/*
Theme Name: HF Foundation Blocks
Description: Block-based theme tuned to mirror the production layout.
Author: HF Team
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');

:root {
    --hf-text: #6d6d6d;
    --hf-white: #ffffff;
    --hf-surface: #f7f7f7;
    --hf-menu-shadow: rgba(0, 0, 0, 0.08);
    --hf-purple: #9B7EB0;
    --hf-purple-dark: #876D9B;
    --hf-purple-footer: #8B6FA0;
    --hf-blue: #27c2f2;
    --hf-blue-dark: #0097d0;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--hf-text);
    background: var(--hf-surface);
}

a { color: inherit; text-decoration: none; }

a:hover { text-decoration: underline; }

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

.wp-site-blocks { padding: 0; margin: 0; }

header.hf-header-empty { display: none; }



.hf-home-shell { width: 100%; margin: 0; padding: 0; }

/* ===================== HERO ===================== */
.hf-hero {
    position: relative;
    background: url('/wp-content/themes/hf-foundation-blocks/assets/images/Header7.0.png') center center / cover no-repeat;
    min-height: clamp(380px, 52vw, 520px);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding-bottom: 140px;
}

.hf-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.25) 60%, rgba(0, 0, 0, 0.38) 100%);
}

.hf-hero__links {
    position: absolute;
    top: 18px;
    right: 24px;
    display: flex;
    gap: 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hf-white);
    z-index: 2;
}

.hf-hero__links a { padding: 4px 0; color: var(--hf-white); }

/* ===================== MENU BAR ===================== */
.hf-menu-bar {
    position: absolute;
    left: 50%;
    bottom: -12px;
    transform: translateX(-50%);
    z-index: 3;
    width: min(1180px, calc(100% - 48px));
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12) !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
}

.hf-menu-bar__search { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.hf-menu-bar__search input {
    height: 34px;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    padding: 0 12px;
    font-family: inherit;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.7) !important;
}

.hf-menu-bar__search button {
    height: 34px;
    border: none;
    border-radius: 6px;
    padding: 0 14px;
    color: var(--hf-white);
    background: linear-gradient(90deg, var(--hf-blue) 0%, var(--hf-blue-dark) 100%);
    font-weight: 700;
    cursor: pointer;
}

.hf-menu-bar__search button:hover { filter: brightness(1.05); }

/* ===================== MENU DROPDOWNS ===================== */
.hf-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0;
    margin: 0;
}

.hf-menu li { position: relative; }

.hf-menu a { font-weight: 700; color: #4c4c4c; }
.hf-menu .dashicons-admin-home { display: inline-block; vertical-align: middle; font-size: 1.2em; margin-right: 4px; }

.hf-menu .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 8px 0;
    list-style: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 5;
}

.hf-menu .dropdown li { padding: 0; }

.hf-menu .dropdown a {
    display: block;
    padding: 8px 14px;
    font-weight: 600;
    color: #3a3a3a;
}

.hf-menu .dropdown a:hover { background: rgba(0, 0, 0, 0.04); }

.hf-menu li.has-dropdown:hover > .dropdown,
.hf-menu li.has-dropdown:focus-within > .dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ===================== MAIN CONTENT: VIDEO + SIDEBAR ===================== */
.hf-main-content {
    display: flex;
    min-height: 500px;
}

.hf-main-content .hf-video {
    flex: 1;
    min-width: 0;
    background: #0d0d0d;
    padding: 0;
}

.hf-video__frame {
    width: 100%;
    position: relative;
    padding-top: 56.25%;
    min-height: 200px;
}

