/* ==========================================================================
   CSS Variables & Basic Reset
   ========================================================================== */
:root {
    /* Kassala Farm ERP Colors */
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --primary-ultralight: #E8F5E9;
    
    --secondary: #FF8F00; /* Warm accent for CTA */
    --secondary-dark: #FF6F00;
    
    --text-main: #333333;
    --text-muted: #666666;
    --text-light: #ffffff;
    
    --bg-main: #ffffff;
    --bg-light: #F8F9FA;
    --bg-dark: #212529;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 15px 30px rgba(46, 125, 50, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 25px;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Tajawal', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    overflow-x: hidden;
}

body {
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-white { color: var(--text-light) !important; }
.text-primary { color: var(--primary) !important; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.w-100 { width: 100%; }

.subtitle {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    background: var(--primary-ultralight);
    padding: 5px 15px;
    border-radius: 20px;
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 15px 35px;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(27, 94, 32, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--text-light);
    transform: translateY(-3px);
}

.btn-white {
    background-color: var(--text-light);
    color: var(--primary-dark);
}

.btn-white:hover {
    background-color: var(--primary-ultralight);
    transform: translateY(-3px);
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
    padding: 15px 0;
}

.header.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.logo i {
    color: var(--primary);
    font-size: 1.8rem;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 3px;
    background-color: var(--primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    padding-top: 150px;
    padding-bottom: 150px;
    background: linear-gradient(135deg, var(--primary-ultralight) 0%, rgba(255,255,255,1) 100%);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text .highlight {
    color: var(--primary);
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

.badge {
    background: rgba(46, 125, 50, 0.1);
    color: var(--primary-dark);
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 15px;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

/* Abstract Graphics for Hero */
.hero-image {
    position: relative;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 300px;
    position: relative;
    z-index: 3;
    transform: rotate(-5deg);
    animation: floating 4s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
    100% { transform: translateY(0px) rotate(-5deg); }
}

.icon-pulse {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 15px auto;
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.glass-card h3 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.wave-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.wave-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.wave-bottom .shape-fill {
    fill: #ffffff;
}

/* ==========================================================================
   Sections Standard Styles
   ========================================================================== */
.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: -80px; /* Pull up into hero slightly */
    position: relative;
    z-index: 5;
}

.feature-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--primary);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-ultralight);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px auto;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: white;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-img-box {
    width: 300px;
    height: 300px;
    background: var(--primary);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
    animation: morph 8s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    33% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    66% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    z-index: 1;
}

.blob-1 {
    width: 250px;
    height: 250px;
    background: var(--primary-light);
    opacity: 0.3;
    top: 10%;
    right: 10%;
}

.blob-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    opacity: 0.2;
    bottom: 10%;
    left: 10%;
}

.about-list {
    margin: 20px 0;
}

.about-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

.about-list i {
    color: var(--primary);
    background: var(--primary-ultralight);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* ==========================================================================
   Products Section
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-img {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.product-info p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta {
    position: relative;
    background: url('hero-bg.jpg') center/cover fixed;
    background-color: var(--primary-dark); /* Fallback */
    color: white;
    padding: 100px 0;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(27, 94, 32, 0.95), rgba(46, 125, 50, 0.85));
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: white;
}

.cta-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.info-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.info-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(-5px);
}

.info-box .icon-box {
    width: 60px;
    height: 60px;
    background: var(--primary-ultralight);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-box h4 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.glass-form {
    background: #fff;
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.05);
}

.glass-form h3 {
    margin-bottom: 25px;
    color: var(--primary-dark);
    font-size: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ultralight);
    background: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-brand p {
    margin-top: 15px;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a:hover {
    color: var(--primary);
    padding-right: 5px;
}

.footer-hours ul li {
    margin-bottom: 10px;
}

.footer-bottom {
    background-color: rgba(0,0,0,0.2);
    padding: 20px 0;
    text-align: center;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .title {
        font-size: 2rem;
    }
    
    .hero-content, 
    .about-container, 
    .contact-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        display: none; /* Hide abstract image on small screens for brevity */
    }

    .hero-text {
        text-align: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
        margin-top: 0;
    }

    .about-image {
        margin-bottom: 40px;
    }

    .about-list li {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer h4::after {
        left: 50%;
        transform: translateX(15px);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .info-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-list {
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        gap: 0;
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: var(--transition);
        border-top: 1px solid #eee;
    }
    
    .nav-list.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .nav-list li {
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        display: block;
        padding: 15px;
        border-bottom: 1px solid #f9f9f9;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .hero {
        padding-top: 120px;
        padding-bottom: 80px;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-btns {
        flex-direction: column;
    }
}
