/* ===== CSS VARIABLES ===== */
:root {
    /* Main Color Palette */
    --primary-blue: #3A6EA5;
    --primary-blue-hover: #2d5680;
    --primary-blue-light: #5A7EC1;
    --primary-blue-lighter: #D6E6F7;
    --primary-blue-lightest: #ECF3FB;
    --gold: #FFD700;
    --gold-hover: #e6c300;
    --gold-light: #FFFACD;
    --gold-dark: #B8860B;
    --white: #ffffff;
    
    /* Text Colors */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-light: #adb5bd;
    
    /* Accent Colors */
    --accent-green: #28a745;
    --accent-green-light: #d4edda;
    
    /* Gray Shades */
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    
    /* Container Width */
    --container-max-width: 1200px;
    
    /* Font Sizes */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-md: 1.125rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-xxl: 1.225rem;
    --font-size-xxxl: 2rem;
    
    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
}

/* ===== TRIENNIAL CYCLE TOGGLE STYLES ===== */
.reading-cycle-toggle {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--border-radius-md);
    padding: 4px;
    gap: 4px;
    margin: var(--space-md) 0;
}

.cycle-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--gray-600);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.cycle-btn:hover {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cycle-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(58, 110, 165, 0.3);
}

.cycle-btn i {
    font-size: 0.85em;
}

.reading-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.reading-section.fade-out {
    opacity: 0.5;
    transform: translateY(-5px);
}

.triennial-note {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--primary-blue-lightest);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--primary-blue);
}

.triennial-note i {
    color: var(--primary-blue);
    margin-top: 2px;
    flex-shrink: 0;
}

.triennial-year-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.triennial-movement {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: var(--font-size-sm);
}

.triennial-year-text {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
    line-height: 1.3;
}

/* Header layout improvements */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

/* Reading layout improvements */
.reading-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    min-width: 0;
    flex-wrap: wrap;
}

.reading-icon {
    display: inline-flex;
    min-width: 16px;
    width: 16px;
    flex-shrink: 0;
    justify-content: center;
}

.reading-label {
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.reading-text {
    color: var(--gray-800);
    font-weight: 500;
    line-height: 1.6;
}

/* Scripture reference formatting - each reference on its own line */
#brit-reading.multi-ref .scripture-ref {
    display: block;
    line-height: 1.5;
    margin-bottom: 2px;
}

/* Special styling only for Torah/Haftarah/Brit readings */
.reading-section .reading-text,
.parashah-info:has(.reading-text) .reading-text {
    margin-top: 2px;
    border-left: 3px solid var(--primary-blue);
    background: var(--primary-blue-lightest);
    padding: 8px 12px;
    border-radius: 0 4px 4px 0;
    margin-left: 16px;
    position: relative;
}

/* Mobile refinements */
@media (max-width: 320px) {
    .reading-section .reading-text,
    .parashah-info:has(.reading-text) .reading-text {
        font-size: 0.9rem;
        margin-left: 8px;
        padding: 6px 10px;
    }
    
    .reading-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}


    
    /* Transitions */
    --transition-standard: all 0.3s ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 15px rgba(0,0,0,0.1);
    --shadow-inset: inset 0 2px 5px rgba(0,0,0,0.05);
}

/* ===== RESET & BASE STYLES ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-100);
    transition: var(--transition-standard);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    position: relative;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: var(--transition-standard);
}

a:hover {
    color: var(--primary-blue-hover);
}

ul {
    list-style-type: none;
}

/* Page content lists - restore bullets */
.page-content ul:not(.footer-links):not(.footer-contact):not(.sidebar-list):not(.nav-links):not(.service-times-list),
.community-section ul,
.worship-section ul {
    list-style-type: disc;
    padding-left: var(--space-xl);
    margin: var(--space-md) 0;
}

.page-content ul:not(.footer-links):not(.footer-contact):not(.sidebar-list):not(.nav-links):not(.service-times-list) li,
.community-section ul li,
.worship-section ul li {
    margin-bottom: var(--space-xs);
    color: var(--gray-700);
}

/* Service Times List - Minimal Line Spacing */
div[data-editable="service-times"] ul,
.service-schedule-modal .service-times-list,
ul.service-times-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

div[data-editable="service-times"] ul li,
.service-schedule-modal .service-times-list li,
ul.service-times-list li {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.15 !important;
    margin-bottom: 8px !important;
    display: block !important;
}

div[data-editable="service-times"] ul li strong,
.service-schedule-modal .service-times-list li strong,
ul.service-times-list li strong {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0.9 !important;
    display: inline !important;
}

/* Time highlights for service schedule */
.time-highlight {
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

.time-highlight.blue {
    background: rgba(58, 110, 165, 0.15);
    color: var(--primary-blue);
}
.time-highlight.gold {
    background: rgba(200, 155, 60, 0.2);
    color: var(--gold-dark);
}
.time-highlight.green {
    background: rgba(40, 167, 69, 0.15);
    color: #1e7e34;
}

/* Prevent email and phone wrapping */
#contact-us-section a[href^="mailto:"],
#contact-us-section a[href^="tel:"],
a[href^="mailto:OhrHaTorahOC@gmail.com"],
a[href^="tel:+17144061513"] {
    white-space: nowrap !important;
    display: inline-block !important;
}

/* Dropdown header links - all clickable by default */
.dropdown > a {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure dropdown still shows on hover */
.dropdown:hover .dropdown-content {
    display: block !important;
}

/* Hanging indent for wrapped text - align to content after colon */
/* For service times list hanging indent */
div[data-editable="service-times"] ul li {
    text-indent: -5em !important;
    padding-left: 5em !important;
}

/* For donation "Mail to:" hanging indent */
.mail-to-address {
    text-indent: -4.2em !important;
    padding-left: 4.2em !important;
}

button, .btn {
    cursor: pointer;
    font-family: inherit;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-standard);
    font-weight: 500;
    outline: none;
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius-sm);
    background-color: var(--white);
    color: var(--primary-blue);
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
    width: 100%;
}

button:hover, .btn:hover {
    background-color: var(--primary-blue-lighter);
    box-shadow: var(--shadow-md);
}

button i, .btn i {
    margin-right: var(--space-sm);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-blue);
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--font-size-xxl);
}

/* Specific override for main title */
.content h1[data-editable="main-title"] {
    font-size: 1.25rem !important;
}

/* FAQ Modal Styles */
.faq-modal {
    max-width: 700px !important;
    width: 85% !important;
    max-height: 85vh !important;
    overflow-y: auto;
}

.faq-intro {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: var(--space-lg);
    font-style: italic;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.faq-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: var(--transition-standard);
}

.faq-question {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--gray-50);
    cursor: pointer;
    transition: var(--transition-standard);
    font-weight: 600;
    color: var(--gray-800);
}

.faq-question:hover {
    background: var(--primary-blue-lightest);
    color: var(--primary-blue);
}

.faq-icon {
    color: var(--primary-blue);
    transition: transform var(--transition-standard);
    font-size: 0.9rem;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 var(--space-md);
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-standard);
    background: var(--white);
    text-align: left;
}

.faq-item.active .faq-answer {
    padding: var(--space-md);
    max-height: 200px;
    text-align: left;
}

.faq-answer p {
    margin: 0;
    color: var(--gray-700);
    line-height: 1.6;
    text-align: left !important;
}

/* Rabbi Modal Styles */
.rabbi-modal {
    max-width: 500px !important;
    width: 90% !important;
}

.rabbi-modal .feature-card {
    margin: 0;
    box-shadow: none;
    border: none;
}

/* Mission, Vision, and Core Values Panel Styles */
.mission-text, .vision-text {
    text-align: left;
}

.mission-text p, .vision-text p {
    margin-bottom: var(--space-md);
    line-height: 1.6;
    color: var(--gray-700);
}

.mission-highlights, .vision-goals {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.highlight-item, .goal-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--primary-blue-lightest);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    color: var(--primary-blue);
}

.highlight-item i, .goal-item i {
    color: var(--primary-blue);
    min-width: 20px;
    width: 20px;
    flex-shrink: 0;
    text-align: center;
    font-size: 0.85rem;
    margin-right: 4px;
}

.values-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-left: 3px solid var(--primary-blue);
    background: var(--gray-50);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.value-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.9rem;
}

.value-content h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: var(--gray-800);
    font-weight: 600;
}

.value-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.4;
}

/* Compact Values List (sidebar) */
.values-list-compact {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.value-item-compact {
    padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-md);
    border-left: 3px solid var(--primary-blue);
    text-align: left;
    background: transparent;
    border-radius: 0 6px 6px 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.value-item-compact:hover {
    background: rgba(0, 102, 204, 0.08);
    border-left-color: #00a896;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 168, 150, 0.2);
}

.value-item-compact h4 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: var(--primary-blue);
    font-weight: 600;
    transition: color 0.3s ease;
}

.value-item-compact:hover h4 {
    color: #00a896;
}

.value-item-compact h4 i {
    font-size: 0.8rem;
    color: var(--primary-blue);
    margin-left: 6px;
    display: inline-block;
    transition: all 0.3s ease;
}

.value-item-compact:hover h4 i {
    color: #00a896;
    transform: scale(1.3) rotate(15deg);
}

.value-item-compact p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.value-item-compact:hover p {
    color: var(--text-primary);
}

