/* Responsive Design for Fawraan Landing Page */

/* Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-section h1 {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Large Devices (1200px and up) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* Medium Devices (992px and up) */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Small Devices (768px and up) */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-section {
        padding: 100px 0 60px;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        margin: 0.5rem 0;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .stats-number {
        font-size: 2.2rem;
    }
}

/* Extra Small Devices (576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
    .hero-section {
        padding: 80px 0 50px;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-padding {
        padding: 50px 0;
    }
    
    .display-4 {
        font-size: 2.2rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
}

/* Mobile Devices (up to 575px) */
@media (max-width: 575px) {
    .hero-section {
        padding: 70px 0 40px;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .section-padding {
        padding: 40px 0;
    }
    
    .display-4 {
        font-size: 1.8rem;
    }
    
    .btn-lg {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .stats-number {
        font-size: 1.8rem;
    }
    
    .stats-label {
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer h5 {
        font-size: 1.1rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0;
    }
    
    .dropdown-menu {
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .form-label {
        font-size: 0.9rem;
    }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-padding {
        padding: 40px 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section::before {
        background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 200" fill="white" opacity="0.1"><polygon points="0,200 2000,0 2000,200"/></svg>');
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .back-to-top {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        padding: 20px 0;
    }
    
    .section-padding {
        padding: 20px 0;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .feature-icon {
        background: #f8f9fa !important;
        color: #6c757d !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-section::before {
        animation: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #000060;
        --accent-color: #ff8c00;
        --text-primary: #000000;
        --text-secondary: #333333;
        --border-color: #000000;
    }
    
    .card {
        border: 2px solid var(--border-color) !important;
    }
    
    .btn {
        border: 2px solid currentColor !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #60a5fa;
        --secondary-color: #3b82f6;
        --accent-color: #fbbf24;
        --dark-color: #1f2937;
        --light-color: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --border-color: #4b5563;
    }
    
    body {
        background-color: #111827;
        color: var(--text-primary);
    }
    
    .card {
        background-color: var(--light-color);
        color: var(--text-primary);
    }
    
    .navbar {
        background: rgba(17, 24, 39, 0.95) !important;
    }
    
    .footer {
        background: var(--dark-color);
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes for Responsive Design */
.d-none-mobile {
    display: block;
}

.d-block-mobile {
    display: none;
}

@media (max-width: 767px) {
    .d-none-mobile {
        display: none !important;
    }
    
    .d-block-mobile {
        display: block !important;
    }
}

/* Text Alignment Responsive */
.text-center-mobile {
    text-align: right;
}

@media (max-width: 767px) {
    .text-center-mobile {
        text-align: center !important;
    }
}

/* Spacing Responsive */
.mb-mobile-3 {
    margin-bottom: 1rem;
}

@media (max-width: 767px) {
    .mb-mobile-3 {
        margin-bottom: 1rem !important;
    }
}

/* Image Responsive */
.img-fluid-mobile {
    max-width: 100%;
    height: auto;
}

@media (max-width: 767px) {
    .img-fluid-mobile {
        max-width: 100% !important;
        height: auto !important;
    }
} 