/*
 * Sirajul Huda v1.0.4
 * Lightweight responsive overrides for automatic navigation, homepage
 * testimonials/news layouts, single posts, and archives.
 */

/* Keep the sticky header attached to the complete viewport, including on
   installations whose document root is wrapped by a constrained container. */
.navigation-sticky .site-header.scrolled {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

.navigation-sticky .site-header.scrolled .navbar,
.navigation-sticky .site-header.scrolled .site-container {
    width: 100%;
    max-width: none;
}

.site-header .navbar > .site-container {
    display: grid;
    grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
    gap: clamp(10px, 1.5vw, 24px);
}

.site-header .navbar-collapse {
    min-width: 0;
}

.navbar-brand {
    max-width: min(410px, 32vw);
    overflow: hidden;
}

.navbar-brand > span {
    min-width: 0;
}

.navbar-brand strong,
.navbar-brand small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-nav .dropdown-menu {
    max-height: min(70vh, 520px);
    overflow-y: auto;
}

/* Testimonial layouts */
.testimonials-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 5% 20%, color-mix(in srgb, var(--theme-accent) 11%, transparent), transparent 28%),
        #f6f9f7;
}

.testimonials-section .section-heading {
    max-width: 760px;
    margin-right: auto;
    margin-bottom: 38px;
    margin-left: auto;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.testimonial-modern {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    margin: 0;
    padding: clamp(24px, 2.7vw, 38px);
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(18, 61, 46, .08);
}

.testimonial-quote {
    position: absolute;
    top: 15px;
    right: 22px;
    color: color-mix(in srgb, var(--theme-primary) 12%, transparent);
    font-size: 52px;
    line-height: 1;
}

.testimonial-modern > p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #35423b;
    font-size: clamp(16px, 1.25vw, 19px);
    line-height: 1.75;
}

.testimonial-modern footer {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
}

.testimonial-modern footer img,
.testimonial-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-avatar {
    display: grid;
    place-items: center;
    background: var(--green-light);
    color: var(--green-dark);
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 800;
}