.hf-video__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.hf-sidebar {
    width: 100px;
    max-width: 100px;
    min-width: 100px;
    flex-shrink: 0;
    background: var(--hf-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
    overflow: hidden;
}

.hf-sidebar a { display: block; line-height: 0; max-width: 90px; overflow: hidden; }

.hf-sidebar img {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.hf-sidebar a:hover img { transform: translateY(-2px); }

/* ===================== OUR PROJECTS ===================== */
.hf-projects {
    background: var(--hf-surface);
    padding: 40px 24px 30px;
    text-align: center;
}

.hf-projects h2 {
    margin: 0 0 28px;
    font-size: 32px;
    font-weight: 700;
    color: #3a3a3a;
}

.hf-projects__card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 32px;
    max-width: 900px;
    margin: 0 auto;
    justify-items: center;
}

.hf-projects__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.hf-projects__card img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.hf-projects__card:hover img {
    transform: scale(1.05);
}

.hf-projects__card-label {
    font-size: 13px;
    color: #6d6d6d;
    text-align: center;
    line-height: 1.4;
    max-width: 160px;
}

/* ===================== RELATED LINKS / PARTNERS ===================== */
.hf-partners {
    background: var(--hf-blue);
    padding: 40px 24px;
    text-align: center;
}

.hf-partners h3 {
    margin: 0 0 24px;
    font-size: 28px;
    font-weight: 700;
    color: var(--hf-white);
}

.hf-partners__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 40px;
    max-width: 800px;
    margin: 0 auto;
    align-items: center;
    justify-items: center;
}

.hf-partners__grid img {
    height: 80px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    transition: transform 0.2s;
}

.hf-partners__grid img:hover {
    transform: scale(1.08);
}

/* ===================== FOOTER ===================== */
.hf-footer {
    margin-top: 0;
    background: var(--hf-purple-footer);
    color: var(--hf-white);
    padding: 0;
}

.hf-footer__subscribe-bar {
    background: var(--hf-purple);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 100%;
}

.hf-footer__subscribe-bar h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--hf-white);
    letter-spacing: 0.3px;
}

.hf-footer__subscribe-bar form {
    display: flex;
    gap: 0;
}

.hf-footer__subscribe-bar input {
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-right: none;
    border-radius: 3px 0 0 3px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--hf-white);
    min-width: 220px;
    font-family: inherit;
    font-size: 14px;
}

.hf-footer__subscribe-bar input::placeholder { color: rgba(255, 255, 255, 0.6); }

.hf-footer__subscribe-bar button {
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-left: none;
    border-radius: 0 3px 3px 0;
    background: rgba(255, 255, 255, 0.22);
    color: var(--hf-white);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}

.hf-footer__subscribe-bar button:hover { background: rgba(255, 255, 255, 0.35); }

.hf-footer__inner {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 36px;
    align-items: flex-start;
    padding: 36px 0 32px;
}

.hf-footer h3 { margin: 0 0 16px; font-size: 20px; font-weight: 700; color: var(--hf-white); }
.hf-footer h4 { margin: 0 0 10px; font-size: 16px; font-weight: 600; color: var(--hf-white); }

.hf-footer p,
.hf-footer li,
.hf-footer a,
.hf-footer .contact-line,
.hf-footer .title {
    color: #f0eaf3;
    font-size: 15px;
    line-height: 1.7;
}

.hf-footer a:hover { text-decoration: underline; }

.hf-footer__subscribe { display: none; }

