/* Responsive Styles for LStar Services Hub */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography */
    .display-1 { font-size: 2.5rem; }
    .display-2 { font-size: 2rem; }
    .display-3 { font-size: 1.75rem; }
    .display-4 { font-size: 1.5rem; }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    /* Layout */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Navigation */
    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        text-align: center;
    }

    .navbar-collapse {
        background-color: rgba(37, 99, 235, 0.95);
        margin-top: 1rem;
        border-radius: var(--border-radius);
        padding: 1rem;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-lg {
        padding: 1rem 1.5rem;
    }

    .btn-group-vertical .btn {
        margin-bottom: 0;
    }

    /* Cards */
    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 1rem;
    }

    /* Forms */
    .form-control {
        padding: 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-select {
        padding: 1rem;
        font-size: 16px;
    }

    /* Tables */
    .table-responsive {
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }

    /* Modal */
    .modal-dialog {
        margin: 1rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    /* Hero Section */
    .hero-section {
        min-height: 70vh;
        padding: 2rem 0;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem !important;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    /* Service Cards */
    .service-card {
        margin-bottom: 1.5rem;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    /* Statistics */
    .stat-number {
        font-size: 2.5rem !important;
    }

    /* Dashboard */
    .dashboard-card .card-body {
        padding: 1rem;
    }

    .quick-action-btn {
        height: 80px !important;
        font-size: 0.875rem;
    }

    .quick-action-btn i {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Footer */
    footer .col-lg-4,
    footer .col-lg-2,
    footer .col-md-6 {
        margin-bottom: 2rem;
        text-align: center;
    }

    footer .social-links {
        justify-content: center;
        margin-top: 1rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero Section */
    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-subtitle {
        font-size: 1.1rem !important;
    }

    /* Buttons */
    .btn-group .btn {
        width: auto;
        margin-bottom: 0;
    }

    /* Service Grid */
    .service-card {
        height: auto;
        min-height: 300px;
    }

    /* Dashboard */
    .stat-number {
        font-size: 2.5rem;
    }

    .quick-action-btn {
        height: 100px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Navigation */
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
    }

    /* Hero Section */
    .hero-section {
        min-height: 80vh;
    }

    .hero-title {
        font-size: 3rem !important;
    }

    .hero-subtitle {
        font-size: 1.15rem !important;
    }

    /* Cards */
    .service-card {
        min-height: 350px;
    }

    /* Dashboard */
    .dashboard-card {
        margin-bottom: 1.5rem;
    }

    .chart-container {
        height: 280px !important;
    }

    .quick-action-btn {
        height: 110px;
    }

    /* Tables */
    .table-responsive {
        overflow-x: auto;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Hero Section */
    .hero-section {
        min-height: 85vh;
    }

    .hero-title {
        font-size: 3.25rem !important;
    }

    /* Service Cards */
    .service-card {
        min-height: 320px;
    }

    /* Dashboard */
    .quick-action-btn {
        height: 115px;
    }
}

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

    /* Hero Section */
    .hero-section {
        min-height: 90vh;
    }

    .hero-title {
        font-size: 3.5rem !important;
    }

    /* Service Cards */
    .service-card {
        min-height: 300px;
    }

    /* Dashboard */
    .dashboard-card {
        margin-bottom: 2rem;
    }

    .quick-action-btn {
        height: 120px;
    }

    /* Footer */
    footer {
        padding: 4rem 0 2rem;
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-title {
        font-size: 4rem !important;
    }

    .hero-subtitle {
        font-size: 1.35rem !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .quick-action-btn,
    .modal,
    .dropdown-menu,
    .alert {
        display: none !important;
    }

    .main-content {
        padding-top: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }

    .hero-section {
        min-height: auto !important;
        padding: 2rem 0 !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    .table {
        font-size: 10pt;
    }

    .table th,
    .table td {
        padding: 0.25rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images and icons for retina displays */
    .service-icon,
    .navbar-brand img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

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

    .fade-in,
    .slide-in-up,
    .pulse {
        animation: none !important;
    }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .form-control,
    .form-select {
        min-height: 44px;
    }

    .card:hover {
        transform: none;
    }

    .service-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
        box-shadow: var(--box-shadow);
    }
}

/* Landscape Orientation */
@media screen and (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }

    .hero-title {
        font-size: 2rem !important;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }

    .navbar {
        padding: 0.5rem 0;
    }
}

/* Dark Mode Media Query */
@media (prefers-color-scheme: dark) {
    /* Auto dark mode styles */
    :root {
        --primary-color: #3b82f6;
        --secondary-color: #64748b;
        --success-color: #10b981;
        --danger-color: #ef4444;
        --warning-color: #f59e0b;
        --info-color: #06b6d4;
        --light-color: #1e293b;
        --dark-color: #f8fafc;
    }

    body {
        background-color: #0f172a;
        color: #f1f5f9;
    }

    .navbar-dark {
        background-color: #1e293b !important;
    }

    .card {
        background-color: #1e293b;
        color: #f1f5f9;
    }

    .modal-content {
        background-color: #1e293b;
        color: #f1f5f9;
    }

    .dropdown-menu {
        background-color: #1e293b;
        border: 1px solid #334155;
    }

    .dropdown-item {
        color: #f1f5f9;
    }

    .dropdown-item:hover {
        background-color: #334155;
    }
}