/* ============================================
   MOBILE NAVIGATION STYLES
   ============================================ */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile menu styles */
@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        overflow-y: auto;
    }
    
    .nav-links.mobile-active {
        right: 0;
    }
    
    .nav-links li {
        width: 100%;
        text-align: left;
    }
    
    .nav-links a {
        display: block;
        padding: 0.8rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links a.nav-cta {
        margin-top: 1rem;
        text-align: center;
        border-bottom: none;
    }
    
    /* Overlay when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* ============================================
   FORM MESSAGE STYLES
   ============================================ */

.form-message {
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.6;
    animation: slideDown 0.3s ease;
    transition: opacity 0.3s ease;
}

.form-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* ============================================
   NAVIGATION SCROLL STYLES
   ============================================ */

.nav-container.scrolled {
    box-shadow: 0 4px 12px rgba(10, 22, 40, 0.15);
}

/* ============================================
   ANIMATION UTILITIES
   ============================================ */

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Staggered animation delays for cards */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }

.feature:nth-child(1) { animation-delay: 0.1s; }
.feature:nth-child(2) { animation-delay: 0.2s; }
.feature:nth-child(3) { animation-delay: 0.3s; }
.feature:nth-child(4) { animation-delay: 0.4s; }

.market-item:nth-child(1) { animation-delay: 0.1s; }
.market-item:nth-child(2) { animation-delay: 0.2s; }
.market-item:nth-child(3) { animation-delay: 0.3s; }
.market-item:nth-child(4) { animation-delay: 0.4s; }

/* ============================================
   LOADING STATES
   ============================================ */

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button[type="submit"]:disabled::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--secondary-gold);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-dark);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .nav-container,
    .hero-ctas,
    .cta-section,
    footer,
    .mobile-menu-toggle {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .hero {
        background: white;
        color: black;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.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; }
.mt-3 { margin-top: 3rem; }

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
