/* Home Eleven — component styles (nav, header, gallery, donation forms, cause content) */

/* Desktop dropdown */
.he11-nav-dropdown {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: -10px;
}
.he11-nav-drop-head {
    display: inline-flex;
    align-items: center;
}
.he11-nav-drop-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 2px 4px 0;
}
.he11-nav-drop-chev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0 4px 4px;
    border: none;
    background: none;
    cursor: default;
    pointer-events: none;
    color: inherit;
}
.he11-nav-drop-chev svg {
    transition: transform 0.2s ease;
}
.he11-nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 50;
}
.he11-nav-dropdown:hover .he11-nav-submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.he11-nav-dropdown:hover .he11-nav-drop-chev svg {
    transform: rotate(180deg);
}
.he11-nav-submenu li a {
    display: block;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-main, #1f2937);
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.he11-nav-submenu li a:hover {
    background: rgba(0, 0, 0, 0.04);
    color: rgb(var(--color-primary));
}

/* Mobile drawer submenu accordion */
.he11-mobile-sub-head {
    display: flex;
    align-items: center;
    width: 100%;
}
.he11-mobile-sub-link {
    flex: 1;
    padding: 10px 12px 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}
.he11-mobile-sub-chev {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}
.he11-mobile-sub-chev svg {
    transition: transform 0.25s ease;
}
.he11-mobile-sub.is-open .he11-mobile-sub-chev svg {
    transform: rotate(180deg);
}
.he11-mobile-sub-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.12);
}
.he11-mobile-sub.is-open .he11-mobile-sub-list {
    max-height: 320px;
}
.he11-mobile-sub-list a {
    display: block;
    padding: 8px 16px 8px 28px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
}
.he11-mobile-sub-list a:hover {
    color: #fff;
}

/* Mobile drawer logo — no color inversion; shown on white chip for contrast */
#mobileDrawer .he11-drawer-logo-chip img.he11-img {
    filter: none;
}
#mobileDrawer .he11-drawer-logo-chip img.he11-img.he11-img--placeholder {
    opacity: 0.55;
    object-fit: contain;
}

/* Transparent header */
html[data-he11-header="transparent"] #mainHeader.he11-header-transparent {
    background-color: transparent;
    border-bottom: 1px solid transparent;
}
html.he11-header-scrolled[data-he11-header="transparent"] #mainHeader.he11-header-transparent {
    background-color: #fff;
    border-bottom: 1px solid rgba(229, 231, 235, 0.4);
}
html[data-he11-header="transparent"] #mainHeader.he11-header-transparent:not(.he11-header-animate) {
    transition: none !important;
}
html[data-he11-header="transparent"] #mainHeader.he11-header-transparent.he11-header-animate {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Mission stats grid */
@media (min-width: 768px) {
    .he11-mission-grid .he11-mission-tall {
        grid-row: span 2 / span 2;
    }
}

/* Image placeholder fallback */
img.he11-img.he11-img--placeholder {
    background-color: #dddfe4;
    object-fit: cover;
}
img.he11-img.he11-img--placeholder-contain,
img.he11-img.he11-img--placeholder[data-he11-fallback-mode="contain"] {
    object-fit: contain;
    padding: clamp(0.75rem, 4vw, 2rem);
}

/* Gallery cells */
.he11-gallery-cell {
    background-color: #dddfe4;
}
.he11-gallery-cell img.he11-img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}
.he11-gallery-cell img.he11-img.he11-img--placeholder,
.he11-gallery-cell img.he11-img.he11-img--placeholder-contain {
    object-fit: cover;
    padding: 0;
}

/* Donation form gateway toggles (cause-details.js) */
.d-none {
    display: none !important;
}
.d-block {
    display: block !important;
}

