@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Color Palette from filmina.png */
    --bg-dark: #0a0e14;
    --bg-card: rgba(255, 255, 255, 0.05);
    --gold-primary: #d4af37;
    --gold-glow: rgba(212, 175, 55, 0.3);
    --blue-accent: #1a3a5f;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --white: #ffffff;
    
    /* Spacing & Borders */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --border-radius: 12px;
    --glass-blur: blur(10px);
    
    /* Transitions */
    --transition-fast: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .serif {
    font-family: 'Playfair Display', serif;
    color: var(--gold-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Glassmorphism Utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

/* Gold Button */
.btn-gold {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--gold-primary);
    color: var(--bg-dark);
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--gold-glow);
    transition: var(--transition-fast);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--gold-glow);
    background-color: var(--white);
}

/* Header & Navbar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.5rem 0; /* Reduced padding for the larger logo */
    transition: var(--transition-fast);
}

header.scrolled {
    padding: 0.5rem 0;
    background: rgba(10, 14, 20, 0.9);
    border-bottom: 1px solid var(--gold-glow);
}

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

.header-logo {
    height: 90px !important; /* Slightly smaller than 110px as requested */
    width: auto;
    transition: var(--transition-fast);
    display: block;
    max-height: none !important;
}

.header-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px var(--gold-glow));
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

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

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(10, 14, 20, 0.7), rgba(10, 14, 20, 0.7)), 
                url('img/filmina.png?v=4.0') no-repeat center center/cover;
    position: relative;
    padding-top: 80px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4rem); /* Dynamic scaling */
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.gold-text {
    color: var(--gold-primary);
    position: relative;
}

.hero-content p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--text-main);
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn-outline {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    border-radius: 50px;
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--gold-glow);
    color: var(--white);
}

/* Editorial Section */
.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--spacing-md);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.book-card {
    padding: var(--spacing-md);
    text-align: center;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.book-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold-primary);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
    min-height: 44px; /* Ensure interactive elements are touch-friendly */
}

/* 3D Effects */
.book-cover {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 2/3;
    background: var(--blue-accent);
    margin: 0 auto var(--spacing-sm);
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    overflow: hidden;
    perspective: 1000px; /* Enable 3D depth */
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.book-card:hover .book-cover img {
    transform: scale(1.05) rotateY(15deg) rotateX(5deg);
    box-shadow: 20px 20px 50px rgba(0,0,0,0.5);
}

/* Add a reflection effect on hover */
.book-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: 0.7s;
}

.book-card:hover .book-cover::after {
    left: 150%;
}

.book-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    min-height: 3.6rem; /* Ensure some space for titles */
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-card p {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.gold-link {
    color: var(--gold-primary);
    font-weight: 600;
    margin-top: auto;
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 20px;
}

.gold-link:hover {
    border-color: var(--gold-primary);
    background: var(--gold-glow);
}

/* Moreh Section Styles */
.moreh-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.glass-image {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-fast);
}

.glass-image:hover {
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    box-shadow: -20px 20px 50px rgba(0,0,0,0.5);
}

.moreh-img {
    width: 100%;
    max-width: 380px; /* Reduced from default/inherited */
    margin: 0 auto;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 0 5px rgba(212, 175, 55, 0.2);
    border: 2px solid var(--gold-primary);
    transition: var(--transition-fast);
    display: block;
}

.moreh-img:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.9), 0 0 20px rgba(212, 175, 55, 0.4);
    border-color: var(--gold-secondary);
}

.stats-grid {
    display: flex;
    gap: var(--spacing-md);
    margin-top: 2rem;
}

.stat-box {
    padding: 1.5rem;
    flex: 1;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold-primary);
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Meaning Section Styles */
.meaning-wrapper {
    padding: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.meaning-split {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 3rem;
}

.meaning-item {
    flex: 1;
    padding: 0 var(--spacing-md);
}

.hebrew-large {
    display: block;
    font-size: 4rem;
    color: var(--gold-primary);
    margin-bottom: 1rem;
    font-family: serif; /* Better for Hebrew fonts */
}

.meaning-divider {
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--gold-primary), transparent);
}

.meaning-focus h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* International Distribution Styles */
.dist-card {
    padding: var(--spacing-lg) var(--spacing-md);
    max-width: 800px;
    margin: 0 auto;
}

