/* Immigration Services Center - Responsive Styles */
/* Extra Small devices (320px and up) */
@media (max-width: 575.98px) {
    /* Header Adjustments */
    .navbar-brand {
        font-size: 1.05rem !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 767.98px) {
    /* General Adjustments */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Header Adjustments */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 3rem 0;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Service Cards */
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    /* Features */
    .feature-box {
        margin-bottom: 1.5rem;
    }
    
    /* Carousel */
    .carousel-item {
        height: 300px;
    }
    
    .carousel-caption {
        padding: 1rem;
        bottom: 1rem;
    }
    
    .carousel-caption h3 {
        font-size: 1.25rem;
    }
    
    .carousel-caption p {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    /* Dashboard */
    .dashboard-container {
        padding: 2rem 0;
    }
    
    .dashboard-menu {
        margin-bottom: 2rem;
    }
    
    .dashboard-card-header {
        padding: 1rem;
    }
    
    .dashboard-card-body {
        padding: 1rem;
    }
    
    .dashboard-card-header h3 {
        font-size: 1.25rem;
    }
    
    /* Forms */
    .form-control {
        font-size: 0.875rem;
    }
    
    /* Rating Stars */
    .rating-stars label {
        font-size: 1.5rem;
    }
    
    /* Footer */
    .footer {
        text-align: center;
    }
    
    .footer .col-md-2, 
    .footer .col-md-4 {
        margin-bottom: 2rem;
    }
    
    .footer .text-md-end {
        text-align: center !important;
        margin-top: 1rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero Section */
    .hero h1 {
        font-size: 2.4rem;
    }
    
    /* Carousel */
    .carousel-item {
        height: 400px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* No specific adjustments needed */
}

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

/* Touch Devices */
@media (hover: none) {
    /* Apply styles for touch devices */
    .dropdown-item:active {
        background-color: var(--primary);
        color: #fff;
    }
}

/* Dark Mode Support (if the user has dark mode enabled) */
/* @media (prefers-color-scheme: dark) { */
    /* We'll just add a subtle adjustment to respect user preferences */
    /* .bg-light { */
        /* background-color: #212529 !important; */
        /* color: #f8f9fa; */
    /* } */
/* } */

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .dashboard-menu,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    .dashboard-card {
        border: 1px solid #dee2e6;
        box-shadow: none;
        break-inside: avoid;
    }
    
    .dashboard-card-header {
        background-color: #f8f9fa !important;
        color: #000 !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 90%;
    }
}

/* Animation Responsive Controls */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Enhanced Mobile Navigation */
@media (max-width: 767.98px) {
    .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .nav-item .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .dropdown-item {
        padding: 0.5rem 0;
    }
    
    .navbar-dark .navbar-nav .nav-link {
        padding: 0.75rem 0;
    }
    
    .language-form .dropdown-item {
        padding: 0.5rem 1rem;
    }
    
    /* Stacked Buttons */
    .btn-group-responsive {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group-responsive .btn {
        margin-bottom: 0.5rem;
        border-radius: 0.25rem !important;
    }
    
    /* Touch-friendly Elements */
    .nav-link, .btn, .form-control, .list-group-item {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    /* Improved Forms */
    .form-label {
        margin-bottom: 0.5rem;
        font-weight: 600;
    }
    
    /* Auth Pages */
    .auth-card {
        margin: 0 15px;
    }
    
    /* Feedback Card */
    .feedback-history .table-responsive {
        border: 0;
    }
    
    .feedback-history .table th, 
    .feedback-history .table td {
        white-space: nowrap;
    }
    
    /* Fixed Navigation for Mobile */
    .fixed-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        display: flex;
    }
    
    .fixed-bottom-nav a {
        flex: 1;
        text-align: center;
        padding: 0.75rem 0;
        color: var(--text-dark);
        font-size: 0.75rem;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .fixed-bottom-nav a i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .fixed-bottom-nav a.active {
        color: var(--primary);
    }
    
    /* Add padding to body when fixed nav is present */
    body.has-fixed-nav {
        padding-bottom: 4rem;
    }
}

/* Loading Indicators */
@keyframes shimmer {
    0% {
        background-position: -1000px 0
    }
    100% {
        background-position: 1000px 0
    }
}

.loading-shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-size: 1000px 100%;
}

/* Social Share Menu */
.social-share {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.social-share a.facebook {
    background-color: #3b5998;
}

.social-share a.twitter {
    background-color: #1da1f2;
}

.social-share a.linkedin {
    background-color: #0077b5;
}

.social-share a.whatsapp {
    background-color: #25d366;
}

.social-share a:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

@media (max-width: 767.98px) {
    .social-share {
        position: fixed;
        bottom: 70px;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        padding: 0.75rem 0;
        z-index: 999;
    }
    
    body.has-social-share {
        padding-bottom: 7rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
a:focus, 
button:focus, 
input:focus, 
textarea:focus, 
select:focus {
    outline: 2px solid var(--accent) !important;
    outline-offset: 2px !important;
}

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Fade-in animation for page content */
.page-content {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* High contrast mode */
@media (forced-colors: active) {
    .btn-primary,
    .btn-secondary,
    .badge {
        forced-color-adjust: none;
    }
}