/* Rich content (Summernote / CMS HTML) */
.he11-rich-content,
.he11-cause-content {
    font-size: 0.875rem;
    line-height: 1.625;
    color: inherit;
}
@media (min-width: 640px) {
    .he11-rich-content,
    .he11-cause-content {
        font-size: 1rem;
    }
}
.he11-rich-content *,
.he11-cause-content * {
    margin: initial;
    padding: initial;
    box-sizing: border-box;
}
.he11-rich-content > *:first-child,
.he11-cause-content > *:first-child {
    margin-top: 0;
}
.he11-rich-content > *:last-child,
.he11-cause-content > *:last-child {
    margin-bottom: 0;
}
.he11-rich-content p,
.he11-cause-content p {
    margin-bottom: 1rem;
    line-height: 1.625;
    color: inherit;
}
.he11-rich-content h1,
.he11-rich-content h2,
.he11-rich-content h3,
.he11-rich-content h4,
.he11-rich-content h5,
.he11-rich-content h6,
.he11-cause-content h1,
.he11-cause-content h2,
.he11-cause-content h3,
.he11-cause-content h4,
.he11-cause-content h5,
.he11-cause-content h6 {
    display: block;
    font-weight: 700;
    color: rgb(var(--color-primary));
    line-height: 1.3;
    margin: 1.25rem 0 0.75rem;
}
.he11-rich-content h1,
.he11-cause-content h1 {
    font-size: 1.75rem;
}
.he11-rich-content h2,
.he11-cause-content h2 {
    font-size: 1.25rem;
}
.he11-rich-content h3,
.he11-cause-content h3 {
    font-size: 1.125rem;
}
@media (min-width: 640px) {
    .he11-rich-content h2,
    .he11-cause-content h2 {
        font-size: 1.5rem;
    }
    .he11-rich-content h3,
    .he11-cause-content h3 {
        font-size: 1.25rem;
    }
}
.he11-rich-content ul,
.he11-cause-content ul {
    display: block;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}
.he11-rich-content ul > li,
.he11-cause-content ul > li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.625;
}
.he11-rich-content ul > li::before,
.he11-cause-content ul > li::before {
    content: '•';
    color: rgb(var(--color-primary));
    font-size: 1.125rem;
    line-height: 1.2;
    flex-shrink: 0;
    margin-top: -2px;
}
.he11-rich-content ol,
.he11-cause-content ol {
    display: block;
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    list-style-type: decimal;
}
.he11-rich-content ol > li,
.he11-cause-content ol > li {
    margin-bottom: 0.5rem;
    line-height: 1.625;
    display: list-item;
}
.he11-rich-content img,
.he11-cause-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}
.he11-rich-content a,
.he11-cause-content a {
    display: inline;
    color: rgb(var(--color-primary));
    text-decoration: underline;
}
.he11-rich-content strong,
.he11-rich-content b,
.he11-cause-content strong,
.he11-cause-content b {
    font-weight: 700;
}
.he11-rich-content em,
.he11-rich-content i,
.he11-cause-content em,
.he11-cause-content i {
    font-style: italic;
}
.he11-rich-content blockquote,
.he11-cause-content blockquote {
    display: block;
    border-left: 3px solid rgb(var(--color-primary));
    padding: 0.5rem 0 0.5rem 1rem;
    margin: 1rem 0;
    font-style: italic;
    opacity: 0.9;
}
.he11-rich-content hr,
.he11-cause-content hr {
    display: block;
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid var(--color-border);
}
.he11-rich-content table,
.he11-rich-content .table,
.he11-cause-content table,
.he11-cause-content .table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.he11-rich-content table td,
.he11-rich-content table th,
.he11-rich-content .table td,
.he11-rich-content .table th,
.he11-cause-content table td,
.he11-cause-content table th,
.he11-cause-content .table td,
.he11-cause-content .table th {
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0.75rem;
    vertical-align: top;
}
.he11-rich-content pre,
.he11-cause-content pre {
    display: block;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-text-main);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.he11-rich-content code,
