/*
Theme Name:     Koren Custom Theme
Theme URI:      https://koren.org.il
Description:    Custom theme for Koren Institute, based on SCF and lightweight assets.
Author:         Antigravity
Author URI:     https://google.com
Text Domain:    koren-custom
Version:        1.0.3
*/

/* =========================================
   0. Self-hosted Fonts
   ========================================= */
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('assets/fonts/open-sans-300.woff2') format('woff2');
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/open-sans-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('assets/fonts/open-sans-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('assets/fonts/open-sans-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
    src: url('assets/fonts/open-sans-700.woff2') format('woff2');
}


/* =========================================
   1. Variables & Global Settings
   ========================================= */
:root {
    --color-primary: #4d5fa3;
    --color-primary-dark: #3d4f93;
    --color-primary-light: #acc0ec;
    --color-accent: #00ccff;
    --color-accent-text: #007897; /* Accessible cyan for text on light backgrounds (4.6:1 on #fff) */
    --color-text: #333333;
    --color-headings: #43484b;
    --color-bg-light: #f9fbfc;
    --color-border: #e9eef2;
    --font-main: 'Open Sans', Arial, sans-serif;
    --container-width: 1170px;
    --color-text-muted: #666;
    --color-text-subtle: #5e5e5e;
    --color-footer-muted: #8c9195;
    --color-bg-card: #f5f5f5;
}

/* =========================================
   2. Reset & Typography
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: #fff;
    direction: rtl; /* Default for Hebrew */
    text-align: right;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-headings);
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

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

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

p:has(.koren-cta-btn) {
    text-align: center;
}
.koren-cta-btn {
	display: inline-block;
	padding: 12px 32px;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.3px;
	background: var(--color-primary);
	color: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(77, 95, 163, 0.3);
	transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}
.koren-cta-btn:hover {
	color: #fff;
	background: var(--color-primary-dark);
	box-shadow: 0 6px 20px rgba(77, 95, 163, 0.4);
	transform: translateY(-1px);
}

/* =========================================
   3. Header & Navigation
   ========================================= */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.2s ease, padding 0.2s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 16px rgba(0,0,0,0.13);
    padding: 4px 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-branding {
    max-width: 197px;
}
.site-branding a,
.site-branding img {
    display: block;
}
.site-branding .custom-logo-link img {
    max-height: 60px;
    width: auto;
}

/* Main Menu */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 18px;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    color: var(--color-primary);
    font-weight: 500;
    font-size: 1rem; /* Reduced from 1.1rem */
    padding: 10px 0;
    display: block;
}

.main-navigation ul li.current-menu-item > a,
.main-navigation ul li a:hover {
    color: var(--color-accent-text);
}

/* Dropdowns (Basic) */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: none;
    z-index: 200;
}

.main-navigation ul li:hover > ul {
    display: flex;
}

.main-navigation ul ul li a {
    padding: 10px 15px;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
}

/* Mobile Toggle (Hidden on Desktop) */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    h2 { font-size: 1.7rem; }
    .site-header .container {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 2.6rem;
        cursor: pointer;
        color: var(--color-primary);
    }
    
    .site-branding {
        flex-grow: 1;
    }

    .main-navigation {
        width: 100%;
        order: 3;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        background: #fff;
        padding: 10px 0;
        border-top: 1px solid var(--color-border);
        text-align: center;
        flex: 0 0 calc(100% + 30px);
        margin: 0 -15px;
    }

    .main-navigation ul li a {
        padding: 6px 0;
    }

    .main-navigation.toggled ul {
        display: flex;
        max-height: calc(100dvh - 110px);
        overflow-y: auto;
    }

    .main-navigation.toggled ul ul {
        display: none;
    }

    .main-navigation.toggled .menu-item-has-children.open > ul {
        display: flex;
        position: static;
        box-shadow: none;
        min-width: 0;
        background: #f7f8fc;
        border-top: none;
    }
}


