/* ==========================================================================
   Layout Components
   Header, Footer, Hero, Feature Cards
   ========================================================================== */

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background-color: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.header-top {
    background-color: var(--color-primary);
    color: white;
    padding: 0.75rem 0;
}

.header-contacts {
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
    font-size: 0.9rem;
}

.header-phone,
.header-whatsapp {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.header-phone:hover,
.header-whatsapp:hover {
    color: var(--color-accent);
}

.header-main {
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    display: block;
}

.logo-text {
    font-size: 1.75rem;
    color: var(--color-primary);
    margin: 0;
}

.logo-tagline {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin: 0;
}

/* Navigation */
.main-nav {
    position: relative;
}

.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: var(--color-primary);
    height: 3px;
    width: 100%;
    border-radius: 2px;
    position: absolute;
    transition: all var(--transition-base);
}

.nav-toggle-label span::before {
    content: '';
    top: -8px;
}

.nav-toggle-label span::after {
    content: '';
    top: 8px;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: var(--color-text);
    font-weight: 600;
    padding: 0.5rem 1rem;
    display: block;
    border-radius: var(--border-radius);
    transition: all var(--transition-base);
}

.nav-link:hover {
    background-color: var(--color-primary);
    color: white;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .header-contacts {
        justify-content: center;
        gap: 1rem;
        font-size: 0.8rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-toggle-label {
        display: block;
        z-index: 2100; /* ensure toggle is above the fixed menu */
    }

    /* Mobile menu: span the full viewport width and sit below the header.
       Use fixed positioning so the menu is not constrained by the centered .container. */
    .nav-menu {
        position: fixed;
        top: 56px; /* fallback header height for most devices; adjust if needed */
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        width: 100vw; /* ensure full viewport width */
        margin: 0; /* remove any centering margins */
        max-width: none;
        max-height: 0;
        overflow: hidden;
        box-shadow: var(--shadow-lg);
        transition: max-height var(--transition-base), transform var(--transition-base);
        z-index: 2000;
        box-sizing: border-box;
        padding: 0; /* mobile menu items will have internal padding */
        align-items: stretch;
        justify-content: flex-start;
    }

    .nav-toggle:checked ~ .nav-menu {
        max-height: 80vh; /* limit to viewport height */
    }

    .nav-toggle:checked ~ .nav-toggle-label span {
        background: transparent;
    }

    .nav-toggle:checked ~ .nav-toggle-label span::before {
        transform: rotate(45deg);
        top: 0;
    }

    .nav-toggle:checked ~ .nav-toggle-label span::after {
        transform: rotate(-45deg);
        top: 0;
    }

    .nav-link {
        padding: 1rem 1.5rem;
        border-radius: 0;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: var(--color-primary-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--color-accent);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-base);
}

.footer-section a:hover {
    color: var(--color-accent);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    font-size: 1.5rem;
    transition: transform var(--transition-base);
}

.social-links a:hover {
    transform: scale(1.2);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0.5rem;
}

.footer-bottom a:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero-content h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.hero-description {
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ==========================================================================
   Feature Cards
   ========================================================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--color-text-light);
    margin: 0;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
    background-color: var(--color-bg-light);
    text-align: center;
    padding: 4rem 0;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.main-content {
    min-height: 60vh;
}
