/* CSS Variables - Polly.be exact colors */
/* Updated: 2025-10-14 - Force cache refresh */
:root {
    --color-primary: #6B5EF6;  /* Purple from Polly */
    --color-primary-dark: #5A4FE3;  /* Darker purple */
    --color-primary-light: #8B7FF8;  /* Lighter purple */
    --color-secondary: #7C6FFA;  /* Secondary purple */
    --color-bg-gradient-start: #E8E6F5;  /* Light purple-gray background */
    --color-bg-gradient-end: #F5F4FA;  /* Very light purple-white */
    --color-text: #1A1651;  /* Dark navy text */
    --color-text-secondary: #4A4570;  /* Medium purple-gray */
    --color-text-light: #7C7A8C;  /* Light gray */
    --color-bg: #FFFFFF;
    --color-bg-soft: #F7F6FB;  /* Very soft purple-white */
    --color-bg-light: #EFEEF5;  /* Light purple-gray background */
    --color-border: rgba(107, 94, 246, 0.15);
    --color-border-light: rgba(107, 94, 246, 0.08);
    --color-overlay: rgba(26, 22, 81, 0.5);
    --color-error: #EF4444;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-info: #3B82F6;
    
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    
    --transition-base: 0.3s ease;
    --transition-fast: 0.2s ease;
    
    --container-width: 1200px;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed navbar */
    overflow-x: hidden; /* Prevent horizontal scroll on entire page */
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: linear-gradient(180deg, var(--color-bg-gradient-end) 0%, var(--color-bg) 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%; /* Ensure body is constrained */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 28px; }
h4 { font-size: 24px; }
h5 { font-size: 20px; }
h6 { font-size: 18px; }

p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-secondary);
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(107, 94, 246, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0 var(--spacing-xs) 0;
    width: 100%; /* Ensure full width containment */
    gap: var(--spacing-xl); /* Add gap between elements */
}

/* Second navigation row: Language Switcher + Coop Login */
.nav-secondary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0 var(--spacing-md) 0;
    width: 100%;
}

/* Coop login button in nav-secondary */
.nav-secondary .nav-cta {
    background: var(--color-primary);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(107, 94, 246, 0.3);
}

.nav-secondary .nav-cta:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.5px;
    flex-shrink: 0; /* Prevent logo from shrinking */
}

.logo-accent {
    color: var(--color-text);
    font-weight: 400;
}

/* Navigation right side - contains menu + language switcher */
.nav-wrapper > .nav-menu,
.nav-wrapper > #languageSwitcher {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex; /* Visible on desktop by default */
    list-style: none;
    gap: var(--spacing-lg);
    flex: 0 1 auto; /* Allow menu to shrink if needed */
    margin: 0; /* Remove margins */
}

.nav-menu a {
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: inline-block;
    white-space: nowrap;
    position: relative;
    padding-bottom: 8px; /* Add space for underline */
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.nav-menu a.active {
    color: var(--color-primary);
    color: #6B5EF6; /* Fallback if CSS variable doesn't load */
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 16px; /* Fallback for var(--spacing-sm) */
    left: var(--spacing-sm);
    right: 16px; /* Fallback for var(--spacing-sm) */
    right: var(--spacing-sm);
    height: 3px;
    background: #6B5EF6; /* Fallback if CSS variable doesn't load */
    background: var(--color-primary);
    border-radius: 2px;
    display: block; /* Ensure it's displayed */
}

.nav-menu a.nav-cta {
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    /* Move to floating position on desktop only */
    font-size: 14px;
    white-space: nowrap;
}

/* Desktop: Hide mobile-only items and show nav-secondary */
@media (min-width: 769px) {
    .mobile-only,
    .mobile-only-inline {
        display: none !important;
    }
}

.nav-menu a.nav-cta:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    width: 24px;
    height: 3px;
    background: var(--color-text);
    margin: 3px 0;
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* Hero Section */
.hero {
    position: relative;
    padding: var(--spacing-xxl) 0;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Page Header - Consistent across all pages */
.page-header {
    position: relative;
    padding: 80px 0 60px;
    background: linear-gradient(135deg, var(--color-bg-soft) 0%, var(--color-bg) 100%);
    overflow: hidden;
}

.page-header .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(107, 94, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(107, 94, 246, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 48px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 16px;
    line-height: 1.2;
}

.page-header .lead {
    font-size: 20px;
    color: var(--color-text-secondary);
    margin: 0;
    font-weight: 400;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-bg-gradient-start) 0%, var(--color-bg-gradient-end) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
}

.text-accent {
    color: var(--color-primary);
    font-weight: 700;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(107, 94, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 94, 246, 0.4);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

/* Sections */
.section {
    padding: var(--spacing-xxl) 0;
}

.section-title {
    font-size: 42px;
    margin-bottom: var(--spacing-xl);
}

.bg-light {
    background: var(--color-bg-soft);
}

.text-center {
    text-align: center;
}

.lead {
    font-size: 20px;
    color: var(--color-text-secondary);
}

/* Grid */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Cards */
.card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.card-icon svg {
    stroke: white;
}

.card h3 {
    margin-bottom: var(--spacing-sm);
}

/* Benefit Cards */
.benefit-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.benefit-card .benefit-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #F9F8FF, #F0EDFF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.benefit-card h3 {
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.benefit-card ul {
    list-style: none;
    padding-left: 0;
}

.benefit-card ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 4px;
}

.benefit-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: bold;
}

/* Member Cards */
.member-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--color-border-light);
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.member-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-sm);
}

