/* Base Reset & Typography */
:root {
    --primary-color: #1B019B;
    /* Mandatory Ultramarine Blue */
    --font-heading: 'Parisienne', cursive;
    /* Elegant & readable handwritten script */
    --font-body: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --transition-speed: 0.6s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
    /* For absolute positioning of BS"D */
    width: 100%;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    text-transform: none;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: 3.8rem;
    /* Adjusted for Parisienne */
    letter-spacing: 1px;
}

h2 {
    font-size: 2.5rem;
    margin-top: 1rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* BS"D Element */
.bsd-header {
    position: absolute;
    top: 10px;
    right: 15px;
    /* Top Right of the container (section) */
    font-family: 'Times New Roman', Times, serif;
    font-size: 10px;
    /* Smaller as requested */
    color: var(--primary-color);
    z-index: 1000;
    opacity: 0.6;
    /* Subtle */
    pointer-events: none;
}

/* Hebrew Font Class */
.hebrew-name {
    font-family: 'Frank Ruhl Libre', serif;
    /* Classic Hebrew serif */
    font-weight: 700;
}

/* Layout & Sections */
section {
    position: relative;
    min-height: 80vh;
    /* Gives the "page" feel */
    padding: 4rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid rgba(27, 1, 155, 0.2);
    /* Subtle divider using primary color */
}

/* Ensure rabbi section behaves like a section for animations */
.rabbi-section {
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
    /* Inherits flex layout from section? No, it's a class. I need to make sure it has section properties or reuse section tag style */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 1.5rem;
}

/* Rabbi's Letter Section */
.rabbi-section {
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
}

/* 770 Watermark */
.rabbi-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/770_bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    /* Increased slightly for visibility */
    /* Transparency for watermark effect */
    pointer-events: none;
}

.gold-title {
    font-family: var(--font-heading);
    color: #C5A059;
    /* Gold */
    font-size: 3rem;
    z-index: 1;
    position: relative;
}

.letter-image {
    max-width: 90%;
    width: 600px;
    height: auto;
    border: 3px solid #C5A059;
    /* Gold border */
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3);
    z-index: 1;
    position: relative;
    margin-top: 2rem;
}

section:last-of-type {
    border-bottom: none;
    min-height: 50vh;
    /* Shorter for RSVP */
}

/* Section Divider */
.section-divider {
    position: absolute;
    top: -30px;
    /* Adjusted for new logo shape */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background-color: var(--bg-color);
    /* Matches page bg */
    padding: 0 10px;
}

.divider-logo {
    width: 60px;
    height: auto;
    display: block;
}

/* Full Photo Section for Mike */
.full-photo-section {
    padding: 0 !important;
    /* Remove standard padding */
    min-height: 100vh;
    width: 100%;
    position: relative;
    border: 15px solid #C5A059;
    /* Gold border frame */
    box-sizing: border-box;
    /* Include border in total width/height */
    overflow: hidden;
}

.mike-full-photo {
    width: 100%;
    height: 100vh;
    /* Force full height of viewport */
    object-fit: cover;
    /* Cover the entire area */
    display: block;
}

/* Ensure BS"D is visible on top of the image */
.full-photo-section .bsd-header {
    margin-top: 15px;
    /* Adjust for border */
    margin-right: 15px;
    color: #C5A059;
    /* Gold to match border? or Primary? Stick to Gold for this page */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    /* Ensure visibility */
    z-index: 10;
}

/* Hero Specifics */
.hero-section {
    min-height: 100vh;
    padding-top: 2rem;
    justify-content: flex-start;
}

.main-logo {
    width: 140px;
    /* Slightly larger for the detailed logo */
    height: auto;
    margin: 2rem auto;
    display: block;
}

/* Animations */
.pulse {
    animation: pulse-animation 2s infinite ease-in-out;
}

@keyframes pulse-animation {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Components */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    font-family: var(--font-heading);
    color: var(--primary-color);
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-number {
    font-size: 2rem;
    font-weight: 700;
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-body);
}

.cta-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 1rem 2rem;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Utilities */
.text-gold {
    color: #C5A059;
    /* Optional gold accent for variety */
}

/* Mobile Adjustments */
/* Music Control Button */
.music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid #C5A059;
    /* Gold border */
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Playing State - Pulse Animation */
.music-control.is-playing {
    animation: music-pulse 1.5s infinite ease-in-out;
}

@keyframes music-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(197, 160, 89, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0);
    }
}

/* Muted/Paused State */
.music-control.is-muted {
    opacity: 0.6;
    background-color: #555;
    /* Grey out */
    position: fixed;
    /* Maintain fixed pos */
}

/* Red strike-through for muted state */
.music-control.is-muted::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 2px;
    background-color: #ff3b30;
    /* Red */
    transform: rotate(45deg);
}

@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .music-control {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
}