.hf-footer__events {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hf-footer__event {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s;
}

.hf-footer__event:hover {
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.hf-footer__event img {
    width: 70px;
    height: 66px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.hf-footer__event-placeholder {
    width: 70px;
    height: 66px;
    border-radius: 6px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
}

.hf-footer__event-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.hf-footer__event-date {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.hf-footer__event-title {
    font-size: 15px;
    font-weight: 400;
    color: var(--hf-white);
    line-height: 1.4;
}

.hf-footer__event-more {
    display: inline-block;
    font-weight: 600;
    margin-top: 8px;
    margin-left: 84px;
    font-size: 15px;
    color: #f0eaf3;
}

.hf-footer__event-more:hover {
    color: #fff;
}

.hf-footer__follow-heading {
    margin-top: 14px !important;
}

.hf-footer__quick ul,
.hf-footer__contact ul { list-style: none; padding: 0; margin: 0; }

.hf-footer__quick-lists {
    display: flex;
    gap: 40px;
}

.hf-footer__quick ul { list-style: none; padding: 0; margin: 0; }

.hf-footer__quick li {
    margin-bottom: 6px;
}

.hf-footer__quick a {
    font-size: 15px;
}

.hf-footer__contact .contact-line { margin-bottom: 8px; }

.hf-footer__contact .contact-line--icon {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.hf-footer__contact .contact-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    color: var(--hf-white);
}

.hf-footer__contact .contact-icon svg {
    display: block;
}

.hf-footer__social { display: flex; gap: 10px; margin-top: 10px; }

.hf-footer__social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hf-white);
}

.hf-footer__social a:hover {
    background: rgba(255, 255, 255, 0.35);
    text-decoration: none;
}

.hf-footer__social svg {
    display: block;
}

.hf-footer__bottom {
    text-align: center;
    padding: 16px 0;
    font-size: 12px;
    color: #e7e1ea;
    line-height: 1.5;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ===================== FOOTER MAP ===================== */
.hf-footer__map {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
}
.hf-footer__map iframe {
    width: 100%;
    height: 300px;
    border: 0;
    display: block;
    filter: grayscale(30%);
}

/* ===================== HAMBURGER TOGGLE ===================== */
.hf-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 10;
}

.hf-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #4c4c4c;
    margin: 4px 0;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
    .hf-main-content { flex-direction: column; }
    .hf-main-content .hf-video {
        width: 100%;
        min-width: 100%;
        flex: none;
    }
    .hf-sidebar {
        width: 100%; max-width: 100%; min-width: 0;
        flex-direction: row; justify-content: center; padding: 20px; gap: 16px;
    }
    .hf-sidebar a { max-width: 80px; }
    .hf-sidebar img { width: 70px !important; height: 70px !important; max-width: 70px !important; }
    .hf-footer__inner { grid-template-columns: 1fr; }
    .hf-footer__subscribe-bar { flex-direction: column; text-align: center; }
    .hf-partners__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    /* Hamburger visible */
    .hf-menu-toggle { display: block; }

    /* Menu bar: switch from absolute to static so it flows below the hero */
    .hf-menu-bar {
        position: static;
        transform: none;
        width: 100%;
        border-radius: 0;
        flex-wrap: wrap;
        padding: 10px 14px;
        gap: 0;
    }

    /* Remove hero bottom padding that was making room for the overlapping bar */
    .hf-hero {
        padding-bottom: 0;
    }

    /* Nav hidden by default */
    .hf-menu-bar .hf-menu {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 4px;
        padding-top: 10px;
    }

    .hf-menu-bar .hf-menu.is-open {
        display: flex;
    }

    .hf-menu li { width: 100%; }
    .hf-menu a { display: block; padding: 6px 0; }

    /* Dropdowns in mobile */
    .hf-menu .dropdown {
        position: static;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 16px;
        margin: 0;
    }

    /* Search */
    .hf-menu-bar__search {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
        order: 10;
    }
    .hf-menu-bar__search input { width: 100%; min-width: 0; }

    /* Hero */
    .hf-hero { min-height: 280px; padding-bottom: 120px; }
    .hf-hero__links { font-size: 12px; gap: 12px; top: 10px; right: 14px; }

    /* Homepage projects — 2×2 grid on tablet/mobile */
    .hf-projects__card-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }
    .hf-projects__card img { width: 120px; height: 120px; }
    .hf-projects__card-label { font-size: 12px; max-width: 130px; }

    /* Partners */
    .hf-partners__grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .hf-partners__grid img { height: 55px; }
}

@media (max-width: 480px) {
    .hf-hero { min-height: 220px; padding-bottom: 100px; }

    /* Projects — stay 2×2 but tighter */
    .hf-projects__card-grid { gap: 16px 12px; }
    .hf-projects__card img { width: 100px; height: 100px; }
    .hf-projects__card-label { font-size: 11px; max-width: 110px; }

    /* Partners — 3-col on small phones too */
    .hf-partners__grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .hf-partners__grid img { height: 44px; }

    /* Footer */
    .hf-footer__events-list a { flex-direction: column; }
}

/* ===================== BREADCRUMBS ===================== */
.hf-breadcrumbs {
    padding: 14px 24px;
    font-size: 14px;
    color: var(--hf-text);
    max-width: 1180px;
    margin: 0 auto;
}

.hf-breadcrumbs a {
    color: var(--hf-text);
}

