/* Self-hosted fonts */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 300;
  src: url('./fonts/heebo-v28-hebrew_latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/heebo-v28-hebrew_latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 500;
  src: url('./fonts/heebo-v28-hebrew_latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 700;
  src: url('./fonts/heebo-v28-hebrew_latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/rubik-v31-hebrew_latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 500;
  src: url('./fonts/rubik-v31-hebrew_latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

:root {
    --primary-color: #7DA291; /* Sage Green */
    --primary-dark: #5e7a6d; /* Darker Sage */
    --secondary-color: #F4F1EA; /* Cream */
    --text-dark: #3D4035; /* Dark Olive */
    --text-light: #666;
    --white: #ffffff;
    --nav-height: 80px; 
}

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

html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: var(--nav-height);
}

body {
    font-family: 'Heebo', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-dark);
    line-height: 1.6;
    font-display: swap;
}

h1, h2, h3 {
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
}

/* Hide the checkbox logic for the mobile menu */
.menu-checkbox {
    display: none;
}

/* Navigation */
nav {
    background: var(--white);
    padding: 0 5%;
    height: var(--nav-height);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.site-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
}

.logo-text {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 30px; 
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.3s;
    font-weight: 500;
}

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

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
    border: none;
    background: none;
}

/* Hero Section */
.hero {
    min-height: 90vh; 
    /* 1. FALLBACK: For ancient browsers (They read this, understand it, and stop here) */
    background: linear-gradient(rgba(44, 48, 38, 0.75), rgba(44, 48, 38, 0.75)),
                url('bgfhdtiny.jpg');
                
    /* 2. MODERN: For new browsers (They read the fallback, then read this, and override the fallback) */
    background: linear-gradient(rgba(44, 48, 38, 0.75), rgba(44, 48, 38, 0.75)),
                image-set(
                    url('bgfhdtiny.avif') type('image/avif'),
                    url('bgfhdtiny.jpg') type('image/jpeg')
                );
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: var(--nav-height); 
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    transition: transform 0.3s, background 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* About Section */
.section {
    padding: 5rem 10%;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--text-dark);
    margin: 10px auto 0;
}

.about-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 120px;
    text-align: right;
}

.about-text {
    flex: 1;
    min-width: 300px;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.about-image {
    flex: 1;
    width: 100%;
    max-width: 400px;
    height: auto; /* keeps proportions */
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    
    margin-left: auto;
    margin-right: auto;
    display: block;

    transform: translateX(-80px);
}

.highlight {
    color: var(--primary-color);
    font-weight: bold;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0;
    max-width: 1200px; 
    margin: 0 auto;
}

.gallery-item {
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- WhatsApp Gallery Styles --- */

.whatsapp-gallery {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 2rem;
}

.whatsapp-card {
    /* Limit width to resemble a phone screen size */
    width: 100%;
    max-width: 300px; 
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    background-color: var(--white);
    height: min-content;
}

.whatsapp-card:hover {
    transform: translateY(-5px); /* Lift effect on hover */
}

.whatsapp-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border: 1px solid #eee; /* Subtle border */
}
.quote-icon {
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.5;
}

/* Contact & Social */
.contact {
    background-color: var(--text-dark);
    color: var(--white);
}

.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-btn {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    text-decoration: none;
    transition: background 0.3s;
}

.social-btn:hover {
    background: var(--primary-color);
}

footer {
    background-color: #2b2e25;
    color: #bbb;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

footer a {
    color: #ddd;
    text-decoration: none;
    border-bottom: 1px dotted #777;
    margin: 0 5px;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--white);
}

/* --- Accessibility Modal Styles --- */
dialog.modal {
    border: none;
    background: transparent;
    padding: 0;
    max-width: 800px;
    width: 80%;
    margin: auto; /* centers the modal automatically */
}

/* the black overlay - built into the browser */
dialog.modal::backdrop {
    background-color: rgba(0, 0, 0, 0.85);
}

/* So the page won't scroll when the modal is open */
body:has(dialog[open]) {
    overflow: hidden;
}

.modal-content {
    background-color: var(--secondary-color);
    padding: 40px;
    border: 1px solid #888;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    text-align: right;
    position: relative;
}

.close-modal {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;

    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1; /* prevents excessive height */
}

.close-modal:hover,
.close-modal:focus {
    color: var(--text-dark);
    text-decoration: none;
    outline: none;
}



/* showing the outline just to whoever's naviagting with keyboard */
.close-modal:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.acc-text h2 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.acc-text h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.acc-text ul {
    margin-right: 20px;
    margin-bottom: 20px;
}

/* --- Mobile Carousel Styles --- */

/* Wrapper keeps buttons and images together */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation Buttons (Hidden on Desktop by default) */
.nav-btn {
    display: none; /* Only show on mobile */
    background: var(--white);
    border: 1px solid #ddd;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 10;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .about-container { text-align: center; }
    .section { padding: 3rem 5%; }
    .modal-content { width: 95%; margin: 20% auto; padding: 25px; }
    
    .hamburger {
        display: block; 
    }

    .nav-links {
        position: absolute;
        top: var(--nav-height);
        right: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        gap: 0;
        border-top: 1px solid #eee;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    /* Opens the menu when the hidden checkbox is checked */
    #menu-toggle:checked ~ .nav-links {
        max-height: 300px; 
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 20px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    /* fixing the width of the modal on mobile */
    dialog.modal {
        width: 92%;
        max-width: none;
    }

    .modal-content {
        width: 100%;
        box-sizing: border-box; /* making sure the padding doesn't break the width */
    }

    .about-container {
        gap: 40px;
    }


    .about-image {
        max-width: 100%;
        margin-bottom: 20px;
        transform: none;
    }
    /* Show buttons on mobile */
    .nav-btn {
        display: flex; /* Turn them on */
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 48px; 
        height: 48px;
        font-size: 1.2rem;
    }

    .nav-btn.prev { right: -10px; } /* Right button (RTL) */
    .nav-btn.next { left: -10px; }  /* Left button (RTL) */

    /* Generic Carousel Container Logic */
    .carousel-container {
        display: flex !important; /* Force horizontal layout */
        flex-wrap: nowrap !important; /* Prevents images flowing down */
        overflow-x: auto;         /* Allow scrolling */
        scroll-snap-type: x mandatory; /* The magic snap effect */
        scroll-behavior: smooth;
        gap: 20px;
        width: 100%;

        padding-inline: 7.5%; 
        box-sizing: border-box;

        align-items: center;
        justify-content: flex-start;
        
        /* Hide scrollbar for cleaner look */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE */
    }

    .carousel-container::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    /* Adjust Gallery Items for Carousel */
    .gallery-item {
        flex: 0 0 85%; /* Item takes 85% of screen width */
        scroll-snap-align: center; /* Center the item when scrolling stops */
        margin: 0 auto;
    }

    .gallery-item img {
        height: 250px; 
    }
    
    /* Adjust WhatsApp Cards for Carousel */
    .whatsapp-card {
        flex: 0 0 85%; /* Item takes 85% of screen width */
        width: 85%;
        scroll-snap-align: center; /* Center the item when scrolling stops */
        margin: 0 auto;
        max-width: none; /* Remove desktop limit */
    }
    
    /* Ensure gallery grid is disabled on mobile */
    .gallery {
        display: flex;
        grid-template-columns: none;
    }
}
@media (hover: hover) {
  .gallery-item:hover {
    transform: scale(1.02);
  }
}

