/* assets/css/components.css */

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    /* Slightly slimmer for class */
    background: var(--white);
    /* Solid white to match logo background */
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 40px;
    /* Slightly more refined logo size */
    width: auto;
    display: block;
}

/* Navbar Links - Desktop */
.nav-links {
    display: flex;
    gap: 2rem;
}

.mobile-nav-cta {
    display: none;
    /* Hide by default on desktop */
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--brand-primary);
}

/* Mobile Menu Toggle (Hidden on Desktop) */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1100;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #042f2e;
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile Nav Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Nav Panel - Enterprise Design */
@media (max-width: 1024px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        z-index: 1001;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 0;
        padding: 0;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
    }

    .nav-links.mobile-active {
        right: 0;
    }

    /* Branded Header in Nav Panel */
    .nav-links::before {
        content: 'Menu';
        display: flex;
        align-items: center;
        justify-content: flex-start;
        height: 72px;
        min-height: 72px;
        padding: 0 1.5rem;
        background: var(--brand-dark);
        color: var(--white);
        font-family: var(--font-heading);
        font-size: 1.25rem;
        font-weight: 600;
        border-bottom: 3px solid var(--brand-accent);
    }

    /* Navigation Links Styling */
    .nav-links a {
        display: flex;
        align-items: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-main);
        border-bottom: 1px solid var(--border);
        text-align: left;
        font-family: var(--font-body);
        min-height: 52px;
        transition: background 0.2s ease, border-left 0.2s ease;
    }

    .nav-links a:hover,
    .nav-links a:active {
        background: var(--bg-alt);
    }

    .nav-links a.active {
        color: var(--brand-primary);
        border-left: 3px solid var(--brand-primary);
        background: rgba(0, 119, 182, 0.05);
        font-weight: 600;
    }

    /* Mobile CTA in Nav Panel */
    .mobile-nav-cta {
        display: block;
        /* Show on mobile */
        margin-top: auto;
        padding: 1.5rem;
        border-top: 1px solid var(--border);
        background: var(--bg-alt);
    }

    .mobile-nav-cta .btn {
        width: 100%;
        justify-content: center;
    }

    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex !important;
        margin-left: 1rem;
        order: 3;
        /* Position rightmost */
    }

    /* Animate Hamburger to X */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

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

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    /* Navbar Flex Order for Mobile */
    .navbar .container {
        justify-content: space-between;
    }

    .logo {
        order: 1;
        flex: 1;
        /* Allow logo to take space but keep others visible */
    }

    /* Hide desktop CTA in navbar? NO, User wants it visible */
    .nav-cta {
        display: block !important;
        /* Force show */
        order: 2;
        margin-left: auto;
        /* Push to right, before toggle */
    }

    .nav-cta .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
        min-height: 36px;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    /* Classy small caps/size */
    font-weight: 700;
    border-radius: var(--radius-md);
    /* 8px rounding */
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-medium) 100%);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-pink) 0%, var(--brand-orange) 100%);
    /* Fun colorful hover */
    box-shadow: 0 0 15px rgba(242, 95, 92, 0.4);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-outline:hover {
    background: var(--brand-primary);
    color: var(--white);
}

/* Cards */
.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    /* 16px rounding */
    border: 1px solid var(--border);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

/* Top accent bar for classy categorization */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-accent), var(--brand-pink), var(--brand-orange));
    /* Colorful top bar */
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card:hover {
    transform: translateY(-4px);
    /* Subtler lift for class */
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(13, 148, 136, 0.1);
    border-color: var(--brand-primary);
}

.card:hover::after {
    transform: scaleX(1);
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--white) 100%);
    border: 1px solid var(--brand-accent);
    /* Cyan border */
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card h3 {
    margin-bottom: 0.75rem;
    color: var(--brand-dark);
    /* Using Deepest Teal */
    font-size: 1.25rem;
    /* Standardized H3 */
}