.hf-breadcrumbs span {
    color: #999;
    margin: 0 4px;
}

/* ===================== PAGE CONTENT (ABOUT US) ===================== */
.hf-page-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 40px;
    background: #fff;
}

.hf-page-title {
    font-size: 32px;
    font-weight: 400;
    color: #333;
    margin: 20px 0 30px;
    padding-bottom: 0;
}

/* About Us video embed (in-content, not full-width) */
.hf-about__video-embed {
    position: relative;
    width: 100%;
    max-width: 850px;
    padding-top: 42%;
    margin-bottom: 30px;
}

.hf-about__video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* About Us text content */
.hf-about__text-content {
    margin-bottom: 40px;
    line-height: 1.8;
    font-size: 16px;
    color: var(--hf-text);
}

.hf-about__text-content p {
    margin: 0 0 16px;
}

.hf-about__section-heading {
    font-size: 24px;
    font-weight: 400;
    color: var(--hf-blue);
    margin: 30px 0 16px;
}

/* Mission & Vision cards - matching original's 2-column layout */
.hf-about__mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 40px 0;
    padding: 40px 0;
}

.hf-about__mv-card {
    text-align: center;
    padding: 20px;
}

.hf-about__mv-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 16px;
    filter: invert(60%) sepia(60%) saturate(500%) hue-rotate(150deg) brightness(100%) contrast(90%);
}

.hf-about__mv-heading {
    font-size: 26px;
    font-weight: 400;
    color: var(--hf-blue);
    margin: 0 0 16px;
}

.hf-about__mv-card p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--hf-text);
    margin: 0;
}

/* Board of Trustees - matching original's 3-column grid */
.hf-about__board-heading {
    font-size: 28px;
    font-weight: 400;
    color: var(--hf-blue);
    text-align: center;
    margin: 30px 0 30px;
}

.hf-about__board-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto 40px;
}

.hf-about__trustee {
    text-align: center;
    padding: 10px;
}

.hf-about__trustee img {
    width: 100%;
    max-width: 340px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0 auto 12px;
}

.hf-about__trustee-role {
    font-size: 14px;
    color: #999;
    font-style: italic;
    margin-bottom: 4px;
}

.hf-about__trustee-name {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.hf-about__trustee-linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0077b5;
    color: #fff;
    text-decoration: none;
}

.hf-about__trustee-linkedin:hover {
    filter: brightness(1.1);
    text-decoration: none;
}

.hf-about__trustee-linkedin svg {
    display: block;
}

/* ===================== CONTACT US PAGE ===================== */
.hf-contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.hf-contact__info {
    padding: 10px 0;
}

.hf-contact__line {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--hf-text);
}

.hf-contact__icon {
    flex-shrink: 0;
    color: var(--hf-blue);
    margin-top: 2px;
}

.hf-contact__icon svg {
    display: block;
}

.hf-contact__social-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 24px 0 12px;
}

.hf-contact__social {
    display: flex;
    gap: 10px;
}

.hf-contact__social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--hf-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.hf-contact__social a:hover {
    filter: brightness(1.1);
    text-decoration: none;
}

.hf-contact__social svg {
    display: block;
}

.hf-contact__whatsapp {
    margin-top: 20px;
    font-size: 14px;
    color: var(--hf-text);
    line-height: 1.6;
}

.hf-contact__form {
    padding: 10px 0;
}

.hf-contact__field {
    margin-bottom: 16px;
}

.hf-contact__field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--hf-blue);
    margin-bottom: 6px;
}

.hf-contact__field input,
.hf-contact__field textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 15px;
    color: #333;
    background: #fff;
}

.hf-contact__field input:focus,
.hf-contact__field textarea:focus {
    outline: none;
    border-color: var(--hf-blue);
}

.hf-contact__field textarea {
    resize: vertical;
}

.hf-contact__submit {
    background: var(--hf-blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 12px 30px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.hf-contact__submit:hover {
    filter: brightness(1.05);
}

/* ===================== PROJECTS PAGE ===================== */
.hf-projects-page__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 40px 0;
    text-align: center;
}

.hf-projects-page__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--hf-blue);
    transition: transform 0.2s;
}