.content-section.no-padding-bottom {
    padding-bottom: 0;
}
.content-section.has-bg-image.hero-text-bg li {
    font-size: 26px;
    margin-bottom: 4px;
}
.content-section.has-bg-image.hero-text-bg li strong {
    padding: 3px 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
}
.content-section.has-bg-image.hero-text-bg li strong a {
    color: inherit;
}

/* =========================================
   4. Hero Section
   ========================================= */
.hero-section {
    position: relative;
    padding: 0;
    color: #fff;
    text-align: center;
}
.hero-section .swiper-slide {
    position: relative;
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-section .slide-picture {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 0;
}
.hero-section .slide-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Slider Pause/Play Controls */
.slider-controls {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 1);
    padding: 5px 8px;
    border-radius: 20px;
    color: #000;
    backdrop-filter: blur(4px);
}
.testimonials-slider .slider-controls {
    bottom: -10px;
    right: -10px;
    padding: 4px 6px;
    color: var(--color-headings);
    background: transparent;
    backdrop-filter: none;
}

.testimonials-slider .slider-controls button {
    padding: 3px 2px;
}
.slider-controls button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1;
    padding: 2px 5px;
    transition: color 0.2s, opacity 0.2s;
}
.home-hero .slider-controls button {
    color: rgba(255, 255, 255, 0.8);
}

.slider-controls button:hover,
.slider-controls button.active {
    color: #000;
    opacity: 1;
    font-weight: normal;
    text-decoration: underline;
}
.home-hero .slider-controls button:hover,
.home-hero .slider-controls button.active {
    color: #fff;
}

/* Hide Default Nav */
.hero-section .swiper-pagination,
.hero-section .swiper-button-next,
.hero-section .swiper-button-prev {
    display: none !important;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

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

.hero-section .subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero-section .swiper-slide { height: 320px; }
    .hero-section h1 { font-size: 2.2rem; }
    .hero-section .subtitle { font-size: 1.2rem; }
}

/* =========================================
   5. Content Blocks
   ========================================= */
.content-section {
    padding: 60px 0;
}

.content-section.has-bg-image {
    background-size: cover;
    background-position: center;
    will-change: background-position;
}

body:not(.home) .content-section.has-bg-image {
    min-height: 450px;
}
body:not(.home) .content-section.has-bg-image.hero-md {
    min-height: 280px;
}

@media (max-width: 768px) {
    .content-section.has-bg-image {
        will-change: auto;
    }
}

/* Image Row Section */
.image-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}
.image-row__item {
    flex: 1 1 0;
    min-width: 0;
}
.image-row__item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}
@media (max-width: 768px) {
    .image-row {
        flex-direction: column;
    }
}

/* Graph description toggle */
.graph-desc {
    display: none;
}
.graph-desc-trigger {
    cursor: pointer;
}

/* Content Grid Section — masonry-like column layout */
.content-grid-section.multiple-bg {
    padding-top: 0;
}
.content-grid__item {
    padding: 12px;
}

.content-grid {
    column-gap: 24px;
}
.content-grid--cols-2 {
    column-count: 2;
}
.content-grid--cols-3 {
    column-count: 3;
}
.content-grid__item {
    break-inside: avoid;
    margin-bottom: 24px;
    display: inline-block;
    width: 100%;
}
@media (max-width: 768px) {
    .content-grid--cols-2,
    .content-grid--cols-3 {
        column-count: 1;
    }
}

/* Read More button — mobile expand toggle */
.read-more-button {
    display: none;
}

@media (max-width: 1023px) {
    .read-more-button {
        display: inline-block;
        margin-bottom: 10px;
        padding: 3px 16px;
        border-radius: 7px;
        background: var(--color-primary);
        color: #fff;
        text-decoration: none;
        cursor: pointer;
    }
    .read-more-button:hover {
        background: var(--color-primary-dark);
        text-decoration: underline;
    }
    .content-body .read-more-button ~ * {
        display: none;
    }
    .content-body.active .read-more-button ~ * {
        display: block;
    }
    .content-body.active .read-more-button {
        display: none;
    }
}