.member-card h4 {
    margin-bottom: var(--spacing-xs);
}

.member-card p {
    font-size: 14px;
}

/* Investment Box */
.investment-box {
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-soft) 100%);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(107, 94, 246, 0.15);
}

.investment-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.investment-item {
    text-align: center;
}

.investment-label {
    display: block;
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xs);
}

.investment-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
}

.investment-note {
    background: var(--color-bg-soft);
    border-left: 4px solid var(--color-primary);
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    border-radius: var(--radius-sm);
    color: var(--color-text);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--color-bg-gradient-start) 0%, var(--color-bg-gradient-end) 100%);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}

/* Trust Signals Section */
.trust-signals {
    padding: var(--spacing-xl) 0;
}

.trust-row {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xxl);
    flex-wrap: wrap;
}

.compliance-badges {
    margin-bottom: var(--spacing-xl);
}

.compliance-item {
    flex: 1;
    max-width: 300px;
}

.kbo-badge, .fsma-notice {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--color-primary);
    position: relative;
    overflow: hidden;
}

.kbo-badge::before, .fsma-notice::before {
    content: '✓';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background: var(--color-success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.kbo-badge strong, .fsma-notice strong {
    display: block;
    color: var(--color-primary);
    font-size: 18px;
    margin-bottom: var(--spacing-sm);
}

.kbo-badge p, .fsma-notice p {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: var(--spacing-sm) 0;
}

.kbo-badge small, .fsma-notice small {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.partners-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
}

.partner-logos {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.partner-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.partner-logo {
    height: 60px;
    width: auto;
    max-width: 180px;
    margin-bottom: var(--spacing-sm);
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all var(--transition-base);
    object-fit: contain;
}

.partner-item:hover .partner-logo {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.partner-item span {
    display: block;
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-top: var(--spacing-sm);
}

/* Partner logo specific styling */
.partner-item img[alt="Belfius"] {
    max-width: 150px;
    height: auto;
    max-height: 60px;
}

.partner-item svg.partner-logo.edson-logo {
    width: 180px;
    height: 60px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .trust-row {
        flex-direction: column;
        align-items: center;
    }
    
    .compliance-item {
        max-width: 100%;
        margin-bottom: var(--spacing-md);
    }
    
    .partner-logos {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary-dark) 100%);
    color: var(--color-bg);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xxl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3,
.footer-section h4 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    color: var(--color-bg);
    opacity: 0.8;
}

.footer-section a:hover {
    color: var(--color-primary);
    opacity: 1;
}

.footer-section p {
    color: var(--color-bg);
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    opacity: 0.6;
}

/* Image Styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.image-rounded {
    border-radius: var(--radius-lg);
}

.image-shadow {
    box-shadow: var(--shadow-lg);
}

.image-showcase {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.image-showcase:hover {
    transform: scale(1.05);
}

/* Responsive */
/* Medium screens - reduce spacing before mobile breakpoint */
@media (max-width: 1024px) {
    .nav-menu {
        gap: var(--spacing-sm); /* Reduce gap */
    }

    .nav-wrapper {
        gap: var(--spacing-sm); /* Reduce gap in wrapper */
    }

    .nav-menu a {
        font-size: 14px;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 36px; }
    h2 { font-size: 28px; }
    h3 { font-size: 24px; }

    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .nav-wrapper {
        flex-wrap: wrap;
        position: relative;
        min-height: 60px;
        align-items: center;
    }
    
    .nav-menu {
        display: none !important; /* Hidden by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg);
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-md);
        margin-left: 0;
        z-index: 1000;
    }

    .nav-menu.active {
        display: flex !important;
    }

    /* Hide nav-secondary on mobile */
    .nav-secondary {
        display: none !important;
    }

    /* Show mobile language switcher in nav-wrapper */
    #languageSwitcherMobile {
        position: absolute;
        right: 60px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 100;
        display: flex !important;
    }
    
    /* Language switcher buttons on mobile */
    #languageSwitcher button {
        padding: 4px 8px;
        font-size: 14px;
    }
    
    /* Move Coop login inside menu on mobile */
    .nav-menu .nav-cta {
        margin-top: var(--spacing-sm);
        width: 100%;
        text-align: center;
    }
    
    .investment-value {
        font-size: 24px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}

/* Modern Form Styling */
.form-group {
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: all var(--transition-base);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E8E8F0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9CA3AF;
    font-size: 15px;
}

.form-group input:hover:not(:focus):not(:disabled),
.form-group select:hover:not(:focus):not(:disabled),
.form-group textarea:hover:not(:focus):not(:disabled) {
    border-color: #D1D1E0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(107, 94, 246, 0.12), 0 2px 8px rgba(107, 94, 246, 0.15);
    background: white;
    transform: translateY(-1px);
}

/* Select dropdown styling */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-group select:focus {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B5EF6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Textarea styling */
.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

/* Form Error States */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--color-error) !important;
    background: #FFF5F5 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-error,
.error-message,
.error-state {
    color: var(--color-error);
    font-size: 14px;
    margin-top: 6px;
    display: none;
    background: #FEF2F2;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 4px solid var(--color-error);
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}

.form-group.error .form-error,
.error-message.show,
.error-state[style*="display: block"] {
    display: block;
    animation: errorShake 0.3s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Modern checkbox styling */
input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #E8E8F0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin-right: 8px;
    flex-shrink: 0;
    vertical-align: middle;
}

input[type="checkbox"]:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:hover:not(:checked) {
    border-color: #D1D1E0;
    background: #F9FAFB;
}

/* Modern radio styling */
input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #E8E8F0;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin-right: 8px;
    flex-shrink: 0;
    vertical-align: middle;
}

input[type="radio"]:checked {
    border-color: var(--color-primary);
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
}

input[type="radio"]:hover:not(:checked) {
    border-color: #D1D1E0;
    background: #F9FAFB;
}

/* Checkbox and radio label styling */
.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    transition: all var(--transition-base);
}

.checkbox-label:hover,
.radio-label:hover {
    color: var(--color-primary);
}

/* Disabled state */
.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: #F9FAFB;
    border-color: #E8E8F0;
    color: #9CA3AF;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Form Validation States */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--color-error) !important;
    background-color: #FFF5F5;
}