.hf-projects-page__item:hover {
    transform: translateY(-4px);
}

.hf-projects-page__item img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    margin-bottom: 16px;
}

.hf-projects-page__item h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--hf-blue);
}

/* ===================== ABOUT & CONTACT PAGE RESPONSIVE ===================== */
@media (max-width: 900px) {
    .hf-about__mission-vision { grid-template-columns: 1fr; gap: 20px; }
    .hf-about__board-grid { grid-template-columns: repeat(2, 1fr); }
    .hf-contact__grid { grid-template-columns: 1fr; }
    .hf-projects-page__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .hf-about__board-grid { grid-template-columns: 1fr; }
    .hf-about__video-embed { padding-top: 56.25%; }
    .hf-projects-page__grid { grid-template-columns: 1fr; }
}


/* Hide WordPress post-author block on TEC event pages (author is devadmin, not meaningful content) */
.single-tribe_events .wp-block-post-author,
.post-type-archive-tribe_events .wp-block-post-author {
    display: none;
}

/* ===================== PUBLICATIONS PAGE ===================== */
/* The publications page (ID 44) uses a wp:html block with raw Elementor HTML.
   wp:html outputs raw HTML without a wrapper, so target .entry-content directly.
   Use CSS columns to create a readable book grid. */

.page-id-44 .entry-content {
    column-count: 3;
    column-gap: 32px;
}

.page-id-44 .entry-content img {
    display: block;
    break-inside: avoid;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.page-id-44 .entry-content h6 {
    text-align: center;
    font-size: 13px;
    margin: 4px 0 6px;
    color: #333;
    break-inside: avoid;
}

.page-id-44 .entry-content a {
    display: inline-block;
    color: var(--hf-blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--hf-blue);
    border-radius: 3px;
    padding: 2px 10px;
    margin-bottom: 28px;
}

.page-id-44 .entry-content a:hover {
    background: var(--hf-blue);
    color: #fff;
}

@media (max-width: 900px) {
    .page-id-44 .entry-content { column-count: 2; }
}

@media (max-width: 560px) {
    .page-id-44 .entry-content { column-count: 1; }
}

/* RTL support for Arabic content pages */
.entry-content [dir="rtl"],
.entry-content p[style*="direction: rtl"],
.entry-content p[style*="text-align: right"] {
    direction: rtl;
    text-align: right;
}
.entry-content .wp-block-columns:has([dir="rtl"]) {
    direction: rtl;
}
.entry-content h1[style*="text-align:right"],
.entry-content h2[style*="text-align:right"],
.entry-content h3[style*="text-align:right"],
.entry-content h4[style*="text-align:right"],
.entry-content p[style*="text-align:right"] {
    direction: rtl;
    text-align: right;
}

/* ===================== HOME ICON IN NAVIGATION ===================== */
/* Dashicon home icon styling for menu items */
.wp-block-navigation-item .dashicons-admin-home {
    display: inline-block;
    vertical-align: middle;
    width: 1em;
    height: 1em;
    font-size: 1.2em;
    margin-right: 4px;
}

/* ===================== ENHANCED SIDEBAR ===================== */
/* Widen sidebar to match original site (~200px) */
.hf-main-content {
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: flex-start;
}

.hf-main-content__primary {
    flex: 1;
    min-width: 0; /* Prevent overflow */
}

.hf-main-content__sidebar {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

/* Sidebar card style (desktop: stacked column, mobile: horizontal strip) */
.hf-sidebar__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    text-decoration: none;
    color: #444;
    font-size: 12px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.hf-sidebar__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hf-sidebar__card img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.hf-sidebar__card svg {
    display: block;
}

.hf-sidebar__card--whatsapp {
    color: #128c5e;
    border-color: #25D366;
    font-size: 11px;
}

.hf-sidebar__card--youtube {
    background: #ff0000;
    border-color: #cc0000;
    color: #fff;
}

.hf-sidebar__card--youtube img {
    filter: brightness(0) invert(1);
}

/* Sidebar brand section */
.hf-sidebar__brand {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
    width: 100%;
}

/* Mobile responsive for sidebar */
@media (max-width: 768px) {
    .hf-main-content {
        flex-direction: column;
    }

    .hf-main-content__primary,
    .hf-main-content .hf-video {
        width: 100%;
        min-width: 100%;
        flex: none;
    }

    .hf-main-content__sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
        background: #f9f9f9;
        border-top: 1px solid #eee;
    }

    .hf-sidebar__brand {
        width: 100%;
        border-bottom: 1px solid #ddd;
        margin-bottom: 4px;
        padding: 8px;
    }

    .hf-sidebar__card {
        flex: 1;
        min-width: 80px;
        max-width: 110px;
    }
}

/* (footer event styles consolidated above) */

/* ===================== LANGUAGE SWITCHER ===================== */
.hf-lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 5;
    margin-left: 12px;
}

