/* ============================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   Mobile-First Approach for DentCare Website
   ============================================ */

/* ============================
   EXTRA SMALL DEVICES (Phones)
   Max Width: 575px
   ============================ */
@media (max-width: 575px) {
    /* Typography */
    h1, .display-1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    h2, .display-5 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    h4 {
        font-size: 1.1rem !important;
    }
    
    p, .fs-5 {
        font-size: 0.95rem !important;
    }
    
    /* Hero Carousel */
    .carousel-caption h1 {
        font-size: 1.8rem !important;
    }
    
    .carousel-caption h2 {
        font-size: 1rem !important;
    }
    
    .carousel-caption .btn {
        font-size: 0.9rem !important;
        padding: 10px 20px !important;
        margin: 5px !important;
        display: block;
        width: 100%;
    }
    
    /* Increase carousel height on mobile */
    .carousel-item {
        min-height: 500px !important;
    }
    
    .carousel-item img {
        min-height: 500px !important;
        object-fit: cover;
    }
    
    .carousel-caption {
        bottom: 20% !important;
        padding: 20px 15px !important;
    }
    
    .carousel-caption .p-3 {
        padding: 15px !important;
        max-width: 100% !important;
    }
    
    /* Carousel indicators */
    .carousel-indicators {
        bottom: 10px !important;
    }
    
    /* Carousel controls */
    .carousel-control-prev,
    .carousel-control-next {
        width: 10% !important;
    }
    
    /* Buttons */
    .btn-lg {
        font-size: 0.95rem !important;
        padding: 12px 25px !important;
    }
    
    .btn {
        margin-bottom: 10px;
        width: 100% !important;
    }
    
    /* CTA Sections */
    .container-fluid.py-5 {
        padding: 30px 15px !important;
    }
    
    .bg-primary .btn,
    [style*="linear-gradient"] .btn {
        display: block;
        width: 100% !important;
        margin: 10px 0 !important;
    }
    
    /* Footer */
    .footer .col-lg-3,
    .footer .col-md-6 {
        margin-bottom: 30px;
    }
    
    .footer h3 {
        font-size: 1.3rem !important;
    }
    
    /* Navigation */
    .navbar-brand h1 {
        font-size: 1.5rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 0 !important;
    }
    
    /* Service Items */
    .service-item {
        margin-bottom: 20px;
    }
    
    .service-item h4 {
        font-size: 1.1rem !important;
    }
    
    /* Team Cards */
    .team-item {
        margin-bottom: 30px;
    }
    
    .team-text h4 {
        font-size: 1.2rem !important;
    }
    
    /* Contact Info */
    .d-flex.align-items-center {
        flex-direction: column;
        text-align: center;
    }
    
    .d-flex.align-items-center i {
        margin: 0 0 10px 0 !important;
    }
    
    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Spacing */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .px-5 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Forms */
    .form-control {
        font-size: 0.95rem;
    }
    
    /* Modal */
    .modal-dialog {
        margin: 10px;
    }
    
    /* Icons */
    .fa-3x {
        font-size: 2rem !important;
    }
    
    .fa-4x {
        font-size: 2.5rem !important;
    }
}

/* ============================
   SMALL DEVICES (Phones)
   576px - 767px
   ============================ */
@media (min-width: 576px) and (max-width: 767px) {
    h1, .display-1 {
        font-size: 2.5rem !important;
    }
    
    h2, .display-5 {
        font-size: 1.8rem !important;
    }
    
    .carousel-caption h1 {
        font-size: 2rem !important;
    }
    
    .btn-lg {
        font-size: 1rem !important;
    }
    
    .container-fluid.py-5 {
        padding: 40px 20px !important;
    }
    
    /* Carousel height for small phones */
    .carousel-item {
        min-height: 550px !important;
    }
    
    .carousel-item img {
        min-height: 550px !important;
    }
}

/* ============================
   MEDIUM DEVICES (Tablets)
   768px - 991px
   ============================ */
@media (min-width: 768px) and (max-width: 991px) {
    h1, .display-1 {
        font-size: 3rem !important;
    }
    
    h2, .display-5 {
        font-size: 2rem !important;
    }
    
    .carousel-caption h1 {
        font-size: 2.5rem !important;
    }
    
    .btn-lg {
        font-size: 1.05rem !important;
    }
    
    .col-md-6 .btn {
        width: auto !important;
        display: inline-block !important;
    }
    
    /* Carousel height for tablets */
    .carousel-item {
        min-height: 600px !important;
    }
    
    .carousel-item img {
        min-height: 600px !important;
    }
}

/* ============================
   LARGE DEVICES (Desktops)
   992px - 1199px
   ============================ */
@media (min-width: 992px) and (max-width: 1199px) {
    .carousel-caption h1 {
        font-size: 3rem !important;
    }
}

/* ============================
   LANDSCAPE ORIENTATION
   ============================ */
@media (max-width: 767px) and (orientation: landscape) {
    .carousel-caption {
        padding: 10px 10px !important;
        bottom: 10% !important;
    }
    
    .carousel-caption h1 {
        font-size: 1.3rem !important;
        margin-bottom: 5px !important;
    }
    
    .carousel-caption h2 {
        font-size: 0.85rem !important;
        margin-bottom: 5px !important;
    }
    
    .carousel-caption .btn {
        font-size: 0.8rem !important;
        padding: 8px 15px !important;
    }
    
    .container-fluid.py-5 {
        padding: 20px 15px !important;
    }
    
    /* Reduce carousel height in landscape */
    .carousel-item {
        min-height: 400px !important;
    }
    
    .carousel-item img {
        min-height: 400px !important;
    }
}