.two-columns-section:not(.no-padding) {
    padding: 60px 0;
}
.two-columns-grid {
    display: flex;
    gap: 40px;
    align-items: center;
}
.two-columns-grid p:has(img) {
    margin: 0;
}
.two-columns-grid img {
    display: block;
}

.col-left, .col-right {
    flex: 1;
    min-width: 0;
    position: relative;
}
.two-columns-section.grey-bg .col-left,
.two-columns-section.grey-bg .col-right {
	padding: 20px;
	border-radius: 10px;
    background-color: var(--color-bg-card);
}
.two-columns-section.grey-bg .col-right > p:before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background-color: var(--color-primary);
    display: inline-block;
    vertical-align: top;
    margin-left: 6px;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .two-columns-grid {
        flex-direction: column;
        gap: 30px;
    }

    .two-columns-section.reverse-mobile .two-columns-grid {
        flex-direction: column-reverse;
    }
}

.three-columns-section {
    padding: 60px 0;
}

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

.feature-column {
    min-width: 0;
    text-align: right;
    padding: 25px 30px;
    border-radius: 6px;
}

.feature-icon {
    margin-bottom: 20px;
}

.feature-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--color-headings);
}

.feature-description {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .three-columns-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .three-columns-grid {
        grid-template-columns: 1fr;
    }
}

.section-alt:not(.parent-no-bg) {
    background-color: var(--color-bg-light);
}
.section-alt.parent-no-bg > .container {
    padding: 4px 20px;
}
.section-alt.parent-no-bg {
    padding-top: 0;
}
.section-alt.parent-no-bg p {
    font-size: 20px;
    color: var(--color-text);
}

/* WP Standard Alignment Classes */
.aligncenter {
    display: block;
    margin: 0 auto 20px;
    text-align: center;
}

.alignleft {
    float: left;
    margin: 0 20px 20px 0;
}

.alignright {
    float: right;
    margin: 0 0 20px 20px;
}

/* Centered section heading with accent underline — shared by content + team sections */
.content-section h2,
.koren-team-section__title {
    text-align: center;
    color: var(--color-primary);
    position: relative;
    padding-bottom: 15px;
}
.content-section h2 { margin-bottom: 30px; }

.content-body h2 {
    text-align: right;
}
.content-section:not(.home-intro) .content-body h2::after {
    left: auto;
    right: 0;
    transform: none;
}

.content-section h2::after,
.koren-team-section__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.content-section h3 {
    color: var(--color-primary-dark);
    margin-top: 1.5rem;
}
.two-columns-section.dark-text h3 {
    color: var(--color-text);
}

.koren-box {
    background: var(--color-bg-light);
    border-inline-start: 4px solid var(--color-accent);
    border-radius: 4px;
    padding: 16px 20px;
    margin: 1rem 0;
}
.koren-box > p:last-child {
    margin-bottom: 0;
}

/* Editor Specifics based on Analysis */
span[style*="color: #00ccff"] { color: var(--color-accent-text) !important; }
span[style*="color: #4d5fa3"] { color: var(--color-primary) !important; }

/* WordPress Gallery Styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.gallery-item {
    margin: 0 !important;
    padding: 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.gallery-icon {
    display: block;
}

.gallery-caption {
    text-align: center;
    font-size: 0.9em;
    color: var(--color-text-muted);
    padding: 8px 5px;
}

/* Gallery columns variants */
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-columns-4,
    .gallery-columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

/* Gallery Lightbox */
#koren-lightbox {
    padding: 0;
    border: none;
    background: transparent;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
    overflow: visible;
}

#koren-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.koren-lightbox__figure {
    margin: 0;
    position: relative;
}

