/* Comprehensive Responsive CSS for all screens */

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Navbar adjustments */
    .navbar-brand {
        font-size: 1.5rem !important;
    }
    
    .search-form .form-control {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    .search-form .btn {
        width: 100%;
        border-radius: 50px;
    }
    
    /* Grid adjustments */
    .col-xs-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Content adjustments */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    /* Header adjustments */
    .header-content h1 {
        font-size: 2rem !important;
    }
    
    .header-content p {
        font-size: 1rem !important;
    }
    
    .header-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-header {
        width: 100%;
    }
    
    /* Footer adjustments */
    .footer .col-md-3, 
    .footer .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    /* Sidebar adjustments */
    .sidebar-section {
        margin-bottom: 1rem;
    }
    
    /* Team member cards */
    .team-member {
        margin-bottom: 2rem;
    }
    
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    /* Stats adjustments */
    .stats-number {
        font-size: 1.5rem;
    }
    
    .stats-label {
        font-size: 0.8rem;
    }
    
    /* Form adjustments */
    .form-control, 
    .form-select {
        margin-bottom: 15px;
    }
    
    /* Button adjustments */
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Text adjustments */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    p {
        font-size: 0.9rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    .col-sm-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .search-form .form-control {
        width: 150px;
    }
    
    .search-form .form-control:focus {
        width: 200px;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    /* Footer adjustments */
    .footer .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    .search-form .form-control {
        width: 180px;
    }
    
    .search-form .form-control:focus {
        width: 230px;
    }
    
    .card-img-top {
        height: 160px;
    }
    
    /* Adjust sidebar on medium screens */
    .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 30px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .search-form .form-control {
        width: 200px;
    }
    
    .search-form .form-control:focus {
        width: 250px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* General responsive improvements */
@media (max-width: 768px) {
    /* Hide desktop-only elements */
    .desktop-only {
        display: none;
    }
    
    /* Show mobile-only elements */
    .mobile-only {
        display: block;
    }
    
    /* Adjust navigation */
    .navbar-collapse {
        text-align: center;
    }
    
    .nav-link {
        margin: 5px 0;
    }
    
    /* Adjust forms */
    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Adjust images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Adjust tables */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Adjust video containers */
    .video-container {
        position: relative;
        padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
        height: 0;
        overflow: hidden;
    }
    
    .video-container video,
    .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        padding: 12px 15px !important;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    /* Adjust hover effects for touch */
    .btn:hover,
    .nav-link:hover {
        transform: none;
    }
    
    .btn:active,
    .nav-link:active {
        transform: translateY(1px);
    }
}

/* High resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Adjust for high DPI displays */
    .navbar {
        border-bottom-width: 0.5px;
    }
    
    .card {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}

/* Orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    /* Adjust for landscape mode on mobile */
    .header-content {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .blog-header {
        min-height: 250px;
    }
}

@media (orientation: portrait) {
    /* Adjust for portrait mode */
    .blog-header {
        min-height: 300px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .whatsapp-float,
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        font-size: 12pt;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}