/* Responsive Design Styles */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .service-card {
        padding: 2.5rem;
    }
    
    .offer-card {
        padding: 2.5rem;
    }
}

/* Desktop (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .mascot-container {
        width: 300px;
        height: 300px;
    }
    
    .mascot-emoji {
        width: 250px;
        height: 250px;
        font-size: 6rem;
    }
    
    .mascot-glow {
        width: 270px;
        height: 270px;
    }
}

/* Tablet (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    /* Navigation */
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        border-radius: var(--border-radius-lg);
        margin-top: var(--spacing-sm);
        padding: var(--spacing-md);
        box-shadow: var(--shadow-lg);
    }
    
    .navbar-nav .nav-link {
        color: var(--text-dark) !important;
        text-align: center;
        padding: 0.75rem 0;
        border-radius: var(--border-radius-md);
        margin: 0.25rem 0;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        color: var(--primary-bg) !important;
        background: rgba(10, 116, 218, 0.1);
    }
    
    .cta-buttons {
        margin-top: var(--spacing-md);
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .cta-buttons .btn {
        width: 100%;
        margin: 0;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 100px 0 50px;
    }
    
    .hero-title {
        font-size: 3rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn {
        width: 80%;
        margin: 0.5rem 0;
    }
    
    .mascot-container {
        width: 250px;
        height: 250px;
        margin: var(--spacing-lg) auto 0;
    }
    
    .mascot-emoji {
        width: 200px;
        height: 200px;
        font-size: 5rem;
    }
    
    .mascot-glow {
        width: 220px;
        height: 220px;
    }
    
    /* Stats Section */
    .stat-card {
        margin-bottom: var(--spacing-md);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Services */
    .service-card {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Calculator */
    .calculator-card {
        padding: var(--spacing-lg);
    }
    
    .price-display {
        margin-top: var(--spacing-md);
    }
    
    /* Floating Elements */
    .floating-cta {
        bottom: 100px;
        right: 15px;
    }
    
    .floating-btn {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
}

/* Mobile Large (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    /* General */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        border-radius: var(--border-radius-lg);
        margin-top: var(--spacing-sm);
        padding: var(--spacing-md);
        box-shadow: var(--shadow-xl);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link {
        color: var(--text-dark) !important;
        text-align: center;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        margin: 0;
        border-radius: 0;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        color: var(--primary-bg) !important;
        background: rgba(10, 116, 218, 0.05);
    }
    
    .cta-buttons {
        margin-top: var(--spacing-md);
        padding-top: var(--spacing-md);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .cta-buttons .btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 80px 0 40px;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .hero-btn {
        width: 90%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .mascot-container {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }
    
    .mascot-emoji {
        width: 150px;
        height: 150px;
        font-size: 4rem;
    }
    
    .mascot-glow {
        width: 170px;
        height: 170px;
    }
    
    /* Sections */
    .section-title {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-md);
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    /* Stats */
    .stats-section {
        padding: var(--spacing-xl) 0;
    }
    
    .stat-card {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    /* Services */
    .services-section {
        padding: var(--spacing-xl) 0;
    }
    
    .service-card {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
    
    .service-icon {
        font-size: 3rem;
    }
    
    .service-title {
        font-size: 1.3rem;
    }
    
    /* Offers */
    .offers-section {
        padding: var(--spacing-xl) 0;
    }
    
    .offer-card {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
    
    .offer-discount {
        font-size: 2.5rem;
    }
    
    /* Calculator */
    .calculator-section {
        padding: var(--spacing-xl) 0;
    }
    
    .calculator-card {
        padding: var(--spacing-md);
    }
    
    .calculator-header h3 {
        font-size: 1.5rem;
    }
    
    .price-amount {
        font-size: 2.5rem;
    }
    
    .calculator-actions {
        margin-top: var(--spacing-md);
    }
    
    .calculator-actions .btn {
        padding: 0.75rem;
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }
    
    /* Footer */
    .main-footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }
    
    .footer-section {
        text-align: center;
        margin-bottom: var(--spacing-lg);
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-legal {
        justify-content: center;
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    /* Floating Elements */
    .floating-cta {
        bottom: 80px;
        right: 15px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .dark-mode-toggle {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* Mobile Small (up to 575px) */
@media (max-width: 575px) {
    /* General */
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    :root {
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
        --spacing-2xl: 3rem;
    }
    
    /* Navigation */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        border: none;
    }
    
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        border-radius: var(--border-radius-md);
        margin-top: var(--spacing-xs);
        padding: var(--spacing-sm);
        box-shadow: var(--shadow-xl);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link {
        color: var(--text-dark) !important;
        text-align: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        margin: 0;
        font-size: 0.95rem;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .cta-buttons {
        margin-top: var(--spacing-sm);
        padding-top: var(--spacing-sm);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .cta-buttons .btn {
        width: 100%;
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 70px 0 30px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
        line-height: 1.5;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-xs);
    }
    
    .hero-btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .mascot-container {
        width: 150px;
        height: 150px;
        margin: var(--spacing-md) auto 0;
    }
    
    .mascot-emoji {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }
    
    .mascot-glow {
        width: 140px;
        height: 140px;
    }
    
    /* Sections */
    .section-title {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
        line-height: 1.2;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: var(--spacing-md);
    }
    
    /* Stats */
    .stats-section {
        padding: var(--spacing-lg) 0;
    }
    
    .stat-card {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    /* Services */
    .services-section {
        padding: var(--spacing-lg) 0;
    }
    
    .service-card {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
    }
    
    .service-icon {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .service-title {
        font-size: 1.2rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .service-description {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .service-features {
        gap: var(--spacing-xs);
    }
    
    .feature-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Offers */
    .offers-section {
        padding: var(--spacing-lg) 0;
    }
    
    .offer-card {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
    }
    
    .offer-badge {
        top: -8px;
        right: 15px;
        padding: 0.3rem 0.7rem;
        font-size: 0.75rem;
    }
    
    .offer-title {
        font-size: 1.3rem;
        margin: var(--spacing-sm) 0;
    }
    
    .offer-discount {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .offer-description {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .offer-features {
        margin-bottom: var(--spacing-sm);
    }
    
    .offer-features li {
        font-size: 0.85rem;
        padding: 0.15rem 0;
    }
    
    .btn-offer {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Calculator */
    .calculator-section {
        padding: var(--spacing-lg) 0;
    }
    
    .calculator-card {
        padding: var(--spacing-sm);
    }
    
    .calculator-header {
        margin-bottom: var(--spacing-md);
    }
    
    .calculator-header h3 {
        font-size: 1.3rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .calculator-header p {
        font-size: 0.9rem;
    }
    
    .calculator-input {
        margin-bottom: var(--spacing-sm);
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .form-control,
    .form-select {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .range-value {
        font-size: 1rem;
    }
    
    .price-display {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
    }
    
    .price-header {
        font-size: 1rem;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    .price-breakdown {
        font-size: 0.9rem;
    }
    
    .price-feature {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    .calculator-actions .btn {
        padding: 0.6rem;
        font-size: 0.9rem;
        margin-bottom: var(--spacing-xs);
    }
    
    /* Why Choose */
    .why-choose-section {
        padding: var(--spacing-lg) 0;
    }
    
    .feature-card {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
        text-align: center;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .feature-card h4 {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .feature-card p {
        font-size: 0.9rem;
    }
    
    /* Footer */
    .main-footer {
        padding: var(--spacing-lg) 0 var(--spacing-sm);
    }
    
    .footer-section {
        text-align: center;
        margin-bottom: var(--spacing-md);
    }
    
    .footer-title {
        font-size: 1.2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .footer-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .footer-description {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .footer-links li {
        margin-bottom: 0.3rem;
    }
    
    .footer-links a {
        font-size: 0.9rem;
    }
    
    .footer-contact li {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .social-icons {
        justify-content: center;
        gap: var(--spacing-xs);
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .footer-divider {
        margin: var(--spacing-md) 0 var(--spacing-sm);
    }
    
    .copyright {
        font-size: 0.85rem;
        text-align: center;
        margin-bottom: var(--spacing-xs);
    }
    
    .footer-legal {
        justify-content: center;
        flex-direction: column;
        gap: var(--spacing-xs);
        text-align: center;
    }
    
    .legal-link {
        font-size: 0.85rem;
    }
    
    /* Floating Elements */
    .floating-cta {
        bottom: 70px;
        right: 10px;
        gap: var(--spacing-xs);
    }
    
    .floating-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .dark-mode-toggle {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        right: 10px;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        left: 10px;
        bottom: 70px;
    }
}

/* Ultra Small Mobile (up to 375px) */
@media (max-width: 375px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .service-icon {
        font-size: 2rem;
    }
    
    .offer-discount {
        font-size: 1.8rem;
    }
    
    .price-amount {
        font-size: 1.8rem;
    }
    
    .mascot-container {
        width: 120px;
        height: 120px;
    }
    
    .mascot-emoji {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .mascot-glow {
        width: 120px;
        height: 120px;
    }
    
    .floating-cta {
        bottom: 60px;
        right: 8px;
    }
    
    .floating-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .dark-mode-toggle {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
        right: 8px;
    }
    
    .back-to-top {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
        left: 8px;
        bottom: 60px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0 20px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }
    
    .hero-btn {
        width: auto;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .mascot-container {
        width: 120px;
        height: 120px;
    }
    
    .mascot-emoji {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .stats-section {
        padding: var(--spacing-md) 0;
    }
    
    .services-section,
    .offers-section,
    .calculator-section,
    .why-choose-section {
        padding: var(--spacing-md) 0;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover,
    .offer-card:hover,
    .stat-card:hover,
    .feature-card:hover {
        transform: none;
    }
    
    .floating-btn:hover,
    .social-icon:hover,
    .btn:hover {
        transform: none;
    }
    
    /* Increase touch targets */
    .navbar-nav .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .floating-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp rendering on high DPI displays */
    .hero-title,
    .section-title {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .mascot-emoji {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    .floating-btn,
    .mascot-container,
    .hero-background {
        animation: none !important;
    }
    
    .service-card,
    .offer-card,
    .stat-card,
    .feature-card {
        transition: none !important;
    }
    
    .service-card:hover,
    .offer-card:hover,
    .stat-card:hover,
    .feature-card:hover {
        transform: none !important;
    }
}

/* Dark Mode Responsive Adjustments */
@media (max-width: 767px) {
    .dark-mode .navbar-collapse {
        background: rgba(51, 51, 51, 0.98);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .dark-mode .navbar-nav .nav-link {
        color: var(--text-light) !important;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .dark-mode .navbar-nav .nav-link:hover,
    .dark-mode .navbar-nav .nav-link.active {
        color: var(--accent-color) !important;
        background: rgba(0, 234, 255, 0.1);
    }
    
    .dark-mode .cta-buttons {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
}

/* Print Styles for Mobile */
@media print {
    .floating-cta,
    .dark-mode-toggle,
    .back-to-top,
    .navbar {
        display: none !important;
    }
    
    .hero-section {
        page-break-inside: avoid;
        margin-top: 0;
        padding-top: 0;
    }
    
    .service-card,
    .offer-card,
    .stat-card {
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .section-title {
        page-break-after: avoid;
    }
}

/* Specific breakpoints for better layout */
@media (min-width: 576px) and (max-width: 767px) {
    .row > * {
        margin-bottom: var(--spacing-md);
    }
    
    .col-md-6:nth-child(2n+1) {
        clear: left;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .row > * {
        margin-bottom: var(--spacing-md);
    }
    
    .col-lg-4:nth-child(2n+1) {
        clear: left;
    }
    
    .col-lg-3:nth-child(2n+1) {
        clear: left;
    }
}

/* Container adjustments */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Footer responsive improvements */
@media (max-width: 991px) {
    .footer-section {
        text-align: center;
    }
    
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

/* Navigation improvements for different screen sizes */
@media (min-width: 992px) {
    .navbar-nav {
        margin-right: auto;
    }
    
    .navbar-nav .nav-link {
        white-space: nowrap;
    }
}

/* Ensure proper spacing on all devices */
@media (max-width: 991px) {
    .mb-lg-0 {
        margin-bottom: 1rem !important;
    }
    
    .text-lg-start {
        text-align: center !important;
    }
    
    .text-lg-end {
        text-align: center !important;
    }
}