.koren-lightbox__img {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 4px;
}

.koren-lightbox__close {
    position: absolute;
    top: -16px;
    inset-inline-end: -16px;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.koren-lightbox__close:hover {
    background: #f0f0f0;
}

.koren-lightbox__caption {
    color: #fff;
    text-align: center;
    padding: 8px 0 0;
    font-size: 0.9em;
}

.koren-lightbox__caption:empty {
    display: none;
}

/* =========================================
   6. Testimonials Section
   ========================================= */
.testimonials-section {
    padding: 60px 0;
    text-align: center;
}
.testimonials-slider {
    padding-bottom: 40px; /* Space for controls */
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    background-color: var(--color-bg-card);
}
.testimonials-slider.swiper[data-effect="fade"] {
    overflow: visible;
}
.testimonials-slider.swiper[data-effect="fade"] .slider-controls {
    bottom: auto;
    top: 100%;
}
.testimonials-section .section-title {
    text-align: right;
}

.testimonial-item {
    padding: 26px 40px;
    background-color: var(--color-bg-card);
    border-radius: 6px;
    text-align: right;
}

.testimonials-slider .swiper-button-next,
.testimonials-slider .swiper-button-prev {
    width: 28px;
    height: 28px;
}

.testimonials-slider .swiper-button-next::after,
.testimonials-slider .swiper-button-prev::after {
    font-size: 16px;
    font-weight: 700;
}

.testimonial-quote blockquote {
    font-size: 1.4rem;
    font-weight: 300;
    font-style: italic;
    color: var(--color-headings);
    margin: 0 0 30px;
    line-height: 1.4;
    position: relative;
}

.testimonial-author__name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--color-primary);
}

.testimonial-subtitle {
    display: block;
    font-size: 0.95rem;
    color: var(--color-text-subtle);
}

/* Testimonials Grid (Cards) */
.testimonials-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.testimonial-card {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 30px 25px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-card__quote {
    font-size: 1rem;
    line-height: 1.7;
    color: #fff;
    margin-bottom: 20px;
}

.testimonial-card__author {
    font-weight: 700;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
    .testimonial-card {
        flex: 1 1 100%;
    }
}

/* =========================================
   7. Contact Section & Forms
   ========================================= */
.contact-section {
    padding: 60px 0;
    background-color: var(--color-primary);
    color: #fff;
    text-align: center;
}

.contact-section h2 {
    color: #fff;
    margin-bottom: 30px;
}

.wpcf7-form {
    max-width: 700px;
    margin: 0 auto;
    text-align: right;
}

.wpcf7-form p {
    margin-bottom: 15px;
}

.wpcf7-form-control-wrap {
    display: block;
}

.wpcf7 label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #c8d0da;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text);
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(77, 95, 163, 0.12);
}

.wpcf7 textarea {
    min-height: 120px;
    resize: vertical;
}

.wpcf7 input[type="submit"] {
    background: var(--color-accent);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s;
    display: block;
    margin: 20px 0 0;
    width: auto;
    min-width: 160px;
}

.wpcf7 input[type="submit"]:hover {
    background: var(--color-primary-dark, #3a4a8a);
    transform: translateY(-1px);
}

.wpcf7 .privacy-agree {
    font-weight: normal;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.wpcf7 .privacy-agree .wpcf7-list-item { margin: 0; }
.wpcf7 .privacy-agree label { display: inline; }

/* Contact section: keep inputs readable on primary-color background */
.contact-section .wpcf7 input[type="text"],
.contact-section .wpcf7 input[type="email"],
.contact-section .wpcf7 input[type="tel"],
.contact-section .wpcf7 textarea {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.contact-section .wpcf7 input[type="text"]:focus,
.contact-section .wpcf7 input[type="email"]:focus,
.contact-section .wpcf7 input[type="tel"]:focus,
.contact-section .wpcf7 textarea:focus {
    border-color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.22);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
}

.contact-section .wpcf7 label { color: rgba(255,255,255,0.85); }

.contact-section .wpcf7 input[type="submit"] {
    background: #fff;
    color: var(--color-primary);
}

.contact-section .wpcf7 input[type="submit"]:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-1px);
}

