/* ========================================
   طيبة الدولية للصرافة - Responsive Styles
   ======================================== */

/* ========== TABLET (768px - 1024px) ========== */
@media screen and (max-width: 1024px) {
    :root {
        --font-size-h1: 40px;
        --font-size-h2: 32px;
        --font-size-h3: 22px;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    .nav-list {
        gap: var(--spacing-md);
    }

    .hero-title {
        font-size: 40px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-form-container {
        grid-column: span 1;
    }
}

/* ========== MOBILE (< 768px) ========== */
@media screen and (max-width: 768px) {
    :root {
        --font-size-h1: 32px;
        --font-size-h2: 28px;
        --font-size-h3: 20px;
        --font-size-large: 16px;
        --spacing-xl: 32px;
        --spacing-xxl: 48px;
    }

    /* ========== HEADER ========== */
    .header-content {
        padding: var(--spacing-sm) 0;
    }

    .logo img {
        height: 50px;
    }

    .nav-menu {
        display: none;
    }

    .header-contact {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    /* ========== CURRENCY TICKER ========== */
    .currency-ticker {
        padding: var(--spacing-xs) 0;
    }

    .ticker-container {
        width: 100%;
        overflow: hidden;
    }

    .ticker-content {
        gap: var(--spacing-md);
        animation: ticker-scroll 15s linear infinite;
        transform: translateX(0);
        display: flex !important;
        flex-wrap: nowrap !important;
        flex-direction: row-reverse;
        will-change: transform;
        width: max-content;
    }

    .ticker-item {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 13px;
        flex-shrink: 0 !important;
        min-width: fit-content !important;
        display: inline-flex !important;
        white-space: nowrap !important;
    }

    .ticker-item i {
        font-size: 14px;
    }

    /* إعادة تعريف الأنيميشن للموبايل */
    @keyframes ticker-scroll {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(-25%);
        }
    }

    /* ========== HERO SECTION ========== */
    .hero {
        min-height: 500px;
    }

    .hero-content {
        padding: var(--spacing-xl) 0;
    }

    .hero-title {
        font-size: 32px;
        margin-bottom: var(--spacing-sm);
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-description {
        font-size: 16px;
        margin-bottom: var(--spacing-lg);
    }

    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* ========== SECTIONS ========== */
    section {
        padding: var(--spacing-xl) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-lg);
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    /* ========== CONVERTER SECTION ========== */
    .converter-header {
        padding: var(--spacing-md);
    }

    .converter-header i {
        font-size: 28px;
    }

    .converter-header h3 {
        font-size: 20px;
    }

    .converter-body {
        padding: var(--spacing-md);
    }

    .converter-form {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .swap-button-container {
        order: 2;
        padding: 0;
        margin: var(--spacing-sm) 0;
    }

    .swap-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .form-group:nth-child(1) {
        order: 1;
    }

    .form-group:nth-child(2) {
        order: 3;
    }

    .form-group:nth-child(4) {
        order: 4;
    }

    .form-group:nth-child(5) {
        order: 5;
    }

    .result-display {
        padding: 14px 16px;
    }

    .result-value {
        font-size: 20px;
    }

    .result-currency {
        font-size: 16px;
    }

    .btn-convert {
        padding: 14px;
        font-size: 16px;
    }

    /* ========== ABOUT SECTION ========== */
    .about-text p {
        font-size: 16px;
    }

    .about-values {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .value-card {
        padding: var(--spacing-lg);
    }

    .value-icon {
        width: 70px;
        height: 70px;
    }

    .value-icon i {
        font-size: 32px;
    }

    /* ========== SERVICES SECTION ========== */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .service-card {
        padding: var(--spacing-lg);
    }

    .service-icon {
        width: 80px;
        height: 80px;
    }

    .service-icon i {
        font-size: 40px;
    }

    .service-card h3 {
        font-size: 20px;
    }

    /* ========== RATES SECTION ========== */
    .rates-header {
        padding: var(--spacing-md);
        flex-direction: column;
        align-items: flex-start;
    }

    .rates-header h3 {
        font-size: 20px;
    }

    .rates-update {
        font-size: 12px;
    }

    .rates-table th,
    .rates-table td {
        padding: var(--spacing-sm);
        font-size: 14px;
    }

    .rates-table th:first-child,
    .rates-table td:first-child {
        position: sticky;
        right: 0;
        background-color: var(--white);
        z-index: 1;
    }

    .rates-table thead th:first-child {
        background-color: var(--light-gray);
    }

    /* ========== CONTACT SECTION ========== */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .info-card {
        padding: var(--spacing-md);
    }

    .info-icon {
        width: 50px;
        height: 50px;
    }

    .info-icon i {
        font-size: 20px;
    }

    .info-card h3 {
        font-size: 18px;
    }

    .form-card {
        padding: var(--spacing-md);
    }

    .form-card h3 {
        font-size: 20px;
    }

    .form-card h3 i {
        font-size: 28px;
    }

    .map-wrapper iframe {
        height: 300px;
    }

    /* ========== FOOTER ========== */
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

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

    .footer-logo {
        margin: 0 auto var(--spacing-md);
    }

    .footer-links,
    .footer-contact,
    .footer-hours {
        text-align: center;
    }

    .footer-bottom {
        padding-top: var(--spacing-md);
        margin-top: var(--spacing-md);
    }

    .footer-license {
        flex-direction: column;
        gap: var(--spacing-xs);
        font-size: 14px;
    }

    .footer-copyright {
        font-size: 12px;
    }

    /* ========== SCROLL TO TOP ========== */
    .scroll-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    /* ========== BUTTONS ========== */
    .btn {
        padding: 12px 24px;
        font-size: 15px;
    }

    .btn i {
        font-size: 16px;
    }
}

/* ========== SMALL MOBILE (< 480px) ========== */
@media screen and (max-width: 480px) {
    :root {
        --font-size-h1: 28px;
        --font-size-h2: 24px;
        --font-size-h3: 18px;
        --spacing-md: 16px;
        --spacing-lg: 24px;
        --spacing-xl: 28px;
        --spacing-xxl: 40px;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .logo img {
        height: 45px;
    }

    .hero {
        min-height: 450px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-description {
        font-size: 15px;
    }

    .section-title {
        font-size: 24px;
    }

    .converter-header h3 {
        font-size: 18px;
    }

    .value-card,
    .service-card,
    .info-card {
        padding: var(--spacing-md);
    }

    .value-icon,
    .service-icon {
        width: 60px;
        height: 60px;
    }

    .value-icon i,
    .service-icon i {
        font-size: 28px;
    }

    .rates-table {
        font-size: 13px;
    }

    .rates-table th,
    .rates-table td {
        padding: var(--spacing-xs);
    }

    .map-wrapper iframe {
        height: 250px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ========== LANDSCAPE MOBILE ========== */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 400px;
    }

    .hero-content {
        padding: var(--spacing-lg) 0;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-description {
        font-size: 15px;
        margin-bottom: var(--spacing-md);
    }

    .hero-buttons {
        flex-direction: row;
        gap: var(--spacing-sm);
    }

    .hero-buttons .btn {
        width: auto;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .header,
    .currency-ticker,
    .hero,
    .mobile-menu-overlay,
    .menu-toggle,
    .scroll-top,
    .converter-section,
    .contact-form-container,
    .map-container,
    .footer-bottom {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    .section-title {
        color: #000;
        page-break-after: avoid;
    }

    .service-card,
    .info-card,
    .value-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --shadow: rgba(0, 0, 0, 0.3);
    }

    .btn {
        border-width: 3px;
    }

    input:focus,
    select:focus,
    textarea:focus {
        border-width: 3px;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ticker-content {
        animation: none;
    }

    .scroll-top:hover,
    .btn:hover,
    .service-card:hover,
    .value-card:hover,
    .info-card:hover {
        transform: none;
    }
}

/* ========== DARK MODE (Optional) ========== */
@media (prefers-color-scheme: dark) {
    /* يمكن إضافة دعم الوضع الداكن هنا إذا لزم الأمر */
}
