/* Responsive Design for Mobile and Tablet */

/* Large Desktop - 1200px and up */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Desktop - 992px to 1199px */
@media (max-width: 1199px) {
    .banner-title {
        font-size: 3rem;
    }
    
    .mega-menu {
        min-width: 700px;
    }
}

/* Tablet - 768px to 991px */
@media (max-width: 991px) {
    /* Navigation */
    .navbar-collapse {
        background: white;
        padding: 20px;
        margin-top: 10px;
        border-radius: 8px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }
    
    .navbar-nav {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 10px;
        width: 100%;
        display: block !important;
    }
    
    .navbar-nav .nav-link {
        padding: 15px 10px !important;
        border-bottom: 1px solid #eee;
        width: 100%;
        display: block !important;
        font-size: 14px !important;
    }
    
    /* Simple mobile dropdowns */
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none !important;
        box-shadow: none !important;
        background: #f8f9fa !important;
        margin-top: 5px !important;
        display: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        border-radius: 0 !important;
        max-height: none !important;
        overflow-y: visible !important;
        min-width: auto !important;
        max-width: none !important;
    }
    
    .dropdown-menu.show {
        display: block !important;
    }
    
    .dropdown-item {
        color: #333 !important;
        padding: 8px 15px !important;
        font-size: 13px !important;
        border-bottom: 1px solid #eee;
        white-space: normal !important;
    }
    
    .dropdown-item:hover {
        background-color: #e9ecef !important;
        color: #00bcd4 !important;
    }
    
    /* Mobile dropdown headers */
    .dropdown-header {
        background-color: #e9ecef !important;
        color: #495057 !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        padding: 8px 15px !important;
        position: static !important;
        margin-top: 5px;
        margin-bottom: 0;
    }
    
    /* Mobile dropdown dividers */
    .dropdown-divider {
        border-top: 2px solid #dee2e6 !important;
        margin: 8px 0 !important;
    }
    
    /* Mobile hamburger menu styling */
    .navbar-toggler {
        display: block !important;
        border: 2px solid #333 !important;
        border-radius: 4px !important;
        padding: 8px 12px !important;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25) !important;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }
    
    /* Hero Banner */
    .hero-banner {
        height: auto;
        min-height: 100vh;
        margin-top: 0;
        padding: 100px 0 60px 0;
        display: flex;
        align-items: center;
    }
    
    .slide {
        padding: 40px 0;
        display: flex;
        align-items: center;
        min-height: calc(100vh - 160px);
    }
    
    .slide-content {
        width: 100%;
        padding: 0 20px;
    }
    
    .slide .row {
        flex-direction: column;
        text-align: center;
    }
    
    .slide .col-lg-6 {
        width: 100%;
        max-width: 100%;
        flex: none;
        margin-bottom: 20px;
    }
    
    .banner-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 20px;
        text-align: center;
        font-weight: 700;
    }
    
    .banner-description {
        font-size: 1rem;
        line-height: 1.5;
        text-align: center;
        margin-bottom: 30px;
        opacity: 0.95;
    }
    
    .banner-buttons {
        text-align: center;
        margin-top: 25px;
    }
    
    .banner-buttons .btn {
        display: inline-block;
        margin: 8px 5px;
        padding: 14px 25px;
        font-size: 0.95rem;
        min-width: 140px;
    }
    
    .banner-image {
        margin-top: 25px;
        max-width: 85%;
        height: auto;
        border-radius: 10px;
    }
    
    /* Columns */
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    /* Sections */
    .services-section,
    .why-choose-us-section,
    .contact-cta-section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card,
    .feature-card {
        margin-bottom: 30px;
    }
}