.form-group.error .error-message {
    display: block !important;
    color: var(--color-error);
    font-size: 14px;
    margin-top: 4px;
    animation: slideDown 0.3s ease-out;
}

.form-group.success input,
.form-group.success select {
    border-color: var(--color-success) !important;
    background-color: #F0FFF4;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for validation */
.form-group input:focus:invalid,
.form-group select:focus:invalid {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.form-group input:focus:valid:not([type="checkbox"]):not([type="radio"]),
.form-group select:focus:valid {
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Disabled button state */
.btn:disabled,
.btn.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading spinner for buttons */
.btn[data-submitting="true"] {
    position: relative;
    pointer-events: none;
}

.btn[data-submitting="true"]::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    right: 20px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Page Load Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply animations to page elements */
.page-header h1 {
    animation: fadeInUp 0.6s ease-out;
}

.page-header .lead {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-content {
    animation: slideInLeft 0.8s ease-out;
}

/* Staggered card animations */
.animate-cards .card:nth-child(1),
.animate-cards .member-card:nth-child(1) { 
    animation: fadeInUp 0.6s ease-out 0.1s both;
}
.animate-cards .card:nth-child(2),
.animate-cards .member-card:nth-child(2) { 
    animation: fadeInUp 0.6s ease-out 0.2s both;
}
.animate-cards .card:nth-child(3),
.animate-cards .member-card:nth-child(3) { 
    animation: fadeInUp 0.6s ease-out 0.3s both;
}
.animate-cards .card:nth-child(4),
.animate-cards .member-card:nth-child(4) { 
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* Tooltip for validation errors */
.validation-tooltip {
    position: absolute;
    background: var(--color-error);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.validation-tooltip.show {
    opacity: 1;
}

/* Success checkmark animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Success message animation */
@keyframes successPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.form-success {
    animation: successPulse 0.5s ease-out;
}

/* Loading spinner for form submissions */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

.success-checkmark {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 0.5s ease-out forwards;
}

/* Modal Styles for Document Viewer */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    padding: 20px;
    overflow: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease;
}

.modal-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--color-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--color-error);
    color: white;
}

.modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 100%;
        height: 95vh;
    }
    
    .modal-header {
        padding: var(--spacing-sm);
    }
}

/* Consent Items Styling */
.consent-section {
    margin: var(--spacing-lg) 0;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
    gap: 12px;
}

.consent-item input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.consent-item label {
    flex: 1;
    line-height: 1.6;
    font-size: 1rem;
    color: var(--color-text);
    cursor: pointer;
    user-select: none;
    word-spacing: normal;
    letter-spacing: normal;
}

.consent-item label strong {
    font-weight: 600;
    color: var(--color-primary);
}}