.he11-cause-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.875em;
    background: var(--color-surface);
    border-radius: 0.25rem;
    padding: 0.1rem 0.35rem;
}
.he11-rich-content pre code,
.he11-cause-content pre code {
    background: transparent;
    padding: 0;
}
.he11-rich-content iframe,
.he11-rich-content video,
.he11-cause-content iframe,
.he11-cause-content video {
    display: block;
    max-width: 100%;
    border-radius: 0.5rem;
    margin: 1rem 0;
}
.he11-rich-content figure,
.he11-cause-content figure {
    display: block;
    margin: 1rem 0;
}
.he11-rich-content figcaption,
.he11-cause-content figcaption {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* About page — image collage */
.he11-about-collage {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 520 / 440;
    min-width: 280px;
}
.he11-about-collage__tl {
    position: absolute;
    top: 0;
    left: 0;
    width: 44.5%;
    aspect-ratio: 285 / 260;
}
.he11-about-collage__sm {
    position: absolute;
    top: 10.5%;
    left: 50%;
    width: 30.5%;
    aspect-ratio: 1 / 1;
}
.he11-about-collage__wide {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 86%;
    aspect-ratio: 440 / 210;
}
.he11-about-collage__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.he11-about-collage__badge {
    position: absolute;
    z-index: 10;
    top: 42%;
    left: 44%;
    transform: translate(-50%, -50%);
    width: 24%;
    aspect-ratio: 1 / 1;
    min-width: 75px;
    max-width: 125px;
    border-width: 0.5vw;
    border-style: solid;
}

/* Blogs page utilities */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.group:hover .group-hover\:scale-102 {
    transform: scale(1.02);
}

/* AJAX contact form feedback (home + contact page) */
.ajax-form-message {
    display: none;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    margin: 0 0 0.25rem;
    padding: 0.95rem 1.1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.45;
}
.ajax-form-message:not([hidden]) {
    display: flex;
}
.ajax-form-message__icon {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.05rem;
}
.ajax-form-message__text {
    flex: 1;
}
.ajax-form-message.is-success {
    color: #1f6b3a;
    background: #eaf7ef;
    border-color: #b7e0c4;
}
.ajax-form-message.is-error {
    color: #9b1c1c;
    background: #fdecec;
    border-color: #f2b8b5;
}
.btn-loading-label {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
}
.btn-loading-dots {
    display: inline-flex;
    width: 1.1em;
    overflow: hidden;
    margin-left: 0.05em;
}
.btn-loading-dots span {
    opacity: 0;
    animation: he11-btn-dot 1.2s infinite;
}
.btn-loading-dots span:nth-child(1) { animation-delay: 0s; }
.btn-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.btn-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes he11-btn-dot {
    0%, 20% { opacity: 0; }
    40%, 100% { opacity: 1; }
}
button.is-loading {
    pointer-events: none;
    opacity: 0.88;
    cursor: wait;
}

/* Portfolio details image slider */
.he11-portfolio-slider {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.he11-portfolio-slider__viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: min(70vh, 34rem);
    background: rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.he11-portfolio-slider__slide {
    position: absolute;
    inset: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
    overflow: hidden;
}

.he11-portfolio-slider__slide.is-active {
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
}

.he11-portfolio-slider__slide img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
}

.he11-portfolio-slider__arrow {
    position: absolute;
    top: 50%;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.he11-portfolio-slider__arrow:hover {
    background: #fff;
    color: rgb(var(--color-primary, 15 118 110));
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}

.he11-portfolio-slider__arrow--prev {
    left: 0.75rem;
}

.he11-portfolio-slider__arrow--next {
    right: 0.75rem;
}

.he11-portfolio-slider__arrow i {
    font-size: 0.85rem;
    line-height: 1;
}

@media (max-width: 639px) {
    .he11-portfolio-slider__viewport {
        aspect-ratio: 4 / 3;
        max-height: 20rem;
    }

    .he11-portfolio-slider__arrow {
        width: 2.25rem;
        height: 2.25rem;
    }

    .he11-portfolio-slider__arrow--prev {
        left: 0.5rem;
    }

    .he11-portfolio-slider__arrow--next {
        right: 0.5rem;
    }
}

/* Detail pages — social share */
.he11-social-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding-top: 1.25rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.he11-social-share__label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-main, #1f2937);
}

.he11-social-share__list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.he11-social-share__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 9999px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    color: #1f2937;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.he11-social-share__link:hover {
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
}

.he11-social-share__link--facebook:hover {
    background: #1877f2;
}

.he11-social-share__link--twitter:hover {
    background: #111;
}

.he11-social-share__link--linkedin:hover {
    background: #0a66c2;
}

.he11-social-share__link--whatsapp:hover {
    background: #25d366;
}

.he11-social-share__link--copy:hover {
    background: var(--clr-primary, #0f766e);
}
