/* Responsive Utilities CSS - Comprehensive Mobile and Desktop Enhancements */

/* Global Responsive Utilities */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

.text-responsive {
    font-size: clamp(14px, 2.5vw, 18px);
    line-height: 1.6;
}

/* Mobile First Approach - Base Styles */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* Enhanced Mobile Styles (up to 767px) */
@media only screen and (max-width: 767px) {
    /* Typography */
    .display-1 { font-size: 2.5rem; }
    .display-2 { font-size: 2rem; }
    .display-3 { font-size: 1.75rem; }
    .display-4 { font-size: 1.5rem; }
    
    /* Spacing */
    .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
    
    .my-5 { margin-top: 2rem !important; margin-bottom: 2rem !important; }
    .my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
    .my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
    
    /* Cards */
    .card {
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Tables */
    .table-responsive {
        border: none;
        margin-bottom: 1rem;
    }
    
    .table {
        font-size: 0.875rem;
        margin-bottom: 0;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
        vertical-align: middle;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-control {
        height: 45px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }
    
    .form-control-lg {
        height: 50px;
        font-size: 18px;
    }
    
    .form-control-sm {
        height: 40px;
        font-size: 14px;
    }
    
    /* Buttons */
    .btn, .default-btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 8px;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-lg {
        min-height: 50px;
        font-size: 18px;
        padding: 15px 25px;
    }
    
    .btn-sm {
        min-height: 40px;
        font-size: 14px;
        padding: 10px 15px;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        padding: 12px 15px;
        font-size: 16px;
        border-bottom: 1px solid #eee;
    }
    
    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: #f8f9fa;
        border: none;
        box-shadow: none;
    }
    
    .dropdown-item {
        padding: 12px 20px;
        font-size: 15px;
        border-bottom: 1px solid #eee;
    }
    
    /* Page Banner */
    .page-banner-area {
        padding: 40px 0;
        text-align: center;
    }
    
    .page-banner-content h1 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .page-banner-content ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Cards */
    .card {
        margin-bottom: 20px;
        border: none;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border-radius: 12px;
    }
    
    .card-header {
        background: #f8f9fa;
        border-bottom: 1px solid #dee2e6;
        padding: 15px 20px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .card-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    /* Alerts */
    .alert {
        padding: 15px 20px;
        margin-bottom: 20px;
        border-radius: 8px;
        font-size: 16px;
    }
    
    /* Modals */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        border-radius: 12px;
        border: none;
    }
    
    .modal-header {
        padding: 20px;
        border-bottom: 1px solid #dee2e6;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
        border-top: 1px solid #dee2e6;
    }
    
    /* Utilities */
    .text-center-mobile {
        text-align: center !important;
    }
    
    .d-block-mobile {
        display: block !important;
    }
    
    .d-none-mobile {
        display: none !important;
    }
    
    .w-100-mobile {
        width: 100% !important;
    }
    
    .mb-mobile-3 {
        margin-bottom: 1rem !important;
    }
    
    .p-mobile-3 {
        padding: 1rem !important;
    }
    
    /* Full width containers on mobile */
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Fix overflow issues */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row > * {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Image responsiveness */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    /* Better touch targets */
    a, button, input, select, textarea {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Improved spacing */
    .section-title {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .section-title h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .section-title p {
        font-size: 16px;
        line-height: 1.6;
    }
    
    /* Contact Cards */
    .contact-card {
        background: #fff;
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        margin-bottom: 20px;
    }
    
    .contact-icon {
        font-size: 24px;
        color: #e91e63;
    }
    
    .department-contacts a {
        color: #111D5E;
        text-decoration: none;
    }
    
    .department-contacts a:hover {
        color: #E32845;
        text-decoration: underline;
    }
    
    .map-container {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
}

/* Tablet Styles (768px - 991px) */
@media only screen and (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .btn, .default-btn {
        width: auto;
        min-width: 120px;
    }
    
    .card-body {
        padding: 25px;
    }
    
    .modal-dialog {
        margin: 30px auto;
        max-width: 600px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .page-banner-content h1 {
        font-size: 32px;
    }
}

/* Desktop Styles (992px and above) */
@media only screen and (min-width: 992px) {
    .btn, .default-btn {
        width: auto;
        min-width: 140px;
    }
    
    .modal-dialog {
        margin: 50px auto;
        max-width: 800px;
    }
    
    .section-title h2 {
        font-size: 32px;
    }
    
    .page-banner-content h1 {
        font-size: 36px;
    }
    
    .card-body {
        padding: 30px;
    }
    
    /* Desktop-specific utilities */
    .d-desktop-inline-block {
        display: inline-block !important;
    }
    
    .d-desktop-flex {
        display: flex !important;
    }
    
    .w-desktop-auto {
        width: auto !important;
    }
}

/* Large Desktop Styles (1200px and above) */
@media only screen and (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .section-title h2 {
        font-size: 36px;
    }
    
    .page-banner-content h1 {
        font-size: 42px;
    }
    
    .card-body {
        padding: 35px;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .sidebar, .modal, .btn, .default-btn {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .page-banner-area {
        padding: 20px 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}