/* ===========================================
   COMPREHENSIVE RESPONSIVE DESIGN
   Mobile First Approach - All Screen Sizes
   =========================================== */

/* Extra Small Devices (Phones) - 320px to 575px */
@media only screen and (max-width: 575px) {
    /* Typography */
    .banner-content h1 {
        font-size: 28px !important;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .banner-content h2 {
        font-size: 20px !important;
        line-height: 1.3;
    }
    
    .banner-content p {
        font-size: 14px !important;
        line-height: 1.5;
    }
    
    .heading h3 {
        font-size: 22px !important;
        line-height: 1.3;
    }
    
    .heading p {
        font-size: 14px !important;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 16px;
    }
    
    .navbar-brand img {
        height: 40px !important;
    }
    
    .navbar-nav .nav-link {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    /* Hero Section */
    .banner-img img {
        margin-top: 60px;
        max-width: 100%;
        height: auto;
    }
    
    /* Cards and Grids */
    .card {
        margin-bottom: 20px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-text {
        font-size: 13px;
    }
    
    /* Buttons */
    .btn {
        font-size: 14px;
        padding: 8px 16px;
        margin-bottom: 10px;
    }
    
    .btn-lg {
        font-size: 16px;
        padding: 10px 20px;
    }
    
    /* Spacing */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .py-4 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Contact Section */
    .contact-img {
        display: none;
    }
    
    /* Footer */
    .footer-links {
        margin: 20px 0;
        text-align: center;
    }
    
    .footer-links h5 {
        font-size: 16px;
    }
    
    .footer-links ul li {
        font-size: 13px;
    }
    
    /* Counter Cards */
    .counter-card-wrap {
        border-right: none;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .counter-card h3 {
        font-size: 24px;
    }
    
    .counter-card p {
        font-size: 12px;
    }
    
    /* Slick Slider */
    .slick-dots {
        left: 50% !important;
        transform: translateX(-50%);
        bottom: -40px;
    }
    
    .slick-dots li button {
        width: 8px;
        height: 8px;
    }
    
    /* Forms */
    .form-control {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .form-label {
        font-size: 14px;
    }
    
    /* Modal */
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-content {
        border-radius: 10px;
    }
    
    /* Utilities */
    .text-center-mobile {
        text-align: center !important;
    }
    
    .d-none-mobile {
        display: none !important;
    }
    
    .d-block-mobile {
        display: block !important;
    }
}

/* Small Devices (Landscape Phones) - 576px to 767px */
@media only screen and (min-width: 576px) and (max-width: 767px) {
    /* Typography */
    .banner-content h1 {
        font-size: 32px !important;
        line-height: 1.2;
    }
    
    .banner-content h2 {
        font-size: 22px !important;
    }
    
    .banner-content p {
        font-size: 15px !important;
    }
    
    .heading h3 {
        font-size: 24px !important;
    }
    
    .heading p {
        font-size: 15px !important;
    }
    
    /* Navigation */
    .navbar-brand img {
        height: 50px !important;
    }
    
    /* Hero Section */
    .banner-img img {
        margin-top: 55px;
        max-width: 100%;
        height: auto;
    }
    
    /* Cards */
    .card-body {
        padding: 20px;
    }
    
    .card-title {
        font-size: 18px;
    }
    
    .card-text {
        font-size: 14px;
    }
    
    /* Buttons */
    .btn {
        font-size: 15px;
        padding: 10px 20px;
    }
    
    /* Spacing */
    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    /* Contact Section */
    .contact-img {
        display: none;
    }
    
    /* Footer */
    .footer-links {
        margin: 25px 0;
    }
    
    /* Counter Cards */
      .counter-card-wrap {
        border-right: none;
        margin-bottom: 25px;
      }
    
    .counter-card h3 {
        font-size: 28px;
    }
    
    .counter-card p {
        font-size: 13px;
    }
    
    /* Slick Slider */
      .slick-dots {
        left: -132px;
      }
}

/* Medium Devices (Tablets) - 768px to 991px */
@media only screen and (min-width: 768px) and (max-width: 991px) {
    /* Typography */
    .banner-content h1 {
        font-size: 38px !important;
        line-height: 1.2;
    }
    
    .banner-content h2 {
        font-size: 26px !important;
    }
    
    .banner-content p {
        font-size: 16px !important;
    }
    
    .heading h3 {
        font-size: 28px !important;
    }
    
    .heading p {
        font-size: 16px !important;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        font-size: 15px;
        padding: 10px 15px;
    }
    
    /* Hero Section */
    .banner-img img {
        margin-top: 50px;
        max-width: 100%;
        height: auto;
    }
    
    /* Grid Layouts */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .col-md-6,
    .col-md-4,
    .col-md-3 {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Cards */
    .card-body {
        padding: 25px;
    }
    
    .card-title {
        font-size: 20px;
    }
    
    .card-text {
        font-size: 15px;
    }
    
    /* Buttons */
    .btn {
        font-size: 16px;
        padding: 12px 24px;
    }
    
    /* Spacing */
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Contact Section */
    .contact-img {
        display: block;
        max-width: 100%;
        height: auto;
    }
    
    /* Footer */
    .footer-links {
        margin: 30px 0;
    }
    
    /* Counter Cards */
    .counter-card-wrap {
        border-right: 1px solid #dee2e6;
        margin-bottom: 30px;
    }
    
    .counter-card h3 {
        font-size: 32px;
    }
    
    .counter-card p {
        font-size: 14px;
    }
    
    /* Slick Slider */
    .slick-dots {
        left: -200px;
    }
}

/* Large Devices (Desktops) - 992px to 1199px */
@media only screen and (min-width: 992px) and (max-width: 1199px) {
    /* Typography */
    .banner-content h1 {
        font-size: 42px !important;
        line-height: 1.2;
    }
    
    .banner-content h2 {
        font-size: 28px !important;
    }
    
    .banner-content p {
        font-size: 17px !important;
    }
    
      .heading h3 {
        font-size: 30px !important;
    }
    
    .heading p {
        font-size: 17px !important;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        font-size: 16px;
        padding: 12px 18px;
    }
    
    /* Hero Section */
    .banner-img img {
        margin-top: 45px;
        max-width: 100%;
        height: auto;
    }
    
    /* Cards */
    .card-body {
        padding: 30px;
    }
    
    .card-title {
        font-size: 22px;
    }
    
    .card-text {
        font-size: 16px;
    }
    
    /* Buttons */
    .btn {
        font-size: 17px;
        padding: 14px 28px;
    }
    
    /* Spacing */
    .py-5 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    
    /* Contact Section */
    .contact-img {
        display: block;
        max-width: 100%;
        height: auto;
    }
    
    /* Footer */
    .footer-links {
        margin: 35px 0;
    }
    
    /* Counter Cards */
    .counter-card-wrap {
        border-right: 1px solid #dee2e6;
        margin-bottom: 35px;
    }
    
    .counter-card h3 {
        font-size: 36px;
      }
    
    .counter-card p {
        font-size: 15px;
    }
    
    /* Slick Slider */
    .slick-dots {
        left: -250px;
    }
}

/* Extra Large Devices (Large Desktops) - 1200px and up */
@media only screen and (min-width: 1200px) {
    /* Typography */
    .banner-content h1 {
        font-size: 48px !important;
        line-height: 1.1;
    }
    
    .banner-content h2 {
        font-size: 32px !important;
    }
    
    .banner-content p {
        font-size: 18px !important;
    }
    
    .heading h3 {
        font-size: 36px !important;
    }
    
    .heading p {
        font-size: 18px !important;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        font-size: 17px;
        padding: 15px 20px;
    }
    
    /* Hero Section */
    .banner-img img {
        margin-top: 40px;
        max-width: 100%;
        height: auto;
    }
    
    /* Cards */
    .card-body {
        padding: 35px;
    }
    
    .card-title {
        font-size: 24px;
    }
    
    .card-text {
        font-size: 17px;
    }
    
    /* Buttons */
    .btn {
        font-size: 18px;
        padding: 16px 32px;
    }
    
    /* Spacing */
    .py-5 {
        padding-top: 5rem !important;
        padding-bottom: 5rem !important;
    }
    
    /* Contact Section */
    .contact-img {
        display: block;
        max-width: 100%;
        height: auto;
    }
    
    /* Footer */
    .footer-links {
        margin: 40px 0;
    }
    
    /* Counter Cards */
    .counter-card-wrap {
        border-right: 1px solid #dee2e6;
        margin-bottom: 40px;
    }
    
    .counter-card h3 {
        font-size: 40px;
    }
    
    .counter-card p {
        font-size: 16px;
    }
    
    /* Slick Slider */
      .slick-dots {
        left: -304px;
      }
}

/* Ultra Wide Screens - 1920px and up */
@media only screen and (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .banner-content h1 {
        font-size: 56px !important;
    }
    
    .banner-content h2 {
        font-size: 36px !important;
    }
    
    .heading h3 {
        font-size: 42px !important;
    }
    
    .card-body {
        padding: 40px;
    }
    
    .btn {
        font-size: 20px;
        padding: 18px 36px;
    }
}

/* Landscape Orientation */
@media only screen and (orientation: landscape) and (max-height: 500px) {
    .banner-content h1 {
        font-size: 24px !important;
    }
    
    .banner-content h2 {
        font-size: 18px !important;
    }
    
    .banner-content p {
        font-size: 12px !important;
    }
    
    .py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    .banner-img img {
        margin-top: 70px;
    }
}

/* High DPI Displays */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi) {
    .banner-img img,
    .card-img-top,
    .about-img img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .slick-dots {
        display: none !important;
    }
    
    .banner-content h1,
    .heading h3 {
        color: #000 !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        break-inside: avoid;
    }
    
    .py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #2c3e50;
        color: #ffffff;
    }
    
    .card-title {
        color: #ffffff;
    }
    
    .card-text {
        color: #e9ecef;
      }
}

/* ===========================================
   ENHANCED MOBILE BROWSER OPTIMIZATIONS
   =========================================== */

/* Prevent iOS text size adjustment */
@media (max-width: 767px) {
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    /* Prevent horizontal scroll */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix for mobile Safari address bar */
    :root {
        --vh: 1vh;
    }
    
    /* Better touch targets - minimum 44x44px */
    a, button, input, select, textarea, .btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    /* Improve form inputs for mobile */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px 15px;
        border-radius: 8px;
        -webkit-appearance: none;
        appearance: none;
    }
    
    /* Better button sizes for mobile */
    .btn {
        padding: 12px 24px;
        font-size: 16px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    .btn-sm {
        padding: 10px 20px;
        font-size: 14px;
        min-height: 40px;
    }
    
    .btn-lg {
        padding: 14px 28px;
        font-size: 18px;
        min-height: 48px;
    }
    
    /* Mobile navigation improvements */
    .navbar-toggler {
        padding: 8px 12px;
        min-height: 44px;
        min-width: 44px;
        border: none;
        background: transparent;
    }
    
    .navbar-nav .nav-link {
        padding: 12px 20px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .dropdown-item {
        padding: 12px 20px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Fix container overflow */
    .container,
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden;
    }
    
    /* Card improvements for mobile */
    .card {
        margin-bottom: 20px;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .card-body {
        padding: 20px;
    }
    
    /* Contact section mobile fixes */
    .contact-method {
        margin-bottom: 20px;
        padding: 15px;
        border-radius: 10px;
    }
    
    .contact-method .btn {
        width: 100%;
        margin-top: 10px;
    }
    
    /* Footer mobile improvements */
    .footer-section {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .footer-links ul {
        padding-left: 0;
        list-style: none;
    }
    
    .footer-links ul li {
        margin-bottom: 10px;
    }
    
    .footer-links ul li a {
        padding: 8px 0;
        display: block;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hero section mobile fixes */
    .hero-section {
        min-height: calc(100vh - 60px);
        padding-top: 80px;
        padding-bottom: 40px;
    }
    
    .banner-content {
        text-align: center;
        margin-bottom: 30px;
    }
    
    /* Table responsive */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    /* Modal mobile improvements */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        border-radius: 15px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    /* Chat widget mobile fixes */
    .chat-widget {
        bottom: 20px;
        right: 20px;
        width: calc(100% - 40px);
        max-width: 400px;
    }
    
    /* Prevent pull-to-refresh on mobile */
    body {
        overscroll-behavior-y: contain;
    }
    
    /* Smooth scrolling for mobile */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix for sticky elements on mobile */
    .sticky-top {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 1020;
    }
}

/* Extra small mobile devices (320px - 375px) */
@media (max-width: 375px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .banner-content h1 {
        font-size: 24px !important;
    }
    
    .banner-content h2 {
        font-size: 18px !important;
    }
    
    .heading h3 {
        font-size: 20px !important;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .btn {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .navbar-brand {
        font-size: 14px;
    }
    
    .navbar-brand img {
        height: 35px !important;
    }
}

/* Mobile landscape orientation */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding-top: 60px;
        padding-bottom: 30px;
    }
    
    .banner-content h1 {
        font-size: 28px !important;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 767px) {
        /* Fix for iOS Safari viewport height */
        .hero-section,
        .min-vh-100 {
            min-height: -webkit-fill-available;
        }
        
        /* Fix iOS input zoom */
        input[type="text"],
        input[type="email"],
        input[type="tel"],
        input[type="number"],
        input[type="url"],
        textarea,
        select {
            font-size: 16px !important;
        }
        
        /* Remove iOS input shadows */
        input,
        textarea,
        select {
            -webkit-appearance: none;
            appearance: none;
            border-radius: 8px;
        }
    }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    @media (max-width: 767px) {
        /* Fix for Android Chrome address bar */
        .hero-section {
            min-height: 100vh;
            min-height: -webkit-fill-available;
        }
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    a, button, .btn, .nav-link, .dropdown-item {
        min-height: 48px;
        padding: 12px 16px;
    }
    
    /* Remove hover effects on touch devices */
    a:hover,
    button:hover,
    .btn:hover {
        opacity: 1;
    }
    
    /* Better focus states for touch */
    a:focus,
    button:focus,
    .btn:focus,
    input:focus,
    textarea:focus,
    select:focus {
        outline: 3px solid rgba(0, 123, 255, 0.5);
        outline-offset: 2px;
    }
}

/* High DPI mobile displays */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    @media (max-width: 767px) {
        img {
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
        }
    }
}