.hf-lang-switcher__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #4c4c4c;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: background 0.2s;
}

.hf-lang-switcher__item:hover {
    background: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    color: #4c4c4c;
}

.hf-lang-switcher__item--current {
    background: var(--hf-blue);
    color: #fff;
    border-color: transparent;
    cursor: default;
}

.hf-lang-switcher__item--current:hover {
    background: var(--hf-blue-dark);
    color: #fff;
}

/* ── Details/Summary block icon sizing ── */
.wp-block-details summary {
    cursor: pointer;
}
.wp-block-details summary img,
.wp-block-details p > a > img.alignnone[width="64"],
.wp-block-details p > img.alignnone[width="64"] {
    width: 28px;
    height: 28px;
    display: inline-block;
    vertical-align: middle;
}

/* ── Gallery block (has-nested-images / modern format) ── */
.wp-block-gallery.has-nested-images {
    --wp--style--unstable-gallery-gap: 8px;
    gap: 8px;
    align-items: flex-start;
}
.wp-block-gallery.has-nested-images figure.wp-block-image img {
    height: 180px;
    object-fit: cover;
    width: 100%;
    display: block;
}
.wp-block-gallery.has-nested-images figure.wp-block-image {
    margin: 0;
}

/* Events List */
.hf-events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}
.hf-events-list__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #1a5c3a;
    transition: background 0.2s;
}
.hf-events-list__item:hover {
    background: #f0f0f0;
}
.hf-events-list__thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}
.hf-events-list__content {
    flex: 1;
}
.hf-events-list__date {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 4px;
}
.hf-events-list__title {
    display: block;
    font-weight: 600;
    color: #1a5c3a;
    text-decoration: none;
    line-height: 1.4;
}
.hf-events-list__title:hover {
    text-decoration: underline;
}

/* -----------------------------------------------------------------------
   Events toggle (Upcoming / Past) & Past Events page
   ----------------------------------------------------------------------- */
.hf-events-toggle {
    display: flex;
    gap: 8px;
    margin: 16px 0 24px;
}
.hf-events-toggle__btn {
    padding: 8px 20px;
    border-radius: 4px;
    border: 2px solid #1a5c3a;
    color: #1a5c3a;
    background: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: background 0.15s, color 0.15s;
}
.hf-events-toggle__btn:hover {
    background: #1a5c3a;
    color: #fff;
}
.hf-events-toggle__btn--active {
    background: #1a5c3a;
    color: #fff;
}
.hf-events-none {
    color: #666;
    font-style: italic;
    margin: 16px 0;
}
.hf-events-pagination {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    font-size: 0.95em;
}
.hf-events-pagination a {
    padding: 6px 14px;
    border: 1px solid #1a5c3a;
    border-radius: 4px;
    color: #1a5c3a;
    text-decoration: none;
    font-weight: 600;
}
.hf-events-pagination a:hover {
    background: #1a5c3a;
    color: #fff;
}
.hf-events-pagination__info {
    color: #666;
}
.hf-past-events-link {
    font-size: 0.8em;
    font-weight: 400;
    color: #1a5c3a;
    text-decoration: none;
    margin-left: 8px;
}
.hf-past-events-link:hover {
    text-decoration: underline;
}
/* No-upcoming message link */
.tribe-events-c-messages__message a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
}