/* =========================================
   8. Footer
   ========================================= */
.site-footer {
    background-color: #141820;
    color: var(--color-footer-muted);
    padding: 60px 0 0;
    font-size: 14px;
    line-height: 1.8;
    text-align: right;
    border-top: 3px solid var(--color-primary);
    position: relative;
}

.inner-footer {
    padding-bottom: 55px;
    position: relative;
}

.footer-columns {
    display: flex;
    gap: 60px;
    position: relative;
}

.footer-col {
    flex: 1;
    min-width: 0;
}

.footer-col:not(:last-child) {
    border-left: 1px solid #2a2f38;
    padding-left: 60px;
}

.footer-col h3 {
    color: #f0f2f5;
    font-size: 18px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 24px;
    padding-bottom: 12px;
    position: relative;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
}

/* Footer About Section */
.footer-about .about-text {
    color: var(--color-footer-muted);
    margin-bottom: 20px;
}

.footer-about .about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.footer-about .about-text a {
    color: var(--color-accent);
}

.footer-about .social-links {
    color: var(--color-accent);
    margin-bottom: 20px;
}

.footer-about .social-links a,
.site-footer .footer-form a {
    color: #8aa0d0;
}

.footer-about .accessibility-logo {
    margin-top: 20px;
}

.footer-about .accessibility-logo img {
    max-width: 100px;
    height: auto;
}

/* Footer Contact Section */
.footer-contact .contact-info {
    color: var(--color-footer-muted);
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-contact .contact-info:hover {
    color: #c8cdd4;
}

.footer-form input[type="text"],
.footer-form input[type="email"],
.footer-form input[type="tel"],
.footer-form textarea {
    width: 100%;
    padding: 6px 10px;
    margin-bottom: 10px;
    border: 1px solid #2e3540;
    background: rgba(255, 255, 255, 0.07);
    color: #e0e4ea;
    font-size: 13px;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.25s, background 0.25s;
}

.footer-form input[type="text"]:focus,
.footer-form input[type="email"]:focus,
.footer-form input[type="tel"]:focus,
.footer-form textarea:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.11);
}

.footer-form textarea {
    min-height: 65px;
    resize: vertical;
}

.footer-form input[type="submit"] {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 10px 28px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.25s, transform 0.15s;
}

.footer-form input[type="submit"]:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.footer-form label {
    display: block;
    color: var(--color-footer-muted);
    margin-bottom: 3px;
    font-size: 13px;
}

.footer-form .wpcf7-checkbox {
    color: var(--color-footer-muted);
    font-size: 13px;
}

.footer-form .wpcf7-checkbox a {
    color: var(--color-accent);
}

/* Bottom Bar */
.last-div {
    background: #0c1016;
    padding: 18px 0;
    border-top: 1px solid #1e2530;
}

.copyright {
    color: #a8b0bc;
    font-size: 13px;
    text-align: right;
}

.copyright strong {
    font-weight: bold;
}

@media (max-width: 768px) {
    .footer-columns {
        flex-direction: column;
    }

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

    .copyright {
        text-align: center;
    }
}

/* =========================================
   9. Utilities
   ========================================= */
.text-center { text-align: center; }
.hidden { display: none; }

/* Dark background sections — force white text */
.dark-bg,
.dark-bg .section-title,
.dark-bg .feature-title,
.dark-bg .feature-description,
.dark-bg .feature-description p,
.dark-bg .feature-description li,
.dark-bg .testimonial-quote blockquote,
.dark-bg .testimonial-author__name,
.dark-bg .testimonial-subtitle,
.dark-bg p,
.dark-bg li,
.dark-bg a {
    color: #fff;
}
.dark-cards .feature-column .feature-description {
    color: #fff;
}

