/* Global Responsive Styles for All Pages */

/* Base responsive utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.col {
    flex: 1;
    padding: 0 0.5rem;
}

/* Responsive breakpoints */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Hide on mobile */
    .d-md-none {
        display: none !important;
    }
    
    /* Show on mobile */
    .d-md-block {
        display: block !important;
    }
    
    /* Mobile navigation */
    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        flex-direction: column;
        display: none;
        z-index: 1000;
        border-radius: 0 0 10px 10px;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-menu li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }
    
    .navbar-menu li:last-child {
        border-bottom: none;
    }
    
    .navbar-menu li a {
        display: block;
        padding: 15px 20px;
        text-align: center;
        color: #333;
        text-decoration: none;
        transition: background-color 0.3s ease;
    }
    
    .navbar-menu li a:hover {
        background-color: #f8f9fa;
    }
    
    /* Mobile menu button */
    .mobile-menu-btn {
        display: block !important;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #333;
        padding: 10px;
        transition: color 0.3s ease;
    }
    
    .mobile-menu-btn:hover {
        color: #1e3a8a;
    }
    
    /* Forms responsive */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-control {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 1rem;
        transition: border-color 0.3s ease;
    }
    
    .form-control:focus {
        outline: none;
        border-color: #1e3a8a;
        box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.1);
    }
    
    /* Buttons responsive */
    .btn {
        display: inline-block;
        padding: 0.75rem 1.5rem;
        border: none;
        border-radius: 8px;
        font-size: 1rem;
        font-weight: 600;
        text-decoration: none;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    .btn-primary {
        background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
        color: white;
    }
    
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(30, 58, 138, 0.3);
    }
    
    .btn-secondary {
        background: #f8f9fa;
        color: #333;
        border: 1px solid #ddd;
    }
    
    .btn-secondary:hover {
        background: #e9ecef;
    }
    
    /* Cards responsive */
    .card {
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        margin-bottom: 1.5rem;
        overflow: hidden;
    }
    
    .card-header {
        padding: 1rem 1.5rem;
        background: #f8f9fa;
        border-bottom: 1px solid #eee;
        font-weight: 600;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .card-footer {
        padding: 1rem 1.5rem;
        background: #f8f9fa;
        border-top: 1px solid #eee;
    }
    
    /* Tables responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 1rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem;
        text-align: right;
        border-bottom: 1px solid #eee;
    }
    
    .table th {
        background: #f8f9fa;
        font-weight: 600;
    }
    
    /* Images responsive */
    .img-responsive {
        max-width: 100%;
        height: auto;
    }
    
    /* Text responsive */
    .text-center {
        text-align: center;
    }
    
    .text-right {
        text-align: right;
    }
    
    .text-left {
        text-align: left;
    }
    
    /* Spacing responsive */
    .mt-1 { margin-top: 0.25rem; }
    .mt-2 { margin-top: 0.5rem; }
    .mt-3 { margin-top: 1rem; }
    .mt-4 { margin-top: 1.5rem; }
    .mt-5 { margin-top: 3rem; }
    
    .mb-1 { margin-bottom: 0.25rem; }
    .mb-2 { margin-bottom: 0.5rem; }
    .mb-3 { margin-bottom: 1rem; }
    .mb-4 { margin-bottom: 1.5rem; }
    .mb-5 { margin-bottom: 3rem; }
    
    .p-1 { padding: 0.25rem; }
    .p-2 { padding: 0.5rem; }
    .p-3 { padding: 1rem; }
    .p-4 { padding: 1.5rem; }
    .p-5 { padding: 3rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .col-sm-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Smaller text on very small screens */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }
    
    /* Smaller buttons */
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    /* Smaller cards */
    .card-body {
        padding: 1rem;
    }
    
    .card-header,
    .card-footer {
        padding: 0.75rem 1rem;
    }
    
    /* Smaller forms */
    .form-control {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 0.25rem;
    }
    
    /* Extra small adjustments */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .form-control {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .mobile-menu-btn {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        color: #fff;
        border: 2px solid #000;
    }
    
    .btn-secondary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

