/* ==========================================================================
   TLC Website 3.0 - Main Stylesheet
   Mobile-First Responsive Design with Dark/Light Mode
   ========================================================================== */

/* CSS Reset & Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Custom Properties for Theme Variables */
:root {
    /* Enhanced Color Palette - Light Mode */
    --primary-color: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --primary-gradient: linear-gradient(135deg, #2E7D32 0%, #4CAF50 50%, #81C784 100%);
    --secondary-color: #FF6F00;
    --secondary-dark: #E65100;
    --secondary-light: #FFB74D;
    --secondary-gradient: linear-gradient(135deg, #FF6F00 0%, #FFB74D 50%, #FFCC80 100%);
    --accent-color: #00BCD4;
    --accent-dark: #0097A7;
    --accent-light: #4DD0E1;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --error-color: #F44336;
    --info-color: #2196F3;
    
    /* Enhanced Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #E8F5E8;
    --bg-card: #FFFFFF;
    --bg-hero: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
    --bg-hero-alt: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #4CAF50 100%);
    --bg-glass: rgba(255, 255, 255, 0.1);
    --bg-glass-border: rgba(255, 255, 255, 0.2);
    --bg-pattern: radial-gradient(circle at 20% 50%, rgba(46, 125, 50, 0.1) 0%, transparent 50%),
                   radial-gradient(circle at 80% 80%, rgba(255, 111, 0, 0.1) 0%, transparent 50%),
                   radial-gradient(circle at 40% 20%, rgba(0, 188, 212, 0.1) 0%, transparent 50%);
    
    /* Text Colors */
    --text-primary: #212121;
    --text-secondary: #616161;
    --text-muted: #9E9E9E;
    --text-inverse: #FFFFFF;
    
    /* Enhanced Border & Shadow */
    --border-color: #E0E0E0;
    --border-light: rgba(46, 125, 50, 0.2);
    --border-accent: rgba(255, 111, 0, 0.3);
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(46, 125, 50, 0.3);
    --shadow-accent: 0 0 20px rgba(255, 111, 0, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-nav: 0 4px 20px rgba(0, 0, 0, 0.12);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', var(--font-primary);
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Enhanced Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-elastic: 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-tooltip: 1060;
}

/* Dark Mode Theme */
[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1E1E1E;
    --bg-tertiary: #2D2D2D;
    --bg-card: #1E1E1E;
    --bg-hero: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    
    --text-primary: #E0E0E0;
    --text-secondary: #BDBDBD;
    --text-muted: #757575;
    --text-inverse: #121212;
    
    --border-color: #333333;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Base Typography */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    /* Prevent horizontal overflow on mobile */
    overflow-x: hidden;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    /* Prevent long words from breaking layout */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    /* Prevent long words from breaking layout */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-md);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -var(--space-sm);
    /* Stack columns vertically on mobile */
    flex-direction: column;
}

.col {
    flex: 1;
    padding: var(--space-md) var(--space-sm);
    min-width: 0;
    /* Full width on mobile for better readability */
    width: 100%;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-md);
}

/* Mobile-first: stack everything vertically */
.grid-2,
.grid-3,
.grid-4 { 
    grid-template-columns: 1fr;
}

/* Enhanced Header & Navigation */
.header {
    background: var(--bg-card);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-nav);
}

[data-theme="dark"] .header.scrolled {
    background: rgba(18, 18, 18, 0.95);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    position: relative;
    z-index: 1;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-smooth);
    position: relative;
}

.navbar-brand:hover {
    transform: scale(1.05);
    color: var(--primary-dark);
}

.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-gradient);
    transition: width var(--transition-smooth);
}

.navbar-brand:hover::after {
    width: 100%;
}

.navbar-logo {
    height: 40px;
    width: auto;
    display: block;
}

.brand-short {
    display: inline-block;
}

.brand-text {
    display: none;
    font-size: 0.95rem;
    font-weight: 600;
}

@media (max-width: 640px) {
    .brand-text {
        display: inline-block;
    }

    .brand-short {
        display: none;
    }
}

.navbar-nav {
    display: none;
    list-style: none;
    align-items: center;
    gap: var(--space-lg);
}

.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    position: relative;
}

.dropdown-toggle::after {
    content: "▾";
    font-size: 0.75em;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + var(--space-xs));
    left: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: var(--space-sm) 0;
    z-index: 1000;
    margin-top: 4px;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block;
}

.dropdown-link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    margin: 0 var(--space-xs);
}

