/* ==========================================================================
   1. Global Styles & Variables
   ========================================================================== */

/* CSS Variables for Colors and Fonts */
:root {
    --color-background: #dddddd; /* CHANGED */
    --color-text-primary: #000000;
    --color-text-light: #ffffff;
    --color-dark: #1f1f1f;
    --color-border: #3d3d3d;

    --font-sora: 'sora', sans-serif;
    --font-space-grotesk: 'space grotesk', sans-serif;
    
    --font-size-h1: 79px;
    --font-size-h2: 59px;
    --font-size-h3: 31px;
    --font-size-h6: 20px;
    --font-size-body-l: 18px;
    --font-size-body-m: 20px;
    --font-size-body-s: 14px;
    
    --site-width: 100%;
}

/* Basic HTML & Body Resets */
html {
    scroll-behavior: smooth;
}

body, html {
    margin: 0;
    padding: 0;
    border: 0;
    height: 100%;
    background-color: #dddddd; /* <--- THIS IS THE FIX */
    vertical-align: baseline;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
}

body {
    overflow-x: hidden; /* Prevent horizontal scrollbar */
    overflow-y: scroll;
}

/* Font-Face Declarations */
@font-face {
    font-family: 'sora';
    font-style: normal;
    font-weight: 700;
    src: url('//static.parastorage.com/tag-bundler/api/v1/fonts-cache/googlefont/woff2/s/sora/v12/xMQ9uFFYT72X5wkB_18qmnndmSdSnh2BAfO5mnuyOo1lfiQwV6-xo6eeIw.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'space grotesk';
    font-style: normal;
    font-weight: 400;
    src: url('//static.parastorage.com/tag-bundler/api/v1/fonts-cache/googlefont/woff2/s/spacegrotesk/v6/V8mDoQDjQSkFtoMM3T6r8E7mPbF4C_k3HqU.woff2') format('woff2');
    font-display: swap;
}


/* ==========================================================================
   2. Layout System
   ========================================================================== */

#SITE_CONTAINER, #site-root, #masterPage {
    position: relative;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal overflow */
    box-sizing: border-box;
}

#main_MF {
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal overflow */
    box-sizing: border-box;
}

#PAGES_CONTAINER {
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal overflow */
    box-sizing: border-box;
}

#fxtya {
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal overflow */
    box-sizing: border-box;
}

#site-root {
    margin: 0 auto;
    min-height: 100%;
}


.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   3. Header & Footer
   ========================================================================== */

/* --- UPDATED HEADER STYLES --- */
#SITE_HEADER {
    height: 90px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    box-sizing: border-box;
    position: fixed; /* Fixed position to float on top */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* This is the 30% transparent (70% opaque) background with a blur */
    background-color: rgba(221, 221, 221, 0.7);
    backdrop-filter: blur(8px);
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

/* Class added by JS on scroll to make the header solid */
#SITE_HEADER.scrolled {
    background-color: var(--color-background); /* Becomes fully solid */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Adds the floating shadow */
}

.header-content {
    width: 100%;
    max-width: 1800px; /* Match page container */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-image {
    width: 160px;
    height: 80px;
}


#SITE_FOOTER {
    background-color: #dddddd;
    padding: 40px;
    text-align: center;
    color: var(--color-text-primary);
}

/* ==========================================================================
   4. Components
   ========================================================================== */

/* Typography */
h1 { font-size: var(--font-size-h1); font-family: var(--font-sora); font-weight: 700; }
h2 { font-size: var(--font-size-h2); font-family: var(--font-sora); font-weight: 700; }
h3 { font-size: var(--font-size-h3); font-family: var(--font-sora); font-weight: 400; }
h6 { font-size: var(--font-size-h6); font-family: var(--font-space-grotesk); font-weight: 400; }
p, a { font-family: var(--font-space-grotesk); color: var(--color-text-primary); }

.font-size-l { font-size: var(--font-size-body-l); }
.font-size-m { font-size: var(--font-size-body-m); }
.font-size-s { font-size: var(--font-size-body-s); }

a { text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: inherit; }
a:link { color: inherit; }

/* Buttons */
.site-button {
    display: inline-block;
    cursor: pointer;
    background-color: var(--color-background) !important;
    color: var(--color-dark) !important;
    border: 2px solid var(--color-dark);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: var(--font-size-body-m);
    transition: all 0.3s ease;
    text-decoration: none;
}

.site-button:hover {
    background-color: var(--color-dark);
    color: var(--color-background);
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.site-button:active {
    background-color: var(--color-dark);
    color: var(--color-background);
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-button:focus {
    outline: 2px solid var(--color-dark);
    outline-offset: 2px;
}

.site-button:focus:not(:hover):not(:active) {
    background-color: var(--color-background) !important;
    color: var(--color-dark) !important;
}

.site-button:not(:hover):not(:active):not(:focus) {
    background-color: var(--color-background) !important;
    color: var(--color-dark) !important;
}

.site-button:link,
.site-button:visited {
    background-color: var(--color-background) !important;
    color: var(--color-dark) !important;
}

/* Primary Button (Donate) */
#menu-button2 {
    background: var(--color-dark);
    color: var(--color-background);
    border: 2px solid var(--color-dark);
    border-radius: 50px;
    padding: 10px 22px;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.6rem; /* Explicit font size for consistency */
    font-family: var(--font-space-grotesk);
}

#menu-button2:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Secondary Button (Contact Us) */
#menu-button3 {
    background: transparent;
    color: var(--color-dark);
    border: 2px solid var(--color-dark);
    border-radius: 50px;
    padding: 10px 22px;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.6rem; /* Explicit font size for consistency */
    font-family: var(--font-space-grotesk);
}

#menu-button3:hover {
    background: var(--color-dark);
    color: var(--color-background);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Desktop navigation - show on desktop, hide on mobile */
.desktop-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}