/* Unique icon animations for each value */
.value-item-compact:nth-child(1):hover h4 i { transform: scale(1.3) rotate(-10deg); }
.value-item-compact:nth-child(2):hover h4 i { transform: scale(1.4) rotate(0deg); }
.value-item-compact:nth-child(3):hover h4 i { transform: scale(1.3) rotate(20deg); }
.value-item-compact:nth-child(4):hover h4 i { transform: scale(1.2) translateY(-3px); }
.value-item-compact:nth-child(5):hover h4 i { transform: scale(1.3) rotate(-15deg); }
.value-item-compact:nth-child(6):hover h4 i { transform: scale(1.2) translateY(-4px); }
.value-item-compact:nth-child(7):hover h4 i { transform: scale(1.3) rotate(10deg); }
.value-item-compact:nth-child(8):hover h4 i { transform: scale(1.2) translateY(-3px) rotate(-5deg); }

/* Community Life Collage Styles */
.community-collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.collage-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform var(--transition-standard);
    cursor: pointer;
}

.collage-image:hover {
    transform: scale(1.05);
}

h2 {
    font-size: var(--font-size-xl);
}

h3 {
    font-size: var(--font-size-lg);
}

h4 {
    font-size: var(--font-size-md);
}

p {
    margin-bottom: var(--space-md);
}

/* Calendar Container */
.calendar-container {
    width: 100%;
    margin: var(--space-lg) 0;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 10px;
}

.responsive-calendar {
    width: 100%;
    height: 600px !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.responsive-calendar iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Mobile adjustments for calendar */
@media (max-width: 768px) {
    .responsive-calendar {
        height: 400px !important;
    }
}


/* ===== UTILITIES ===== */
.text-center {
    text-align: center;
}

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

.text-bold {
    font-weight: 700;
}

.text-italic {
    font-style: italic;
}

.text-blue {
    color: var(--primary-blue);
}

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

.text-white {
    color: var(--white);
}

.bg-blue {
    background-color: var(--primary-blue);
}

.bg-gold {
    background-color: var(--gold);
}

.bg-light {
    background-color: var(--primary-blue-lightest);
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

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

.align-start {
    align-items: flex-start;
}

.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.my-sm {
    margin-top: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.my-md {
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
}

.my-lg {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.my-xl {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.px-sm {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
}

.px-md {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

.px-lg {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.py-sm {
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
}

.py-md {
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
}

.py-lg {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
}

.p-md {
    padding: var(--space-md);
}

.p-lg {
    padding: var(--space-lg);
}

.rounded-sm {
    border-radius: var(--border-radius-sm);
}

.rounded-md {
    border-radius: var(--border-radius-md);
}

.rounded-lg {
    border-radius: var(--border-radius-lg);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.border {
    border: 1px solid var(--gray-300);
}

.border-gold {
    border-color: var(--gold);
}

.border-blue {
    border-color: var(--primary-blue-lighter);
}

.btn-blue {
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
}

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

.btn-gold {
    background-color: var(--gold);
    color: var(--gray-900);
    border: none;
}

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

.w-full {
    width: 100%;
}

.w-half {
    width: 50%;
}

.w-third {
    width: 33.333%;
}

.h-full {
    height: 100%;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-gap-md {
    gap: var(--space-md);
}

.grid-gap-lg {
    gap: var(--space-lg);
}

/* ===== COMPONENTS ===== */
/* Header */
.header {
    position: relative;
    background: #000000;
    color: var(--white);
    padding: 0 var(--space-xl);
    height: 224px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    background: linear-gradient(to bottom,
        #000000 0%,
        #000000 5%,
        #010103 5.5%,
        #010205 6%,
        #020307 6.5%,
        #02040a 7%,
        #03050d 7.5%,
        #030610 8%,
        #040713 8.5%,
        #040816 9%,
        #050a19 9.5%,
        #050b1c 10%,
        #060c1f 10.5%,
        #060d22 11%,
        #070e25 11.5%,
        #070f28 12%,
        #08102b 12.5%,
        #08112e 13%,
        #091231 13.5%,
        #091334 14%,
        #0a142c 14.5%,
        #0a1529 15%,
        #0b1830 16%,
        #0c1a35 17%,
        #0d1c3b 18%,
        #0e1f41 19%,
        #0f2147 20%,
        #10244d 21%,
        #112753 22%,
        #122959 23%,
        #132b5f 24%,
        #142e65 25%,
        #15306b 26%,
        #163371 27%,
        #173577 28%,
        #18387d 29%,
        #193a83 30%,
        #1a3d89 31%,
        #1b3f8f 32%,
        #1c4295 33%,
        #1d449b 34%,
        #1e47a1 35%,
        #1f49a7 36%,
        #204cad 37%,
        #214eb3 38%,
        #2251b9 39%,
        #2353bf 40%,
        #2456c5 41%,
        #2558cb 42%,
        #265bd1 43%,
        #275dd7 44%,
        #2860dd 45%,
        #2962e3 46%,
        #2a65e9 47%,
        #2b67ef 48%,
        #2c6af5 49%,
        #2d6cf3 50%,
        #2e6ff1 51%,
        #2f71ef 52%,
        #3074ed 53%,
        #3176eb 54%,
        #3279e9 55%,
        #337be7 56%,
        #347ee5 57%,
        #3580e3 58%,
        #3683e1 59%,
        #3785df 60%,
        #3888dd 61%,
        #398adb 62%,
        #3a8dd9 63%,
        #3b8fd7 64%,
        #3c92d5 65%,
        #3d94d3 66%,
        #3e97d1 67%,
        #3f99cf 68%,
        #409ccd 69%,
        #419ecc 70%,
        #42a1c9 71%,
        #50a5ce 72%,
        #5FA8D3 73%,
        #66add7 74%,
        #6DB2DB 75%,
        #74b7df 76%,
        #7BBCE3 77%,
        #85c1e7 78%,
        #8FC7EC 78.5%,
        #93CCF0 79%,
        #9DD4F4 79.5%,
        #A5D8F5 80%,
        #ACDBF6 80.5%,
        #B3E0F7 81%,
        #BAE4F8 81.5%,
        #C1E8F9 82%,
        #C8ECFA 82.5%,
        #CFF0FB 83%,
        #D6F4FC 83.5%,
        #DDF8FD 84%,
        #E2F9FD 84.5%,
        #E6FAFE 85%,
        #EAFBFE 85.5%,
        #EEFBFE 86%,
        #F0FCFE 86.5%,
        #F2FCFE 87%,
        #F4FDFF 87.5%,
        #F6FDFF 88%,
        #F7FDFF 88.5%,
        #F8FDFF 89%,
        #F9FEFF 89.5%,
        #FAFEFF 90%,
        #FBFEFF 90.5%,
        #FCFEFF 91%,
        #FDFEFF 91.5%,
        #FEFEFF 92%,
        #FEFEFF 92.5%,
        #FFFFFF 93%,
        #FFFFFF 100%);
    filter: blur(8px);
    z-index: -1;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.005"/></svg>');
    z-index: -1;
    mix-blend-mode: overlay;
}

.header > * {
    position: relative;
    z-index: 10;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.logo-image {
    height: 224px;
    width: auto;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.location {
    display: flex;
    align-items: center;
}

.header-info {
    position: absolute;
    right: var(--space-xl);
    top: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 100;
}

.header-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

/* Hostage Counter - Bring Them Home Now Widget */
.hostage-info {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: block; /* Always visible for our hostage counter */
}



.time-date-container {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
    color: var(--white);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.time-date-container .date-section {
    display: flex;
    flex-direction: column;
    gap: 1px;
    align-items: flex-end;
}

.time-date-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

.israel-time {
    font-size: 1.4rem;
    color: var(--white);
    font-weight: 300;
    letter-spacing: 2px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}

.time-suffix {
    font-size: 0.6rem;
    font-weight: 400;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hebrew-date {
    font-size: 1rem;
    color: var(--white);
    font-weight: 300;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    opacity: 0.95;
    min-width: 150px;
    line-height: 1.3;
}


.gregorian-date {
    font-size: 0.85rem;
    color: var(--white);
    font-weight: 300;
    letter-spacing: 0.3px;
    opacity: 0.8;
    margin-top: -5px;
    line-height: 1.3;
    text-align: right;
}

/* Hostage Counter */
.hostage-counter {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    transition: var(--transition-standard);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hostage-counter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.hostage-header {
    margin-bottom: 6px;
}

.hostage-text {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    margin-bottom: 2px;
}

.hostage-flag {
    width: 19px;
    height: 14px;
    margin-right: 6px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.hostage-count {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.1em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hostage-subtext {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.4px;
}

.hostage-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    margin: 6px 0;
}

.timer-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 28px;
}

.timer-number {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-hover));
    color: var(--white);
    padding: 3px 4px;
    border-radius: 3px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 26px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-variant-numeric: tabular-nums;
}

.timer-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.6rem;
    font-weight: 500;
    margin-top: 2px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.timer-separator {
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hostage-footer {
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bring-them-home {
    color: var(--gold);
    font-size: 0.715rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: gentle-glow 3s ease-in-out infinite;
}

@keyframes gentle-glow {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    50% {
        opacity: 0.85;
        text-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    }
}

/* Hostage Memorial Styles */
.hostage-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.hostage-link:hover .hostage-counter {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.hostage-memorial {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
}

.memorial-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 8px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-hover));
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 42px;
}

.memorial-number {
    color: var(--white);
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.1;
}

.memorial-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

/* Admin Portal Styles */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.admin-modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
    max-width: 550px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 10001;
}

.admin-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    transition: var(--transition-standard);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    line-height: 1;
}

.admin-modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
    border-color: var(--gray-400);
    transform: scale(1.1);
}

.admin-form-group {
    margin-bottom: var(--space-md);
}

.admin-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: var(--font-size-sm);
}

.admin-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    transition: var(--transition-standard);
    box-sizing: border-box;
    min-height: 40px;
}

.admin-form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.1);
}

.admin-form-group input[readonly] {
    background: var(--gray-100);
    color: var(--gray-600);
}

.admin-error {
    background: #fee;
    color: #c53030;
    padding: var(--space-sm);
    border-radius: var(--border-radius-sm);
    margin-top: var(--space-sm);
    border: 1px solid #fecaca;
}

.admin-section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--gray-200);
}

.admin-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.admin-section h4 {
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-md);
    color: var(--primary-blue);
}

.admin-section p {
    margin-bottom: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    line-height: 1.5;
}

.admin-buttons {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.admin-buttons .btn {
    flex: 1;
    min-height: 40px;
    font-size: var(--font-size-sm);
    padding: 10px 16px;
}

.admin-section h4 {
    color: var(--primary-blue);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-md);
}

.admin-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.admin-buttons .btn {
    flex: 1;
    min-width: 120px;
}

#admin-panel h3 {
    color: var(--primary-blue);
    margin-bottom: var(--space-xl);
    text-align: center;
}

#admin-login-form h3 {
    color: var(--primary-blue);
    margin-bottom: var(--space-xl);
    text-align: center;
}

/* Edit Mode Styles */
body.edit-mode {
    position: relative;
}

body.edit-mode::before {
    content: '✏️ EDIT MODE ACTIVE - Click elements to edit them';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    text-align: center;
    padding: 12px;
    font-weight: bold;
    z-index: 9999;
    font-size: 1rem;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

body.edit-mode [data-editable] {
    position: relative !important;
    transition: all 0.3s ease !important;
    border: 2px dashed #ccc !important;
    padding: 4px !important;
    margin: 2px !important;
    min-height: 20px !important;
}

body.edit-mode [data-editable]:hover {
    border-color: var(--primary-blue) !important;
    background: rgba(58, 110, 165, 0.1) !important;
    cursor: pointer !important;
}

body.edit-mode [data-editable].editing {
    border-color: var(--gold) !important;
    background: rgba(255, 215, 0, 0.1) !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3) !important;
}

/* Special handling for sidebar and card elements */
body.edit-mode .sidebar-widget [data-editable],
body.edit-mode .feature-card [data-editable],
body.edit-mode .widget-header[data-editable],
body.edit-mode .card-header [data-editable],
body.edit-mode .testimonial [data-editable] {
    position: relative !important;
    border: 2px dashed #ccc !important;
    padding: 4px !important;
    margin: 2px !important;
    min-height: 20px !important;
}

body.edit-mode .sidebar-widget [data-editable]:hover,
body.edit-mode .feature-card [data-editable]:hover,
body.edit-mode .widget-header[data-editable]:hover,
body.edit-mode .card-header [data-editable]:hover,
body.edit-mode .testimonial [data-editable]:hover {
    border-color: var(--primary-blue) !important;
    background: rgba(58, 110, 165, 0.1) !important;
    cursor: pointer !important;
}

/* Ensure edit icons appear in complex layouts */
body.edit-mode .sidebar-widget .edit-icon,
body.edit-mode .feature-card .edit-icon,
body.edit-mode .testimonial .edit-icon {
    z-index: 10000 !important;
    position: absolute !important;
}

.edit-icon {
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    background: var(--primary-blue) !important;
    color: white !important;
    border-radius: 50% !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.8rem !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

.edit-icon:hover {
    background: var(--primary-blue-hover) !important;
    transform: scale(1.1) !important;
}

body.edit-mode [data-editable]:hover .edit-icon {
    opacity: 1 !important;
}

.edit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-dialog {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: var(--space-xl);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.edit-dialog h3 {
    color: var(--primary-blue);
    margin-bottom: var(--space-lg);
}

.edit-dialog textarea {
    width: 100%;
    min-height: 120px;
    padding: var(--space-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: var(--font-size-base);
    resize: vertical;
}

.edit-dialog textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.1);
}

.edit-dialog-buttons {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.edit-dialog-buttons .btn {
    flex: 1;
}

.edit-mode-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-blue);
    color: white;
    padding: 16px 20px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 9998;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.edit-mode-controls {
    display: flex;
    gap: 8px;
    width: 100%;
}

.edit-mode-controls .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85rem;
    min-width: auto;
}

.exit-edit-btn {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
    font-weight: bold !important;
}

.exit-edit-btn:hover {
    background: #c82333 !important;
    border-color: #c82333 !important;
    transform: scale(1.05) !important;
}

.save-all-edit-btn {
    background: var(--gold) !important;
    border-color: var(--gold) !important;
    color: var(--gray-800) !important;
    font-weight: bold !important;
}

.save-all-edit-btn:hover {
    background: var(--gold-hover) !important;
    border-color: var(--gold-hover) !important;
}

.btn-gold {
    background: var(--gold);
    color: var(--gray-800);
    border: 1px solid var(--gold-hover);
}

.btn-gold:hover {
    background: var(--gold-hover);
    border-color: var(--gold-hover);
    color: var(--gray-900);
}

/* Navigation */
.nav-container {
    background: var(--white);
    border-bottom: 1px solid var(--gray-300);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    width: 100%;
    height: 45px;
}

.navigation {
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    height: 100%;
}

.nav-links {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
}

.nav-links li {
    margin: 0;
    position: relative;
    flex: 1;
    display: flex;
}

.nav-links a {
    color: var(--gray-800);
    padding: var(--space-xs) var(--space-md);
    transition: var(--transition-standard);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: calc(var(--font-size-sm) * 1.25);
    text-shadow: 1px 1px 2px rgba(255,255,255,0.7);
    width: 100%;
    border-right: 1px solid rgba(255,255,255,0.3);
    line-height: 1.4;
}

/* Reduced line spacing when text wraps */
.nav-links a.text-wrapped {
    line-height: 1.1;
    padding: 2px var(--space-md);
}

.nav-links a i {
    margin-right: var(--space-sm);
    font-size: var(--font-size-sm);
    transition: var(--transition-standard);
}

.nav-links a:hover {
    filter: brightness(1.1);
}

.nav-links a:hover i {
    transform: translateX(2px);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    width: max-content;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-radius: var(--border-radius-sm);
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.3);
    overflow: hidden;
}