/* ============================================
   MOBILE RESPONSIVENESS FIXES
   ============================================ */

/* Ensure minimum touch targets for all interactive elements */
.btn, 
.btn-primary, 
.btn-secondary, 
.btn-action,
button,
input[type="submit"],
input[type="button"],
.mobile-toggle,
.nav-links a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Fix small action buttons in admin */
.btn-action {
    padding: 10px 16px !important;
    font-size: 14px;
}

/* Responsive tables */
.data-table,
table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

@media (max-width: 768px) {
    /* Make tables scrollable on mobile */
    .table-wrapper,
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Better modal experience on mobile */
    .modal-content {
        width: 95%;
        max-width: 100%;
        height: 90vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 10px 10px 0 0;
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Optimize form layouts for mobile */
    .form-row,
    .address-row {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .form-row > *,
    .address-row > * {
        width: 100% !important;
    }
    
    /* Improve navigation touch targets */
    .nav-links {
        padding: 0;
    }
    
    .nav-links li a {
        padding: 15px 20px;
        display: block;
        width: 100%;
    }
    
    /* Fix hamburger menu touch target */
    .mobile-toggle {
        width: 44px;
        height: 44px;
        padding: 10px;
    }
    
    /* Better spacing for mobile forms */
    .form-group {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Larger input fields on mobile */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Stack payment methods vertically on mobile */
    .payment-methods {
        flex-direction: column;
    }
    
    .payment-method {
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }
    
    /* Improve card layouts on mobile */
    .share-option,
    .member-card {
        padding: var(--spacing-lg);
    }
    
    /* Fix admin dashboard for mobile */
    .admin-container {
        padding: var(--spacing-md);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Make admin action buttons more touch-friendly */
    .actions-cell {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .actions-cell .btn-action {
        flex: 1;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile optimizations */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .container {
        padding: var(--spacing-md);
    }
    
    /* Stack all grid layouts on small mobile */
    .grid,
    .features-grid,
    .benefits-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Full-width buttons on small mobile */
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Simplify progress steps on mobile */
    .progress-step {
        padding: 8px 12px;
    }
    
    .progress-step span {
        display: none; /* Hide labels, keep only numbers */
    }
    
    .progress-step.active span {
        display: inline; /* Show current step label */
    }
}

/* Ensure touch-friendly checkboxes and radios */
input[type="checkbox"],
input[type="radio"] {
    min-width: 24px;
    min-height: 24px;
    cursor: pointer;
}

/* Fix overlapping elements on mobile */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .floating-cta {
        bottom: 20px;
        right: 20px;
        left: 20px;
        width: auto;
    }
}

/* Improve table readability on mobile with card layout */
@media (max-width: 640px) {
    .responsive-table tbody tr {
        display: block;
        margin-bottom: var(--spacing-md);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        padding: var(--spacing-md);
    }
    
    .responsive-table tbody td {
        display: block;
        text-align: right;
        padding: 8px;
        position: relative;
        padding-left: 50%;
    }
    
    .responsive-table tbody td:before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        font-weight: 600;
        text-align: left;
    }
    
    .responsive-table thead {
        display: none;
    }
}

/* Print styles for mobile */
@media print {
    .no-print,
    .mobile-toggle,
    .nav-links,
    .btn-action {
        display: none !important;
    }
}