/* Hamburger button - hidden on desktop, shown on mobile */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
    position: relative;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger active state (X shape) */
.hamburger-btn.is-active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-btn.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.is-active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    display: none;
}

.mobile-menu-overlay.is-open {
    display: block !important;
}

/* Mobile navigation menu */
.mobile-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 50vh !important;
    max-height: 400px !important;
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0 0 12px 12px !important;
    padding-top: 70px !important;
    padding-bottom: 20px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    z-index: 99999 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
}

/* Close button inside mobile menu */
.mobile-menu-close {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    width: 45px !important;
    height: 45px !important;
    background: transparent !important;
    border: none !important;
    font-size: 45px !important;
    line-height: 45px !important;
    color: #333 !important;
    cursor: pointer !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Mobile nav section (for grouping) */
.mobile-nav-section {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

/* Mobile nav header (like "Projects") */
.mobile-nav-header {
    display: block !important;
    padding: 18px 25px !important;
    color: #333 !important;
    font-size: 1.5rem !important;
    font-family: var(--font-space-grotesk) !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #ddd !important;
    cursor: pointer !important;
}

.mobile-nav-arrow {
    margin-left: 8px !important;
    font-size: 1.2rem !important;
    transition: transform 0.3s ease !important;
}

.mobile-nav-dropdown-toggle.active .mobile-nav-arrow {
    transform: rotate(180deg) !important;
}

.mobile-nav-dropdown {
    display: none !important;
    width: 100% !important;
    overflow: hidden !important;
    transition: max-height 0.3s ease !important;
}

.mobile-nav-dropdown.active {
    display: block !important;
}

/* Mobile nav links */
.mobile-nav-link {
    display: block !important;
    padding: 18px 25px !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 1.5rem !important;
    font-family: var(--font-space-grotesk) !important;
    border-bottom: 1px solid #ddd !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

/* Sublinks (indented items under headers) */
.mobile-nav-sublink {
    padding: 16px 25px !important;
    font-size: 1.4rem !important;
    color: #555 !important;
    background-color: #f9f9f9 !important;
    border-bottom: 1px solid #ddd !important;
}

/* Prevent body scrolling when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    /* Hide desktop navigation on mobile */
    .desktop-navigation {
        display: none !important;
    }

    /* Show hamburger button on mobile */
    .hamburger-btn {
        display: flex !important;
        margin-left: auto;
    }
}

/* Projects Dropdown */
.projects-dropdown {
    position: relative;
    display: inline-block;
}

#menu-button-projects {
    background: transparent;
    color: var(--color-dark);
    border: 2px solid var(--color-dark);
    border-radius: 50px;
    padding: 10px 22px;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.6rem; /* Explicit font size for consistency */
    font-family: var(--font-space-grotesk);
}

#menu-button-projects:hover {
    background: var(--color-dark);
    color: var(--color-background);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.projects-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    z-index: 1001;
}

.projects-dropdown-content a {
    color: var(--color-dark);
    padding: 15px 20px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
    font-size: 1.6rem;
    font-family: var(--font-space-grotesk);
}

.projects-dropdown-content a:hover {
    background-color: #f0f0f0;
    text-decoration: none;
}

.projects-dropdown.active .projects-dropdown-content {
    display: block;
}

.projects-dropdown:hover .projects-dropdown-content {
    display: block;
}

/* Find-A-Mikvah Button */
#menu-button-find {
    background: transparent;
    color: var(--color-dark);
    border: 2px solid var(--color-dark);
    border-radius: 50px;
    padding: 10px 22px;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.6rem; /* Explicit font size for consistency */
    font-family: var(--font-space-grotesk);
}

#menu-button-find:hover {
    background: var(--color-dark);
    color: var(--color-background);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


/* Images */
.responsive-img {
    width: 100%;
    height: 290px;
    object-fit: cover;
    border-radius: 10px;
}

img {
    max-width: 100%;
    height: auto;
}


/* ==========================================================================
   5. Page-Specific Sections
   ========================================================================== */
    
/* Hero Section - Generic (for other pages) */
.hero-section {
    min-height: 100vh; /* Fill the entire viewport height */
    display: flex;
    justify-content: center;
    align-items: flex-end;
    text-align: center;
    color: #dddddd;
    padding: 60px 40px;
    box-sizing: border-box;
    background-size: cover;
    background-position: center;
    width: 100%;
    max-width: 100vw; /* Prevent overflow */
    overflow-x: hidden; /* Prevent horizontal overflow */
    margin: 0;
    position: relative;
}

