/* ================================================
   Beauty Ziv — Layout CSS
   Header, Footer, Navigation, Main Layout
   ================================================ */

/* ═══════════════════════════════════════════════
   PAGE LAYOUT
   ═══════════════════════════════════════════════ */

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding-top: var(--header-height);
}

@media (max-width: 767px) {
    .main-content {
        padding-top: var(--header-height-mobile);
    }
}


/* ═══════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--cream-lightest);
    border-bottom: 1px solid var(--border-light);
    z-index: var(--z-sticky);
    transition: all var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-soft);
    background: rgba(255, 254, 249, 0.95);
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: var(--container-xl);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-4);
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.header-logo-image {
    height: 50px;
    width: auto;
}

.header-logo-text {
    display: flex;
    flex-direction: column;
}

.header-logo-name {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--gold-accessible, #8B6F09);
    letter-spacing: 0.1em;
    line-height: 1;
}

.header-logo-tagline {
    font-size: var(--text-xs);
    color: var(--text-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.nav-link {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-medium);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--gold-accessible, #8B6F09);
    background: rgba(212, 175, 55, 0.08);
}

.nav-link.active {
    color: var(--gold-accessible, #8B6F09);
    background: rgba(212, 175, 55, 0.12);
    font-weight: var(--font-semibold);
}

.nav-link-cta {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: white !important;
    font-weight: var(--font-semibold);
    padding: var(--space-2) var(--space-5);
}

.nav-link-cta:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    order: -1; /* מעביר לצד ימין (ב-RTL = התחלת הדף) */
}

@media (max-width: 991px) {
    .header {
        height: var(--header-height-mobile);
    }
    
    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--cream-lightest);
        border-bottom: 1px solid var(--border-light);
        flex-direction: column;
        padding: var(--space-4);
        gap: var(--space-2);
        box-shadow: var(--shadow-medium);
        z-index: 999;
    }
    
    .header-nav.open {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        padding: var(--space-3) var(--space-4);
        text-align: center;
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(212,175,55,0.15);
        touch-action: manipulation;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}


/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */

.footer {
    background: var(--text-dark);
    color: white;
    padding: var(--space-12) 0 var(--space-6);
    margin-top: auto;
}

.footer-container {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-8);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer Brand */
.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--gold-primary);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-3);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

/* Footer Links */
.footer-section-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--gold-primary);
    margin-bottom: var(--space-4);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

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

/* Footer Contact */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-sm);
}

.footer-contact-item i {
    color: var(--gold-primary);
    width: 20px;
    text-align: center;
}

.footer-contact-item a {
    color: rgba(255, 255, 255, 0.9);
}

.footer-contact-item a:hover {
    color: var(--gold-primary);
}

/* Footer Social */
.footer-social {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--gold-primary);
    transform: translateY(-3px);
}

.footer-social a.facebook:hover { background: #1877f2; }
.footer-social a.instagram:hover { background: #e1306c; }
.footer-social a.whatsapp:hover { background: #25d366; }
.footer-social a.tiktok:hover { background: #000; border: 1px solid #fff; }

/* Footer Bottom */
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    padding-top: var(--space-6);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-xs);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.footer-dev-credit {
    color: rgba(255, 255, 255, 0.35);
    font-size: var(--text-xs);
}

.footer-dev-link {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-dev-link:hover {
    color: var(--gold-primary);
}

.footer-legal {
    display: flex;
    gap: var(--space-4);
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-xs);
}

.footer-legal a:hover {
    color: var(--gold-primary);
}

@media (max-width: 767px) {
    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        max-width: 100%;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}


/* ═══════════════════════════════════════════════
   PAGE HERO
   ═══════════════════════════════════════════════ */

.page-hero {
    background: linear-gradient(135deg, var(--cream-light), var(--cream));
    padding: var(--space-12) 0;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.page-hero-title {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--text-dark);
    margin-bottom: var(--space-2);
}

.page-hero-subtitle {
    font-size: var(--text-lg);
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto;
}

.page-hero-gold {
    color: var(--gold-primary);
}


/* ═══════════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════════ */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) 0;
    font-size: var(--text-sm);
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--gold-primary);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-dark);
    font-weight: var(--font-medium);
}


/* ═══════════════════════════════════════════════
   FLOATING ELEMENTS
   ═══════════════════════════════════════════════ */

/* WhatsApp Float Button */
.float-whatsapp {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 60px;
    height: 60px;
    background: var(--accent-whatsapp);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
    text-decoration: none;
}

.float-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

.float-whatsapp::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-full);
    border: 2px solid var(--accent-whatsapp);
    animation: pulse 2s ease-in-out infinite;
    opacity: 0.5;
}

/* Accessibility Widget Button */
.float-accessibility {
    position: fixed;
    bottom: var(--space-6);
    left: var(--space-6);
    width: 56px;
    height: 56px;
    background: #1565c0;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: var(--z-fixed);
    cursor: pointer;
    border: 2px solid white;
    transition: all var(--transition-base);
}

.float-accessibility:hover {
    transform: scale(1.1);
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: calc(var(--space-6) + 70px);
    right: var(--space-6);
    width: 44px;
    height: 44px;
    background: var(--gold-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: var(--shadow-gold);
    z-index: var(--z-fixed);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
}

@media (max-width: 767px) {
    .float-whatsapp,
    .float-accessibility {
        bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 16px));
    }

    .float-whatsapp {
        right: var(--space-4);
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .float-accessibility {
        left: var(--space-4);
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .scroll-to-top {
        bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 16px) + 60px);
    }

    /* מעבר חלק ל-idle state */
    .float-whatsapp,
    .float-accessibility {
        transition: opacity 0.35s ease, transform 0.35s ease,
                    box-shadow var(--transition-base), color var(--transition-base);
    }

    /* Idle — דעיכה ומיקוד */
    .float-whatsapp.float-idle,
    .float-accessibility.float-idle {
        opacity: var(--float-idle-opacity, 0.25);
        transform: scale(0.72);
        pointer-events: auto; /* תמיד לחיץ — WCAG */
    }
}


/* ═══════════════════════════════════════════════
   COOKIE BANNER
   ═══════════════════════════════════════════════ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--text-dark);
    color: white;
    padding: var(--space-4) var(--space-6);
    z-index: var(--z-toast);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform var(--transition-slow);
}

.cookie-banner.active {
    transform: translateY(0);
}

.cookie-banner-container {
    max-width: var(--container-lg);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 250px;
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.9);
}

.cookie-banner-text a {
    color: var(--gold-primary);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: var(--space-3);
}

.cookie-accept {
    background: var(--gold-primary);
    color: var(--text-dark);
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-md);
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

.cookie-accept:hover {
    background: var(--gold-light);
}

.cookie-decline {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: var(--space-2) var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cookie-decline:hover {
    color: white;
    border-color: white;
}


/* ═══════════════════════════════════════════════
   GRID LAYOUTS
   ═══════════════════════════════════════════════ */

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

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

@media (min-width: 1024px) {
    .content-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .content-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Sidebar Layout */
.layout-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

@media (min-width: 1024px) {
    .layout-sidebar {
        grid-template-columns: 280px 1fr;
    }
    
    .layout-sidebar-reverse {
        grid-template-columns: 1fr 280px;
    }
}

.sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
    align-self: start;
}