.dark-bg .section-title::after {
    background: rgba(255,255,255,0.5);
}

.dark-bg .slider-controls {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.dark-bg .swiper-pagination-bullet-active {
    background: #fff;
}

/* =========================================
   10. Visibility Utilities
   ========================================= */
@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .mobile-only {
        display: none !important;
    }
}

/* =========================================
   11. Visual Refinements
   ========================================= */
.hero-content {
    background: rgba(0, 0, 0, 0.4);
    padding: 30px 40px;
    display: inline-block;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 4px;
}

.youtube-popup-container {
    margin: 0 auto;
    text-align: center;
    max-width: 100%;
}

.youtube-popup-thumbnail {
    margin: 0 auto;
    display: inline-block;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.wp-caption-text {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
    color: var(--color-text-muted);
}

/* =========================================
   12. Team Section
   ========================================= */
.koren-team-section {
    padding: 70px 0;
}

.koren-team-section__title {
    margin-bottom: 50px;
}

/* Cards row */
.koren-team-section__cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-bottom: 60px;
}

.koren-team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    width: 200px;
    transition: transform 0.25s ease;
    will-change: transform;
}

.koren-team-card:hover {
    transform: translateY(-5px);
    color: inherit;
}

.koren-team-card__photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 16px;
    border: 3px solid var(--color-primary-light);
    flex-shrink: 0;
}

.koren-team-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.koren-team-card__photo--placeholder {
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.koren-team-card__photo--placeholder span {
    font-size: 3rem;
    color: #fff;
    font-weight: 700;
}

.koren-team-card__name {
    font-size: 1.5rem;
    margin: 0 0 6px;
    color: var(--color-headings);
}

.koren-team-card__role {
    display: none;
    font-size: 0.9rem;
    color: var(--color-primary);
    margin: 0;
    font-weight: 500;
}

/* Bio sections */
.koren-team-bio {
    border-top: 1px solid var(--color-border);
    padding: 40px 0;
    scroll-margin-top: 100px;
}

.koren-team-bio:first-of-type {
    border-top: 2px solid var(--color-primary-light);
}

.koren-team-bio__header {
    margin-bottom: 20px;
}

.koren-team-bio__name {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin: 0 0 6px;
}

.koren-team-bio__role {
    display: inline-block;
    font-size: 1.1rem;
    color: var(--color-text-subtle);
    font-weight: 700;
}

.koren-team-bio__content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
}

.koren-team-bio__content p {
    margin-bottom: 1em;
}

.koren-team-bio__content strong {
    color: var(--color-headings);
}

/* Responsive */
@media (max-width: 768px) {
    .koren-team-section__cards {
        gap: 25px;
    }

    .koren-team-card {
        width: 150px;
    }

    .koren-team-card__photo {
        width: 110px;
        height: 110px;
    }
}

@media (max-width: 480px) {
    .koren-team-section__cards {
        gap: 20px;
    }

    .koren-team-card {
        width: 130px;
    }
}

/* Screen reader utility */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    border: 0;
    word-wrap: normal !important;
    word-break: normal;
}

/* ==========================================================================
   Thank You Letters Section
   ========================================================================== */

.thank-you-letters-section {
    padding: 60px 24px 80px;
}
.thank-you-letters-section .letters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.thank-you-letters-section .letter-figure {
    margin: 0;
}

.thank-you-letters-section .letter-figure img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 576px) {
    .thank-you-letters-section .letters-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   In-text link underlines (WCAG 1.4.1)
   Color alone isn't a sufficient cue inside flow text.
   ========================================= */
.content-body p a,
.content-body li a,
.content-body td a,
.koren-team-bio__content p a,
.koren-team-bio__content li a,
.col-right p a,
.col-right li a,
.col-left p a,
.col-left li a,
.feature-column p a,
.feature-column li a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