.dropdown-link:hover,
.dropdown-link.active {
    color: var(--primary-color);
    background-color: var(--bg-tertiary);
    text-decoration: none;
}

.navbar-nav.active {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    padding: var(--space-lg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    z-index: calc(var(--z-dropdown) + 5);
    margin-top: 4px;
}

.navbar-nav.active .dropdown-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: var(--space-xs) 0 var(--space-sm) var(--space-md);
}

.navbar-nav.active .dropdown-link {
    margin: 0;
    padding-left: 0;
}

@media (max-width: 768px) {
    .nav-item.dropdown {
        width: 100%;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: var(--space-sm) var(--space-md);
        border-radius: var(--radius-sm);
    }

    .dropdown-toggle:focus,
    .dropdown-toggle:hover {
        background-color: var(--bg-tertiary);
    }

    .navbar-nav.active .dropdown-menu {
        margin: var(--space-xs) 0 var(--space-sm) var(--space-md);
        padding-left: var(--space-sm);
        border-left: 2px solid var(--border-color);
    }

    .navbar-nav.active .dropdown-menu li {
        list-style: none;
    }

    .navbar-nav.active .dropdown-link {
        padding: var(--space-xs) 0;
        font-weight: 500;
    }
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    background-color: var(--bg-tertiary);
    text-decoration: none;
}

.navbar-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background-color: var(--bg-secondary);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-tertiary);
}

/* Enhanced Hero Section */
.hero {
    background: var(--bg-hero);
    color: var(--text-inverse);
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-attachment: fixed;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    transition: all var(--transition-slow);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-pattern);
    opacity: 0.5;
    z-index: 1;
    animation: floatPattern 20s ease-in-out infinite;
}

@keyframes floatPattern {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20px, -20px) scale(1.05); }
    66% { transform: translate(20px, -10px) scale(0.95); }
}


@keyframes heroContentFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* Light mode: Add dark overlay for text contrast */
:root:not([data-theme="dark"]) .hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(46, 125, 50, 0.55);
    z-index: 0;
}

/* Dark mode: Minimal overlay */
[data-theme="dark"] .hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    z-index: 2;
    pointer-events: none;
}

.hero-home {
    background-image: url('../images/index.engineeringregenerativeafrica.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-home .hero-overlay {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.7) 0%, rgba(76, 175, 80, 0.6) 50%, rgba(255, 111, 0, 0.5) 100%);
    mix-blend-mode: overlay;
}

.hero-agrisense {
    background-image: url('../images/agrisense-hero-1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-agrisense .hero-overlay {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.8) 0%, rgba(76, 175, 80, 0.7) 50%, rgba(255, 111, 0, 0.6) 100%);
    mix-blend-mode: overlay;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    margin: 0 auto;
    animation: heroContentFadeIn 1s ease-out;
}

.hero-title {
    color: var(--text-inverse);
    margin-bottom: var(--space-lg);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)); }
    to { filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.6)); }
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
    animation: subtitleFadeIn 1.2s ease-out 0.3s both;
}

@keyframes subtitleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
    animation: ctaFadeIn 1.4s ease-out 0.6s both;
}

@keyframes ctaFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1rem;
    line-height: 1;
    min-height: 48px;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--secondary-gradient);
    color: white;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 4px 15px rgba(255, 111, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover {
    background: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 111, 0, 0.4);
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-inverse);
    border: 2px solid var(--bg-glass-border);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
    text-decoration: none;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-gradient);
    transition: width var(--transition-smooth);
    z-index: -1;
}

.btn-outline:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-glow);
}

.btn-outline:hover::before {
    width: 100%;
}

/* Enhanced Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: var(--space-xl);
    transition: all var(--transition-smooth);
    border: 1px solid var(--border-color);
    height: 100%;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-smooth);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-light);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-header {
    margin-bottom: var(--space-lg);
}

.card-icon {
    width: 4rem;
    height: 4rem;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    font-size: 1.8rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
    transition: all var(--transition-smooth);
}

.card-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

.card:hover .card-icon::before {
    animation: iconShine 0.6s ease-in-out;
}

@keyframes iconShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); opacity: 0; }
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: var(--space-sm);
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all var(--transition-smooth);
}

.card:hover .card-title {
    transform: translateX(4px);
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.7;
    transition: color var(--transition-smooth);
}

.card:hover .card-text {
    color: var(--text-primary);
}

/* Enhanced Sections */
.section {
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.section:nth-child(even) {
    background: var(--bg-secondary);
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--primary-gradient);
    opacity: 0.3;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.section-title {
    margin-bottom: var(--space-md);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -var(--space-sm);
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-gradient);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: var(--space-lg);
}

