﻿/* استایل‌های ریسپانسیو */

/* تبلت - افقی (1024px به پایین) */
@media (max-width: 1024px) {
    .container {
        width: 95%;
    }
    
    .hero h2 {
        font-size: 2.4rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .swiper {
        height: 400px;
    }
    
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lesson-content {
        gap: 20px;
    }
}

/* تبلت - عمودی (768px به پایین) */
@media (max-width: 768px) {
    /* هدر */
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo {
        width: 100%;
        justify-content: space-between;
    }
    
    .mobile-menu-btn {
        display: block;
        order: 2;
    }
    
    nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        order: 3;
    }
    
    nav.active {
        max-height: 300px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        padding: 0;
    }
    
    nav a {
        display: block;
        text-align: center;
        padding: 12px;
    }
    
    /* هیرو */
    .hero {
        padding: 80px 0;
        background-attachment: scroll;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        padding: 0 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* اسلایدر */
    .swiper {
        height: 350px;
    }
    
    .slide-caption {
        transform: translateY(0);
        padding: 20px 15px 15px;
    }
    
    .slide-caption h3 {
        font-size: 1.3rem;
    }
    
    /* دوره‌ها */
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-image {
        height: 200px;
    }
    
    .course-card-content {
        padding: 20px;
    }
    
    .course-card-content h3 {
        font-size: 1.3rem;
    }
    
    /* مطالب آموزشی */
    .educational-content {
        padding: 25px;
    }
    
    .lesson-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .lesson-text {
        padding: 20px;
    }
    
    .lesson-text h4 {
        font-size: 1.3rem;
    }
    
    .video-placeholder i {
        font-size: 3rem;
    }
    
    .video-placeholder h4 {
        font-size: 1.3rem;
    }
    
    /* سوالات متداول */
    .faq-section h3 {
        font-size: 1.5rem;
    }
    
    .faq-question {
        padding: 15px;
        font-size: 1rem;
    }
    
    /* تضمین */
    .guarantee {
        padding: 30px 20px;
        margin-top: 40px;
    }
    
    .guarantee h3 {
        font-size: 1.5rem;
    }
    
    .guarantee p {
        font-size: 1.1rem;
    }
    
    /* تماس */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-form {
        padding: 25px;
    }
    
    .contact-form h3 {
        font-size: 1.3rem;
    }
    
    /* فوتر */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h3::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .footer-links {
        display: inline-block;
        text-align: right;
    }
    
    .footer-contact {
        display: inline-block;
        text-align: right;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* دکمه بازگشت به بالا */
    .scroll-top-btn {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* موبایل (576px به پایین) */
@media (max-width: 576px) {
    /* هیرو */
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* عنوان بخش‌ها */
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* اسلایدر */
    .swiper {
        height: 300px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    
    /* دوره‌ها */
    .course-image {
        height: 180px;
    }
    
    .course-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .price-new {
        font-size: 1.6rem;
    }
    
    /* مطالب آموزشی */
    .educational-content h3 {
        font-size: 1.5rem;
    }
    
    .cta-section p {
        font-size: 1.1rem;
    }
    
    .cta-btn {
        font-size: 1.1rem;
        padding: 12px 25px;
    }
    
    /* تضمین */
    .guarantee {
        padding: 25px 15px;
    }
    
    .guarantee h3 {
        font-size: 1.3rem;
    }
    
    .guarantee p {
        font-size: 1rem;
    }
    
    /* تماس */
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    /* مدال */
    .modal {
        padding: 30px 20px;
    }
    
    .modal h3 {
        font-size: 1.5rem;
    }
    
    .modal p {
        font-size: 1rem;
    }
    
    /* پیش‌لودینگ */
    .music-note {
        font-size: 3rem;
    }
    
    .preloader-content p {
        font-size: 1.3rem;
    }
    
    /* کپی رایت */
    .copyright {
        font-size: 0.8rem;
    }
}

/* موبایل کوچک (375px به پایین) */
@media (max-width: 375px) {
    /* هیرو */
    .hero h2 {
        font-size: 1.6rem;
    }
    
    /* دوره‌ها */
    .course-features {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* مطالب آموزشی */
    .lesson-list li {
        font-size: 0.95rem;
    }
    
    /* سوالات متداول */
    .faq-question {
        font-size: 0.95rem;
    }
    
    /* تضمین */
    .guarantee-badge {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }
}

/* تبلت بزرگ (بین 769px و 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .course-card:last-child {
        grid-column: 1 / -1;
        max-width: 600px;
        margin: 0 auto;
    }
}

/* لپتاپ (بین 1025px و 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
    .container {
        max-width: 1100px;
    }
}

/* جهت‌های مختلف */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .swiper {
        height: 250px;
    }
}

/* حالت تاریک (پیش‌نهاد) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .course-card,
    .lesson-text,
    .contact-form,
    .faq-item,
    .educational-content {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    
    .course-card-content p,
    .lesson-text p,
    .form-note {
        color: #b0b0b0;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background-color: #3d3d3d;
        color: #e0e0e0;
        border-color: #555;
    }
    
    .contact-item {
        background-color: #2d2d2d;
    }
}

/* چاپ‌گر */
@media print {
    * {
        color: black !important;
        background: white !important;
    }
    
    .btn, .mobile-menu-btn, .scroll-top-btn {
        display: none !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }
    
    .hero {
        background: none !important;
        color: black !important;
        padding: 20px 0 !important;
    }
    
    .swiper, .video-container {
        display: none !important;
    }
    
    section {
        padding: 20px 0 !important;
        page-break-inside: avoid;
    }
    
    footer {
        display: none !important;
    }
}

/* ارتفاع کم */
@media (max-height: 600px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero h2 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }
    
    .modal {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* پشتیبانی از تاچ */
@media (hover: none) and (pointer: coarse) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    
    .course-card:hover {
        transform: none;
    }
    
    nav a:hover {
        background-color: transparent;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .contact-item:hover {
        transform: none;
    }
}

/* پشتیبانی از مرورگرهای قدیمی */
@supports not (display: grid) {
    .courses-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .course-card {
        width: 300px;
        margin: 15px;
    }
    
    .footer-content {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .footer-section {
        width: 48%;
        margin-bottom: 30px;
    }
}