/**
 * Homepage layout-only responsive overrides.
 * Linked last from index.php — does not change colors, copy, or visual design.
 */

/* ---------- Global layout safety ---------- */
img,
video,
svg,
iframe {
    max-width: 100%;
}

.hero-sec,
.hero-sec video {
    width: 100%;
    display: block;
}

.hero-sec video {
    height: auto;
    object-fit: cover;
}

.fundraiser-text,
.news-slider-area,
.news-info,
.progress-wrapper,
.raised-info,
.test-column,
.featured-box,
.donation-card .col-lg-7,
.donation-card .col-lg-5 {
    min-width: 0;
}

/* ---------- Large tablets / small laptops ---------- */
@media (max-width: 1199.98px) {
    .news-wrapper {
        align-items: stretch;
    }

    .news-info {
        width: 38%;
        padding: 48px 36px;
        min-height: 0;
    }

    .news-info h2 {
        font-size: clamp(28px, 3.2vw, 40px);
    }

    .news-slider-area {
        width: 70%;
        margin-left: -48px;
        max-width: calc(100% + 48px);
    }

    .news-btn {
        max-width: 100%;
    }

    .fundraiser-img {
        flex: 0 0 42%;
        max-width: 260px;
        min-width: 0;
    }

    .fundraiser-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .heading11,
    .heading11 span {
        font-size: clamp(32px, 3.5vw, 44px);
    }

    .awards-header .heading11,
    .awards-header .heading11 span {
        font-size: clamp(28px, 3.5vw, 48px);
    }
}