.hero-section h1, .hero-section p {
    color: var(--color-text-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section .site-button {
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Index Hero Section - Separate styles */
.index-hero-section {
    min-height: 100vh; /* Fill the entire viewport height */
    display: flex;
    justify-content: center;
    align-items: flex-end;
    text-align: center;
    color: #dddddd;
    padding: 60px 40px;
    box-sizing: border-box;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://live.staticflickr.com/65535/54964092213_0923415584_b.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    max-width: 100vw; /* Prevent overflow */
    overflow-x: hidden; /* Prevent horizontal overflow */
    margin: 0;
    position: relative;
}

.index-hero-section h1, .index-hero-section p {
    color: var(--color-text-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.index-hero-section .site-button {
    margin-top: 20px;
    margin-bottom: 10px;
    background-color: var(--color-background) !important;
    color: var(--color-dark) !important;
}

/* Services Section */
.services-section {
    padding: 80px 40px;
    background-color: #dddddd;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 40px auto;
    text-align: left;
}

.service-card {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

a.service-card {
    text-decoration: none;
    color: inherit;
}

a.service-card:hover {
    text-decoration: none;
    color: inherit;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-card img {
    transition: transform 0.3s ease;
    width: 100%; /* Ensure image fills card width */
    height: 290px; /* Match responsive-img height */
    object-fit: cover; /* Fill container, crop if needed */
    display: block; /* Remove inline spacing */
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-card h3 {
    margin: 15px;
    font-size: 1.8rem;
}

.service-card p {
    margin: 0 15px 15px;
    font-size: 1.4rem;
    color: #666;
}

/* Footer Content */
#SITE_FOOTER p, #SITE_FOOTER a {
    font-size: var(--font-size-body-s);
    color: var(--color-text-primary);
}

#SITE_FOOTER a {
    text-decoration: underline;
}


/* ==========================================================================
   6. OUR IMPACT SECTION
   ========================================================================== */

.impact-section {
    padding: 80px 40px;
    background-color: #f9f9f9;
    width: 100vw; /* Full viewport width */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.impact-section.page-container {
    max-width: none; /* Override page-container max-width */
    padding: 80px 40px;
}

.impact-container {
    display: flex;
    gap: 80px;
    align-items: center;
    width: 100%;
    max-width: 1800px; /* Wider max-width for impact section */
    margin: 0 auto;
}

.impact-text-column {
    flex: 1;
    text-align: left;
}

.impact-text-column h2 {
    margin-bottom: 30px;
    color: var(--color-dark);
}

.impact-text-column p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--color-text-primary);
}

.impact-image-column {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.impact-image-wrapper {
    width: 100%;
    max-width: 500px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.impact-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.impact-map-wrapper {
    width: 100%;
    max-width: 600px;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.impact-map {
    width: 100%;
    height: auto;
    display: block;
}

.impact-globe-wrapper {
    width: 100%;
    max-width: 600px;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: none;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.globe-label {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-dark);
    margin-top: 30px;
    margin-bottom: 0;
    text-align: center;
    min-height: 40px;
    transition: opacity 0.3s ease;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Project Carousel Styles */
.project-carousel {
    width: 100%;
    height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    overflow: visible;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.carousel-card {
    position: absolute;
    top: 50%;
    width: 280px;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform, opacity;
    background: #fff;
}

.carousel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    pointer-events: none;
}

/* Position classes */
.carousel-card.position-left {
    left: 10%;
    transform: translate(-50%, -50%) scale(0.75) translateZ(-100px);
    opacity: 0.6;
    z-index: 1;
}

.carousel-card.position-center {
    left: 50%;
    transform: translate(-50%, -50%) scale(1) translateZ(0);
    opacity: 1;
    z-index: 3;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.carousel-card.position-right {
    left: 90%;
    transform: translate(-50%, -50%) scale(0.75) translateZ(-100px);
    opacity: 0.6;
    z-index: 1;
}

.carousel-card.position-hidden-left {
    left: -20%;
    transform: translate(-50%, -50%) scale(0.6) translateZ(-200px);
    opacity: 0;
    z-index: 0;
}

.carousel-card.position-hidden-right {
    left: 120%;
    transform: translate(-50%, -50%) scale(0.6) translateZ(-200px);
    opacity: 0;
    z-index: 0;
}

/* Hover effects */
.carousel-card.position-left:hover,
.carousel-card.position-right:hover {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0.85) translateZ(-50px);
}

.carousel-card.position-center:hover {
    transform: translate(-50%, -50%) scale(1.05) translateZ(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.map-outline {
    fill: #f5f5f5;
    stroke: #ddd;
    stroke-width: 2;
}

.map-continent {
    fill: #e8e8e8;
    stroke: #ccc;
    stroke-width: 1;
}

.location-marker {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.location-marker:hover {
    transform: scale(1.2);
    transform-origin: center;
}

.location-marker .pulse {
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        r: 12;
        opacity: 0.3;
    }
    50% {
        r: 18;
        opacity: 0.2;
    }
    100% {
        r: 24;
        opacity: 0;
    }
}

.location-marker text {
    pointer-events: none;
    user-select: none;
}

/* ==========================================================================
   7. ABOUT & SPONSORS SECTION (NEW STYLES)
   ========================================================================== */

/* Tax Info Bar */
.tax-info-bar {
    background-color: var(--color-dark);
    color: var(--color-text-light);
    padding: 20px 0;
    text-align: center;
    margin-top: 60px;
}

.tax-info-text {
    font-size: 1.4rem;
    margin: 0;
    color: var(--color-text-light);
}

/* ==========================================================================
   7. CONTACT PAGE STYLES
   ========================================================================== */

.contact-section {
    background-color: #f0f0f0; /* A slightly different background for the main content area */
    padding: 80px 20px;
}

.contact-header {
    text-align: center;
    margin-bottom: 60px;
}

.contact-header h2 {
    margin-bottom: 15px;
    letter-spacing: -0.02em;
    font-weight: 700;
    line-height: 1.2;
}

.contact-header p {
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--color-text-primary);
}

.contact-container {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-form-column {
    flex: 2; /* Takes up 2/3 of the space */
    background: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact-info-column {
    flex: 1; /* Takes up 1/3 of the space */
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-space-grotesk);
    font-size: 1.6rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.6rem;
    font-family: var(--font-space-grotesk);
    box-sizing: border-box; /* Important for padding and width */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Project Search Container */
.project-search-container {
    position: relative;
    margin-bottom: 20px;
}

.project-search-input-wrapper {
    position: relative;
}

.project-search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1.6rem;
    font-family: var(--font-space-grotesk);
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.project-search-input:focus {
    outline: none;
    border-color: var(--color-dark);
    box-shadow: 0 0 5px rgba(31, 31, 31, 0.2);
}

.project-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.project-dropdown-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.project-search-container.active .project-dropdown-icon {
    transform: translateY(-50%) rotate(180deg);
}

/* Project Selector (Custom Dropdown) */
.project-selector {
    display: none;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.project-search-container.active .project-selector {
    display: grid;
}

.project-button.hidden {
    display: none;
}

.project-button {
    background: #fff;
    border: 2px solid #e0e0e0;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5rem;
    font-family: var(--font-space-grotesk);
    text-align: left;
    transition: all 0.3s ease;
    width: 100%;
}

.project-button:hover {
    border-color: var(--color-dark);
    background: #f0f0f0;
}

.project-button.active {
    background: var(--color-dark);
    color: var(--color-background);
    border-color: var(--color-dark);
}

/* Payment Methods */
.payment-methods {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.payment-method-button {
    flex: 1;
    min-width: 150px;
    background: #fff;
    border: 2px solid #e0e0e0;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.6rem;
    font-family: var(--font-space-grotesk);
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15); /* Added shadow for differentiation */
}

.payment-method-button:hover {
    border-color: var(--color-dark);
    background: #f0f0f0;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}

.payment-method-button.active {
    background: var(--color-dark);
    color: var(--color-background);
    border-color: var(--color-dark);
    box-shadow: 0 5px 15px rgba(31, 31, 31, 0.3); /* Stronger shadow for active state */
}

.payment-method-button i {
    font-size: 2rem;
}

#card-payment-form {
    margin-top: 20px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-dark);
    box-shadow: 0 0 5px rgba(31, 31, 31, 0.2);
}

.form-submit-button {
    display: inline-block;
    width: 100%;
    cursor: pointer;
    background-color: var(--color-dark);
    color: var(--color-background);
    border: none;
    padding: 15px 24px;
    border-radius: 30px;
    font-size: var(--font-size-body-m);
    font-weight: bold;
    transition: all 0.3s ease;
}

.form-submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Contact Info & Map Styles */
.contact-info-block {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.contact-info-block h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.contact-info-block p {
    font-size: 1.6rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info-block i {
    color: var(--color-dark);
    margin-right: 15px;
    font-size: 1.8rem;
    width: 20px;
    text-align: center;
}

.map-container {
    border-radius: 10px;
    overflow: hidden; /* Ensures the iframe corners are rounded */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    line-height: 0; /* Removes any extra space below the iframe */
    position: relative;
}

/* Map Zoom Controls */
.map-zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.map-zoom-button {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid var(--color-dark);
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--color-dark);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.map-zoom-button:hover {
    background: var(--color-dark);
    color: var(--color-background);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.map-zoom-button:active {
    transform: scale(0.95);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 900px) {
    .contact-container {
        flex-direction: column;
    }
}

.donate-hero-section {
    background: #9ca0a0;
    text-align: center;
    padding: 80px 40px;
    color: var(--color-text-light);
}

.donate-hero-section h1 {
    color: var(--color-text-light);
}

.donate-form-section {
    background-color: #f0f0f0;
    padding: 80px 0;
}

.donate-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.donate-form-column {
    flex: 2;
    background: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.donate-impact-column {
    flex: 1;
}

.donate-form-column h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

/* Amount Selector */
.amount-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.amount-button {
    background: #f0f0f0;
    border: 2px solid #f0f0f0;
    padding: 15px 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.6rem;
    font-weight: bold;
    font-family: var(--font-space-grotesk);
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15); /* Added shadow for differentiation */
}

.amount-button:hover {
    border-color: var(--color-dark);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}

.amount-button.active {
    background: var(--color-dark);
    color: var(--color-background);
    border-color: var(--color-dark);
    box-shadow: 0 5px 15px rgba(31, 31, 31, 0.3); /* Stronger shadow for active state */
}

.custom-amount-input {
    margin-bottom: 20px;
}
.custom-amount-input label {
    display: block;
    margin-bottom: 8px;
    font-size: 1.6rem;
}
.custom-amount-input input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.6rem;
    box-sizing: border-box;
}

/* Frequency Toggle */
.frequency-toggle {
    display: flex;
    background: #f0f0f0;
    border-radius: 30px;
    padding: 5px;
    margin-bottom: 30px;
}

.frequency-button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.6rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.frequency-button.active {
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Form Row for Expiry/CVC */
.form-row {
    display: flex;
    gap: 20px;
}
.form-row .form-group {
    flex: 1;
}

/* Impact Section */
.donate-impact-column h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.impact-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.impact-card i {
    font-size: 3rem;
    color: var(--color-dark);
    margin-bottom: 15px;
}

.impact-card h4 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-family: var(--font-sora);
}

.impact-card p {
    font-size: 1.5rem;
    color: #555;
    margin: 0;
}


/* Responsive adjustments for smaller screens */
@media (max-width: 900px) {
    .donate-container {
        flex-direction: column;
    }
}

/* ==========================================================================
   8. RESPONSIVE / TABLET STYLES (for screens between 769px and 1024px)
   ========================================================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet-specific adjustments */
    .page-container {
        max-width: 900px;
        padding: 0 30px;
    }
    
    /* Hero sections on tablet */
    .hero-section, .donate-hero-section, .find-mikvah-hero, .index-hero-section {
        padding: 60px 30px;
    }
    
    /* Contact page on tablet */
    .contact-section {
        padding: 60px 30px;
    }
    
    .contact-container {
        max-width: 900px;
        padding: 0 30px;
    }
    
    /* Donate page on tablet */
    .donate-form-section {
        padding: 60px 30px;
    }
    
    .donate-container {
        max-width: 900px;
        padding: 0 30px;
    }
    
    /* Services/Projects grid on tablet */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Impact section on tablet */
    .impact-container {
        max-width: 900px;
        padding: 0 30px;
    }
    
    /* Project detail page on tablet */
    .project-contact-map-container {
        gap: 30px;
    }
    
    .project-images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* ==========================================================================
   9. RESPONSIVE / MOBILE STYLES (for screens 768px or smaller)
   ========================================================================== */

@media (max-width: 768px) {
    /* --- GENERAL FONT & LAYOUT ADJUSTMENTS --- */
    body {
        font-size: 9px; /* Slightly adjust base font size for better scaling */
    }

    h1 { font-size: 48px; } /* Reduce heading sizes */
    h2 { font-size: 38px; }
    h3 { font-size: 24px; }

    /* Index Hero section h1 - adaptive font size to fit on screen */
    .index-hero-section h1 {
        font-size: clamp(1.5rem, 5vw, 28px); /* Even smaller font size for mobile */
        white-space: normal; /* Allow text wrapping on mobile */
        max-width: 100%; /* Ensure it doesn't exceed container */
        padding: 0 20px; /* Add padding to prevent text from touching edges */
        box-sizing: border-box;
        word-spacing: normal; /* Normal word spacing */
        letter-spacing: normal; /* Normal letter spacing */
        line-height: 1.2; /* Tighter line height for better fit */
        margin: 0 auto 10px auto; /* Center the heading with bottom margin */
    }

    /* Reduce padding on main sections to save space */
    .services-section, .contact-section, .donate-form-section, .impact-section {
        padding: 40px 20px;
        text-align: center; /* Center section content on mobile */
    }

    /* Center section headings on mobile */
    .services-section h2,
    .impact-section h2,
    .contact-section h2 {
        text-align: center; /* Center headings on mobile */
    }

    /* Make the main page container use more of the screen width */
    .page-container {
        padding: 0 20px;
        text-align: center; /* Center content by default on mobile */
    }
    
    /* Override page-container padding for impact section on mobile */
    .impact-section.page-container {
        padding: 40px 0px !important; /* Ensure consistent padding */
        margin: 0 auto; /* Center the section */
    }

    /* Ensure text-center class works on mobile */
    .text-center {
        text-align: center !important;
    }

    /* --- HEADER --- */
    #SITE_HEADER {
        height: 70px; /* Optimize height for single line */
        padding: 0 10px;
        width: 100%; /* Ensure full width on mobile */
        max-width: 100vw; /* Prevent overflow */
        box-sizing: border-box; /* Include padding in width */
        overflow-x: hidden; /* Prevent horizontal overflow */
        left: 0;
        right: 0;
    }

    .header-content {
        flex-wrap: nowrap; /* Prevent wrapping - keep everything on one line */
        gap: 8px;
        justify-content: space-between;
        width: 100%; /* Ensure full width on mobile */
        max-width: 100%; /* Remove max-width constraint on mobile */
        box-sizing: border-box; /* Include padding in width */
        padding: 0; /* Remove any extra padding */
        align-items: center; /* Center items vertically */
    }
    
    /* Ensure nav doesn't overflow */
    nav {
        flex-shrink: 0; /* Prevent nav from shrinking */
        max-width: calc(100% - 100px); /* Leave space for logo */
        overflow: visible; /* Allow menu to overflow if needed */
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .logo-container {
        flex-shrink: 1;
        min-width: 0; /* Allow logo to shrink */
    }

    /* Make logo smaller to fit - will scale down as needed */
    .logo-image {
        height: 40px;
        width: auto;
        max-width: 90px;
        object-fit: contain;
    }

    /* Hide desktop navigation on mobile */
    .desktop-nav {
        display: none;
    }

    /* Hamburger menu button (mobile only) */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10001; /* Higher z-index than menu */
        position: relative;
        flex-shrink: 0; /* Prevent button from shrinking */
        margin-left: auto; /* Push to the right */
    }

    .mobile-menu-toggle span {
        width: 100%;
        height: 3px;
        background-color: var(--color-text-primary);
        border-radius: 3px;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    /* Hamburger menu button active state (X shape) */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

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

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }


    .mobile-menu-item {
        display: block;
        padding: 15px 20px;
        color: var(--color-text-primary);
        text-decoration: none;
        font-size: 1.2rem;
        font-family: var(--font-space-grotesk);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        transition: background-color 0.2s ease;
    }

    .mobile-menu-item:hover,
    .mobile-menu-item:focus {
        background-color: rgba(0, 0, 0, 0.05);
    }

    .mobile-menu-item:last-child {
        border-bottom: none;
    }

    /* Header navigation - position hamburger button (duplicate removed, using nav style above) */

    /* On very small screens, adjust but keep buttons readable */
    @media (max-width: 480px) {
        .logo-image {
            height: 35px;
            max-width: 80px;
        }

        #menu-button2, #menu-button3, #menu-button-find, #menu-button-projects {
            padding: 5px 10px;
            font-size: 1.1rem;
            margin: 0 1px;
        }

        #menu-button-projects {
            font-size: 1rem;
            padding: 5px 8px;
        }

        /* Shorten button text on very small screens */
        #menu-button-find {
            font-size: 1rem;
        }

        /* On very small screens, adjust card width */
        .service-card {
            min-width: 100%; /* Use full width on very small screens */
            max-width: 100%; /* Remove max-width constraint */
        }
    }

    /* --- INDEX HERO SECTION (Mobile) --- */
    .index-hero-section {
        min-height: auto; /* Let content determine height on mobile */
        padding: 180px 20px 10px 20px; /* More top padding to lower content down further */
        text-align: center; /* Ensure centered text on mobile */
        width: 100%;
        max-width: 100vw; /* Prevent overflow */
        overflow-x: hidden; /* Prevent horizontal overflow */
        margin: 0;
        display: flex; /* Keep flex display */
        align-items: flex-start; /* Align content to top */
        justify-content: center; /* Center content horizontally */
    }

    .index-hero-section h1, .index-hero-section p {
        text-align: center; /* Ensure centered text on mobile */
    }
    
    /* Index Hero section content wrapper on mobile */
    .index-hero-section > div {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    .index-hero-section p {
        font-size: clamp(0.9rem, 3.5vw, 1.2rem); /* Smaller responsive paragraph size */
        line-height: 1.4; /* Better line height for readability */
        padding: 0 10px;
        margin: 10px auto -5px auto; /* Adjusted margins */
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .index-hero-section .site-button {
        font-size: clamp(0.85rem, 3vw, 1.1rem); /* Smaller responsive button size */
        padding: 10px 20px;
        margin-top: 15px; /* Reduced top margin */
        display: inline-block;
    }

    /* --- OTHER HERO SECTIONS (Mobile) --- */
    .hero-section, .donate-hero-section, .find-mikvah-hero {
        min-height: auto; /* Let content determine height on mobile */
        padding: 40px 20px; /* Standard padding */
        text-align: center; /* Ensure centered text on mobile */
        width: 100%;
        max-width: 100vw; /* Prevent overflow */
        overflow-x: hidden; /* Prevent horizontal overflow */
        margin: 0;
        display: flex; /* Keep flex display */
        align-items: center; /* Center content vertically */
        justify-content: center; /* Center content horizontally */
    }

    .hero-section h1, .hero-section p,
    .donate-hero-section h1, .donate-hero-section p,
    .find-mikvah-hero h1, .find-mikvah-hero p {
        text-align: center; /* Ensure centered text on mobile */
    }
    
    /* Hero section content wrapper on mobile */
    .hero-section > div {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    .hero-section p {
        font-size: clamp(0.9rem, 3.5vw, 1.2rem); /* Smaller responsive paragraph size */
        line-height: 1.4; /* Better line height for readability */
        padding: 0 10px;
        margin: 10px auto 15px auto; /* Adjusted margins */
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .hero-section .site-button {
        font-size: clamp(0.85rem, 3vw, 1.1rem); /* Smaller responsive button size */
        padding: 10px 20px;
        margin-top: 15px; /* Reduced top margin */
        display: inline-block;
    }

    /* --- PROJECTS GRID --- */
    .services-grid {
        /* Stack projects in a single column on mobile */
        grid-template-columns: 1fr; 
        gap: 30px;
        text-align: center; /* Center project cards on mobile */
    }

    .service-card {
        text-align: left; /* Keep card content left-aligned */
        margin: 0 auto; /* Center the card itself */
        width: 100%; /* Full width on mobile */
        max-width: 400px; /* Limit card width on mobile */
        min-width: 280px; /* Ensure minimum width for very small screens */
        box-sizing: border-box; /* Include padding in width */
        display: block; /* Ensure block display */
    }

    /* Ensure images inside cards fill the card width */
    .service-card img,
    .service-card .responsive-img {
        width: 100% !important; /* Force full width */
        height: 290px !important; /* Fixed height */
        object-fit: cover !important; /* Fill container, crop if needed */
        display: block; /* Remove inline spacing */
        min-width: 100%; /* Ensure image fills card */
    }

    /* --- ABOUT & SPONSORS --- */
    .impact-section {
        width: 100%; /* Remove full viewport width on mobile */
        position: static; /* Remove breakout positioning on mobile */
        left: auto;
        right: auto;
        margin-left: 0;
        margin-right: 0;
        padding: 40px 20px; /* Add padding to section instead of container */
    }

    .impact-section.page-container {
        max-width: 100%; /* Full width on mobile */
        padding: 40px 20px; /* Padding on section */
        margin: 0 auto; /* Center section */
    }

    .impact-container {
        flex-direction: column;
        gap: 40px;
        text-align: center; /* Center content on mobile */
        max-width: 100%; /* Limit width on mobile */
        width: 100%; /* Full width on mobile */
        padding: 0; /* Remove padding to center properly */
        box-sizing: border-box; /* Include padding in width */
        margin: 0 auto; /* Center container */
        display: flex; /* Ensure flex display */
        align-items: center; /* Center items */
        justify-content: center; /* Center content */
    }

    .impact-text-column {
        text-align: center; /* Center text on mobile */
        width: 100%; /* Full width on mobile */
        max-width: 100%; /* Prevent overflow */
        box-sizing: border-box; /* Include padding in width */
        padding: 0 20px; /* Add equal padding on both sides */
        margin: 0 auto; /* Center the column */
    }

    .impact-text-column h2 {
        text-align: center; /* Center heading on mobile */
        word-wrap: break-word; /* Prevent text overflow */
        overflow-wrap: break-word; /* Prevent text overflow */
    }

    .impact-text-column p {
        text-align: center; /* Center paragraphs on mobile */
        word-wrap: break-word; /* Prevent text overflow */
        overflow-wrap: break-word; /* Prevent text overflow */
        max-width: 100%; /* Prevent overflow */
    }

    .impact-image-column {
        order: -1; /* Show image first on mobile */
        text-align: center; /* Center images on mobile */
        width: 100%; /* Full width on mobile */
        max-width: 100%; /* Prevent overflow */
        display: flex;
        justify-content: center; /* Center carousel */
        align-items: center;
    }

    .impact-image-wrapper {
        max-width: 100%;
        margin: 0 auto; /* Center images */
    }

    .impact-map-wrapper {
        max-width: 100%;
        padding: 15px;
        margin: 0 auto; /* Center maps */
    }

    .impact-globe-wrapper {
        max-width: 100%;
        width: 100%;
        padding: 15px;
        margin: 0 auto; /* Center globes */
        box-sizing: border-box; /* Include padding in width */
        display: flex;
        flex-direction: column;
        align-items: center; /* Center carousel */
        justify-content: center;
        text-align: center; /* Center text content */
    }

    .globe-label {
        font-size: 1.5rem;
        margin-bottom: 15px;
        text-align: center; /* Center labels on mobile */
        word-wrap: break-word; /* Prevent text overflow */
        overflow-wrap: break-word; /* Prevent text overflow */
        max-width: 100%; /* Prevent overflow */
        box-sizing: border-box; /* Include padding in width */
    }

    /* Ensure carousel is centered on mobile */
    .project-carousel {
        width: 100%;
        max-width: 100%;
        height: 400px;
        margin: 0 auto; /* Center carousel */
        display: flex; /* Ensure flex display */
        justify-content: center; /* Center carousel content */
        align-items: center; /* Center carousel vertically */
        position: relative; /* Ensure positioning works */
    }

    .carousel-card {
        width: 220px;
        height: 320px;
    }

    .carousel-card.position-left {
        left: 5%;
        opacity: 0.85 !important; /* Make side cards more visible on mobile */
        transform: translate(-50%, -50%) scale(0.8) translateZ(-50px) !important; /* Larger scale for visibility */
    }

    .carousel-card.position-right {
        left: 95%;
        opacity: 0.85 !important; /* Make side cards more visible on mobile */
        transform: translate(-50%, -50%) scale(0.8) translateZ(-50px) !important; /* Larger scale for visibility */
    }

    /* Tax Info Bar on mobile */
    .tax-info-bar {
        padding: 15px 0;
        text-align: center; /* Center tax info on mobile */
    }

    .tax-info-text {
        font-size: 1.2rem;
        text-align: center; /* Center text on mobile */
    }

    /* --- CONTACT PAGE --- */
    .contact-section {
        padding: 40px 5px !important; /* Minimal horizontal padding to make content wider */
    }
    
    .contact-container {
        /* Stack the form and the info box vertically */
        flex-direction: column;
        gap: 40px;
        text-align: center; /* Center content on mobile */
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important; /* No padding to make boxes wider */
        box-sizing: border-box !important;
    }
    
    .contact-info-column {
        width: 100% !important;
        padding: 0 !important; /* No padding to make boxes wider */
        box-sizing: border-box !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important; /* Gap between contact info box and map */
    }
    
    .contact-info-block {
        width: 100% !important;
        padding: 30px 15px !important; /* Minimal side padding to make box wider */
        box-sizing: border-box !important;
        margin: 0 auto !important;
    }
    
    .map-container {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 auto !important;
        margin-top: 30px !important; /* Gap between contact info and map */
        box-sizing: border-box !important;
    }
    
    .contact-header {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
        text-align: center !important; /* Center header text on mobile */
    }

    .contact-header p {
        text-align: center; /* Center paragraph text on mobile */
    }

    /* Contact form fields on mobile */
    .contact-form-column {
        text-align: center; /* Center form container on mobile */
        width: 100% !important; /* Full width on mobile */
        max-width: 100% !important; /* Remove any max-width constraints */
        padding: 30px 15px !important; /* Minimal side padding to make box wider */
        box-sizing: border-box !important;
        margin: 0 auto !important;
    }

    .form-group {
        text-align: left; /* Keep labels and inputs left-aligned */
        margin-bottom: 25px; /* More spacing on mobile */
        width: 100%; /* Full width on mobile */
    }

    .form-group label {
        font-size: 1.8rem; /* Larger labels on mobile */
        margin-bottom: 10px;
        display: block; /* Ensure full width */
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 1.8rem; /* Larger input text on mobile */
        padding: 15px; /* More padding on mobile */
        width: 100%; /* Full width on mobile */
        max-width: 100%; /* Ensure no max-width constraints */
        box-sizing: border-box;
    }

    /* --- DONATE PAGE --- */
    .donate-hero-section {
        text-align: center !important; /* Ensure centered text on mobile */
        padding: 40px 20px !important; /* Ensure proper padding on mobile */
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .donate-hero-section .page-container {
        max-width: 100% !important; /* Full width on mobile */
        padding: 0 20px !important; /* Proper padding */
        width: 100% !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
    
    .donate-hero-section h1,
    .donate-hero-section p {
        text-align: center !important; /* Force center alignment */
        width: 100%;
        max-width: 100%;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .donate-form-section {
        padding: 40px 10px !important; /* Less padding for wider content */
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .donate-container {
        /* Stack the donation form and the impact cards vertically */
        flex-direction: column;
        gap: 40px;
        max-width: 100% !important; /* Full width on mobile */
        padding: 0 10px !important; /* Less padding for wider content */
        width: 100% !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    .donate-form-column {
        text-align: left; /* Keep form fields left-aligned */
    }

    .donate-form-column h3 {
        text-align: center; /* Center form headings on mobile */
    }

    .amount-selector {
        /* Change amount buttons to a 2-column grid to save space */
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- FIND-A-MIKVAH PAGE --- */
    .find-mikvah-hero {
        text-align: center; /* Ensure centered text on mobile */
    }

    #mikvah-map {
        height: 400px;
    }

    .map-controls {
        flex-direction: column;
        align-items: stretch;
        text-align: center; /* Center map controls on mobile */
    }

    .map-control-button {
        width: 100%;
        margin-bottom: 10px;
    }

    .map-section {
        text-align: center; /* Center map section on mobile */
    }

    .map-zoom-controls {
        top: 5px;
        right: 5px;
    }

    .map-zoom-button {
        width: 35px;
        height: 35px;
        font-size: 1.4rem;
    }

    .mikvah-list {
        grid-template-columns: 1fr;
    }

    /* Form row adjustments for mobile */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ==========================================================================
   9. PROJECT DETAIL PAGE STYLES
   ========================================================================== */

.project-hero-section {
    position: relative;
    text-align: center;
    color: var(--color-text-light);
    margin-top: 90px; /* Account for fixed header */
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.project-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.project-hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.1);
    display: block;
}

.project-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    z-index: 2;
}

.project-hero-content {
    position: relative;
    z-index: 3;
    padding: 80px 40px;
}

.project-number-badge {
    display: inline-block;
    background-color: var(--color-dark);
    color: var(--color-background);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.project-number-badge-card {
    position: absolute;
    top: 340px;
    right: 15px;
    background-color: var(--color-dark);
    color: var(--color-background);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.project-hero-content h1 {
    color: var(--color-text-light);
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.project-hero-content p {
    color: var(--color-text-light);
    font-size: var(--font-size-body-l);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.project-details-section {
    background-color: #dddddd;
    padding: 80px 0;
}

.project-images-gallery {
    margin-bottom: 60px;
}

.project-images-gallery h2 {
    margin-bottom: 30px;
}

.project-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.project-image-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.project-image-item:hover {
    transform: translateY(-5px);
}

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

.project-description {
    margin-bottom: 60px;
}

.project-description h2 {
    margin-bottom: 20px;
}

.project-contact-map-container {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    margin-bottom: 60px;
}

.project-left-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-contact-info {
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.project-contact-info h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--color-dark);
    font-size: 2.4rem;
}

.project-contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.contact-detail-item i {
    font-size: 1.6rem;
    color: var(--color-dark);
    margin-top: 2px;
    flex-shrink: 0;
}

.contact-detail-item span,
.contact-detail-item a {
    font-size: 1.4rem;
    color: var(--color-text-primary);
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-detail-item a:hover {
    color: var(--color-dark);
    text-decoration: underline;
}

.contact-detail-item a:active {
    color: var(--color-dark);
}

.project-map-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

.project-donate-section {
    text-align: center;
    padding: 25px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.project-donate-section h2 {
    margin-top: 6;
    margin-bottom: 15px;
    font-size: 2.9rem;
}

.project-donate-section p {
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.project-donate-section .site-button {
    font-size: 1.6rem;
    padding: 15px 30px;
    margin-top: 0;
}

/* Lightbox Modal Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-counter {
    color: #fff;
    font-size: 18px;
    margin-top: 20px;
    font-weight: 500;
}

.project-image-item {
    cursor: pointer;
}

.project-gallery-img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

@media (max-width: 768px) {
    .project-hero-section {
        min-height: 400px;
        text-align: center; /* Ensure centered text on mobile */
    }
    
    .project-hero-content {
        padding: 60px 20px;
        text-align: center; /* Ensure centered content on mobile */
    }
    
    .project-images-grid {
        grid-template-columns: 1fr;
    }
    
    .project-gallery-img {
        height: 250px;
    }
    
    .project-contact-map-container {
        flex-direction: column;
        gap: 30px;
        text-align: center; /* Center container on mobile */
    }
    
    .project-left-column {
        width: 100%;
        gap: 20px;
        text-align: center; /* Center column on mobile */
    }
    
    .project-contact-info {
        padding: 20px;
        text-align: left; /* Keep contact info left-aligned */
        margin: 0 auto; /* Center the box itself */
        width: 100%; /* Full width to match other content */
        max-width: 100%; /* Remove max-width constraint */
        box-sizing: border-box; /* Include padding in width */
    }
    
    .project-contact-info h2 {
        font-size: 2rem;
        margin-bottom: 15px;
        text-align: center; /* Center heading on mobile */
    }
    
    .contact-detail-item {
        padding: 12px;
    }
    
    .contact-detail-item i {
        font-size: 1.4rem;
    }
    
    .contact-detail-item span,
    .contact-detail-item a {
        font-size: 1.3rem;
    }
    
    .project-map-section {
        width: 100%;
        padding-top: 0;
    }
    
    .project-map-section .map-container {
        width: 100%;
    }
    
    .project-map-section iframe {
        height: 350px !important;
    }
    
    .project-donate-section {
        padding: 20px;
        text-align: left; /* Keep donate section left-aligned */
        margin: 0 auto; /* Center the box itself */
        max-width: 500px; /* Limit width on mobile */
    }
    
    .project-donate-section h2 {
        font-size: 2rem;
        margin-bottom: 12px;
        text-align: center; /* Center heading on mobile */
    }
    
    .project-donate-section p {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .project-donate-section .site-button {
        font-size: 1.4rem;
        padding: 12px 25px;
        display: block;
        margin: 0 auto; /* Center button on mobile */
    }
    
    .project-details-section {
        padding: 40px 0;
        text-align: center; /* Center section on mobile */
    }

    .project-details-section h2 {
        text-align: center; /* Center section headings on mobile */
    }

    /* Lightbox on mobile */
    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 35px;
        height: 35px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-content img {
        max-height: 75vh;
    }

    .lightbox-counter {
        font-size: 16px;
        margin-top: 15px;
    }

    /* Payment methods on mobile */
    .payment-methods {
        flex-direction: column;
    }

    .payment-method-button {
        width: 100%;
    }

    /* Project selector on mobile */
    .project-selector {
        max-height: 250px;
    }
}

/* Stripe Elements Styles */
.stripe-element {
    background: #fff;
    border: 2px solid #e6e6e6;
    border-radius: 5px;
    padding: 12px 15px;
    font-size: 1.6rem;
    transition: border-color 0.3s ease;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.stripe-element:focus-within {
    border-color: var(--color-dark);
    outline: none;
}

.stripe-element.StripeElement--invalid {
    border-color: #e74c3c;
}

.stripe-error {
    color: #e74c3c;
    font-size: 1.4rem;
    margin-top: 8px;
    min-height: 20px;
}

/* Payment Result Messages */
.payment-result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.payment-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.payment-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.payment-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.payment-message i {
    font-size: 3rem;
}

.payment-message h4 {
    margin: 0;
    font-size: 2rem;
}

.payment-message p {
    margin: 0;
    font-size: 1.4rem;
}

/* Loading Spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--color-dark);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* Submit Button States */
.form-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

/* Mobile Stripe Elements */
@media (max-width: 768px) {
    .stripe-element {
        padding: 10px 12px;
        font-size: 1.4rem;
    }
    
    .payment-message {
        padding: 15px;
    }
    
    .payment-message i {
        font-size: 2.5rem;
    }
    
    .payment-message h4 {
        font-size: 1.8rem;
    }
    
    .payment-message p {
        font-size: 1.3rem;
    }
}