/* Enhanced Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-2xl) 0;
    position: relative;
}

.stat-item {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-smooth);
    border: 1px solid var(--border-color);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    z-index: 0;
}

.stat-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.stat-item:hover::before {
    opacity: 0.05;
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
    transition: all var(--transition-smooth);
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
}

.stat-label {
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
    transition: color var(--transition-smooth);
}

.stat-item:hover .stat-label {
    color: var(--primary-color);
}

/* Features List */
.features-list {
    list-style: none;
    margin: var(--space-lg) 0;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
}

.features-list li:hover {
    background-color: var(--bg-secondary);
}

.features-list li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    margin-right: var(--space-md);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Enhanced Footer */
.footer {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: var(--space-3xl);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.footer::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.05;
    border-radius: 50%;
    animation: floatPattern 25s ease-in-out infinite;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    position: relative;
    z-index: 1;
}

.footer-section h3 {
    margin-bottom: var(--space-lg);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary-gradient);
    border-radius: 1px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--space-sm);
}

.footer-section ul li a {
    color: var(--text-secondary);
    transition: all var(--transition-smooth);
    position: relative;
    padding-left: 0;
    display: inline-block;
}

.footer-section ul li a::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all var(--transition-smooth);
    color: var(--secondary-color);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.footer-section ul li a:hover::before {
    left: -20px;
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-lg);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive Design - Mobile (up to 480px) */
@media (max-width: 480px) {
    /* Reduce spacing on very small screens */
    .section {
        padding: var(--space-2xl) 0;
    }
    
    .card {
        padding: var(--space-lg);
    }
    
    .hero {
        padding: var(--space-2xl) 0;
    }
    
    /* Ensure tables/grids don't overflow */
    .grid {
        gap: var(--space-sm);
    }
    
    /* Make buttons full width for better mobile UX */
    .btn {
        width: 100%;
        min-width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    /* Better mobile readability */
    .stat-number {
        font-size: 2rem;
    }
    
    .features-list li {
        padding: var(--space-sm);
        font-size: 0.95rem;
    }
    
    /* Ensure nested rows don't add extra negative margin on mobile */
    .row {
        margin: 0;
    }
    
    .col {
        padding: var(--space-sm) 0;
    }
    
    /* Reduce card margins on mobile */
    .card {
        margin-bottom: var(--space-md);
    }
}

/* Responsive Design - Medium Mobile (481px to 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    /* Buttons can be inline on medium mobile */
    .btn {
        width: auto;
        min-width: 200px;
    }
    
    /* Allow 2-column grids on medium mobile for grid-2 and grid-4 */
    .grid-2,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive Design - Tablet */
@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-lg);
    }
    
    .hero-cta {
        flex-direction: row;
        justify-content: center;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .navbar-nav {
        display: flex;
        position: static;
        background: none;
        box-shadow: none;
        flex-direction: row;
        padding: 0;
    }
    
    .navbar-nav.active {
        display: flex;
    }
    
    /* Make row columns horizontal on tablets and larger */
    .row {
        flex-direction: row;
    }
    
    .col {
        width: auto;
        padding: 0 var(--space-sm);
    }
    
    /* Grid responsive behavior for tablets */
    .grid-2 { 
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 { 
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .grid-4 { 
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer responsive behavior for tablets */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    /* Stats grid better spacing on tablets */
    .stats-grid {
        gap: var(--space-xl);
    }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-xl);
    }
    
    .section {
        padding: var(--space-3xl) 0 var(--space-2xl);
    }
    
    /* Full grid behavior for desktop */
    .grid-3 { 
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-4 { 
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus States */
.btn:focus,
.nav-link:focus,
.theme-toggle:focus,
.mobile-menu-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Advanced Animations & Effects */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInScale {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

/* Enhanced Interactive Elements */

/* Advanced Card Variants */
.card-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--bg-glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card-gradient {
    background: var(--primary-gradient);
    color: white;
}

.card-gradient .card-title,
.card-gradient .card-text {
    color: white;
}

.card-hover-lift:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Enhanced Button Variants */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-glow:hover::before {
    width: 300px;
    height: 300px;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Typography */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shadow-glow {
    text-shadow: 0 0 20px rgba(46, 125, 50, 0.5);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }
/* Brand text styling */
.brand-text {
    display: none;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

@media (max-width: 640px) {
    .brand-text {
        display: inline-block !important;
    }
}

@media (max-width: 768px) {
    .navbar-brand img {
        height: 35px !important;
    }
}