/* ---------- Tablets ---------- */
@media (max-width: 991.98px) {
    .news-wrapper {
        display: block;
    }

    .news-info {
        width: 100%;
        border-radius: 20px 20px 0 0;
        min-height: auto;
        margin-bottom: 0;
        padding: 40px 32px 28px;
    }

    .news-info p {
        margin-bottom: 0;
    }

    .news-btn--in-info {
        display: none;
    }

    .news-gallery-block {
        display: block;
        background: #fdd831e6;
        border-radius: 0 0 20px 20px;
        padding: 0 32px 32px;
    }

    .news-slider-area {
        width: 100%;
        margin-left: 0;
        max-width: 100%;
    }

    .news-btn--bottom {
        display: inline-flex;
        width: 100%;
        max-width: 100%;
    }

    .news-info h2 {
        font-size: clamp(26px, 5vw, 36px);
    }

    /* Real featured / blog columns (old .featured-row selectors never matched) */
    .featured-sec .row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .fundraiser-box {
        flex-direction: column;
    }

    .fundraiser-img {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .fundraiser-img img {
        width: 100%;
        height: 260px;
        object-fit: cover;
        border-radius: 8px 8px 0 0;
    }

    .main-heading {
        font-size: 28px !important;
        line-height: 1.25;
    }

    .description2 {
        font-size: 15px;
    }

    .progress-wrapper .d-flex {
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .progress-wrapper h3 {
        font-size: 16px !important;
    }

    .btn-custom {
        height: auto !important;
        min-height: 56px;
        font-size: 15px !important;
        padding-top: 12px;
        padding-bottom: 12px;
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }

    .impact-sec {
        margin-top: 80px;
        padding: 40px 0;
    }

    .impact-img img {
        width: 100%;
        height: auto;
        max-height: 80px;
        object-fit: cover;
    }

    .impact-img.top {
        top: -48px;
    }

    .impact-text h2 {
        font-size: clamp(28px, 4vw, 40px);
    }

    .impact-text p {
        font-size: 15px;
    }

    .heading11,
    .heading11 span {
        font-size: clamp(28px, 4.5vw, 36px) !important;
    }

    .awards-header .heading11,
    .awards-header .heading11 span {
        font-size: clamp(28px, 4.5vw, 40px) !important;
    }

    .test-box {
        padding: 28px !important;
        padding-bottom: 28px !important;
    }

    .testimonial-nav {
        padding-top: 16px;
    }

    .testimonial-nav .swiper-button-prev,
    .testimonial-nav .swiper-button-next {
        width: 40px;
        height: 40px;
    }

    .test-inner.ptb50 {
        padding-bottom: 56px !important;
    }

    .left-image {
        min-height: 280px;
    }

    .left-image img {
        min-height: 280px;
    }

    .award-card--featured {
        width: min(85vw, 400px);
        height: auto;
        aspect-ratio: 6 / 5;
    }

    .award-card:not(.award-card--featured) {
        width: min(70vw, 270px);
        height: auto;
        aspect-ratio: 3 / 4;
    }

    footer .row > [class*="col-"] {
        margin-bottom: 8px;
    }
}

/* ---------- Mobile landscape / large phones ---------- */
@media (max-width: 767.98px) {
    .container,
    .container-fluid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .featured-sec .row > [class*="col-"],
    #posts > [class*="col-"],
    #posts > [class*="col"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .featured-box {
        min-height: 0 !important;
    }

    .featured-box img {
        width: 100%;
        height: 180px !important;
        object-fit: cover;
        display: block;
    }

    .featured-box-text {
        padding: 12px 14px !important;
    }

    .featured-box-text h4 {
        font-size: 15px !important;
        min-height: 0 !important;
    }

    .news-showcase {
        padding: 50px 0 !important;
    }

    .news-info {
        padding: 28px 20px 22px !important;
    }

    .news-info h2 {
        font-size: 26px !important;
    }

    .news-info p {
        font-size: 14px !important;
        margin-bottom: 0 !important;
        margin-right: 0 !important;
    }

    .news-gallery-block {
        padding: 0 20px 24px !important;
    }

    .news-btn--bottom {
        width: 100% !important;
        max-width: 100%;
        padding: 14px 20px !important;
    }

    .news-prev,
    .news-next {
        width: 44px;
        height: 44px;
    }

    .news-prev {
        right: 60px !important;
    }

    /* Keep non-news swiper controls usable (inline rule hid all arrows) */
    .testimonial-nav .swiper-button-prev,
    .testimonial-nav .swiper-button-next,
    .partner-swipe .swiper-button-prev,
    .partner-swipe .swiper-button-next {
        display: flex !important;
    }

    .test-box {
        padding: 16px !important;
        padding-bottom: 16px !important;
    }

    .test-box h5 {
        font-size: 16px !important;
    }

    .test-box p {
        font-size: 13px !important;
    }

    .test-head h2,
    .test-sec .heading11 {
        font-size: 22px !important;
    }

    .testimonial-nav {
        padding-top: 14px;
    }

    .testimonial-nav .swiper-button-prev,
    .testimonial-nav .swiper-button-next {
        width: 44px;
        height: 44px;
    }

    .test-inner.ptb50 {
        padding-bottom: 48px !important;
    }

    .impact-sec {
        margin-top: 56px;
        padding: 32px 0;
    }

    .impact-img img {
        max-height: 56px;
    }

    .impact-img.top {
        top: -32px;
    }

    .impact-text {
        padding-top: 12px;
        margin-bottom: 28px;
    }

    .impact-text h2 {
        font-size: 24px !important;
        margin-bottom: 10px;
    }

    .impact-text p {
        font-size: 14px;
        text-align: left;
    }

    .impact-small-box {
        margin-bottom: 12px;
    }

    .ngo-section,
    .featured-sec,
    .fundraiser-sec,
    .partner-sec,
    .awards-section {
        padding-left: 0;
        padding-right: 0;
    }

    .ngo-section {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .donation-card {
        padding: 16px !important;
        border-radius: 18px;
    }

    .donation-card .btn-custom {
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        width: 100%;
    }

    .main-heading {
        font-size: 22px !important;
    }

    .main-heading br {
        display: none;
    }

    .bottom-caption {
        padding: 12px !important;
        gap: 10px !important;
        flex-wrap: wrap;
    }

    .bottom-caption h5 {
        font-size: 13px !important;
    }

    .heart-circle {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
    }

    .progress-wrapper {
        padding: 16px !important;
    }

    .progress-wrapper .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 4px;
    }

    .progress-wrapper h3 {
        font-size: 15px !important;
        margin: 0;
    }

    .progress-wrapper h5 {
        font-size: 13px !important;
        line-height: 1.4;
    }

    .info-box {
        padding: 10px !important;
    }

    .info-box h6,
    .info-box small {
        font-size: 13px !important;
        word-break: break-word;
    }

    .footer-box {
        padding: 16px !important;
    }

    .footer-item {
        align-items: flex-start;
    }

    .footer-item i {
        font-size: 26px !important;
    }

    .raised-info {
        flex-wrap: wrap;
        gap: 6px 12px;
    }

    .raised-info span,
    .raised-info p {
        font-size: 0.85rem;
    }

    .fundraiser-text p {
        font-size: 1rem;
    }

    .awards-panorama-swiper .swiper-slide {
        width: min(68vw, 245px);
    }

    .panorama-slider .swiper-slide {
        width: min(72vw, 240px);
        height: auto;
        aspect-ratio: 240 / 190;
    }

    .award-card--featured {
        width: min(88vw, 340px);
    }

    .award-card:not(.award-card--featured) {
        width: min(72vw, 240px);
    }

    .part-item {
        margin: 8px;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .partner-swipe .swiper-slide {
        display: flex;
        justify-content: center;
        align-items: center;
        height: auto;
    }

    .part-item img {
        width: 100%;
        max-width: 180px;
        height: auto;
        max-height: none;
        aspect-ratio: 1;
        object-fit: contain;
        margin: 0 auto;
        display: block;
    }

    .partner-sec .awards-header {
        text-align: center;
    }

    /* Blogs CTA + space before footer */
    .featured-sec:has(#posts) {
        padding-bottom: 64px !important;
    }

    .main-button-div {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
        margin-top: 28px !important;
        margin-bottom: 24px !important;
        padding: 0 12px;
        text-align: center !important;
    }

    .main-button-div .btnn {
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px;
        margin: 0 auto;
        text-align: center;
        white-space: nowrap;
    }

    .main-button-div .btnn i {
        margin-left: 0;
    }

    footer {
        padding-top: 2.5rem;
        clear: both;
    }

    footer .footer-logo {
        display: block;
        max-width: min(240px, 70vw);
        margin-top: 8px;
        margin-bottom: 1.25rem;
    }

    .video-modal {
        width: calc(100% - 24px);
        max-width: 100%;
        margin: 12px;
    }

    .video-modal-close {
        right: 8px;
        top: 8px;
    }

    .heading11 img {
        max-height: 1.1em;
        width: auto;
        vertical-align: middle;
    }

    .social ul {
        column-gap: 14px;
    }

    footer .footer-form {
        max-width: 100%;
    }

    .footer-qr {
        max-width: 120px;
    }
}

/* ---------- Small phones ---------- */
@media (max-width: 575.98px) {
    .featured-sec .row > [class*="col-"],
    #posts > [class*="col-"],
    #posts > [class*="col"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .fundraiser-box {
        flex-direction: column !important;
    }

    .fundraiser-img {
        width: 100% !important;
        height: 180px !important;
    }

    .fundraiser-img img {
        height: 100% !important;
        object-fit: cover;
    }

    .fundraiser-text {
        padding: 14px !important;
    }

    .main-heading {
        font-size: 20px !important;
    }

    .left-image,
    .left-image img {
        min-height: 220px;
    }

    .bottom-caption {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .footer-item {
        flex-direction: column;
        text-align: center;
        gap: 6px;
        align-items: center;
    }

    .btn-custom {
        font-size: 14px !important;
        min-height: 52px;
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }

    .days-badge {
        font-size: 12px;
        padding: 3px 12px;
    }

    .news-prev,
    .news-next {
        width: 38px;
        height: 38px;
        top: 8px !important;
    }

    .newsSwiper {
        padding: 48px 0 40px;
    }

    .impact-sec {
        margin-top: 48px;
    }

    .heading11,
    .heading11 span,
    .awards-header .heading11,
    .awards-header .heading11 span {
        font-size: 24px !important;
    }

    .test-sec::before {
        width: 28%;
        border-left-width: 10px;
    }
}

/* ---------- Very small phones ---------- */
@media (max-width: 380px) {
    .container,
    .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .main-heading {
        font-size: 18px !important;
    }

    .news-info h2 {
        font-size: 22px !important;
    }

    .heading11,
    .heading11 span,
    .awards-header .heading11,
    .awards-header .heading11 span {
        font-size: 20px !important;
    }

    .btn-custom {
        font-size: 13px !important;
        letter-spacing: 0;
    }

    .awards-panorama-swiper .swiper-slide {
        width: min(78vw, 220px);
    }
}