/* Mobile - 576px to 767px */
@media (max-width: 767px) {
    /* Typography */
    .banner-title {
        font-size: 2rem;
    }
    
    .banner-description {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    /* Hero Banner */
    .hero-banner {
        height: auto;
        min-height: 90vh;
        margin-top: 0;
        padding: 90px 0 50px 0;
        display: flex;
        align-items: center;
    }
    
    .slide {
        padding: 30px 0;
        display: flex;
        align-items: center;
        min-height: calc(90vh - 140px);
    }
    
    .slide-content {
        width: 100%;
        padding: 0 15px;
    }
    
    .slide-content .row {
        flex-direction: column;
        text-align: center;
    }
    
    .slide .col-lg-6 {
        width: 100%;
        max-width: 100%;
        flex: none;
        margin-bottom: 15px;
    }
    
    .banner-title {
        font-size: 1.7rem;
        line-height: 1.2;
        text-align: center;
        margin-bottom: 18px;
        font-weight: 700;
    }
    
    .banner-description {
        font-size: 0.9rem;
        text-align: center;
        margin-bottom: 25px;
        line-height: 1.4;
        opacity: 0.95;
    }
    
    .banner-buttons {
        text-align: center;
        margin-top: 20px;
    }
    
    .banner-buttons .btn {
        display: inline-block;
        width: auto;
        margin: 6px 8px;
        padding: 12px 22px;
        font-size: 0.88rem;
        min-width: 130px;
    }
    
    .banner-image {
        margin-top: 25px;
        max-width: 90%;
        height: auto;
        border-radius: 8px;
    }
    
    /* Navigation */
    .top-header {
        display: none;
    }
    
    .main-navigation {
        padding: 10px 0;
    }
    
    .navbar-brand .logo {
        height: 40px;
    }
    
    .navbar-toggler {
        border: none;
        padding: 4px 8px;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    /* Columns */
    .col-lg-4, .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    /* Cards */
    .service-card,
    .feature-card {
        padding: 25px 20px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .service-card h4,
    .feature-card h4 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .service-card p,
    .feature-card p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .service-icon,
    .feature-icon,
    .cta-icon {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }
    
    .cta-card {
        padding: 30px 20px;
        margin-bottom: 20px;
    }
    
    /* Slider Navigation */
    .slider-navigation {
        padding: 0 20px;
    }
    
    .slider-navigation button {
        padding: 10px 15px;
    }
    
    .slider-dots {
        bottom: 20px;
    }
    
    /* Footer */
    .footer-section {
        padding: 40px 0 15px;
    }
    
    .footer-logo {
        height: 50px;
    }
    
    .partner-logos img {
        height: 30px;
        margin: 5px;
    }
    
    .certification-logos img {
        height: 40px;
        margin: 5px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-item {
        margin-bottom: 15px;
    }
}

/* Small Mobile - up to 575px */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    /* Typography */
    .banner-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .banner-description {
        font-size: 0.95rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .service-card h4,
    .feature-card h4,
    .cta-card h4 {
        font-size: 1.1rem;
    }
    
    /* Hero Banner */
    .hero-banner {
        height: auto;
        min-height: 80vh;
        margin-top: 0;
        padding: 80px 0 40px 0;
        display: flex;
        align-items: center;
    }
    
    .slide {
        padding: 25px 0;
        display: flex;
        align-items: center;
        min-height: calc(80vh - 120px);
    }
    
    .slide-content {
        width: 100%;
        padding: 0 12px;
    }
    
    .slide-content .row {
        flex-direction: column;
        text-align: center;
    }
    
    .slide .col-lg-6 {
        width: 100%;
        max-width: 100%;
        flex: none;
        margin-bottom: 12px;
    }
    
    .banner-title {
        font-size: 1.5rem;
        line-height: 1.2;
        text-align: center;
        margin-bottom: 15px;
        font-weight: 700;
    }
    
    .banner-description {
        font-size: 0.85rem;
        text-align: center;
        margin-bottom: 20px;
        line-height: 1.3;
        opacity: 0.95;
    }
    
    .banner-buttons {
        text-align: center;
        margin-top: 18px;
    }
    
    .banner-buttons .btn {
        display: inline-block;
        padding: 10px 18px;
        font-size: 0.82rem;
        margin: 5px 6px;
        min-width: 120px;
    }
    
    .banner-image {
        margin-top: 20px;
        max-width: 95%;
        height: auto;
        border-radius: 6px;
    }
    
    .banner-buttons .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    /* Cards */
    .service-card,
    .feature-card,
    .cta-card {
        padding: 25px 15px;
    }
    
    .service-icon,
    .feature-icon,
    .cta-icon {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    /* Sections */
    .services-section,
    .why-choose-us-section,
    .contact-cta-section {
        padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    /* Footer */
    .footer-about,
    .footer-contact,
    .footer-newsletter {
        margin-bottom: 30px;
    }
    
    .partner-logos img,
    .certification-logos img {
        height: 25px;
    }
    
    .input-group .form-control {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .input-group-append .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

/* Extra Small Mobile - up to 375px */
@media (max-width: 375px) {
    /* Typography */
    .banner-title {
        font-size: 1.6rem;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    /* Hero Banner */
    .hero-banner {
        height: auto;
        min-height: 70vh;
        padding: 70px 0 35px 0;
        display: flex;
        align-items: center;
    }
    
    .slide {
        padding: 20px 0;
        display: flex;
        align-items: center;
        min-height: calc(70vh - 105px);
    }
    
    .slide-content {
        width: 100%;
        padding: 0 10px;
    }
    
    .slide-content .row {
        flex-direction: column;
        text-align: center;
    }
    
    .slide .col-lg-6 {
        width: 100%;
        max-width: 100%;
        flex: none;
        margin-bottom: 10px;
    }
    
    .banner-title {
        font-size: 1.3rem;
        line-height: 1.1;
        text-align: center;
        margin-bottom: 12px;
        font-weight: 700;
    }
    
    .banner-description {
        font-size: 0.8rem;
        text-align: center;
        margin-bottom: 18px;
        line-height: 1.2;
        opacity: 0.95;
    }
    
    .banner-buttons {
        text-align: center;
        margin-top: 15px;
    }
    
    .banner-buttons .btn {
        display: inline-block;
        padding: 9px 16px;
        font-size: 0.78rem;
        margin: 4px 5px;
        min-width: 110px;
    }
    
    .banner-image {
        margin-top: 18px;
        max-width: 100%;
        height: auto;
        border-radius: 5px;
    }
    
    .slider-navigation {
        padding: 0 10px;
    }
    
    .slider-navigation button {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* Cards */
    .service-card,
    .feature-card,
    .cta-card {
        padding: 20px 12px;
    }
    
    /* Footer */
    .footer-section {
        padding: 30px 0 15px;
    }
    
    .contact-item strong {
        font-size: 0.9rem;
    }
    
    .contact-item p {
        font-size: 0.85rem;
    }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-banner {
        height: 80vh;
    }
    
    .banner-title {
        font-size: 2.2rem;
    }
    
    .services-section,
    .why-choose-us-section,
    .contact-cta-section {
        padding: 50px 0;
    }
}

/* Print Styles */
@media print {
    .header-section,
    .slider-navigation,
    .slider-dots,
    .btn {
        display: none !important;
    }
    
    .hero-banner {
        margin-top: 0;
        height: auto;
        page-break-after: always;
    }
    
    .slide {
        position: static;
        opacity: 1;
        background: none;
        color: black;
    }
    
    .footer-section {
        page-break-before: always;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .service-icon,
    .feature-icon,
    .cta-icon {
        transform: translateZ(0);
    }
    
    .logo,
    .footer-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .slide {
        transition: none;
    }
    
    .service-card,
    .feature-card,
    .cta-card,
    .btn,
    .nav-link {
        transition: none;
    }
    
    .service-card:hover,
    .feature-card:hover,
    .cta-card:hover {
        transform: none;
    }
    
    .animate-fadeInUp {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .header-section {
        background: #1e1e1e;
        border-bottom: 1px solid #333;
    }
    
    .service-card,
    .feature-card {
        background: #1e1e1e;
        color: #e0e0e0;
    }
    
    .dropdown-menu {
        background: #1e1e1e;
        border: 1px solid #333;
    }
    
    .dropdown-item {
        color: #e0e0e0;
    }
    
    .dropdown-item:hover {
        background: #333;
    }
} 

/* Additional Mobile Improvements */
@media (max-width: 767px) {
    /* Better container spacing */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* Mobile hero banner adjustments */
    .hero-banner .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Slider navigation improvements */
    .slider-navigation button {
        background: rgba(255, 255, 255, 0.8);
        border-radius: 50%;
        backdrop-filter: blur(5px);
    }
    
    .slider-dots {
        bottom: 20px;
        text-align: center;
    }
    
    .dot {
        width: 10px;
        height: 10px;
        margin: 0 5px;
    }
    
    /* Service section mobile fixes */
    .services-section .row {
        margin: 0;
    }
    
    .services-section .col-lg-4 {
        padding: 0 10px;
        margin-bottom: 25px;
    }
    
    /* Typography improvements */
    .section-header {
        text-align: center;
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .section-header p {
        font-size: 0.9rem;
        line-height: 1.5;
        opacity: 0.8;
    }
}

@media (max-width: 575px) {
    /* Extra small devices */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-banner {
        padding: 80px 0 40px 0;
    }
    
    .slide-content {
        padding: 0 10px;
    }
    
    .service-card {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .service-card h4 {
        font-size: 1.1rem;
    }
    
    .service-card p {
        font-size: 0.85rem;
    }
}


/* Critical Mobile Banner Layout Fixes */
@media (max-width: 991px) {
    /* Force mobile layout for all banner elements */
    .hero-banner .row {
    }
    
    .hero-banner .col-lg-6 {
        margin-bottom: 20px;
    }
    
    .text-lg-start {
    }
    
    .justify-content-center {
    }
    
    .align-items-center {
    }
}

@media (max-width: 767px) {
    /* Enhanced mobile banner fixes */
    .hero-banner {
    }
    
    .slide .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .banner-title {
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .banner-description {
        max-width: 100%;
        margin: 0 auto 25px auto;
    }
    
    .banner-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .banner-buttons .btn {
        width: 200px;
        max-width: 90%;
    }
}

@media (max-width: 575px) {
    /* Ultra-mobile banner optimization */
    .banner-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .banner-buttons .btn {
        width: 180px;
        max-width: 85%;
        font-size: 0.8rem;
        padding: 10px 15px;
    }
}

/* CRITICAL: Emergency Mobile Banner Button Fix */
@media (max-width: 991px) {
    /* Fix blank spaces between slides only */
    .hero-banner .slide {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .hero-banner .slide:not(.active) {
        display: none !important;
    }
    
    .hero-banner .banner-buttons {
        width: 100% !important;
        text-align: center !important;
        padding: 0 20px !important;
        margin: 20px 0 !important;
        overflow: visible !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .hero-banner .banner-buttons .btn {
        display: inline-block !important;
        margin: 5px !important;
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
        min-width: 120px !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: visible !important;
        position: relative !important;
        z-index: 100 !important;
        border: 2px solid transparent !important;
    }
    
    .hero-banner .banner-buttons .btn-primary {
        background: #00bcd4 !important;
        color: white !important;
        border-color: #00bcd4 !important;
    }
    
    .hero-banner .banner-buttons .btn-secondary {
        background: transparent !important;
        color: white !important;
        border-color: white !important;
    }
}

@media (max-width: 767px) {
    .hero-banner .banner-buttons {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 0 30px !important;
    }
    
    .hero-banner .banner-buttons .btn {
        width: 100% !important;
        max-width: 250px !important;
        padding: 14px 25px !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 575px) {
    .hero-banner .banner-buttons {
        padding: 0 20px !important;
    }
    
    .hero-banner .banner-buttons .btn {
        max-width: 200px !important;
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
    }
}
