/**
 * Dariusham Responsive Breakpoints
 * Exact responsive matching for Tablet (<= 1024px) and Mobile (<= 767px)
 */

/* ==========================================================================
   1. TABLET BREAKPOINT (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    :root {
        --container-max-width: 100%;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .nav-item {
        margin-left: 10px;
        margin-right: 10px;
    }

    .nav-link {
        font-size: 12px;
    }

    .btn--header {
        font-size: 13px;
        padding: 8px 12px;
    }

    .header-megamenu__inner {
        padding: 18px 16px;
    }

    .header-megamenu__grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .megamenu-card {
        padding: 12px 8px;
    }

    .site-footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* ==========================================================================
   2. MOBILE BREAKPOINT (<= 767px)
   ========================================================================== */
@media (max-width: 767px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* ---------------------------------------------------------------------- */
    /* Header (Mobile)
    /* ---------------------------------------------------------------------- */
    .site-header__inner {
        position: relative;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .site-header__logo {
        flex: 0 0 18%;
        max-width: 18%;
    }

    .site-header__logo img {
        width: 44px;
    }

    .site-header__toggle {
        display: flex;
        flex: 0 0 17%;
        max-width: 17%;
        order: 2;
    }

    .site-header__cta {
        flex: 0 0 63%;
        max-width: 63%;
        order: 3;
        padding-right: 10px;
    }

    .btn--header {
        font-size: 13px;
        padding: 9px 12px;
    }

    /* Mobile Drawer / Dropdown */
    .site-header__nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        padding: 10px 0;
        background-color: var(--color-white);
        border: 1px solid var(--color-primary);
        border-radius: 6px;
        box-shadow: 0 8px 24px rgba(49, 38, 130, 0.15);
        z-index: 9999;
    }

    .site-header__nav.is-open {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-item {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid rgba(49, 38, 130, 0.08);
    }

    .nav-link {
        font-size: 14px;
        padding: 12px 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-item.has-children {
        position: relative;
    }

    .nav-item .dropdown-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        left: 12px;
        top: 12px;
        width: 28px;
        height: 28px;
        background-color: rgba(49, 38, 130, 0.05);
        border-radius: 4px;
        z-index: 5;
    }

    .nav-item .dropdown-toggle::after {
        content: "";
        display: inline-block;
        width: 6px;
        height: 6px;
        border-right: 2px solid var(--color-primary);
        border-bottom: 2px solid var(--color-primary);
        transform: rotate(45deg);
        transition: transform 0.2s ease;
    }

    .nav-item.has-children.is-open > .dropdown-toggle::after {
        transform: rotate(-135deg);
    }

    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid rgba(49, 38, 130, 0.08);
        border-radius: 0;
        background-color: #faf9fd;
        padding-right: 15px;
        display: none;
    }

    .nav-item.has-children.is-open > .sub-menu {
        display: block;
    }

    .sub-menu .nav-link {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* Header Mega Menu (Mobile) */
    .nav-item--megamenu,
    .has-megamenu,
    li.menu-item.has-megamenu {
        position: relative !important;
    }

    .header-megamenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
        box-shadow: none;
        display: none;
        pointer-events: auto;
        max-width: 100%;
        margin: 0;
    }

    .nav-item--megamenu.is-open .header-megamenu,
    .has-megamenu.is-open .header-megamenu,
    li.menu-item.has-megamenu.is-open .header-megamenu {
        display: block;
    }

    .header-megamenu__inner {
        background-color: #faf9fd;
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-top: 1px solid rgba(49, 38, 130, 0.08);
        padding: 12px 10px;
    }

    .header-megamenu__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .megamenu-card {
        padding: 12px 8px;
        background-color: #ffffff;
        border-radius: 8px;
    }

    .megamenu-card__title {
        font-size: 13px;
    }

    .megamenu-card__subtitle {
        font-size: 10px;
    }

    /* ---------------------------------------------------------------------- */
    /* Hero Banner & Slider (Mobile)
    /* ---------------------------------------------------------------------- */
    .hero-slider {
        padding: 7px;
    }

    .hero-slider__track {
        min-height: auto;
    }

    .hero-slide {
        position: static;
        height: auto;
    }

    .hero-slide.is-active {
        display: block;
    }

    .hero-slide__img {
        height: auto;
        max-height: 480px;
        object-fit: contain;
        box-shadow: 0px 8px 46px -27px var(--color-primary);
    }

    .hero-slide__content {
        bottom: 20px;
    }

    .btn--hero {
        font-size: 12px;
        padding: 8px 18px;
    }

    .hero-slider__arrow {
        width: 34px;
        height: 34px;
    }

    .hero-slider__arrow svg {
        width: 18px;
        height: 18px;
    }

    .hero-slider__arrow--prev {
        right: 12px;
    }

    .hero-slider__arrow--next {
        left: 12px;
    }

    .hero-slider__dots {
        bottom: 12px;
    }

    .hero-banner--desktop {
        display: none;
    }

    .hero-banner--mobile {
        display: block;
        padding: 7px;
    }

    /* ---------------------------------------------------------------------- */
    /* Funds Section (Mobile)
    /* ---------------------------------------------------------------------- */
    .funds-section {
        padding: 7px;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .funds-grid {
        flex-wrap: wrap;
        gap: 0;
    }

    .fund-card {
        flex: 0 0 50%;
        width: 50%;
        min-height: auto;
        padding: 1.5em 1em;
        gap: 15px;
    }

    .fund-card--servat {
        border-radius: 0;
    }

    .fund-card--dara .fund-card__subtitle,
    .fund-card--oto .fund-card__subtitle {
        margin-top: 7px;
    }

    .fund-card--khazaneh .fund-card__subtitle,
    .fund-card--andokhte .fund-card__subtitle,
    .fund-card--sabad .fund-card__subtitle {
        text-align: center;
        line-height: 1.4em;
    }

    .fund-card--ganjineh {
        flex: 0 0 100%;
        width: 100%;
        border-radius: 0px 0px 12px 12px;
    }

    .fund-card--banko {
        border-radius: 0;
    }

    .fund-card--sabad {
        flex: 0 0 100%;
        width: 100%;
        border-radius: 0px 0px 12px 12px;
    }

    /* ---------------------------------------------------------------------- */
    /* Investment Types (Mobile)
    /* ---------------------------------------------------------------------- */
    .investment-types-section {
        padding: 7px;
    }

    .invest-card--header {
        flex: 0 0 100%;
        width: 100%;
        min-height: 100px;
        border-radius: 20px 20px 0px 0px;
    }

    .invest-card--item {
        flex: 0 0 50%;
        width: 50%;
        min-height: auto;
        padding: 1.5em 1em;
        border-radius: 0;
    }

    .invest-card--item:hover {
        margin-top: 0;
        margin-bottom: 0;
        padding: 1.5em 1em;
        border-radius: 0;
        box-shadow: none;
    }

    .invest-card--small {
        min-height: 0;
    }

    .invest-card--contact {
        flex: 0 0 100%;
        width: 100%;
        border-radius: 0px 0px 20px 20px;
        padding: 2.5em 1.5em;
    }

    .invest-card__contact-title {
        font-size: 15px;
        line-height: 1.7em;
    }

    .invest-card__hover-desc {
        max-height: none;
        opacity: 0.95;
        margin-top: 6px;
        display: block;
        color: var(--color-primary);
        font-size: 11px;
    }

    .invest-card--item:hover .invest-card__hover-desc {
        color: var(--color-white);
    }

    /* ---------------------------------------------------------------------- */
    /* CTA Promo Cards (Mobile)
    /* ---------------------------------------------------------------------- */
    .cta-cards-grid {
        flex-direction: column;
        gap: 12px;
    }

    .cta-card--large {
        flex: 0 0 100%;
        width: 100%;
        min-height: 250px;
        border-radius: 12px;
    }

    .cta-card--large .cta-card__content {
        min-height: 250px;
    }

    .cta-cards-column {
        flex: 0 0 100%;
        width: 100%;
        gap: 12px;
    }

    .cta-card--invest {
        border-radius: 12px;
        min-height: 200px;
    }

    .cta-card--portfolio {
        border-radius: 12px;
        min-height: 200px;
    }

    /* ---------------------------------------------------------------------- */
    /* Steps (Mobile)
    /* ---------------------------------------------------------------------- */
    .steps-section {
        padding: 7px;
    }

    .steps-section__title {
        text-align: center;
        font-size: 15px;
    }

    .steps-grid {
        flex-direction: column;
        gap: 12px;
    }

    .step-card {
        flex: 0 0 100%;
        width: 100%;
        min-height: auto;
        border-radius: 12px !important;
        padding: 1.8em 1.5em !important;
    }

    .step-card--1 .step-card__text {
        padding-right: 0;
        letter-spacing: -0.7px;
    }

    .step-card--2 .step-card__text,
    .step-card--3 .step-card__text,
    .step-card--4 .step-card__text {
        padding-left: 0;
    }

    /* Modal Popup (Mobile) */
    .site-modal {
        padding: 12px;
    }

    .site-modal__container {
        padding: 24px 18px;
        border-radius: 16px;
    }

    /* ---------------------------------------------------------------------- */
    /* Consultation Callout (Mobile)
    /* ---------------------------------------------------------------------- */
    .consultation-box {
        border-radius: 20px;
        padding: 35px 15px;
        min-height: auto;
    }

    .consultation-box__title {
        font-size: 17px;
        line-height: 1.7em;
        padding: 0 15px;
    }

    .consultation-box__subtitle {
        font-size: 15px;
        line-height: 1.5em;
        padding: 0 10px;
    }

    .consultation-box__spacer {
        height: 1em;
    }

    .consultation-box__actions {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }

    /* ---------------------------------------------------------------------- */
    /* About (Mobile)
    /* ---------------------------------------------------------------------- */
    .about-section__inner {
        flex-direction: column;
        gap: 15px;
    }

    .about-section__title-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .about-section__content-col {
        flex: 0 0 100%;
        max-width: 100%;
        max-height: 340px;
    }

    /* ---------------------------------------------------------------------- */
    /* Single Page (Mobile)
    /* ---------------------------------------------------------------------- */
    .page-sticky-header__title {
        font-size: 17px;
        padding: 1.2em 1.5em 0.5em 1.5em;
    }

    .page-card {
        padding: 1.5em 1em;
        border-radius: 10px;
    }

    /* ---------------------------------------------------------------------- */
    /* Footer (Mobile)
    /* ---------------------------------------------------------------------- */
    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .site-footer__col--contact {
        text-align: center;
    }

    .site-footer__card {
        padding: 40px 20px;
        border-radius: 20px;
    }

    /* Floating Badge (Mobile) */
    .floating-badge {
        --badge-width: 75px !important;
    }
    .floating-badge--bottom-right {
        bottom: 16px;
        right: 16px;
    }
    .floating-badge--bottom-left {
        bottom: 16px;
        left: 16px;
    }
    .floating-badge--top-right {
        top: 16px;
        right: 16px;
    }
    .floating-badge--top-left {
        top: 16px;
        left: 16px;
    }
}