.testimonial-modern footer span {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.testimonial-modern footer strong {
    overflow: hidden;
    color: var(--green-dark);
    font-family: var(--font-heading);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.testimonial-modern footer small {
    color: var(--muted);
    font-size: 12px;
}

.testimonial-verified {
    color: var(--green);
    font-size: 18px;
}

.testimonials-style-spotlight .testimonials-grid {
    grid-template-columns: 1.35fr 1fr 1fr;
}

.testimonials-style-spotlight .testimonial-featured {
    border-color: transparent;
    background: var(--green-dark);
}

.testimonials-style-spotlight .testimonial-featured > p,
.testimonials-style-spotlight .testimonial-featured footer strong {
    color: #fff;
}

.testimonials-style-spotlight .testimonial-featured footer small {
    color: #c4d8ce;
}

.testimonials-style-spotlight .testimonial-featured .testimonial-verified {
    color: var(--gold);
}

.testimonials-style-minimal {
    background: #fff;
}

.testimonials-style-minimal .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.testimonials-style-minimal .testimonial-modern {
    padding-right: 0;
    padding-left: 0;
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: none;
}

.testimonial-slider {
    max-width: 860px;
    margin: 0 auto;
}

.testimonial-slider .testimonial-modern {
    min-height: 330px;
    text-align: center;
}

.testimonial-slider .testimonial-modern footer {
    grid-template-columns: 54px minmax(0, auto) auto;
    justify-content: center;
    text-align: left;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.testimonial-controls button {
    display: grid;
    width: 46px;
    height: 46px;
    min-height: 46px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #fff;
    color: var(--green-dark);
}

/* Homepage Warta layouts */
.home-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.home-news-item {
    min-width: 0;
}

.home-news-item .news-image {
    aspect-ratio: 16 / 10;
}

.home-news-item .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-news-style-featured-grid .home-news-grid {
    grid-template-columns: 1.45fr 1fr 1fr;
}

.home-news-style-featured-grid .home-news-featured {
    grid-row: span 2;
}

.home-news-style-featured-grid .home-news-featured .news-image {
    aspect-ratio: 16 / 11;
}

.home-news-style-featured-grid .home-news-featured h3 {
    font-size: clamp(23px, 2vw, 32px);
}

.home-news-style-list .home-news-grid,
.home-news-style-editorial .home-news-grid {
    grid-template-columns: 1fr;
}

.home-news-style-list .home-news-item {
    display: grid;
    grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
}

.home-news-style-list .home-news-item .news-image {
    height: 100%;
    min-height: 240px;
}

.home-news-style-list .home-news-item .news-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-news-style-editorial .home-news-item {
    display: grid;
    grid-template-columns: minmax(170px, 25%) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 46px);
    padding: 24px 0;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.home-news-style-editorial .home-news-item .news-image {
    border-radius: 14px;
}

.home-news-style-editorial .home-news-item h3 {
    font-size: clamp(22px, 2.2vw, 34px);
}

/* Archives and single posts */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.archive-layout-list .archive-grid {
    grid-template-columns: 1fr;
    max-width: 1040px;
}

.archive-layout-list .archive-item {
    display: grid;
    grid-template-columns: minmax(240px, 36%) minmax(0, 1fr);
}

.archive-layout-list .archive-item .news-image {
    height: 100%;
}

.archive-layout-list .archive-item .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.archive-layout-compact .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.archive-layout-compact .archive-item {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    border-radius: 12px;
}

.archive-layout-compact .archive-item .news-image {
    height: 100%;
}

.archive-layout-compact .archive-item .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.archive-layout-compact .archive-item .news-body {
    padding: 18px;
}

.archive-layout-compact .archive-item h2 {
    font-size: 17px;
}

.single-post .content-container {
    width: calc(100% - 40px);
    max-width: var(--single-content-width);
}

.prose figure {
    max-width: 100%;
    margin: 2em 0;
}

.prose figure img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 13px;
}

.prose figcaption {
    margin-top: 9px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.prose img:not(figure img) {
    max-width: 100%;
    height: auto;
    border-radius: 13px;
}

@supports (content-visibility: auto) {
    .home-page main > section:not(:first-child) {
        content-visibility: auto;
        contain-intrinsic-size: auto 760px;
    }
}

@media (max-width: 1399.98px) {
    .site-header .navbar > .site-container {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .site-header .navbar-brand {
        max-width: calc(100vw - 132px);
    }

    .testimonials-grid,
    .testimonials-style-spotlight .testimonials-grid,
    .home-news-grid,
    .home-news-style-featured-grid .home-news-grid,
    .archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .testimonials-style-spotlight .testimonial-featured,
    .home-news-style-featured-grid .home-news-featured {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

@media (max-width: 991.98px) {
    .site-header .navbar {
        min-height: 76px;
        padding: 7px 0;
    }

    .site-header .navbar-brand {
        max-width: calc(100vw - 108px);
    }

    .navbar-brand strong {
        font-size: clamp(14px, 2.5vw, 17px);
    }

    .navbar-brand small {
        font-size: 9px;
    }

    .min-vh-hero {
        min-height: clamp(600px, 78vh, 720px) !important;
        padding-top: 112px;
        padding-bottom: 66px;
    }

    .hero-copy h1,
    .hero-style-editorial .hero-copy h1,
    .hero-style-split-card .hero-copy h1 {
        max-width: 780px;
        font-size: clamp(38px, 7vw, 58px);
    }

    .site-footer .row {
        --bs-gutter-y: 2.5rem;
    }

    .site-footer {
        padding-top: 70px;
    }
}

@media (max-width: 767.98px) {
    .site-container {
        padding-right: 20px;
        padding-left: 20px;
    }

    .site-header .navbar {
        min-height: 70px;
    }

    .site-header .navbar-brand {
        gap: 9px;
        max-width: calc(100vw - 88px);
    }

    .site-header .navbar-brand img {
        width: 44px !important;
        height: 44px !important;
        flex: 0 0 44px;
    }

    .site-header .navbar-brand strong {
        font-size: 14px;
        letter-spacing: -.025em;
    }

    .site-header .navbar-brand small {
        max-width: 240px;
        font-size: 8px;
        letter-spacing: .08em;
    }

    .navbar-toggler {
        width: 44px;
        height: 44px;
        min-height: 44px;
    }

    .offcanvas {
        width: min(88vw, 340px) !important;
    }

    .min-vh-hero {
        min-height: min(680px, 88svh) !important;
        padding-top: 100px;
        padding-bottom: 52px;
    }

    .hero-copy {
        max-width: 100%;
    }

    .hero-copy h1,
    .hero-style-editorial .hero-copy h1,
    .hero-style-split-card .hero-copy h1,
    .hero-style-minimal .hero-copy h1 {
        margin: 12px 0 18px;
        font-size: clamp(31px, 9.3vw, 43px);
        line-height: 1.08;
        letter-spacing: -.04em;
        overflow-wrap: anywhere;
    }

    .hero-lead {
        display: -webkit-box;
        overflow: hidden;
        margin-bottom: 22px;
        font-size: 16px;
        line-height: 1.65;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
    }

    .hero-actions .btn {
        flex: 1 1 145px;
        padding-right: 14px;
        padding-left: 14px;
    }

    .hero-trust {
        gap: 8px 14px;
        margin-top: 18px;
        font-size: 11px;
    }

    .section {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .section-title {
        font-size: clamp(29px, 8vw, 39px);
        overflow-wrap: anywhere;
    }

    .testimonials-grid,
    .testimonials-style-spotlight .testimonials-grid,
    .testimonials-style-minimal .testimonials-grid,
    .home-news-grid,
    .home-news-style-featured-grid .home-news-grid,
    .archive-grid,
    .archive-layout-compact .archive-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-style-spotlight .testimonial-featured,
    .home-news-style-featured-grid .home-news-featured {
        grid-column: auto;
    }

    .testimonial-modern {
        min-height: 0;
        padding: 25px 22px;
    }

    .testimonial-slider .testimonial-modern {
        min-height: 360px;
    }

    .home-news-style-list .home-news-item,
    .home-news-style-editorial .home-news-item,
    .archive-layout-list .archive-item,
    .archive-layout-compact .archive-item {
        display: block;
    }

    .home-news-style-list .home-news-item .news-image,
    .home-news-style-editorial .home-news-item .news-image,
    .archive-layout-list .archive-item .news-image,
    .archive-layout-compact .archive-item .news-image {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .home-news-style-editorial .home-news-item {
        padding: 20px 0;
    }

    .single-post .content-container {
        width: calc(100% - 32px);
    }

    .article-header h1 {
        font-size: clamp(31px, 9vw, 44px);
        overflow-wrap: anywhere;
    }

    .share-button span {
        display: none;
    }

    .share-button {
        width: 44px;
        padding: 0;
    }

    .site-footer {
        padding-top: 58px;
        padding-bottom: 24px;
    }

    .site-footer .row {
        --bs-gutter-x: 1.2rem;
        --bs-gutter-y: 2rem;
    }

    .footer-brand img {
        width: 58px;
        height: 58px;
    }

    .footer-brand strong {
        font-size: 18px;
    }

    .footer-title {
        margin-bottom: 16px;
        font-size: 18px;
    }

    .footer-links,
    .footer-contact {
        gap: 9px;
    }

    .footer-links a,
    .footer-contact li {
        min-height: auto;
        font-size: 14px;
        line-height: 1.5;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        margin-top: 38px;
        padding-top: 22px;
    }

    .floating-whatsapp,
    .back-to-top {
        right: 16px;
        width: 50px;
        height: 50px;
        min-height: 50px;
    }

    .floating-whatsapp {
        bottom: 78px;
        font-size: 25px;
    }

    .back-to-top {
        bottom: 16px;
    }
}

@media (max-width: 420px) {
    .site-header .navbar-brand small {
        display: none;
    }

    .site-header .navbar-brand strong {
        white-space: normal;
        line-height: 1.15;
    }

    .site-footer .col-6 {
        width: 100%;
    }
}
