/* ===== RESPONSIVE DESIGN SYSTEM ===== */
/* Click Master - Responsive Design */

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

/* Large Devices (1200px and up) */
@media (min-width: 1200px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .features-section,
    .about-section,
    .cta-section {
        padding: 3rem 0;
    }
    
    .navbar-brand {
        font-size: 1.8rem;
    }
}

/* Medium Devices (992px and up) */
@media (min-width: 992px) {
    .navbar-nav .nav-link {
        margin: 0 0.5rem;
    }
    
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .hero-section p {
        font-size: 1.3rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .about-image > div {
        width: 300px;
        height: 300px;
    }
    
    .about-image i {
        font-size: 5rem;
    }
}

/* Small Devices (768px and up) */
@media (min-width: 768px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .hero-section p {
        font-size: 1.2rem;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    .stats-row {
        flex-direction: row;
        gap: 2rem;
    }
    
    .navbar-nav {
        flex-direction: row;
    }
}

/* Extra Small Devices (576px and up) */
@media (min-width: 576px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .features-section,
    .about-section,
    .cta-section {
        padding: 2.5rem 0;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
}

/* Mobile First - Extra Small Devices (less than 576px) */
@media (max-width: 575.98px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-lg {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .features-section,
    .about-section,
    .cta-section {
        padding: 2rem 0;
    }
    
    .feature-card {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    .about-image > div {
        width: 150px;
        height: 150px;
    }
    
    .about-image i {
        font-size: 2.5rem;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .stat-item h3 {
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
        border-radius: 0.5rem;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .col-lg-2,
    .footer .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Small Devices (less than 768px) */
@media (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .features-section h2,
    .about-section h2,
    .cta-section h2 {
        font-size: 2rem;
    }
    
    .feature-card h4 {
        font-size: 1.2rem;
    }
    
    .about-section .row {
        text-align: center;
    }
    
    .about-section .col-lg-6:first-child {
        margin-bottom: 2rem;
    }
    
    .navbar-collapse {
        background: rgba(102, 126, 234, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 0.5rem;
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        margin: 0.25rem 0;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .btn-outline {
        margin-top: 0.5rem;
        width: 100%;
        text-align: center;
    }
}

/* Medium Devices (less than 992px) */
@media (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .hero-section p {
        font-size: 1.2rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .about-image {
        margin-top: 2rem;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        text-align: center;
    }
    
    .dropdown-menu {
        text-align: center;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .dropdown-item {
        color: white;
    }
    
    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }
}

/* Large Devices (less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section {
        padding: 3.5rem 0;
    }
    
    .features-section,
    .about-section,
    .cta-section {
        padding: 2.5rem 0;
    }
}

/* Extra Large Devices (less than 1400px) */
@media (max-width: 1399.98px) {
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .hero-section p {
        font-size: 1.3rem;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        margin-top: 1.5rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .feature-icon {
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    .btn {
        border-width: 1px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .hero-buttons {
        display: none !important;
    }
    
    .hero-section,
    .features-section,
    .about-section,
    .cta-section {
        padding: 1rem 0;
        background: white !important;
        color: black !important;
    }
    
    .hero-section h1,
    .features-section h2,
    .about-section h2,
    .cta-section h2 {
        color: black !important;
    }
    
    .feature-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
    
    .about-image > div {
        background: #f0f0f0 !important;
        color: #333 !important;
    }
    
    .stats-row {
        display: block !important;
    }
    
    .stat-item {
        display: inline-block;
        margin: 0 1rem 1rem 0;
    }
}

/* 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 h1,
    .hero-section p,
    .hero-buttons {
        animation: none !important;
    }
    
    .about-image > div {
        animation: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .feature-card {
        border: 2px solid var(--dark-color);
    }
    
    .navbar {
        border-bottom: 2px solid white;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #ffffff;
        --light-color: #1a1a1a;
    }
    
    body {
        background: #121212;
        color: #ffffff;
    }
    
    .feature-card {
        background: #1e1e1e;
        color: #ffffff;
    }
    
    .about-section {
        background: #1e1e1e;
    }
    
    .form-control {
        background: #2d2d2d;
        border-color: #444;
        color: #ffffff;
    }
    
    .form-control:focus {
        background: #2d2d2d;
        color: #ffffff;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.nav-link:focus,
.form-control:focus {
    outline: 2px solid var(--primary-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(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

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

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