/* Skip link removed as per request */

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    /* only animate non-layout properties to avoid height/size jumps */
    transition: background 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
    box-shadow: 0 6px 30px rgba(16,24,40,0.04);
}

.navbar.scrolled {
    /* Keep the shadow and border when scrolled, but avoid changing height/size to prevent layout shift */
    box-shadow: var(--shadow-medium);
    border-bottom-color: var(--glass-border);
    background: var(--glass-bg);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    min-height: 64px; /* Ensure nav-menu height provides space for underline visual */
}

.navbar.scrolled .nav-container {
    /* keep layout sizing identical to default state to avoid any height animation */
    padding: 0 2rem;
}
.navbar.scrolled .contact-btn {
    /* keep CTA shadow but avoid resizing */
    box-shadow: 0 12px 32px rgba(253,215,7,0.14);
}

.logo img {
    height: 44px;
    width: auto;
    transition: transform 220ms ease, height 220ms ease;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative; /* for underline positioning */
    padding-bottom: 12px; /* space for underline */
}

.nav-menu .theme-toggle {
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

.mobile-theme-toggle {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.nav-link {
    position: relative;
    transition: var(--transition);
    display: inline-block;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700; /* stronger weight for better legibility */
    font-size: 1rem; /* slightly larger for clarity */
    letter-spacing: 0.2px;
    text-shadow: 0 1px 0 rgba(0,0,0,0.04);
    border-radius: 10px;
    transition: var(--transition);
}

.nav-link.active {
    color: var(--accent-color);
    font-weight: 800;
}

.nav-link:hover {
    color: var(--accent-color);
    background: var(--nav-hover-bg);
}

/* Remove old pseudo underline behavior (keeps focus/hover highlighting) */
.nav-link::after { display: none; }

/* Moving underline element */
.nav-underline {
    position: absolute;
    height: 4px;
    bottom: -10px;
    left: 0;
    width: 0;
    border-radius: 6px;
    background: linear-gradient(90deg, #FDD707 0%, #F6A514 100%);
    box-shadow: 0 6px 20px rgba(246,165,20,0.15);
    transition: transform 260ms cubic-bezier(0.2,0.9,0.2,1), width 260ms cubic-bezier(0.2,0.9,0.2,1);
    will-change: transform, width;
    pointer-events: none;
}

/* Make sure the underline adapts on smaller screens */
@media (max-width: 768px) {
    .nav-underline { display: none; }
}

.cta-button {
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
    min-height: 48px;
}

/* Global hero CTA layout to ensure consistency across pages */
.hero-cta {
    display: flex;
    gap: 1rem; /* slightly tighter gap to match homepage spacing */
    flex-wrap: wrap;
    justify-content: center;
}

.hero .cta-button {
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    min-height: 48px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    /* Force a consistent hero CTA height across pages (matches homepage visual) */
    height: 56px;
    line-height: 56px;
    box-sizing: border-box;
}

/* Give primary hero CTAs a layered glow (teal + yellow) matching the visual on the homepage */
.hero .cta-button.primary {
    box-shadow: 0 12px 42px rgba(14,159,137,0.14), 0 6px 18px rgba(246,165,20,0.22);
}
.hero .cta-button.primary:hover {
    box-shadow: 0 22px 60px rgba(14,159,137,0.22), 0 10px 30px rgba(246,165,20,0.38);
}

.cta-button.primary {
    background: var(--accent-color);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(246, 165, 20, 0.3);
}

.cta-button svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    box-shadow: 0 4px 15px rgba(246, 165, 20, 0.3);
    border: none;
}

.cta-button.primary:hover {
    background: #FDD707;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(246, 165, 20, 0.4);
}

.cta-button.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
    backdrop-filter: none;
}

.cta-button.secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Loading state for buttons */
.cta-button.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.cta-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== MICRO-INTERACTIONS ===== */
.nav-link {
    position: relative;
    transition: var(--transition);
}

.service-card {
    transition: var(--transition);
}
    .hero .cta-button {
        height: auto;
        line-height: normal;
        padding: 0.9rem 1.2rem;
    }

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

/* Additional micro-interactions */
.cta-button.primary {
    animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { box-shadow: var(--shadow-strong); }
    50% { box-shadow: 0 15px 40px rgba(14, 159, 137, 0.4); }
}

.theme-toggle {
    transition: var(--transition);
}

.theme-toggle:hover {
    animation: rotate 0.6s ease-in-out;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 2rem;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: inherit; /* inherit from .footer so it adapts to light/dark themes */
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: inherit; /* use footer text color for sufficient contrast */
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #a0aec0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.copyright {
    color: #a0aec0;
    font-size: 0.9rem;
    margin: 0;
}

.attribution {
    color: #718096;
    font-size: 0.8rem;
    margin: 0.5rem 0 0 0;
}

.itify-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.itify-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Contact page placeholder note */
.contact-placeholder-note {
    padding: 2rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    color: var(--text-secondary);
    font-size: 0.99rem;
    line-height: 1.6;
    border: 1px solid rgba(255,255,255,0.03);
}

/* Improve heading contrast on dark theme with subtle orangy glow */
[data-theme="dark"] .hero .hero-title,
[data-theme="dark"] .contact-info .section-title {
    color: var(--text-primary);
    text-shadow: 0 8px 28px rgba(246,165,20,0.12), 0 2px 8px rgba(0,0,0,0.5);
}

[data-theme="dark"] .contact-details h3 {
    color: var(--text-primary);
    text-shadow: 0 4px 18px rgba(246,165,20,0.10);
}

/* Slightly brighter contact links in dark mode */
.contact-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

[data-theme="dark"] .contact-link {
    color: #FFD66A; /* lighter orangy tone for legibility */
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-container {
        padding: 0 1rem;
        height: 70px;
    }

    .nav-actions {
        gap: 0.25rem;
    }

    .theme-toggle {
        padding: 0.5rem;
        font-size: 1rem;
        margin-left: 0.25rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid var(--primary-color);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border-radius: var(--border-radius);
        cursor: pointer;
        transition: var(--transition);
        color: var(--text-primary);
    }

    .theme-toggle:hover {
        background: var(--primary-gradient);
        color: white;
        transform: scale(1.05);
        box-shadow: var(--shadow-light);
        border-color: var(--primary-color);
    }

    .mobile-menu-btn {
        padding: 0.5rem;
        min-width: 44px;
        min-height: 44px;
        margin-left: 0.25rem;
        z-index: 1002; /* Higher than mobile menu */
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        height: 70px;
    }

    .logo img {
        height: 35px;
    }

    .cta-button {
        padding: 1rem 1.75rem;
        font-size: 0.9rem;
        min-height: 48px;
    }

    .cta-button svg {
        width: 20px;
        height: 20px;
    }

    .footer {
        padding: 3rem 0 1.5rem;
    }

    .footer .container {
        padding: 0 1rem;
    }
}

.hero .hero-subtitle {
    text-align: center;
    max-width: 500px; /* match homepage for coherent CTA placement */
    margin: 0 auto;
    font-size: 1.25rem;
    color: var(--text-secondary);
}
