﻿/* ========================================
   Tablet
======================================== */

@media (max-width: 992px) {

    section {
        padding: 70px 0;
    }

    .about-image {
        order: -1;
    }

    .cta-content {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* ========================================
   Mobile
======================================== */

@media (max-width: 768px) {

    .container {
        width: min(100% - 30px, var(--container-width));
    }

    section {
        padding: 55px 0;
    }

    .section-heading {
        margin-bottom: 30px;
    }

        .section-heading h2 {
            font-size: 28px;
        }

    .section-heading-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .hero {
        min-height: 0;
        padding: 72px 0;
    }

    .hero::before {
        display: none;
    }

        .hero h1 {
            font-size: 34px;
        }

        .hero p {
            font-size: 15px;
        }

    .hero-actions {
        width: 100%;
    }

        .hero-actions .btn {
            width: 100%;
        }

    .about-content h2 {
        font-size: 30px;
    }

    .about-image img {
        min-height: 280px;
    }

    .stat-number {
        font-size: 34px;
    }

    .publication-content {
        padding: 14px;
    }

        .publication-content h3 {
            font-size: 15px;
        }

    .cta-content h2 {
        font-size: 27px;
    }

    .cta-content .btn {
        width: 100%;
    }
}


/* ========================================
   Small Mobile
======================================== */

@media (max-width: 480px) {

    .hero {
        min-height: 500px;
    }

        .hero h1 {
            font-size: 29px;
        }

        .hero p {
            font-size: 14px;
        }

    .publication-image {
        aspect-ratio: 4 / 3;
    }
}

/* ========================================
   About - Tablet
======================================== */

@media (max-width: 992px) {

    .contact-box {
        grid-template-columns: 1fr;
    }
}


/* ========================================
   About - Mobile
======================================== */

@media (max-width: 768px) {

    .page-hero {
        padding: 70px 0;
    }

        .page-hero h1 {
            font-size: 36px;
        }

    .about-introduction-content h2,
    .values-content h2,
    .contact-content h2 {
        font-size: 28px;
    }

    .about-introduction-image img,
    .values-image img {
        min-height: 280px;
    }

    .contact-box {
        padding: 25px;
    }
}
/* ========================================
   Header Responsive
======================================== */

@media (max-width: 768px) {

    .header-inner {
        min-height: 72px;
        gap: 15px;
    }

    .header-left {
        gap: 6px;
        min-width: 0;
    }

    .site-logo-image {
        height: 44px;
    }

    .language-switcher {
        font-size: 12px;
    }

    .header-login {
        min-height: 38px;
        padding-inline: 13px;
        font-size: 12px;
    }

    .header-user {
        width: auto;
        max-width: 100%;
        min-height: 38px;
        padding: 3px 4px;
        gap: 5px;
        border-radius: 9px;
    }

    .header-phone {
        min-height: 32px;
        padding-inline: 9px;
        font-size: 11px;
    }

    .header-logout {
        min-height: 32px;
        padding-inline: 10px;
        font-size: 11px;
        border-radius: 7px;
    }
}


@media (max-width: 480px) {

    .header-inner {
        gap: 10px;
    }

    .header-left {
        gap: 5px;
    }

    .language-switcher {
        gap: 4px;
        font-size: 11px;
    }

    .header-login {
        min-height: 36px;
        padding-inline: 10px;
        font-size: 11px;
    }

    .header-user {
        gap: 3px;
        padding: 3px;
    }

    .header-phone {
        min-height: 30px;
        padding-inline: 7px;
        font-size: 10px;
    }

    .header-logout {
        min-height: 30px;
        padding-inline: 8px;
        font-size: 10px;
    }

    .site-logo-image {
        height: 40px;
    }
}
/* ========================================
   News Responsive
======================================== */

@media (max-width: 768px) {

    .news-list-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

        .news-list-header h2 {
            font-size: 28px;
        }

    .news-list-card .news-content h3 {
        min-height: auto;
    }

    .pagination {
        margin-top: 35px;
        flex-wrap: wrap;
    }
}
/* ========================================
   Mobile Navbar
======================================== */

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
}

    .mobile-menu-button span {
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: var(--text);
        transition: transform 0.25s ease, opacity 0.2s ease;
    }


.mobile-menu {
    display: none;
    border-top: 1px solid var(--border);
    background: #ffffff;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
}

.mobile-menu-link {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding-inline: 5px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease;
}

    .mobile-menu-link:hover {
        color: var(--primary);
        background: var(--background-soft);
    }

.mobile-menu-link.is-active {
    padding-inline-start: 12px;
    border-inline-start: 3px solid var(--primary);
    color: var(--primary);
    background: var(--background-soft);
}


/* ========================================
   Mobile Navbar
======================================== */

@media (max-width: 768px) {

    .site-navbar {
        position: sticky;
        top: var(--site-header-height, 72px);
    }

    .navbar-desktop {
        display: none;
    }

    .navbar-inner {
        min-height: 54px;
        justify-content: flex-start;
    }

    .mobile-menu-button {
        display: flex;
    }

    .mobile-menu.is-open {
        display: block;
        /* در گوشی افقی همه گزینه‌ها قابل دسترس باشند */
        max-height: calc(100vh - var(--site-header-height, 72px) - 54px);
        max-height: calc(100dvh - var(--site-header-height, 72px) - 54px);
        overflow-y: auto;
    }
}



/* ========================================
   Footer Responsive
======================================== */

@media (max-width: 992px) {

    .footer-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .footer-about {
        max-width: none;
    }
}


@media (max-width: 768px) {

    .site-footer {
        padding-top: 50px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 35px;
        padding-bottom: 35px;
    }

    .footer-about {
        max-width: 100%;
    }

    .footer-logo img {
        height: 48px;
    }

    .footer-bottom {
        padding: 18px 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .footer-bottom-links {
        gap: 15px;
        flex-wrap: wrap;
    }
}

/* ========================================
   News Details Responsive
======================================== */
@media (max-width: 768px) {

    .news-details-header {
        padding: 50px 0 40px;
    }

    .news-breadcrumb {
        margin-bottom: 20px;
        font-size: 11px;
    }

    .news-details-title h1 {
        font-size: 30px;
    }

    .news-details-meta {
        gap: 7px;
        font-size: 12px;
    }

    .news-details-content {
        padding: 45px 0;
    }

    .news-details-card {
        padding: 25px 20px;
        border-radius: var(--radius-md);
    }

    .news-summary {
        padding: 18px;
        margin-bottom: 25px;
    }

        .news-summary p {
            font-size: 14px;
        }

    .news-details-image {
        margin-bottom: 25px;
    }

    .news-description {
        font-size: 14px;
        line-height: 2.2;
    }
}


@media (max-width: 480px) {

    .news-details-title h1 {
        font-size: 26px;
    }

    .news-details-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .meta-divider {
        display: none;
    }

    .news-details-card {
        padding: 20px 15px;
    }
}

/* ========================================
   Account Login Responsive
======================================== */

@media (max-width: 768px) {

    .login-section {
        padding: 45px 0;
    }

    .login-card {
        padding: 30px 22px;
        border-radius: var(--radius-md);
    }

    .login-card-header h1 {
        font-size: 25px;
    }

    .otp-footer {
        align-items: center;
        flex-direction: column;
    }

    .otp-timer {
        order: -1;
    }
}


@media (max-width: 480px) {

    .login-card {
        padding: 25px 17px;
    }

    .login-card-header h1 {
        font-size: 23px;
    }

    .login-logo img {
        height: 52px;
    }

    .otp-input {
        letter-spacing: 5px;
    }
}