.large-p {
    font-size: 1.5rem;
    color: var(--gold-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact-methods {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2rem;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    background-color: #20b355;
    color: white;
}

/* TV Page Styles */
.tv-main {
    padding-top: 110px; /* Reduced from 130px */
    min-height: calc(100vh - 40px); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(10, 14, 20, 0.85), rgba(10, 14, 20, 0.85)), 
                url('img/filmina.png?v=4.0') no-repeat center center/cover;
}

.tv-grid {
    display: grid;
    grid-template-columns: 320px 1fr; /* Slightly narrower sidebar */
    gap: 1.5rem; /* Reduced gap */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.tv-header {
    text-align: left;
    margin-bottom: 0.75rem; /* Reduced margin */
    margin-top: 0;
}

.video-container {
    width: 100%;
    background: #000;
    aspect-ratio: 16/9;
    padding: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    border: 2px solid var(--gold-primary);
    border-radius: 12px;
    max-width: 100%;
}

.pip-btn {
    position: absolute;
    bottom: 60px;
    right: 20px;
    background: rgba(10, 14, 20, 0.8);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 100;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.pip-btn:hover {
    background: var(--gold-primary);
    color: var(--bg-dark);
}

#video-player {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.player-overlay-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 80px;
    height: auto;
    z-index: 10;
    opacity: 0.8;
    pointer-events: none;
    border-radius: 5px;
}

@media (max-width: 992px) {
    .tv-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tv-header {
        text-align: center;
    }
}

.tv-info {
    padding: 1.2rem; /* Reduced padding from 2rem */
    text-align: left;
}

/* Animations Logic */
.fade-in, .fade-in-delay {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.8s ease-out;
}

.fade-in-delay {
    transition-delay: 0.3s;
}

.fade-in.visible, .fade-in-delay.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Toggle - Global State */
.mobile-tv-btn {
    display: none; /* Hidden on desktop by default */
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 32px;
    height: 3px;
    background-color: var(--gold-primary) !important;
    border-radius: 4px;
    display: block;
    transition: var(--transition-fast);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        padding: 0.3rem 0;
    }

    .header-logo {
        height: 60px !important; /* Scaled down for mobile */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        margin-bottom: var(--spacing-md);
    }

    .moreh-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .stats-grid {
        flex-direction: column;
        gap: 1rem;
    }
    
    .meaning-split {
        flex-direction: column;
        gap: 2rem;
    }
    
    .meaning-divider {
        width: 100%;
        height: 2px;
        background: linear-gradient(to right, transparent, var(--gold-primary), transparent);
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(10, 14, 20, 0.95);
        backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.5s ease;
        z-index: 1001;
        border-left: 1px solid var(--gold-glow);
    }

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

    .nav-links a {
        font-size: 1.5rem;
    }
    
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        z-index: 1002;
        width: 44px;
        height: 44px;
        background: rgba(10, 14, 20, 0.8);
        border: 1px solid var(--gold-glow);
        border-radius: 8px;
    }

    .menu-toggle.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

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

    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .mobile-tv-btn {
        display: flex !important;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: rgba(212, 175, 55, 0.1);
        border: 1px solid var(--gold-glow);
        border-radius: 8px;
        color: var(--gold-primary);
        font-weight: 600;
        font-size: 0.9rem;
        margin-right: 12px;
        transition: var(--transition-fast);
        z-index: 1002;
    }

    .mobile-tv-btn i {
        font-size: 1rem;
    }

    .mobile-tv-btn.active {
        background: var(--gold-primary);
        color: var(--bg-dark);
        border-color: var(--gold-primary);
    }
}

@media (max-width: 480px) {
    .header-logo {
        height: 50px !important;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .btn-gold, .btn-outline {
        padding: 1rem 2rem; /* Increased hit area for mobile */
        font-size: 1rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links a {
        font-size: 1.5rem;
        padding: 15px 20px; /* Larger hit area for mobile menu links */
        display: block;
        width: 100%;
        text-align: center;
    }

    .whatsapp-item {
        padding: 15px 20px;
        min-height: 50px;
    }
}


html {
    scroll-behavior: smooth;
}

.glass-bg {
    background: linear-gradient(rgba(10, 14, 20, 0.8), rgba(10, 14, 20, 0.8)), url('img/filmina.png?v=4.0') center/cover fixed;
}

.about-content {
    padding: var(--spacing-lg) var(--spacing-sm);
    text-align: center;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

footer {
    border-top: 1px solid var(--gold-primary); /* Stronger border */
    background: rgba(15, 20, 30, 1) !important; /* Slightly lighter/solid for contrast */
    padding: 3rem 0;
    margin-top: 4rem; /* Separation from sections */
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.footer-info p {
    font-size: 1rem;
    color: var(--white); /* Maximum contrast */
    font-weight: 400;
}

.footer-links a {
    color: var(--gold-primary);
    font-weight: 600;
    text-decoration: underline;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.whatsapp-main-btn {
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    outline: none;
    position: relative;
}

.whatsapp-main-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-fast);
    padding: 10px;
    pointer-events: none;
}

/* Pseudo-element to bridge the gap between button and menu */
.whatsapp-menu::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    height: 30px;
}

.whatsapp-float:hover .whatsapp-menu,
.whatsapp-float.active .whatsapp-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    z-index: 10000;
}

.whatsapp-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white !important;
    background: rgba(10, 14, 20, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    transition: var(--transition-fast);
    text-decoration: none !important;
}

.whatsapp-item:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
    transform: translateX(-5px);
}

.whatsapp-item i {
    font-size: 26px;
    color: #25d366;
}

.wa-text span {
    display: block;
    font-size: 0.7rem;
    color: var(--gold-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wa-text p {
    font-size: 0.9rem;
    margin: 0;
    color: white;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-menu {
        width: 220px;
        bottom: 75px;
    }

    .footer-grid {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .book-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .dist-card {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .contact-methods {
        flex-direction: column;
        align-items: center;
    }

    .btn-whatsapp {
        width: 100%;
        justify-content: center;
    }

    /* TV Page Mobile Refinements */
    .tv-main {
        padding-top: 100px;
        padding-bottom: 2rem;
        min-height: auto;
    }

    .tv-grid {
        gap: 2rem;
    }

    .tv-info h3 {
        font-size: 1.2rem !important;
    }

    .tv-info p, .tv-info li {
        font-size: 0.9rem !important;
    }

    .video-container {
        border-width: 1px;
    }
}

@media (max-width: 480px) {
    .tv-main {
        padding-top: 90px;
    }

    .tv-header h1 {
        font-size: 1.5rem !important;
    }

    .tv-info {
        padding: 1rem;
    }

    .player-overlay-logo {
        width: 50px;
        top: 10px;
        left: 10px;
    }
}

.full-height-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.glass-bg-light {
    background: rgba(10, 14, 20, 0.4);
    backdrop-filter: blur(10px);
}
