/* Responsive Utilities and Additional Styles */

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }

.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

.p-xs { padding: var(--spacing-xs); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

.m-xs { margin: var(--spacing-xs); }
.m-sm { margin: var(--spacing-sm); }
.m-md { margin: var(--spacing-md); }
.m-lg { margin: var(--spacing-lg); }
.m-xl { margin: var(--spacing-xl); }

.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .credit-card {
        width: 320px;
        height: 200px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Navigation */
    .nav-container {
        padding: 1rem;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.98);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        backdrop-filter: blur(20px);
        padding: 2rem 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        z-index: 999;
        height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 1rem 0;
    }
    
    .nav-toggle {
        display: flex;
        flex-shrink: 0;
    }
    
    /* Typography */
    .hero-title {
        font-size: 2.5rem;
        text-align: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        text-align: center;
        max-width: none;
    }
    
    /* Layout */
    .hero-container {
        padding: var(--spacing-lg) var(--spacing-sm);
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    /* Cards */
    .credit-card {
        width: 100%;
        max-width: 320px;
        height: 200px;
        margin: 0 auto;
    }
    
    .card-wrapper {
        padding: var(--spacing-md);
    }
    
    /* Forms */
    .application-form {
        padding: var(--spacing-lg);
    }
    
    /* Comparison Table - Mobile friendly */
    .comparison-table {
        overflow-x: auto;
    }
    
    .table-header,
    .table-row {
        min-width: 800px;
    }
    
    /* Category buttons */
    .card-categories {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    .category-btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    /* Typography */
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        justify-content: center;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: var(--font-size-3xl);
    }
    
    /* Cards */
    .credit-card {
        width: 100%;
        max-width: 300px;
        height: 190px;
    }
    
    .card-content {
        padding: var(--spacing-md);
    }
    
    .card-number {
        font-size: var(--font-size-base);
    }
    
    /* Benefits */
    .benefit-icon {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-xl);
    }
    
    /* Contact */
    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .contact-method i {
        margin: 0 auto;
    }
    
    /* Footer */
    .social-links {
        justify-content: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .credit-card {
        max-width: 280px;
        height: 175px;
    }
    
    .card-logo {
        font-size: var(--font-size-xs);
    }
    
    .card-chip {
        width: 35px;
        height: 25px;
    }
    
    .benefit-card {
        padding: var(--spacing-lg);
    }
    
    .application-form {
        padding: var(--spacing-md);
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--spacing-lg) 0;
    }
    
    .hero-container {
        padding: var(--spacing-md);
    }
    
    .nav-menu {
        top: 60px;
        padding: var(--spacing-md) 0;
    }
}

/* High resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .credit-card {
        box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.3),
            0 0 0 0.5px rgba(201, 170, 113, 0.2);
    }
}

/* Print styles */
@media print {
    .navbar,
    .scroll-indicator,
    .floating-elements,
    .preloader,
    .custom-cursor,
    .mouse-follower {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero {
        min-height: auto;
        page-break-after: always;
    }
    
    .section-title {
        color: black !important;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-card,
    .card-stack,
    .scroll-indicator {
        animation: none !important;
    }
}

/* Dark mode support (system preference) */
@media (prefers-color-scheme: light) {
    /* This website is designed for dark theme, but we can add light mode overrides here if needed */
    /* Currently maintaining dark theme for premium aesthetic */
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --accent-color: #ffd700;
        --border-color: #555555;
        --text-secondary: #dddddd;
    }
    
    .credit-card {
        border: 2px solid var(--accent-color);
    }
    
    .btn-primary {
        border: 2px solid var(--primary-color);
    }
}

/* Focus improvements for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    .nav-link:focus,
    .btn:focus,
    .category-btn:focus,
    input:focus,
    select:focus {
        outline: 3px solid var(--accent-color);
        outline-offset: 2px;
    }
}

/* Hover support detection */
@media (hover: hover) {
    .credit-card:hover {
        transform: translateY(-10px) scale(1.02);
    }
    
    .btn:hover {
        transform: translateY(-2px);
    }
    
    .benefit-card:hover {
        transform: translateY(-5px);
    }
}

@media (hover: none) {
    /* Touch devices - simplify hover effects */
    .credit-card:active {
        transform: scale(0.98);
    }
    
    .btn:active {
        transform: scale(0.95);
    }
}

/* Theme Toggle Responsive Styles */
@media (max-width: 768px) {
    .nav-actions {
        order: 2;
        margin-left: auto;
        margin-right: var(--spacing-sm);
    }
    
    .nav-toggle {
        order: 3;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        border-width: 1px;
    }
    
    .theme-icon {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem var(--spacing-sm);
        gap: var(--spacing-sm);
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
    }
    
    .theme-icon {
        font-size: 0.9rem;
    }
    
    .nav-actions {
        margin-right: var(--spacing-xs);
    }
}

/* Theme-specific responsive adjustments */
[data-theme="light"] .nav-menu {
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--border-color);
}

[data-theme="light"] .theme-toggle {
    background: var(--background-dark);
    border-color: var(--border-color);
}

[data-theme="light"] .theme-toggle:hover {
    border-color: var(--accent-color);
    background: var(--background-light);
}

/* Enhanced light mode responsive styles */
@media (max-width: 768px) {
    [data-theme="light"] .nav-menu {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px) saturate(180%);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    }
    
    [data-theme="light"] .card-wrapper {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }
    
    [data-theme="light"] .benefit-card {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }
    
    [data-theme="light"] .application-form {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }
}

@media (max-width: 576px) {
    [data-theme="light"] .category-btn {
        background: rgba(255, 255, 255, 0.9);
        border: 2px solid var(--border-color);
        box-shadow: var(--shadow-sm);
    }
    
    [data-theme="light"] .category-btn.active {
        background: var(--accent-color);
        color: #ffffff;
        box-shadow: var(--shadow-md);
    }
    
    [data-theme="light"] .btn-primary {
        box-shadow: var(--shadow-lg);
    }
    
    [data-theme="light"] .btn-secondary {
        background: rgba(255, 255, 255, 0.9);
        box-shadow: var(--shadow-md);
    }
}