/* responsive.css - استایل‌های ریسپانسیو بهینه شده */

@media (max-width: 1400px) {
    .container {
        max-width: 1320px;
        padding: 0 25px;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .category-services {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-plans {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    /* هیرو */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.15rem;
        max-width: 100%;
    }
    
    .hero-features {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .law-illustration {
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* سکشن‌ها */
    .section-title {
        font-size: 2rem;
    }
    
    /* سرویس‌ها */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* قیمت‌گذاری */
    .pricing-plans {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }
    
    /* فوتر */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* صفحات */
    .payment-section {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    /* نظرات */
    .testimonials-slider {
        max-width: 100%;
    }
    
    /* گالری تصاویر */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 15px;
    }

    /* هدر و لوگو */
    .main-header {
        padding: 0.5rem 0;
    }
    
    .logo-text h1 {
        font-size: 1.1rem;
    }
    
    .logo-text span {
        font-size: 0.75rem;
    }
    
    .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        margin-left: 8px;
    }

    /* منوی موبایل */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        padding: 0;
        border-top: 2px solid var(--primary-color);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .main-nav li:last-child {
        border-bottom: none;
    }
    
    .main-nav a {
        padding: 1rem 1.2rem;
        border-radius: 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .main-nav a:hover {
        background-color: rgba(26, 77, 143, 0.05);
    }
    
    /* زیرمنو در موبایل */
    .main-nav ul ul {
        position: static;
        box-shadow: none;
        background: rgba(26, 77, 143, 0.03);
        padding: 0;
    }
    
    .main-nav ul ul a {
        padding-right: 2.5rem;
        font-size: 0.9rem;
    }
    
    .main-nav li:hover > ul {
        display: flex;
    }

    .header-actions {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: rgba(26, 77, 143, 0.05);
        transition: var(--transition);
    }
    
    .mobile-menu-btn:hover {
        background: rgba(26, 77, 143, 0.1);
    }
    
    .mobile-menu-btn:active {
        transform: scale(0.95);
    }

    /* هیرو سکشن */
    .hero-section {
        padding: 120px 0 60px;
        margin-top: 70px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-features {
        gap: 0.8rem;
    }
    
    .feature {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }
    
    .law-illustration {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 280px;
        margin: 0 auto;
    }

    /* سکشن‌ها */
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2.5rem;
    }

    /* سرویس‌ها */
    .category-services {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        font-size: 2rem;
        width: 55px;
        height: 55px;
    }
    
    .service-title {
        font-size: 1.1rem;
    }
    
    .service-description {
        font-size: 0.9rem;
    }

    /* اسناد */
    .creator-steps {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .creator-steps::before {
        display: none;
    }
    
    .step {
        justify-content: flex-start;
        padding: 0;
    }
    
    .document-types {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .doc-type {
        padding: 1.5rem 1rem;
    }
    
    .doc-type-icon {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .doc-type-name {
        font-size: 0.9rem;
    }

    /* فرم‌ها */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 0.9rem;
        padding: 0.8rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-actions .btn {
        width: 100%;
    }

    /* قیمت‌گذاری */
    .pricing-plans {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .pricing-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .pricing-card.featured {
        transform: none;
        border-width: 2px;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-5px);
    }
    
    .plan-name {
        font-size: 1.3rem;
    }
    
    .plan-price {
        font-size: 2rem;
    }

    /* نظرات */
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .client-info h4 {
        font-size: 1rem;
    }
    
    .client-position {
        font-size: 0.85rem;
    }

    /* وکلا / تیم */
    .lawyers-grid,
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .lawyer-card,
    .team-card {
        padding: 1.5rem;
    }

    /* بلاگ / مقالات */
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-card {
        display: flex;
        flex-direction: column;
    }
    
    .article-image {
        height: 220px;
    }
    
    .article-title {
        font-size: 1.1rem;
    }

    /* تماس */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }

    /* فوتر */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
    }
    
    .footer-links li a {
        font-size: 0.9rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* مودال */
    .modal-content {
        width: 95%;
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
    
    /* صفحه هدر */
    .page-header {
        padding: 80px 0 50px;
        margin-top: 70px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .breadcrumb {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }
    
    /* تایپوگرافی */
    .section-title {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    
    .hero-title {
        font-size: 1.7rem;
        line-height: 1.4;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    /* دکمه‌ها */
    .btn {
        font-size: 0.9rem;
        padding: 0.8rem 1.2rem;
    }
    
    .btn i {
        font-size: 0.85rem;
    }
    
    /* فیچرها */
    .feature {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
    
    .hero-features {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    /* سرویس‌ها */
    .service-card {
        padding: 1.2rem;
    }
    
    .service-icon {
        font-size: 1.8rem;
        width: 50px;
        height: 50px;
    }
    
    .service-title {
        font-size: 1rem;
    }
    
    .service-description {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    /* اسناد */
    .document-types {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .doc-type {
        padding: 1.2rem;
    }
    
    .doc-type-icon {
        font-size: 1.5rem;
    }
    
    /* مراحل */
    .generation-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .generation-step {
        padding: 1rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .step-title {
        font-size: 0.9rem;
    }
    
    /* قیمت‌گذاری */
    .pricing-card {
        padding: 1.5rem;
    }
    
    .plan-name {
        font-size: 1.2rem;
    }
    
    .plan-price {
        font-size: 1.8rem;
    }
    
    .plan-period {
        font-size: 0.85rem;
    }
    
    .plan-features li {
        font-size: 0.85rem;
        padding: 0.6rem 0;
    }
    
    /* وکلا / تیم */
    .lawyers-grid,
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .lawyer-card,
    .team-card {
        max-width: 350px;
        margin: 0 auto;
    }
    
    /* نظرات */
    .testimonial-card {
        padding: 1.2rem;
    }
    
    .rating {
        font-size: 0.9rem;
    }
    
    .testimonial-text {
        font-size: 0.9rem;
        line-height: 1.7;
    }
    
    /* مقالات */
    .article-image {
        height: 200px;
    }
    
    .article-title {
        font-size: 1rem;
    }
    
    .article-excerpt {
        font-size: 0.85rem;
    }
    
    .article-meta {
        font-size: 0.8rem;
    }
    
    /* فوتر */
    .footer-section h3 {
        font-size: 1rem;
    }
    
    .footer-links li a {
        font-size: 0.85rem;
    }
    
    .social-links a {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .footer-bottom {
        font-size: 0.85rem;
        padding: 1rem 0;
    }
    
    /* پرداخت */
    .payment-options {
        flex-direction: column;
        gap: 1rem;
    }
    
    .payment-option {
        padding: 1rem;
    }
    
    /* مودال */
    .modal-content {
        width: 98%;
        padding: 1.2rem;
    }
    
    .modal-header {
        padding-bottom: 1rem;
    }
    
    .modal-body {
        padding: 1rem 0;
    }
    
    /* صفحه هدر */
    .page-header {
        padding: 70px 0 40px;
    }
    
    .page-title {
        font-size: 1.7rem;
    }
    
    .page-content {
        padding: 50px 0;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .pricing-card {
        padding: 1.2rem;
    }
    
    .generation-steps {
        grid-template-columns: 1fr;
    }
    
    .logo-text h1 {
        font-size: 1rem;
    }
    
    .logo-text span {
        font-size: 0.7rem;
    }
}

/* بهینه‌سازی برای دستگاه‌های لمسی */
@media (hover: none) and (pointer: coarse) {
    /* غیرفعال کردن هاورهای ناسازگار با تاچ */
    .service-card:hover,
    .pricing-card:hover,
    .doc-type:hover,
    .lawyer-card:hover,
    .article-card:hover {
        transform: none;
    }
    
    /* افزودن فیدبک لمسی */
    .service-card:active,
    .pricing-card:active,
    .doc-type:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.97);
    }
    
    .nav-link:hover {
        background: transparent;
    }
    
    /* سایز بهتر برای لمس */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link,
    .main-nav a {
        min-height: 48px;
    }
}

/* تنظیمات برای دستگاه‌های با ارتفاع کم (منظره) */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        padding: 60px 0 40px;
        margin-top: 60px;
    }
    
    .page-header {
        padding: 60px 0 30px;
        margin-top: 60px;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .section {
        padding: 40px 0;
    }
}

/* حالت تاریک (Dark Mode) */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #1a202c;
        --text-color: #cbd5e0;
        --text-light: #a0aec0;
        --border-color: #2d3748;
        --dark-color: #f7fafc;
    }
    
    body {
        background-color: #0f1419;
        color: var(--text-color);
    }
    
    .main-header {
        background-color: rgba(26, 32, 44, 0.98);
        border-bottom-color: #2d3748;
    }
    
    .service-card,
    .pricing-card,
    .testimonial-card,
    .lawyer-card,
    .article-card,
    .modal-content {
        background: #2d3748;
        color: var(--text-color);
        border-color: #4a5568;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #1a202c;
        border-color: #4a5568;
        color: var(--text-color);
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: var(--primary-color);
        background: #2d3748;
    }
    
    .hero-section {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }
    
    .footer {
        background: #1a202c;
        border-top-color: #2d3748;
    }
}

/* انیمیشن‌های بهینه شده */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* بهبود عملکرد لمسی برای دکمه‌ها */
@media (pointer: coarse) {
    .btn {
        min-height: 44px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .nav-link,
    .main-nav a {
        padding: 1rem 1.2rem;
        min-height: 48px;
    }
    
    .doc-type {
        padding: 1.5rem 1rem;
        min-height: 120px;
    }
    
    .mobile-menu-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* فاصله بیشتر بین المان‌های کلیک‌پذیر */
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .footer-links li {
        margin-bottom: 0.8rem;
    }
}

/* بهینه‌سازی برای چاپ */
@media print {
    .main-header,
    .mobile-menu-btn,
    .header-actions,
    .footer,
    .btn,
    .social-links,
    .hero-actions {
        display: none !important;
    }
    
    .hero-section,
    .section {
        padding: 20px 0;
    }
    
    .service-card,
    .pricing-card,
    .article-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
}

/* بهینه‌سازی برای صفحه‌نمایش‌های کوچک (Smart Watch) */
@media (max-width: 320px) {
    .container {
        padding: 0 8px;
    }
    
    .hero-title {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.8rem 1rem;
    }
    
    .service-card,
    .pricing-card {
        padding: 0.8rem;
    }
    
    .logo-text h1 {
        font-size: 0.9rem;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}