.dropdown-content a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
    margin: 0;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

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


.dropdown > a::after {
    content: "\25BC";
    font-size: var(--font-size-xs);
    margin-left: var(--space-sm);
    vertical-align: middle;
}

/* Match dropdown colors to parent menu items */
.nav-links li:nth-child(1) .dropdown-content {
    background: linear-gradient(135deg, #B8E0FF 0%, #94CCFF 100%);
}

.nav-links li:nth-child(1) .dropdown-content a {
    background: transparent;
    color: var(--gray-800);
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-links li:nth-child(1) .dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.nav-links li:nth-child(2) .dropdown-content {
    background: linear-gradient(135deg, #FFE0F0 0%, #FFCCE5 100%);
}

.nav-links li:nth-child(2) .dropdown-content a {
    background: transparent;
    color: var(--gray-800);
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-links li:nth-child(2) .dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.nav-links li:nth-child(3) .dropdown-content {
    background: linear-gradient(135deg, #E0FFEB 0%, #C2FFD6 100%);
}

.nav-links li:nth-child(3) .dropdown-content a {
    background: transparent;
    color: var(--gray-800);
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-links li:nth-child(3) .dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.nav-links li:nth-child(4) .dropdown-content {
    background: linear-gradient(135deg, #FFFACD 0%, #FFE09E 100%);
}

.nav-links li:nth-child(4) .dropdown-content a {
    background: transparent;
    color: var(--gray-800);
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-links li:nth-child(4) .dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.nav-links li:nth-child(5) .dropdown-content {
    background: linear-gradient(135deg, #E8E0FF 0%, #D1C4FF 100%);
}

.nav-links li:nth-child(5) .dropdown-content a {
    background: transparent;
    color: var(--gray-800);
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-links li:nth-child(5) .dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.nav-links li:nth-child(6) .dropdown-content {
    background: linear-gradient(135deg, #FFE8D1 0%, #FFD9B8 100%);
}

.nav-links li:nth-child(6) .dropdown-content a {
    background: transparent;
    color: var(--gray-800);
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-links li:nth-child(6) .dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.nav-links li:nth-child(7) .dropdown-content {
    background: linear-gradient(135deg, #F0E68C 0%, #FFD700 100%);
}

.nav-links li:nth-child(7) .dropdown-content a {
    background: transparent;
    color: var(--gray-800);
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-links li:nth-child(7) .dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

/* Ensure Community dropdown expands to fit content */
.dropdown:nth-child(3) .dropdown-content {
    min-width: 250px;
}

/* Ghibli-inspired pastel gradient background swatches for each menu item */
.nav-links li:nth-child(1) a {
    background: linear-gradient(135deg, #B8E0FF 0%, #94CCFF 100%);
}

.nav-links li:nth-child(2) a {
    background: linear-gradient(135deg, #FFE0F0 0%, #FFCCE5 100%);
}

.nav-links li:nth-child(3) a {
    background: linear-gradient(135deg, #E0FFEB 0%, #C2FFD6 100%);
}

.nav-links li:nth-child(4) a {
    background: linear-gradient(135deg, #FFFACD 0%, #FFE09E 100%);
}

.nav-links li:nth-child(5) a {
    background: linear-gradient(135deg, #E8E0FF 0%, #D1C4FF 100%);
}

.nav-links li:nth-child(6) a {
    background: linear-gradient(135deg, #FFE8D1 0%, #FFD9B8 100%);
}

.nav-links li:nth-child(7) a {
    background: linear-gradient(135deg, #F0E68C 0%, #FFD700 100%);
}

/* Hover effects for menu items */
.nav-links li:nth-child(1) a:hover {
    background: linear-gradient(135deg, #94CCFF 0%, #70B8FF 100%);
}

.nav-links li:nth-child(2) a:hover {
    background: linear-gradient(135deg, #FFCCE5 0%, #FFB8DB 100%);
}

.nav-links li:nth-child(3) a:hover {
    background: linear-gradient(135deg, #C2FFD6 0%, #A4FFC1 100%);
}

.nav-links li:nth-child(4) a:hover {
    background: linear-gradient(135deg, #FFE09E 0%, #FFD074 100%);
}

.nav-links li:nth-child(5) a:hover {
    background: linear-gradient(135deg, #D1C4FF 0%, #BBA7FF 100%);
}

.nav-links li:nth-child(6) a:hover {
    background: linear-gradient(135deg, #FFD9B8 0%, #FFCA9F 100%);
}

.nav-links li:nth-child(7) a:hover {
    background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
}

.donate-btn {
    color: var(--gray-800) !important;
    font-weight: 600 !important;
    padding: var(--space-xs) var(--space-md) !important;
    border-radius: 0 !important;
    margin-left: 0;
    border-right: none !important;
    font-size: calc(var(--font-size-sm) * 1.25) !important;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.7) !important;
}

.donate-btn:hover {
    filter: brightness(1.1) !important;
}

.donate-btn i {
    color: var(--gray-800);
}

.nav-links li:last-child a {
    border-right: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: var(--font-size-xl);
    cursor: pointer;
    box-shadow: none;
}

.mobile-menu-btn:hover {
    background: none;
    color: var(--primary-blue-hover);
    box-shadow: none;
}

/* Container */
.container {
    max-width: 1400px;
    margin: var(--space-lg) auto;
    padding: 0 var(--space-lg);
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(500px, 2.5fr) minmax(250px, 1fr);
    gap: var(--space-lg);
    align-items: start;
    box-sizing: border-box;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    width: 100%;
    max-width: 335px;
    min-width: 255px;
}

.sidebar-widget {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-standard);
    border: 1px solid var(--gray-300);
    width: 100%;
}

/* .sidebar-widget:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
} */

.widget-header {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: var(--space-md) var(--space-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 8px;
}

.widget-header i {
    margin-right: var(--space-sm);
    color: var(--gold);
}

/* Live Indicator and Last Updated for Prayer Times */
.prayer-last-updated {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.65rem;
    color: #888;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.prayer-last-updated .live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(76, 175, 80, 0.15);
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 600;
    color: #4CAF50;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prayer-last-updated .live-indicator.active {
    opacity: 1;
}

.prayer-last-updated .live-dot {
    width: 5px;
    height: 5px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse-widget 2s ease-in-out infinite;
}

@keyframes pulse-widget {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.prayer-last-updated .live-text {
    letter-spacing: 0.5px;
}

.prayer-last-updated .updated-time {
    color: #888;
}

.widget-content {
    padding: var(--space-md);
}

.sidebar-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition-standard);
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    color: var(--primary-blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: var(--transition-standard);
    padding: var(--space-sm) 0;
}

.sidebar-list a:hover {
    color: var(--primary-blue-light);
    transform: translateX(3px);
}

.sidebar-list a i {
    margin-right: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--primary-blue);
    transition: var(--transition-standard);
}

.sidebar-list a:hover i {
    color: var(--gold);
    transform: scale(1.2);
}

/* Content */
.content {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-300);
    width: 100%;
    box-sizing: border-box;
}

.content h1 {
    color: var(--primary-blue);
    margin-top: 0;
    font-size: 1.6rem;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--primary-blue-lighter);
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.content h1 i {
    margin-right: var(--space-sm);
    color: var(--primary-blue);
}

.content h3 {
    display: flex;
    align-items: center;
    margin-top: var(--space-lg);
}

.content h3 i {
    margin-right: var(--space-sm);
    color: var(--primary-blue);
}

/* Infobox */
.infobox {
    background-color: var(--gold-light);
    border-left: 4px solid var(--gold);
    padding: var(--space-md);
    margin: var(--space-md) 0;
    border-radius: var(--border-radius-sm);
    position: relative;
    transition: var(--transition-standard);
}

/* .infobox:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
} */

.infobox i {
    margin-right: var(--space-sm);
    color: var(--primary-blue);
}


/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
    background-color: var(--gray-100);
    padding: var(--space-md);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--gray-300);
}

.info-box {
    transition: var(--transition-standard);
    padding: var(--space-md);
    border-radius: var(--border-radius-sm);
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
}

/* .info-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
} */

.info-box h4 {
    margin: 0 0 var(--space-sm) 0;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
}

.info-box h4 i {
    margin-right: var(--space-sm);
    color: var(--primary-blue);
}

.info-box p {
    margin: 0;
    white-space: normal;
    line-height: 1.4;
}

.map-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* Taller aspect ratio to fill available space */
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Button Group */
.btn-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

/* Card Styles for Right Sidebar */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    width: 100%;
    max-width: 335px;
    min-width: 255px;
}

.feature-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-standard);
    border: 1px solid var(--gray-300);
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* .feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
} */

.card-header {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: var(--space-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    white-space: nowrap;
    overflow: hidden;
}

/* Parashah card header - use shorter month format */
#parashah-header {
    font-size: 0.95rem;
}

.card-header i {
    color: var(--gold);
    font-size: var(--font-size-lg);
}

.card-body {
    padding: var(--space-md);
    flex-grow: 1;
}

.card-footer {
    padding: var(--space-md);
    background-color: var(--gray-100);
    border-top: 1px solid var(--gray-300);
    display: flex;
    justify-content: center;
}

/* Leader Card */
.leader-card {
    text-align: center;
}

.leader-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto var(--space-md);
    border: 3px solid var(--primary-blue);
    padding: 3px;
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition-standard);
}


.leader-name {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: var(--space-xs);
}

.leader-title {
    color: var(--primary-blue);
    font-style: italic;
    margin-bottom: var(--space-sm);
    font-weight: 500;
}

.leader-bio {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-md);
}

/* Parashah Card */
.parashah-info {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px dotted var(--gray-300);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Only stack the readings (Torah, Haftarah, Brit), not the main parashah name */
.reading-section .parashah-info,
.parashah-info:has(.reading-text) {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.parashah-info:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Brit Chadashah Section */
.brit-chadashah-section {
    position: relative;
}

/* Brit Chadashah editable styling in edit mode */
body.admin-edit-mode [data-brit-editable] {
    cursor: pointer;
    transition: outline 0.15s ease, background-color 0.15s ease;
    outline: 2px dashed transparent;
    outline-offset: 4px;
    border-radius: 4px;
    position: relative;
}

body.admin-edit-mode [data-brit-editable]:hover {
    outline-color: #3182ce;
    background-color: rgba(49, 130, 206, 0.08);
}

body.admin-edit-mode [data-brit-editable].actively-editing {
    outline: 2px solid #3182ce !important;
    outline-offset: 4px;
    background-color: rgba(49, 130, 206, 0.12) !important;
    cursor: text;
}

/* Ensure Haftarah sections always have their separator line */
.reading-section .parashah-info:last-child {
    border-bottom: 1px dotted var(--gray-300);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
}

.parashah-info i {
    margin-right: var(--space-sm);
    color: var(--primary-blue);
    margin-top: var(--space-xs);
    min-width: 16px;
    flex-shrink: 0;
}

.parashah-label {
    font-weight: 600;
    color: var(--primary-blue);
    margin-right: var(--space-sm);
}

/* Candle Lighting Card */
.candle-times {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.candle-row {
    display: flex;
    justify-content: space-between;
    padding-bottom: var(--space-sm);
    border-bottom: 1px dotted var(--gray-300);
}

.candle-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.candle-day {
    font-weight: 600;
    color: var(--primary-blue);
}

.candle-date {
    color: var(--gray-600);
    font-size: var(--font-size-sm);
}

.candle-time {
    color: var(--primary-blue);
    display: flex;
    align-items: center;
}

.candle-time i {
    color: var(--gold);
    margin-right: var(--space-sm);
}

/* Quote Box */
/* Ticker Banner */
.ticker-banner {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
    border-radius: var(--border-radius-md);
    margin: var(--space-lg) 0;
    border: 2px solid var(--primary-blue-light);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
    height: 60px;
}

.ticker-content {
    display: flex;
    animation: ticker 30s linear infinite;
    position: absolute;
    left: 0;
    height: 100%;
    align-items: center;
    white-space: nowrap;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 var(--space-xl);
    font-size: var(--font-size-base);
    color: var(--gray-700);
    font-style: italic;
    gap: var(--space-sm);
}

.ticker-item i {
    color: var(--gold);
    font-size: var(--font-size-lg);
}

.ticker-author {
    font-style: normal;
    font-weight: 600;
    color: var(--primary-blue);
    margin-left: var(--space-sm);
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause ticker on hover */
.ticker-banner:hover .ticker-content {
    animation-play-state: paused;
}

/* Footer */
.footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: var(--space-xl) 0 var(--space-lg);
    margin-top: auto;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
}

.footer-col h4 i {
    margin-right: var(--space-sm);
    color: var(--gold);
}

.footer-col p {
    color: var(--gray-300);
    font-size: var(--font-size-sm);
}

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

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

.footer-links a {
    color: var(--gray-300);
    display: flex;
    align-items: center;
    transition: var(--transition-standard);
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(3px);
}

.footer-links a i {
    margin-right: var(--space-sm);
    color: var(--gold);
    font-size: var(--font-size-sm);
    min-width: 20px;
    flex-shrink: 0;
    text-align: left;
}

.footer-contact {
    list-style: none;
    text-align: left;
    padding-left: 0;
    margin-left: 0;
}

.footer-contact li {
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: flex-start;
    color: var(--gray-300);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

.footer-contact li i {
    margin-right: var(--space-sm);
    color: var(--gold);
    min-width: 20px;
    flex-shrink: 0;
    text-align: left;
    margin-top: 2px;
}

.footer-contact li a {
    color: #4A90E2;
    text-decoration: none;
    transition: var(--transition-standard);
}

.footer-contact li a:hover {
    color: #357ABD;
    text-decoration: underline;
}

.social-icons {
    display: flex;
    gap: var(--space-sm);
    margin: var(--space-md) 0;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition-standard);
}

.social-icons a:hover {
    background-color: var(--gold);
    color: var(--gray-900);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--font-size-sm);
    color: var(--gray-400);
}

.footer-bottom a {
    color: var(--gray-300);
}

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

.newsletter-form {
    display: flex;
    margin-top: var(--space-md);
}

.newsletter-form input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    font-family: inherit;
    font-size: var(--font-size-sm);
    outline: none;
}

.newsletter-btn {
    background-color: var(--gold);
    color: var(--gray-900);
    border: none;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: var(--transition-standard);
}

.newsletter-btn:hover {
    background-color: var(--gold-hover);
}

/* Newsletter Form Expanded */
.newsletter-form-expanded {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: var(--space-md);
}

.newsletter-form-expanded .form-row {
    display: flex;
    gap: 0.75rem;
}

.newsletter-form-expanded input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    color: var(--gray-900);
    transition: all 0.2s ease;
}

.newsletter-form-expanded input::placeholder {
    color: #6b7280;
}

.newsletter-form-expanded input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    background: white;
}

.newsletter-form-expanded input:valid:not(:placeholder-shown) {
    border-color: #4ade80;
}

.newsletter-btn-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hover) 100%);
    color: var(--gray-900);
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.newsletter-btn-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.newsletter-btn-full:active {
    transform: translateY(0);
}

.newsletter-btn-full:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.newsletter-btn-full i {
    transition: transform 0.3s ease;
}

.newsletter-btn-full:hover i {
    transform: translateX(4px);
}

.form-status {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.4em;
    text-align: center;
    font-weight: 500;
}

.form-status.success {
    color: #4ade80;
}

.form-status.error {
    color: #fca5a5;
}

.form-status.loading {
    color: var(--gold);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile: Stack name fields */
@media (max-width: 480px) {
    .newsletter-form-expanded .form-row {
        flex-direction: column;
    }

    .newsletter-form-expanded input {
        padding: 0.875rem 1rem;
    }
}

/* Announcement Banner */
.announcement {
    background: linear-gradient(to right, var(--gold), var(--gold-hover));
    color: var(--gray-900);
    padding: var(--space-sm) 0;
    text-align: center;
    font-weight: 500;
}

.announcement a {
    color: var(--primary-blue);
    text-decoration: underline;
    font-weight: 600;
}

.announcement a:hover {
    color: var(--primary-blue-hover);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-standard);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

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

.back-to-top:hover {
    background-color: var(--gold);
    color: var(--gray-900);
    transform: translateY(-3px);
}

/* Prayer Times */
.prayer-times {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.prayer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-sm);
    border-bottom: 1px dotted var(--gray-300);
}

.prayer-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.prayer-name {
    font-weight: 600;
    color: var(--primary-blue);
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: var(--space-xs);
}

.prayer-name i {
    color: var(--gold);
    font-size: var(--font-size-sm);
    text-align: center;
}

.prayer-time {
    color: var(--gray-700);
}

/* Testimonial */
.testimonial {
    background-color: var(--primary-blue-lightest);
    border-radius: var(--border-radius-md);
    padding: var(--space-md);
    margin: var(--space-lg) 0;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: var(--space-md);
    color: var(--gray-700);
    position: relative;
    padding-left: var(--space-lg);
}

.testimonial-text::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -10px;
    font-size: 40px;
    color: var(--gold);
    font-family: Georgia, serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: var(--space-md);
    border: 2px solid var(--gold);
    object-fit: cover;
    object-position: center 40%;
}

.testimonial-info {
    display: flex;
    flex-direction: column;
}

.testimonial-name {
    font-weight: 600;
    color: var(--primary-blue);
}

.testimonial-role {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

/* Loading Indicator */
.loader {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-300);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    margin: var(--space-md) auto;
    animation: spin 1s linear infinite;
}

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

/* Community Life Card */
.community-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.community-item {
    text-align: center;
    transition: transform 0.3s ease;
    padding: var(--space-sm);
    background-color: var(--white);
    border-radius: var(--border-radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* .community-item:hover {
    transform: translateY(-2px);
} */

.community-item {
    text-align: center;
    transition: transform 0.3s ease;
    padding: var(--space-sm);
    background-color: var(--gray-100);
    border-radius: var(--border-radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.community-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* .community-image:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
} */

.community-caption {
    margin-top: var(--space-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--primary-blue);
}

/* Modal styles have been moved to bottom of file for consolidation */

/* Responsive Styles */
/* Extra large screens */
@media (min-width: 1600px) {
    .container {
        max-width: 1500px;
        width: 85%;
    }
}

@media (max-width: 1600px) {
    .container {
        width: 95%;
    }
}

@media (max-width: 1400px) {
    .container {
        grid-template-columns: 1fr 3fr 1fr;
        gap: var(--space-md);
    }
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: minmax(200px, 1fr) 3fr minmax(200px, 1fr);
        width: 98%;
        padding: 0 var(--space-sm);
    }
}

@media (max-width: 992px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 900px;
        padding: 0 var(--space-md);
        margin: 0 auto;
    }
    
    .sidebar,
    .right-sidebar {
        width: 100%;
    }
    
    /* Make widgets more compact */
    .sidebar-widget,
    .feature-card {
        margin-bottom: var(--space-md);
    }
    
    /* Adjust calendar width */
    .calendar-frame,
    iframe[src*="calendar"] {
        max-width: 100%;
        width: 100%;
    }
    
    /* Reduce padding on smaller screens */
    .widget-content,
    .card-body {
        padding: var(--space-md);
    }
    
    /* Smaller fonts for better fit */
    .widget-header,
    .card-header {
        font-size: var(--font-size-base);
        padding: var(--space-sm) var(--space-md);
    }
    
    /* Adjust images */
    .leader-img {
        width: 60px;
        height: 60px;
    }
    
    /* Compact prayer times */
    .prayer-times {
        gap: var(--space-sm);
    }
    
    .prayer-row {
        padding: var(--space-sm);
    }
    
    /* Adjust buttons */
    .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-size-sm);
    }
}

/* Additional media query for smaller tablets */
@media (max-width: 768px) {
    /* Add more padding to prevent edge cutoff */
    body {
        padding: 0 15px;
        background: #f8f9fa;
    }
    
    .container {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: 100%;
    }
    
    .sidebar {
        order: 2;
        margin-top: var(--space-lg);
    }
    
    .content {
        order: 1;
        box-shadow: none;
        border-radius: 0;
    }
    
    .right-sidebar {
        order: 3;
        margin-top: var(--space-lg);
    }
    
    /* Full width widgets */
    .sidebar-widget,
    .feature-card {
        border-radius: 0;
        margin: 0 0 2px 0;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    /* Calendar adjustments */
    .calendar-container {
        padding: var(--space-sm);
        background: white;
        margin: 0 -15px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    .responsive-calendar {
        position: relative;
        height: 600px !important;
        overflow: hidden;
        max-width: 100%;
    }
    
    .responsive-calendar iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
    }
    
    /* Header adjustments */
    .header {
        padding: var(--space-md);
    }
    
    .logo-image {
        height: 80px;
    }
    
    /* Navigation */
    nav {
        background: var(--white);
        box-shadow: var(--shadow-sm);
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .nav-links {
        justify-content: space-around;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }
    
    .nav-links a {
        padding: var(--space-md) var(--space-sm);
        white-space: nowrap;
        font-size: var(--font-size-sm);
    }
    
    /* Footer improvements */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

/* Mobile Design - Simple and Clean */
@media (max-width: 430px) {
    body {
        background: white;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Hide desktop nav */
    nav {
        display: block;
    }
    
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }

    /* Header Container - With Gradient */
    header, .header {
        background: linear-gradient(to bottom,
            #000000 0%,
            #070e25 15%,
            #0f2147 30%,
            #13274F 40%,
            #1c4295 55%,
            #275dd7 70%,
            #3785df 85%,
            #5FA8D3 95%,
            #7BBCE3 100%);
        padding: 15px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        position: relative;
        height: auto;
        min-height: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    
    /* Add blur overlay for smoother gradient */
    .header::before {
        display: none; /* Removed for performance */
    }
    
    .header::before,
    .header::after {
        display: none;
    }
    
    /* Logo - Centered Properly */
    .logo {
        position: static;
        transform: none;
        display: block;
        margin: 0 auto;
        z-index: 1;
        width: 100%;
        text-align: center;
    }
    
    .logo-image {
        height: 85px;
        width: auto;
        filter: none;
        display: inline-block;
        margin: 0 auto;
    }
    
    /* Header Info - Hidden on Mobile */
    .header-info {
        display: none !important;
    }
    
    .time-date-container,
    .hebrew-date,
    .israel-time,
    .time-date-divider,
    .time-suffix {
        display: none !important;
    }
    
    /* Hide desktop elements */
    .hostage-info,
    .location,
    .announcement {
        display: none !important;
    }
    
    /* Hamburger Menu - Top Left */
    .mobile-menu-btn {
        position: absolute;
        top: 50%;
        left: 15px;
        transform: translateY(-50%);
        width: 30px;
        height: 24px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1002;
        display: block !important;
    }
    
    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background: white;
        margin: 5px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Navigation Container - Mobile Drawer */
    .nav-container {
        background: white;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        overflow: hidden;
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 300px;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
        display: block !important;
    }
    
    .nav-container.active {
        left: 0;
    }
    
    /* Mobile Navigation */
    .nav-links {
        display: flex !important;
        flex-direction: column;
        padding: 80px 0 20px 0;
        margin: 0;
        list-style: none;
    }
    
    .nav-links li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    
    .nav-links a {
        display: block;
        padding: 18px 24px;
        font-size: 16px;
        color: #333;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s ease;
    }
    
    .nav-links a:hover {
        background: #f0f4f8;
        color: #13274F;
        padding-left: 28px;
    }
    
    /* Donate button special styling */
    .donate-btn {
        background: #FFD700 !important;
        color: #13274F !important;
        margin: 16px;
        padding: 12px 24px !important;
        border-radius: 8px;
        text-align: center;
        font-weight: 600;
    }
    
    /* Mobile drawer menu items */
    .nav-drawer ul {
        display: flex;
        flex-direction: column;
        padding: 70px 0 20px 0;
        align-items: stretch;
    }
    
    .nav-drawer ul li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }
    
    .nav-drawer ul li a {
        padding: 15px 20px;
        background: none;
        color: #333;
        border-radius: 0;
        margin: 0;
    }
    
    .nav-drawer ul li a:hover {
        background: #f0f4f8;
        transform: none;
        padding-left: 25px;
    }
    
    /* Nav Overlay */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Main Container */
    .container {
        display: flex;
        flex-direction: column;
        padding: 0;
        max-width: 100%;
        margin: 0;
        gap: 0;
        padding-top: 0;
    }
    
    /* Content Area */
    .content {
        order: 1;
        width: 100%;
        padding: 0;
        background: white;
        margin: 0;
        box-shadow: none;
        border: none;
        border-radius: 0;
    }
    
    .content > h1 {
        font-size: 22px;
        color: #13274F;
        margin: 0;
        padding: 25px 20px;
        text-align: center;
        background: white;
        font-weight: 600;
        display: block;
        border-bottom: 1px solid #eee;
        white-space: normal !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.3;
    }
    
    .content > h1 i {
        display: inline-block;
        margin-right: 8px;
        color: #FFD700;
        font-size: 18px;
    }
    
    /* Welcome Message Box */
    .infobox {
        background: linear-gradient(to right, #f8f9fa, #ffffff);
        border-left: 4px solid #FFD700;
        padding: 20px;
        margin: 0 0 2px 0;
        font-size: 16px;
        line-height: 1.6;
        border-radius: 0;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    .infobox strong {
        display: block;
        color: #13274F;
        font-size: 18px;
        margin-bottom: 8px;
        font-weight: 600;
    }
    
    .infobox i {
        color: #FFD700;
        font-size: 18px;
        margin-right: 8px;
    }
    
    /* Content paragraphs */
    .content > p {
        margin: 0;
        padding: 20px;
        background: white;
        color: #555;
        font-size: 16px;
        line-height: 1.6;
        border-bottom: 1px solid #f0f0f0;
    }
    
    /* Torah Quote Banner - Enhanced */
    .ticker-banner {
        background: linear-gradient(to right, #13274F, #1B3964);
        margin: 0;
        padding: 25px 20px;
        height: auto;
        border: none;
        box-shadow: 0 2px 5px rgba(0,0,0,0.08);
        border-radius: 0;
    }
    
    .ticker-content {
        animation: none;
        display: block;
        white-space: normal;
        position: static;
    }
    
    .ticker-item {
        display: block;
        font-style: italic;
        color: white;
        font-size: 16px;
        line-height: 1.6;
        padding: 0;
        text-align: center;
    }
    
    .ticker-item i {
        color: #FFD700;
        margin-right: 8px;
    }
    
    /* Hide duplicate ticker items on mobile */
    .ticker-item:not(:first-child) {
        display: none !important;
    }
    
    .ticker-author {
        display: block;
        text-align: center;
        font-style: normal;
        font-weight: 600;
        margin-top: 10px;
        color: #FFD700;
        font-size: 14px;
    }
    
    /* Info Grid - Force 2x2 Grid for Service Info */
    .info-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin: 0;
        padding: 15px;
        background: white;
    }
    
    /* Force all info boxes to fit in 2x2 grid */
    .info-grid .info-box {
        grid-column: span 1 !important;
        width: 100% !important;
    }
    
    /* Ensure only 4 items shown in 2x2 grid */
    .info-grid .info-box:nth-child(n+5) {
        display: none !important;
    }
    
    .info-box {
        background: #f8f9fa;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 12px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 110px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        width: 100%;
        box-sizing: border-box;
    }
    
    .info-box h4 {
        font-size: 14px;
        color: #13274F;
        margin: 0 0 6px 0;
        font-weight: 600;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .info-box h4 i {
        font-size: 28px;
        color: var(--primary-blue);
    }
    
    .info-box p {
        font-size: 13px;
        color: #666;
        margin: 0;
        line-height: 1.3;
    }
    
    /* Button Group */
    .btn-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 0;
        padding: 15px;
        background: #f8f9fa;
    }
    
    .btn {
        padding: 14px;
        font-size: 14px;
        border-radius: 10px;
        border: none;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        box-shadow: 0 3px 6px rgba(0,0,0,0.08);
    }
    
    .btn i {
        font-size: 18px;
    }
    
    .btn-blue {
        background: linear-gradient(135deg, #3A6EA5, #2d5680);
        color: white;
    }
    
    .btn-blue:hover {
        background: linear-gradient(135deg, #2d5680, #244a6d);
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    }
    
    .btn-gold {
        background: linear-gradient(135deg, #FFD700, #FFA500);
        color: #13274F;
    }
    
    .btn-gold:hover {
        background: linear-gradient(135deg, #e6c300, #ff9500);
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    }
    
    /* Sidebar - Full Width Cards */
    .sidebar {
        order: 2;
        width: 100%;
        margin: 0;
        padding: 0;
        background: transparent;
    }
    
    .sidebar-widget {
        background: white;
        border-radius: 0;
        margin: 0 0 2px 0;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        border: none;
        border-bottom: 1px solid #eee;
    }
    
    .widget-header {
        background: #13274F;
        color: white;
        padding: 16px 20px;
        font-size: 18px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .widget-header i {
        color: #FFD700;
        font-size: 20px;
    }
    
    .widget-content {
        padding: 20px;
    }
    
    /* Prayer Times Grid */
    .prayer-times {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .prayer-row {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 15px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        border-bottom: none;
    }
    
    .prayer-name {
        font-size: 14px;
        font-weight: 600;
        color: #13274F;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    
    .prayer-name i {
        color: #FFD700;
        font-size: 24px;
    }
    
    .prayer-time {
        font-size: 16px;
        color: #333;
        font-weight: 700;
        margin: 0;
    }
    
    /* Sidebar Lists */
    .sidebar-list {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    
    .sidebar-list li {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .sidebar-list li:last-child {
        border-bottom: none;
    }
    
    .sidebar-list a {
        display: flex;
        align-items: center;
        padding: 16px 0;
        color: #333;
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        transition: all 0.3s ease;
    }
    
    .sidebar-list a:hover {
        color: #3A6EA5;
        transform: translateX(5px);
    }
    
    .sidebar-list a i {
        color: #3A6EA5;
        margin-right: 14px;
        font-size: 18px;
        width: 24px;
        text-align: center;
    }
    
    /* Right Sidebar */
    .right-sidebar {
        order: 3;
        width: 100%;
        margin: 0;
        padding: 0;
        background: transparent;
    }
    
    .feature-card {
        background: white;
        border-radius: 0;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        margin: 0 0 2px 0;
        border: none;
        border-bottom: 1px solid #eee;
    }
    
    .card-header {
        background: #13274F;
        color: white;
        padding: 16px 20px;
        font-size: 18px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .card-header i {
        color: #FFD700;
        font-size: 20px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    /* Leader Card */
    .leader-card {
        text-align: center;
    }
    
    .leader-img {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        border: 3px solid #13274F;
        margin: 0 auto 15px;
        display: block;
    }
    
    .leader-name {
        font-size: 20px;
        color: #13274F;
        font-weight: 700;
        margin-bottom: 4px;
    }
    
    .leader-title {
        font-size: 14px;
        color: #FFD700;
        font-weight: 500;
        margin-bottom: 10px;
    }
    
    .leader-bio {
        font-size: 14px;
        color: #666;
        line-height: 1.5;
    }
    
    /* Footer */
    .footer {
        background: #13274F;
        color: white;
        padding: 0;
        margin: 0;
        margin-top: 40px;
    }
    
    .footer-content {
        padding: 30px 20px;
        text-align: center;
    }
    
    .footer-grid {
        display: none;
    }
    
    .social-icons {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin: 20px 0;
    }
    
    .social-icons a {
        width: 44px;
        height: 44px;
        background: rgba(255,255,255,0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 18px;
        transition: all 0.3s ease;
    }
    
    .social-icons a:hover {
        background: #FFD700;
        color: #13274F;
    }
    
    .footer-bottom {
        font-size: 14px;
        padding: 20px;
        border-top: 1px solid rgba(255,255,255,0.1);
        background: rgba(0,0,0,0.2);
    }
    
    /* Hide unnecessary elements on mobile */
    .calendar-frame,
    .calendar-frame *,
    .calendar,
    .testimonial,
    .photos,
    .community-grid,
    .twitter-feed,
    .newsletter-form,
    .announcement,
    .time-suffix,
    .dropdown-content,
    .dropdown > a::after,
    .community-life,
    iframe[src*="calendar"],
    iframe[src*="hebcal"],
    .calendar-container,
    .responsive-calendar,
    h3 + .calendar-container,
    .content > h3:has(+ .calendar-container),
    .content > h3:nth-child(3) {
        display: none !important;
    }
    
    /* Modal adjustments */
    .modal-content {
        width: 90%;
        max-width: 100%;
        padding: 20px;
        border-radius: 12px;
    }
    
    /* Typography */
    body {
        font-size: 16px;
        line-height: 1.6;
        color: #333;
    }
    
    h1 { font-size: 26px; }
    h2 { font-size: 22px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }
    
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
    }
    
    /* Touch-friendly targets */
    a, button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Container width fixes */
    .container > * {
        max-width: 100%;
        width: 100%;
    }
    
    /* Force text wrapping on all elements */
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Ensure headings wrap properly */
    h1, h2, h3, h4, h5, h6 {
        white-space: normal !important;
        hyphens: auto;
    }
}

/* Calendar Container Styles */
.calendar-container {
    padding: var(--space-md);
    background: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    margin: var(--space-lg) 0;
    width: 100%;
    box-sizing: border-box;
}

.responsive-calendar {
    position: relative;
    height: 600px !important;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
    max-width: 100%;
}

.responsive-calendar iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    max-width: 100%;
}

/* Tablet styles (iPad, etc.) */
@media (min-width: 431px) and (max-width: 768px) {
    .header {
        padding: var(--space-lg) var(--space-md);
        text-align: center;
        min-height: 170px;
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .logo {
        position: static;
        transform: none;
    }
    
    .logo-image {
        height: 100px;
    }
    
    .header-info {
        position: static;
        margin-top: 0;
        width: auto;
    }
    
    .hostage-info {
        position: static;
        transform: none;
        margin-bottom: var(--space-md);
    }

    .location {
        justify-content: center;
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--white);
        box-shadow: var(--shadow-md);
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 0;
        width: 100%;
    }
    
    .nav-links a {
        width: 100%;
        display: block;
        padding: var(--space-md);
        border-bottom: 1px solid var(--gray-200);
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        display: none;
        background-color: var(--gray-100);
    }

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

    .container {
        grid-template-columns: 1fr;
        padding: var(--space-sm);
    }
    
    .sidebar,
    .right-sidebar {
        width: 100%;
        margin-bottom: var(--space-lg);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

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

    .footer-col h4 {
        justify-content: center;
    }

    .footer-links a, .footer-contact li {
        justify-content: flex-start;
    }

    .newsletter-form {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-author {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .testimonial-avatar {
        margin-right: 0;
        margin-bottom: var(--space-sm);
    }
}

/* ===== MODAL STYLES ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 35, 80, 0.85) 0%, rgba(36, 82, 154, 0.85) 100%);
    backdrop-filter: blur(8px);
    animation: modalOverlayFade 0.3s ease-out;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #FFF8E1 0%, #FFFFFF 50%, #E8F5E9 100%);
    border-radius: 20px;
    padding: 35px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 35, 80, 0.4);
    animation: modalContentBounce 0.5s ease-out;
    border: 3px solid var(--primary-blue-light);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: var(--primary-blue-light);
    border: none;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: var(--white);
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--primary-blue);
    transform: rotate(90deg) scale(1.1);
}

.modal-content h3 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-content h3 i {
    color: var(--gold);
    font-size: 28px;
    animation: iconSpin 2s ease-in-out infinite;
}

.modal-content p {
    color: var(--gray-700);
    margin-bottom: 15px;
    line-height: 1.6;
    text-align: center;
    font-size: 16px;
}

.modal-link-info {
    background: linear-gradient(135deg, #E8F5E9 0%, #FFF3E0 100%);
    padding: 15px;
    border-radius: 15px;
    margin-top: 20px;
    border: 2px solid var(--primary-blue-lighter);
    text-align: center;
}

.modal-link-info span {
    font-weight: 600;
    color: var(--primary-blue);
    display: inline-block;
    margin-top: 5px;
}

.modal-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    min-width: 120px;
    box-shadow: 0 5px 15px rgba(0, 35, 80, 0.3);
}

.modal-btn:hover {
    background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--primary-blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 35, 80, 0.4);
}

/* Modal Animations */
@keyframes modalOverlayFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalContentBounce {
    0% { 
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes iconSpin {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Worship Times Modal Styles */
.worship-modal {
    max-width: 600px;
    width: 90%;
}

.service-section {
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--gold);
}

.service-section h4 {
    color: var(--primary-blue);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.service-section h4 i {
    color: var(--gold);
}

.service-announcement {
    font-size: var(--font-size-md);
    color: var(--text-dark);
    font-style: italic;
    margin: 0;
}

.schedule-item {
    display: flex;
    margin: var(--space-sm) 0;
    padding: var(--space-sm);
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-sm);
    align-items: flex-start;
    gap: var(--space-md);
}

.schedule-item .time {
    font-weight: bold;
    color: var(--primary-blue);
    min-width: 80px;
    font-size: var(--font-size-md);
}

.schedule-item .activity {
    color: var(--text-dark);
    line-height: 1.4;
    flex: 1;
}

.modal-footer {
    text-align: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: var(--space-lg);
    }
    
    .modal-content h3 {
        font-size: var(--font-size-xl);
    }
    
    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
    
    .worship-modal {
        width: 95%;
    }
    
    .schedule-item {
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .schedule-item .time {
        min-width: auto;
        font-size: var(--font-size-sm);
    }
}

/* Service Info Box Styles */
.service-section-info {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.service-section-info:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.service-section-info h5 {
    color: var(--primary-blue);
    font-size: var(--font-size-sm);
    margin: 0 0 var(--space-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.service-section-info h5 i {
    color: var(--gold);
    font-size: var(--font-size-xs);
}

.service-announcement-small {
    font-size: var(--font-size-xs);
    color: var(--text-gray);
    font-style: italic;
    margin: 0;
    line-height: 1.3;
}

.schedule-compact {
    font-size: var(--font-size-xs);
    line-height: 1.4;
    margin: 0;
}

.schedule-compact strong {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Mobile adjustments for service info */
@media (max-width: 768px) {
    .service-section-info h5 {
        font-size: var(--font-size-xs);
    }
    
    .service-announcement-small,
    .schedule-compact {
        font-size: 11px;
    }
}

/* Messianic Jewish Resources Modal Styles */
.messianic-resources-modal {
    max-height: 80vh;
    overflow-y: auto;
}

.resources-container {
    padding: 0;
}

.resources-intro {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.resource-category {
    margin-bottom: var(--space-xl);
}

.resource-category h4 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.resource-item {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(70, 130, 180, 0.2);
    border-radius: 8px;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    transition: all 0.3s ease;
}

.resource-item:hover {
    background-color: rgba(70, 130, 180, 0.05);
    border-color: rgba(70, 130, 180, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resource-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.resource-header i {
    font-size: var(--font-size-lg);
    min-width: 24px;
}

.resource-header h5 {
    margin: 0;
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-dark);
}

.resource-item p {
    margin: 0 0 var(--space-sm) 0;
    line-height: 1.6;
    color: var(--text-secondary);
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: color 0.3s ease;
}

.resource-link:hover {
    color: var(--gold);
    text-decoration: underline;
}

.resource-link i {
    font-size: 12px;
}

.getting-started-note {
    border-left: 4px solid var(--primary-blue);
}

.getting-started-note h4 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-md);
}

.getting-started-note ul {
    padding-left: var(--space-lg);
}

.getting-started-note li {
    margin-bottom: var(--space-xs);
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Mobile adjustments for resources modal */
@media (max-width: 768px) {
    .messianic-resources-modal {
        width: 98%;
        max-height: 85vh;
    }
    
    .resource-category h4 {
        font-size: var(--font-size-md);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    
    .resource-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    
    .resource-header h5 {
        font-size: var(--font-size-sm);
    }
    
    .resource-item {
        padding: var(--space-sm);
    }
    
    .getting-started-note {
        padding: var(--space-sm);
    }
    
    .getting-started-note h4 {
        font-size: var(--font-size-sm);
    }
}

/* Stand With Israel Modal Styles */
.stand-with-israel-modal {
    max-height: 80vh;
    overflow-y: auto;
}

.israel-ministries-container {
    padding: 0;
}

.israel-intro {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.ministries-grid {
    text-align: left;
}

.ministry-item {
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 102, 204, 0.2);
    border-radius: 12px;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    transition: all 0.3s ease;
    position: relative;
}

.ministry-item:hover {
    background-color: rgba(0, 102, 204, 0.05);
    border-color: rgba(0, 102, 204, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.ministry-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid rgba(0, 102, 204, 0.1);
}

.ministry-header i {
    min-width: 32px;
    text-align: center;
}

.ministry-header h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0;
}

.ministry-content p {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
    color: var(--text-secondary);
}

.ministry-activities {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: var(--space-md);
    margin: var(--space-md) 0;
}

.ministry-activities h5 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.ministry-activities ul {
    margin: var(--space-sm) 0 0 var(--space-lg);
    padding: 0;
}

.ministry-activities li {
    margin-bottom: var(--space-xs);
    line-height: 1.5;
    color: var(--text-secondary);
}

.ministry-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: all 0.3s ease;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    background-color: rgba(0, 102, 204, 0.1);
}

.ministry-link:hover {
    color: var(--gold);
    background-color: rgba(0, 102, 204, 0.2);
    text-decoration: none;
    transform: translateX(3px);
}

.ministry-link i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.ministry-link:hover i {
    transform: translateX(2px);
}

.support-note {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(255, 255, 255, 0.8));
    border: 1px solid rgba(0, 102, 204, 0.2);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.support-note::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #0066cc, #004499);
}

.support-note h4 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.support-note p {
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Mobile adjustments for Stand With Israel modal */
@media (max-width: 768px) {
    .stand-with-israel-modal {
        width: 98%;
        max-height: 85vh;
    }
    
    .ministry-item {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .ministry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        text-align: left;
    }
    
    .ministry-header h4 {
        font-size: var(--font-size-md);
    }
    
    .ministry-activities {
        padding: var(--space-sm);
    }
    
    .ministry-activities h5 {
        font-size: var(--font-size-sm);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    
    .support-note {
        padding: var(--space-sm);
    }
    
    .support-note h4 {
        font-size: var(--font-size-sm);
    }
}

/* New Welcome Modal Styles - Higher z-index and desktop optimized */
.who-are-we-modal,
.what-to-expect-modal,
.mission-vision-modal,
.our-location-modal,
.umjc-affiliation-modal {
    z-index: 15000 !important; /* Higher than the under construction modal */
}

.who-are-we-modal .modal-content,
.what-to-expect-modal .modal-content,
.mission-vision-modal .modal-content,
.our-location-modal .modal-content,
.umjc-affiliation-modal .modal-content {
    max-width: 900px !important; /* Larger for desktop screens */
    width: 90vw !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    padding: 25px !important;
}

/* Ensure proper scrolling for tall content */
.who-are-we-modal .modal-content,
.what-to-expect-modal .modal-content,
.mission-vision-modal .modal-content,
.our-location-modal .modal-content,
.umjc-affiliation-modal .modal-content {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) var(--gray-100);
}

.who-are-we-modal .modal-content::-webkit-scrollbar,
.what-to-expect-modal .modal-content::-webkit-scrollbar,
.mission-vision-modal .modal-content::-webkit-scrollbar,
.our-location-modal .modal-content::-webkit-scrollbar,
.umjc-affiliation-modal .modal-content::-webkit-scrollbar {
    width: 8px;
}

.who-are-we-modal .modal-content::-webkit-scrollbar-track,
.what-to-expect-modal .modal-content::-webkit-scrollbar-track,
.mission-vision-modal .modal-content::-webkit-scrollbar-track,
.our-location-modal .modal-content::-webkit-scrollbar-track,
.umjc-affiliation-modal .modal-content::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

.who-are-we-modal .modal-content::-webkit-scrollbar-thumb,
.what-to-expect-modal .modal-content::-webkit-scrollbar-thumb,
.mission-vision-modal .modal-content::-webkit-scrollbar-thumb,
.our-location-modal .modal-content::-webkit-scrollbar-thumb,
.umjc-affiliation-modal .modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

.who-are-we-modal .modal-content::-webkit-scrollbar-thumb:hover,
.what-to-expect-modal .modal-content::-webkit-scrollbar-thumb:hover,
.mission-vision-modal .modal-content::-webkit-scrollbar-thumb:hover,
.our-location-modal .modal-content::-webkit-scrollbar-thumb:hover,
.umjc-affiliation-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue-dark);
}

/* Mobile adjustments for new modals */
@media (max-width: 768px) {
    .who-are-we-modal .modal-content,
    .what-to-expect-modal .modal-content,
    .mission-vision-modal .modal-content,
    .our-location-modal .modal-content,
    .umjc-affiliation-modal .modal-content {
        width: 95vw !important;
        max-width: none !important;
        padding: 20px !important;
        max-height: 90vh !important;
    }
}

/* Tablet adjustments for new modals */
@media (min-width: 769px) and (max-width: 1024px) {
    .who-are-we-modal .modal-content,
    .what-to-expect-modal .modal-content,
    .mission-vision-modal .modal-content,
    .our-location-modal .modal-content,
    .umjc-affiliation-modal .modal-content {
        max-width: 800px !important;
        width: 85vw !important;
    }
}

/* Desktop adjustments for new modals */
@media (min-width: 1025px) {
    .who-are-we-modal .modal-content,
    .what-to-expect-modal .modal-content,
    .mission-vision-modal .modal-content,
    .our-location-modal .modal-content,
    .umjc-affiliation-modal .modal-content {
        max-width: 900px !important;
        width: 80vw !important;
    }
}

/* Additional responsive fixes for modal grids */
@media (max-width: 480px) {
    /* Make single column on very small screens */
    .who-are-we-modal [style*="grid-template-columns"],
    .what-to-expect-modal [style*="grid-template-columns"],
    .mission-vision-modal [style*="grid-template-columns"],
    .our-location-modal [style*="grid-template-columns"],
    .umjc-affiliation-modal [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Reduce padding on small screens */
    .who-are-we-modal .modal-content,
    .what-to-expect-modal .modal-content,
    .mission-vision-modal .modal-content,
    .our-location-modal .modal-content,
    .umjc-affiliation-modal .modal-content {
        padding: 15px !important;
    }
}

/* Medium mobile adjustments */
@media (min-width: 481px) and (max-width: 768px) {
    /* Adjust minimum widths for better mobile display */
    .who-are-we-modal [style*="minmax(200px"],
    .what-to-expect-modal [style*="minmax(220px"],
    .mission-vision-modal [style*="minmax(180px"] {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
    }
}

/* Enhanced accessibility and color contrast for new modals */
.who-are-we-modal h4,
.what-to-expect-modal h4,
.mission-vision-modal h4,
.our-location-modal h4,
.umjc-affiliation-modal h4 {
    font-weight: 600;
    line-height: 1.3;
}

.who-are-we-modal h5,
.what-to-expect-modal h5,
.mission-vision-modal h5,
.our-location-modal h5,
.umjc-affiliation-modal h5 {
    font-weight: 600;
    line-height: 1.4;
}

/* Ensure proper text contrast in all modal sections */
.who-are-we-modal [style*="color: var(--text-secondary)"],
.what-to-expect-modal [style*="color: var(--text-secondary)"],
.mission-vision-modal [style*="color: var(--text-secondary)"],
.our-location-modal [style*="color: var(--text-secondary)"],
.umjc-affiliation-modal [style*="color: var(--text-secondary)"] {
    color: var(--text-secondary) !important;
}

/* FORCE horizontal layout for mission and vision cards IN MODALS ONLY */
.modal .mission-highlights,
.modal .vision-goals {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    width: 100% !important;
}

.modal .mission-highlights .highlight-item,
.modal .vision-goals .goal-item {
    display: flex !important;
    flex-direction: column !important;
    width: 150px !important;
    max-width: 150px !important;
    min-width: 150px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: 150px !important;
    box-sizing: border-box !important;
}