.card p {
    color: var(--text-muted);
    font-size: 1rem;
    /* Standardized Body */
    line-height: 1.6;
}

/* Footer */
footer {
    background: var(--bg-footer);
    color: rgba(255, 255, 255, 0.8);
    /* Lighter text for dark bg */
    padding: 5rem 0;
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    text-align: left;
    margin-bottom: 4rem;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1.5rem;
}

.footer-tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

footer h4 {
    color: var(--brand-accent);
    /* Cyan for headers */
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 700;
}

.footer-links {
    list-style: none;
    padding: 0;
    font-size: 0.875rem;
    line-height: 2;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--brand-pink);
    /* Pink hover */
    text-shadow: none;
}

.footer-bottom {
    border-top: 1px solid rgba(13, 148, 136, 0.2);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: var(--white);
    margin: 0;
    max-width: 60%;
}

.footer-legal {
    display: flex;
    gap: 2rem;
    font-size: 0.75rem;
}

.footer-legal a {
    color: var(--white);
}

.footer-legal a:hover {
    color: var(--brand-orange);
}

/* Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.stat-item {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--brand-dark);
    /* Dark text for value */
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.stat-item p {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--brand-pink);
    /* Pink Label */
    margin-bottom: 0;
    font-family: var(--font-mono);
}

/* Steps / Journey */
.step-card {
    position: relative;
    background: var(--bg-alt);
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.step-card:hover {
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.step-num {
    position: absolute;
    top: -1.5rem;
    left: 2.5rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--brand-primary);
    color: var(--white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
    box-shadow: var(--shadow-md);
}

.step-card h4 {
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.step-card hr {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.step-meta {
    font-size: 0.8125rem;
    color: var(--brand-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-mono);
}

/* Grids */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1024px) {

    .grid-4,
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-4,
    .grid-3,
    .grid-2,
    .stats-container {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }

    /* ========== COMPACT MOBILE FOOTER ========== */
    footer {
        padding: 2rem 0 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 1rem;
        text-align: left;
        margin-bottom: 1.5rem;
    }

    /* Logo section spans full width */
    .footer-grid>div:first-child {
        grid-column: 1 / -1;
        text-align: center;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 0.5rem;
    }

    .footer-logo {
        margin: 0 auto 0.75rem;
        height: 32px;
    }

    .footer-tagline {
        display: none;
        /* Hide on mobile for compactness */
    }

    footer h4 {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .footer-links {
        line-height: 1.6;
        font-size: 0.8125rem;
    }

    .footer-links li {
        margin-bottom: 0.25rem;
    }

    .footer-links a {
        padding: 0.25rem 0;
        display: inline-block;
        min-height: 36px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding-top: 1rem;
        margin-top: 0;
    }

    .footer-bottom p {
        font-size: 0.6875rem;
        opacity: 0.7;
    }

    .footer-legal {
        justify-content: center;
        gap: 1rem;
    }

    .footer-legal a {
        font-size: 0.6875rem;
    }
}

/* Small phones - even more compact */
@media (max-width: 576px) {
    footer {
        padding: 1.5rem 0 1rem;
    }

    .footer-grid {
        gap: 1rem 0.75rem;
    }

    footer h4 {
        font-size: 0.6875rem;
    }

    .footer-links {
        font-size: 0.75rem;
    }

    .footer-links a {
        min-height: 32px;
    }
}

/* ========== TOUCH INTERACTION OPTIMIZATION ========== */

/* Minimum touch target size (44px per Apple/Google guidelines) */
.btn {
    min-height: 44px;
}

.nav-links a {
    min-height: 48px;
    display: flex;
    align-items: center;
}

.footer-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* Active/pressed states for touch feedback */
.btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.card:active {
    transform: scale(0.99);
}

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

/* Reduce animations for accessibility and performance */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Hide decorative background on mobile for performance */
@media (max-width: 768px) {
    body {
        background-image: none;
    }

    .background-shapes {
        display: none;
    }
}