/**
 * Component Styles
 * Navbar, Footer, and other reusable components
 */

/* ========================================
   NAVBAR (Apple-Style)
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* Translucent background with our primary color */
    background-color: rgba(10, 26, 47, 0.8);
    /* Frosted glass effect */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* Subtle bottom border */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* Minimal border */
    transition: background-color var(--duration-normal) var(--ease-smooth),
        padding var(--duration-normal) var(--ease-smooth);
    height: 48px;
    /* Fixed height for sleek look */
    display: flex;
    /* Flex container */
    align-items: center;
    /* Center vertically */
}

/* Scrolled state can be slightly darker/more opaque if needed, 
   but Apple usually keeps it consistent. We'll keep it consistent. */
.navbar.scrolled {
    background-color: rgba(10, 26, 47, 0.9);
    /* Slightly more opaque on scroll */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    /* Subtle shadow on scroll */
}

.navbar .container {
    height: 100%;
    /* Full height of navbar */
    max-width: 1024px;
    /* Constrain width like Apple */
    margin: 0 auto;
    padding: 0 var(--space-4);
    display: flex;
    align-items: center;
    /* Vertically center content */
    justify-content: space-between;
    /* Space out logo and menu */
}

.navbar-content {
    display: contents;
    /* Allow children to be direct children of container */
    width: 100%;
}

.navbar-logo {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    /* Slightly smaller, crisp code/brand font */
    font-weight: 600;
    color: var(--text-inverse);
    /* White text */
    text-decoration: none;
    letter-spacing: -0.01em;
    /* Tight tracking */
    opacity: 0.9;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.navbar-logo:hover {
    opacity: 1;
}

.navbar-menu {
    display: none;
    align-items: center;
    gap: 32px;
    /* Generous spacing */
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

@media (min-width: 1024px) {
    .navbar-menu {
        display: flex;
    }
}

.nav-link {
    font-size: 12px;
    /* Small, crisp text */
    font-weight: 400;
    /* Regular weight */
    color: rgba(255, 255, 255, 0.8);
    /* Slightly transparent white */
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
    letter-spacing: -0.01em;
    position: relative;
    padding: 0 4px;
    /* Touch target breathing room */
}

.nav-link:hover {
    color: #ffffff;
    /* Bright white on hover */
}

/* Apple doesn't usually do underlines, they do simple color shifts. 
   Removing the underline effect for cleaner look. */
.nav-link::after {
    display: none;
}

/* Contact button in navbar - make it text-only or very subtle */
.navbar-menu .btn-sm {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
}

.navbar-menu .btn-sm:hover {
    background: none;
    color: #ffffff;
    box-shadow: none;
    transform: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    /* Above toggle */
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.hamburger {
    position: relative;
    width: 18px;
    /* Smaller, finer lines */
    height: 1px;
    /* Very thin lines */
    background-color: rgba(255, 255, 255, 0.8);
    transition: all var(--duration-normal) var(--ease-smooth);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.8);
    transition: all var(--duration-normal) var(--ease-smooth);
}

.hamburger::before {
    top: -6px;
    /* Tighter spacing */
}

.hamburger::after {
    bottom: -6px;
}

.mobile-menu-toggle:hover .hamburger,
.mobile-menu-toggle:hover .hamburger::before,
.mobile-menu-toggle:hover .hamburger::after {
    background-color: #ffffff;
}

.mobile-menu-toggle.active .hamburger {
    background-color: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 48px;
    /* Below navbar */
    left: 0;
    right: 0;
    height: 0;
    /* Animate height */
    background-color: rgba(10, 26, 47, 0.95);
    /* Opaque background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: height var(--duration-normal) var(--ease-smooth);
    display: block !important;
    /* Always block, rely on height */
}

.mobile-menu.active {
    height: auto;
    /* Allow content to dictate height */
    padding-bottom: var(--space-8);
}

@media (min-width: 1024px) {

    .mobile-menu,
    .mobile-menu.active {
        display: none !important;
    }
}

.mobile-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: var(--space-4) var(--space-4);
    gap: 0;
    /* Remove gap */
}

.mobile-nav-link {
    display: block;
    font-size: 17px;
    /* iOS standard size */
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 12px 0;
    /* Larger touch targets */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* Separators */
    transition: color var(--duration-fast) var(--ease-out);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover {
    color: #ffffff;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background-color: var(--color-bg-secondary);
    padding: var(--space-24) 0 var(--space-8);
    margin-top: var(--space-64);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

.footer-logo {
    font-size: var(--text-h3);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
}

.footer-tagline {
    color: var(--color-text-tertiary);
    font-size: var(--text-body-md);
    max-width: 300px;
}

.footer-heading {
    font-size: var(--text-body-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: var(--text-body-md);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

.footer-links a:hover {
    color: var(--color-accent-primary);
}

.footer-text {
    color: var(--color-text-secondary);
    font-size: var(--text-body-md);
    margin-bottom: var(--space-4);
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border-subtle);
    text-align: center;
}

.footer-copyright {
    color: var(--color-text-tertiary);
    font-size: var(--text-body-sm);
}

/* ========================================
   FLASH MESSAGES
   ======================================== */

.flash-messages {
    position: fixed;
    top: 80px;
    right: var(--space-6);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 400px;
}

.flash-message {
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: var(--text-body-md);
    animation: slideIn var(--duration-normal) var(--ease-smooth);
}

.flash-success {
    background-color: hsl(145, 60%, 95%);
    color: hsl(145, 60%, 25%);
    border-left: 4px solid hsl(145, 60%, 45%);
}

.flash-error {
    background-color: hsl(355, 70%, 95%);
    color: hsl(355, 70%, 25%);
    border-left: 4px solid hsl(355, 70%, 55%);
}

.flash-info {
    background-color: var(--color-accent-light);
    color: var(--color-accent-dark);
    border-left: 4px solid var(--color-accent-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-24) 0;
    background: linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-accent-light) 100%);
}

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

.hero-title {
    margin-bottom: var(--space-6);
}

.hero-subtitle {
    font-size: var(--text-body-xl);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-8);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}