/* ====================================
   AYENAH - Custom Responsive Overrides
   ==================================== */

/* === FIX: Override template's `div { line-height: 0px !important }` === */
/* This rule in main.css destroys text rendering in all divs */
.section-header,
.section-header div,
.alert-box,
.alert-box div,
.info-box,
.info-box div,
.stat-card,
.stat-card div,
.content-card,
.content-card div,
.pilier-card,
.pilier-card div,
.partner-box,
.partner-box div,
.step-item,
.step-item div,
.form-box,
.form-box div,
.cta-section,
.cta-section div,
.cm-details div,
.cm-group,
.cm-group div,
.faq div,
.contact-main div,
.blog div,
.donate-us div,
.checkout__form div,
.help-three div,
.difference-three div,
.donation-future div,
.process-flow,
.process-flow div,
.table-ayenah-wrapper,
.table-ayenah-wrapper div,
.simple-form,
.simple-form div,
.form-sidebar,
.form-sidebar div,
.form-box__header,
.form-box__header div,
.footer-three div,
.social-share-float div,
.diaspora-invite div {
    line-height: normal !important;
}

/* === Images responsive fix === */
.difference-three__thumb .thumb-lg {
    max-width: 100%;
}

/* === Dividers responsive (w-50 on index) === */
.divider-green {
    margin: 0 auto;
    text-align: center;
}

/* ====================================
   TABLET (max-width: 991.98px)
   ==================================== */
@media (max-width: 991.98px) {
    .difference-three__thumb .thumb-lg {
        max-width: 80%;
        margin: 0 auto;
    }

    .difference-three__thumb .thumb-lg img {
        max-height: 300px;
        width: auto;
        object-fit: cover;
    }

    /* Section header smaller */
    .section-header__title {
        font-size: 30px !important;
    }

    .section-header__desc {
        font-size: 16px !important;
    }

    /* Table scrollable on tablet */
    .table-ayenah-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-ayenah {
        min-width: 500px;
    }

    /* Step items on tablet */
    .step-item__content {
        padding: 20px;
    }

    /* Process flow adapt */
    .process-flow {
        gap: 10px !important;
    }

    .process-flow__item {
        min-width: 80px !important;
    }

    .process-flow__label {
        font-size: 11px !important;
    }

    .process-flow__icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }

    /* CTA section padding */
    .cta-section {
        padding: 40px 20px !important;
    }

    .cta-section__title {
        font-size: 24px !important;
    }

    .cta-section__text {
        font-size: 16px !important;
    }

    /* Partner boxes */
    .partner-box {
        margin-bottom: 20px;
    }

    /* Info box text */
    .info-box__title {
        font-size: 17px !important;
    }

    /* Pilier cards */
    .pilier-card {
        margin-bottom: 20px;
    }

    .pilier-card__title {
        font-size: 20px !important;
    }

    /* Banner text */
    .common-banner__content h2 {
        font-size: 28px !important;
    }

    .banner__content h1 {
        font-size: 32px !important;
    }
}

/* ====================================
   MOBILE (max-width: 767.98px)
   ==================================== */
