/* =====================================================
   724 Döviz - Responsive Styles
   ===================================================== */

/* ==================== Large Desktop (1400px+) ==================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr 480px;
    }
}

/* ==================== Desktop (1200px - 1399px) ==================== */
@media (max-width: 1399px) {
    .gold-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== Laptop (992px - 1199px) ==================== */
@media (max-width: 1199px) {
    :root {
        --header-height: 65px;
    }
    
    .rates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr 380px;
        gap: var(--spacing-2xl);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-brand {
        grid-column: span 2;
    }
}

/* ==================== Tablet (768px - 991px) ==================== */
@media (max-width: 991px) {
    :root {
        --container-padding: 1.25rem;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: calc(var(--top-bar-height) + var(--header-height));
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: var(--spacing-xl);
        gap: var(--spacing-sm);
        transform: translateX(-100%);
        transition: transform var(--transition-slow);
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-link {
        width: 100%;
        padding: var(--spacing-md);
        justify-content: flex-start;
        font-size: 1.0625rem;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: var(--spacing-xl);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition);
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 300px;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* Hero */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero p {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-widget {
        max-width: 420px;
        margin: 0 auto;
    }
    
    /* Rates */
    .rates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Gold */
    .gold-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* News */
    .news-card.featured {
        grid-column: span 2;
        grid-template-columns: 1fr;
    }
    
    .news-card.featured .news-image {
        height: 240px;
    }
    
    /* Newsletter */
    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-text {
        text-align: center;
    }
    
    .newsletter-text h2 {
        justify-content: center;
    }
    
    .newsletter-form {
        max-width: 100%;
        width: 100%;
    }
    
    /* Crypto Table */
    .crypto-table th:nth-child(6),
    .crypto-table td:nth-child(6),
    .crypto-table th:nth-child(7),
    .crypto-table td:nth-child(7) {
        display: none;
    }
}

/* ==================== Mobile Large (576px - 767px) ==================== */
@media (max-width: 767px) {
    :root {
        --spacing-2xl: 2rem;
        --spacing-3xl: 2.5rem;
    }
    
    /* Top Bar */
    .top-bar {
        height: auto;
        padding: var(--spacing-sm) 0;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    .top-bar-left,
    .top-bar-right {
        justify-content: center;
    }
    
    /* Header */
    .logo {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        font-size: 1rem;
        padding: 0.2rem 0.4rem;
    }
    
    /* Ticker */
    .ticker-item {
        font-size: 0.875rem;
    }
    
    /* Hero */
    .hero {
        padding: var(--spacing-2xl) 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-stats {
        gap: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Rates */
    .rates-grid {
        grid-template-columns: 1fr;
    }
    
    .rate-current {
        font-size: 1.5rem;
    }
    
    /* Gold */
    .gold-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .gold-card {
        padding: var(--spacing-md);
    }
    
    .gold-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .gold-card h3 {
        font-size: 0.8125rem;
    }
    
    .price-value {
        font-size: 1.125rem;
    }
    
    /* Crypto */
    .crypto-table th:nth-child(5),
    .crypto-table td:nth-child(5),
    .crypto-table th:nth-child(8),
    .crypto-table td:nth-child(8) {
        display: none;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: var(--spacing-lg);
    }
    
    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
    
    /* News */
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-card.featured {
        grid-column: span 1;
    }
    
    /* Newsletter */
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .newsletter-form .btn {
        width: 100%;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        grid-column: span 1;
    }
    
    .footer-brand .logo {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* Cookie */
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-content p {
        flex-direction: column;
    }
    
    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-actions .btn {
        width: 100%;
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }
}

/* ==================== Mobile Small (< 576px) ==================== */
@media (max-width: 575px) {
    :root {
        --container-padding: 1rem;
    }
    
    body {
        font-size: 15px;
    }
    
    /* Hero */
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    /* Quick Converter */
    .quick-converter {
        padding: var(--spacing-md);
    }
    
    .quick-converter h3 {
        font-size: 1rem;
    }
    
    .converter-input input,
    .converter-select select {
        padding: 0.625rem 0.875rem;
        font-size: 0.9375rem;
    }
    
    .result-value {
        font-size: 1.25rem;
    }
    
    /* Gold */
    .gold-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .gold-card {
        padding: var(--spacing-sm);
    }
    
    .gold-icon {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .gold-card h3 {
        font-size: 0.75rem;
    }
    
    .price-value {
        font-size: 1rem;
    }
    
    .gold-change {
        font-size: 0.6875rem;
        padding: 0.125rem 0.375rem;
    }
    
    .gold-details {
        font-size: 0.6875rem;
    }
    
    /* Crypto */
    .crypto-table th,
    .crypto-table td {
        padding: var(--spacing-sm);
        font-size: 0.8125rem;
    }
    
    .crypto-icon {
        width: 28px;
        height: 28px;
        font-size: 0.625rem;
    }
    
    .crypto-table th:nth-child(4),
    .crypto-table td:nth-child(4) {
        display: none;
    }
    
    /* Section */
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    /* News */
    .news-image {
        height: 160px;
    }
    
    .news-content {
        padding: var(--spacing-md);
    }
    
    .news-content h3 {
        font-size: 1rem;
    }
    
    /* Newsletter */
    .newsletter-section {
        padding: var(--spacing-2xl) 0;
    }
    
    .newsletter-text h2 {
        font-size: 1.25rem;
    }
    
    /* Footer */
    .footer-links h4 {
        font-size: 0.9375rem;
    }
    
    .footer-links ul li a {
        font-size: 0.875rem;
    }
    
    .footer-disclaimer p {
        font-size: 0.75rem;
    }
}

/* ==================== Extra Small (< 380px) ==================== */
@media (max-width: 379px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .gold-grid {
        grid-template-columns: 1fr;
    }
    
    .gold-card {
        padding: var(--spacing-md);
    }
    
    .gold-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .gold-card h3 {
        font-size: 0.9375rem;
    }
    
    .price-value {
        font-size: 1.25rem;
    }
}

/* ==================== Landscape Orientation ==================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: var(--spacing-lg) 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero p {
        display: none;
    }
    
    .hero-buttons {
        margin-bottom: var(--spacing-md);
    }
    
    .hero-widget {
        display: none;
    }
}

/* ==================== High Resolution Displays ==================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .ticker-content {
        animation: none;
    }
    
    .pulse {
        animation: none;
    }
}

/* ==================== Dark Mode Specific ==================== */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --text-primary: #f9fafb;
        --text-secondary: #e5e7eb;
        --text-muted: #9ca3af;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-tertiary: #374151;
        --border-color: #374151;
    }
}

/* ==================== Touch Device Optimizations ==================== */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover,
    .rate-card:hover,
    .gold-card:hover,
    .feature-card:hover,
    .news-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    .nav-link {
        min-height: 48px;
    }
    
    .btn {
        min-height: 48px;
    }
    
    .social-links a,
    .footer-social a {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ==================== Focus Visible (Keyboard Navigation) ==================== */
@media (hover: hover) {
    :focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    .btn:focus-visible,
    .nav-link:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* ==================== Print Optimizations ==================== */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .rate-card,
    .gold-card,
    .news-card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}