/* ============================
   SPECIFIC COMPONENT FIXES
   ============================ */

/* WhatsApp Button */
@media (max-width: 575px) {
    .btn-success {
        width: 100% !important;
        margin: 10px 0 !important;
    }
}

/* Appointment Modal */
@media (max-width: 575px) {
    .modal-content {
        margin: 0 10px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-title {
        font-size: 1.2rem !important;
    }
}

/* Service Cards */
@media (max-width: 575px) {
    .service-item.bg-light {
        padding: 20px !important;
    }
    
    .service-icon i {
        font-size: 2.5rem !important;
    }
}

/* Team Cards */
@media (max-width: 575px) {
    .team-item {
        margin-bottom: 30px;
    }
    
    .team-text {
        padding: 20px 15px !important;
    }
}

/* Hero Carousel */
@media (max-width: 575px) {
    .hero-header {
        padding: 30px 0 !important;
    }
    
    .hero-header h1 {
        font-size: 2rem !important;
    }
    
    /* Carousel specific styling */
    #header-carousel {
        margin-bottom: 30px !important;
    }
    
    #header-carousel .carousel-item {
        min-height: 500px !important;
        position: relative;
    }
    
    #header-carousel .carousel-item img {
        min-height: 500px !important;
        height: 500px !important;
        object-fit: cover;
        object-position: center;
    }
    
    #header-carousel .carousel-caption {
        position: absolute;
        top: 50% !important;
        bottom: auto !important;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        width: 90%;
        padding: 20px 15px !important;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 10px;
    }
    
    #header-carousel .carousel-caption h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }
    
    #header-carousel .carousel-caption h2 {
        font-size: 0.9rem !important;
        margin-bottom: 15px !important;
    }
    
    #header-carousel .carousel-caption .btn {
        font-size: 0.85rem !important;
        padding: 10px 20px !important;
        margin: 5px 0 !important;
        width: 100% !important;
    }
    
    /* Carousel controls smaller */
    #header-carousel .carousel-control-prev,
    #header-carousel .carousel-control-next {
        width: 15% !important;
        opacity: 0.8;
    }
    
    #header-carousel .carousel-control-prev-icon,
    #header-carousel .carousel-control-next-icon {
        width: 30px !important;
        height: 30px !important;
    }
    
    /* Carousel indicators */
    #header-carousel .carousel-indicators {
        bottom: 15px !important;
    }
    
    #header-carousel .carousel-indicators button {
        width: 8px !important;
        height: 8px !important;
        border-radius: 50%;
        margin: 0 4px !important;
    }
}

/* Section Titles */
@media (max-width: 575px) {
    .section-title h5 {
        font-size: 0.9rem !important;
    }
    
    .section-title h1 {
        font-size: 1.5rem !important;
    }
}

/* Contact Page */
@media (max-width: 575px) {
    .col-xl-4 {
        margin-bottom: 20px;
    }
    
    .bg-light.rounded.h-100 {
        height: auto !important;
        min-height: auto !important;
    }
}

/* Google Maps */
@media (max-width: 575px) {
    iframe {
        min-height: 300px !important;
    }
}

/* Back to Top Button */
@media (max-width: 575px) {
    .back-to-top {
        width: 45px !important;
        height: 45px !important;
        font-size: 1rem !important;
    }
}

/* Navbar */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 15px;
        margin-top: 10px;
        border-radius: 5px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 10px 0 !important;
        border-bottom: 1px solid #eee;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Smaller brand text on mobile */
    .navbar-brand h1 {
        font-size: 1.5rem !important;
    }
}

/* Extra small devices - even smaller brand */
@media (max-width: 575px) {
    .navbar-brand h1 {
        font-size: 1.3rem !important;
    }
    
    .navbar-brand .fa-tooth {
        font-size: 1rem !important;
    }
}

/* Topbar */
@media (max-width: 991px) {
    .container-fluid.bg-light.ps-5.pe-0 {
        display: none !important;
    }
}

/* Footer Responsive */
@media (max-width: 575px) {
    .footer .btn-social {
        width: 40px !important;
        height: 40px !important;
        font-size: 0.9rem !important;
    }
    
    .footer .row .col-lg-3 {
        text-align: center;
    }
    
    .footer .d-flex {
        justify-content: center !important;
    }
    
    /* Footer copyright text smaller on mobile */
    .container-fluid[style*="background: #051225"] p {
        font-size: 0.85rem !important;
        line-height: 1.5;
    }
    
    .container-fluid[style*="background: #051225"] .border-bottom {
        font-size: 0.85rem !important;
    }
}

/* ============================
   UTILITY CLASSES
   ============================ */
@media (max-width: 575px) {
    .mobile-center {
        text-align: center !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
    
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-mb-3 {
        margin-bottom: 1rem !important;
    }
}

/* ============================
   PRINT STYLES
   ============================ */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    .btn,
    .carousel-control-prev,
    .carousel-control-next {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    h1 {
        font-size: 18pt;
    }
    
    h2 {
        font-size: 16pt;
    }
}

/* ============================
   ACCESSIBILITY
   ============================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    a {
        text-decoration: underline;
    }
}