@media (max-width: 767.98px) {
    .difference-three__thumb .thumb-lg {
        max-width: 90%;
    }

    .difference-three__thumb .thumb-lg img {
        max-height: 250px;
    }

    /* Section headers */
    .section-header {
        margin-bottom: 35px !important;
    }

    .section-header__title {
        font-size: 24px !important;
    }

    .section-header__desc {
        font-size: 15px !important;
    }

    /* Section padding reduced */
    .section-padding {
        padding: 50px 0 !important;
    }

    .section-padding-sm {
        padding: 35px 0 !important;
    }

    /* Stat cards smaller */
    .stat-card {
        padding: 25px 20px !important;
    }

    .stat-card__number {
        font-size: 32px !important;
    }

    .stat-card__icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.3rem !important;
    }

    /* Info boxes */
    .info-box {
        padding: 20px !important;
    }

    .info-box__icon {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem !important;
        margin-bottom: 15px !important;
    }

    .info-box__title {
        font-size: 16px !important;
    }

    .info-box__text {
        font-size: 14px !important;
    }

    /* Alert boxes */
    .alert-box {
        padding: 18px 15px !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .alert-box__icon {
        width: 35px !important;
        height: 35px !important;
        font-size: 0.9rem !important;
    }

    .alert-box__title {
        font-size: 15px !important;
    }

    .alert-box__text {
        font-size: 14px !important;
    }

    /* Step items */
    .step-item {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .step-item__number {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
    }

    .step-item__content {
        padding: 18px !important;
    }

    .step-item__title {
        font-size: 16px !important;
    }

    .step-item__text {
        font-size: 14px !important;
    }

    /* Process flow vertical on mobile */
    .process-flow {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .process-flow__arrow {
        transform: rotate(90deg) !important;
    }

    .process-flow__item {
        min-width: unset !important;
    }

    /* CTA section */
    .cta-section {
        padding: 30px 18px !important;
        border-radius: 16px !important;
    }

    .cta-section__title {
        font-size: 22px !important;
    }

    .cta-section__text {
        font-size: 15px !important;
        margin-bottom: 20px !important;
    }

    /* Buttons smaller on mobile */
    .btn-ayenah {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }

    .btn--primary,
    .btn--tertiary {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }

    /* Pilier cards */
    .pilier-card {
        padding: 25px 20px !important;
    }

    .pilier-card__icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }

    .pilier-card__title {
        font-size: 18px !important;
    }

    .pilier-card__text {
        font-size: 14px !important;
    }

    .pilier-card-3d {
        min-height: auto !important;
    }

    .pilier-card-3d__inner {
        min-height: auto !important;
    }

    /* Partner boxes */
    .partner-box {
        padding: 25px 20px !important;
    }

    .partner-box__list li {
        font-size: 14px !important;
        padding: 10px 0 !important;
    }

    /* Content card */
    .content-card {
        padding: 20px 15px !important;
        border-radius: 14px !important;
    }

    /* Form box */
    .form-box {
        border-radius: 18px !important;
    }

    .form-box__header {
        padding: 22px 20px !important;
        gap: 14px !important;
    }

    .form-box__header-icon {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
        font-size: 1.1rem !important;
    }

    .form-box__header-title {
        font-size: 18px !important;
    }

    .form-box__header-text {
        font-size: 13px !important;
    }

    .simple-form {
        padding: 25px 20px 30px !important;
    }

    /* Sidebar mobile */
    .form-sidebar {
        position: static !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
    }

    .form-sidebar__card {
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 200px !important;
        padding: 18px !important;
    }

    .form-sidebar__steps {
        width: 100% !important;
    }

    /* Tables */
    .table-ayenah-wrapper {
        margin: 0 -15px;
        padding: 0 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-ayenah {
        min-width: 450px;
    }

    .table-ayenah thead th {
        padding: 12px 14px !important;
        font-size: 13px !important;
    }

    .table-ayenah tbody td {
        padding: 12px 14px !important;
        font-size: 13px !important;
    }

    /* Banner text mobile */
    .common-banner__content h2 {
        font-size: 24px !important;
    }

    .common-banner__content p {
        font-size: 14px !important;
    }

    .banner__content h1 {
        font-size: 26px !important;
    }

    /* FAQ */
    .accordion-button {
        font-size: 14px !important;
        padding: 12px 15px !important;
    }

    .accordion-body {
        padding: 12px 15px !important;
        font-size: 14px !important;
    }

    /* Contact form */
    .contact__form {
        padding: 20px !important;
    }

    /* Map iframe */
    iframe {
        height: 300px !important;
    }

    /* Dividers w-50 → w-75 on mobile */
    .w-50.mx-auto {
        width: 75% !important;
    }

    /* Hide 3D line decorations on mobile */
    .difference-three__thumb .line {
        display: none !important;
    }

    /* Footer */
    .footer-three__logo {
        text-align: center;
        margin-bottom: 20px;
    }

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

/* ====================================
   SMALL MOBILE (max-width: 575.98px)
   ==================================== */
@media (max-width: 575.98px) {
    /* Extra small adjustments */
    .section-header__title {
        font-size: 22px !important;
    }

    .stat-card__number {
        font-size: 28px !important;
    }

    .cta-section__title {
        font-size: 20px !important;
    }

    /* Stack CTA buttons vertically */
    .cta-section .d-flex.gap-3 {
        flex-direction: column !important;
        align-items: center !important;
    }

    .cta-section .btn-ayenah {
        width: 100% !important;
        max-width: 280px !important;
        justify-content: center !important;
    }

    /* Banner */
    .banner__content h1 {
        font-size: 22px !important;
    }

    .common-banner__content h2 {
        font-size: 20px !important;
    }

    /* Form inputs full width */
    .input-group {
        flex-direction: column !important;
    }

    /* Simple form */
    .simple-form__group input,
    .simple-form__group select,
    .simple-form__group textarea {
        padding: 12px 14px !important;
        font-size: 14px !important;
    }

    .simple-form__input--icon {
        padding-left: 40px !important;
    }

    /* Sidebar stacks fully on small mobile */
    .form-sidebar__card {
        flex: 1 1 100% !important;
        min-width: unset !important;
    }

    /* Step indicators compact */
    .simple-form__step-label {
        display: none !important;
    }

    .simple-form__step-divider {
        width: 24px !important;
        margin: 0 8px !important;
    }

    .simple-form__section-title {
        font-size: 17px !important;
    }

    .simple-form__submit button {
        width: 100% !important;
        padding: 14px 20px !important;
    }

    /* Process flow compact */
    .process-flow__icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 0.9rem !important;
    }

    .process-flow__label {
        font-size: 12px !important;
    }

    /* Partner box icons */
    .partner-box__icon {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem !important;
    }

    /* Inline paragraphs */
    p {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    /* Lists */
    ul li, ol li {
        font-size: 14px !important;
    }
}

/* ====================================
   PRINT STYLES
   ==================================== */
@media print {
    .common-banner,
    .social-share-float,
    .progress-wrap,
    .mouseCursor,
    .header,
    footer,
    .preloader {
        display: none !important;
    }

    .section-padding {
        padding: 20px 0 !important;
    }

    body {
        font-size: 12pt !important;
    }
}
