/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* ========================================
   Base Responsive Settings
   ======================================== */

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Container & Layout Fixes
   ======================================== */

@media (max-width: 991px) {
    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    .row {
        margin-left: -15px;
        margin-right: -15px;
    }

    [class*="col-"] {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ========================================
   Typography Responsive
   ======================================== */

@media (max-width: 767px) {
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    h4 {
        font-size: 1.25rem !important;
    }

    h5 {
        font-size: 1.1rem !important;
    }

    h6 {
        font-size: 1rem !important;
    }

    p {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 575px) {
    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.35rem !important;
    }

    h4 {
        font-size: 1.15rem !important;
    }
}

/* ========================================
   Navbar Mobile Enhancements
   ======================================== */

@media (max-width: 991px) {
    /* Navbar brand adjustments */
    .navbar-brand {
        max-width: 70%;
        font-size: 1rem;
        display: flex !important;
        align-items: center !important;
        gap: 10px;
    }

    .navbar-brand h4 {
        font-size: 1rem !important;
        line-height: 1.2;
        margin: 0 !important;
    }

    .navbar-brand small {
        font-size: 0.7rem !important;
        display: block;
        line-height: 1.2;
    }

    .navbar-logo {
        height: 45px !important;
        width: auto !important;
        object-fit: contain !important;
        flex-shrink: 0;
    }

    /* Navbar toggle button */
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        font-size: 1.25rem;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    /* Navigation menu */
    .navbar-nav {
        width: 100%;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 0.75rem 0 !important;
        font-size: 0.95rem !important;
    }
}

@media (max-width: 575px) {
    .navbar-brand {
        max-width: 80%;
        display: flex !important;
        align-items: center !important;
        gap: 8px;
    }

    .navbar-brand h4 {
        font-size: 0.9rem !important;
        margin: 0 !important;
    }

    .navbar-brand small {
        font-size: 0.65rem !important;
    }

    .navbar-logo {
        height: 40px !important;
        width: auto !important;
        object-fit: contain !important;
        flex-shrink: 0;
    }
}

/* ========================================
   Sections Padding Responsive
   ======================================== */

@media (max-width: 991px) {
    .section-padding {
        padding: 2rem 0 !important;
    }
}

@media (max-width: 767px) {
    .section-padding {
        padding: 2rem 0 !important;
    }
}

@media (max-width: 575px) {
    .section-padding {
        padding: 2rem 0 !important;
    }
}

/* ========================================
   Hero Section Mobile
   ======================================== */

@media (max-width: 991px) {
    .hero-carousel-section-modern {
        min-height: 70vh;
    }

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

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

    .hero-description {
        font-size: 0.95rem !important;
    }

    .hero-main-image {
        max-height: 350px;
        width: 100% !important;
        height: 350px !important;
        object-fit: cover !important;
        object-position: center !important;
        margin: 0 auto;
        display: block;
    }

    .hero-image-card {
        margin-top: 20px;
        max-width: 100% !important;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-visual-wrapper {
        padding: 10px !important;
    }

    .min-vh-hero {
        min-height: auto !important;
        padding: 40px 0;
    }

    .hero-badge {
        font-size: 0.85rem !important;
        padding: 8px 16px;
    }

    .hero-trust-badges {
        flex-direction: column;
        gap: 10px;
    }

    .trust-badge {
        width: 100%;
        text-align: center;
    }

    /* Hero carousel controls */
    .hero-carousel-control {
        width: 40px;
        height: 40px;
    }

    .hero-control-prev {
        left: 10px;
    }

    .hero-control-next {
        right: 10px;
    }
}

@media (max-width: 575px) {
    .hero-carousel-section-modern {
        min-height: auto !important;
        height: auto !important;
    }

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

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

    .hero-description {
        font-size: 0.9rem !important;
    }

    .hero-main-image {
        max-height: 280px;
        width: 100% !important;
        height: 280px !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    .hero-badge {
        font-size: 0.75rem !important;
        padding: 6px 12px;
    }
    
    .hero-image-card {
        max-width: 100% !important;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ========================================
   About Section Mobile
   ======================================== */

@media (max-width: 991px) {
    .about-image-wrapper-home {
        max-width: 400px;
        margin: 0 auto 30px;
    }

    .about-main-name {
        font-size: 1.75rem !important;
        text-align: center;
    }

    .about-qualification {
        font-size: 1.1rem !important;
        text-align: center;
    }

    .about-description {
        text-align: left;
        font-size: 0.95rem;
    }

    .about-cta-group {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .about-appointment-cta {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 575px) {
    .about-image-wrapper-home {
        max-width: 100%;
    }

    .about-main-name {
        font-size: 1.5rem !important;
    }

    .about-qualification {
        font-size: 1rem !important;
    }
}

/* ========================================
   Services Section Mobile
   ======================================== */

@media (max-width: 991px) {
    .modern-service-card {
        margin-bottom: 20px;
    }

    .modern-service-image {
        height: 200px;
        object-fit: cover;
    }

    .modern-service-title {
        font-size: 1.25rem !important;
    }

    .modern-service-features {
        font-size: 0.9rem;
    }

    .modern-service-features li {
        padding: 8px 0;
    }
}

@media (max-width: 575px) {
    .modern-service-card {
        margin-bottom: 15px;
    }

    .modern-service-image {
        height: 180px;
    }

    .modern-service-title {
        font-size: 1.15rem !important;
    }

    .modern-service-features {
        font-size: 0.85rem;
    }
}

/* ========================================
   Specialties Section Mobile
   ======================================== */

@media (max-width: 991px) {
    .specialty-card {
        margin-bottom: 20px;
    }

    .specialty-icon-wrapper-home {
        height: 250px !important;
    }

    .specialty-title-styled {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 575px) {
    .specialty-icon-wrapper-home {
        height: 200px !important;
    }

    .specialty-title-styled {
        font-size: 1.1rem !important;
    }
}

/* ========================================
   Gallery Section Mobile
   ======================================== */

@media (max-width: 991px) {
    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .gallery-card {
        height: 220px;
    }
}

@media (max-width: 575px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gallery-card {
        height: 280px;
    }
}

/* ========================================
   Testimonials Section Mobile
   ======================================== */

@media (max-width: 991px) {
    .home-testimonial-card-modern {
        margin-bottom: 20px;
    }

    .home-testimonial-text-modern {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 575px) {
    .home-testimonial-text-modern {
        font-size: 0.9rem !important;
    }
}

/* ========================================
   Video Section (Splide Carousel) Mobile
   ======================================== */

@media (max-width: 991px) {
    .splide {
        padding: 0 10px;
    }

    .shorts-card {
        height: auto !important;
        background: transparent !important;
        border: none !important;
    }

    .ratio-9x16 {
        height: auto !important;
        aspect-ratio: 9/16;
    }
}

@media (max-width: 575px) {
    .shorts-card {
        height: auto !important;
        background: transparent !important;
        border: none !important;
    }

    .ratio-9x16 {
        height: auto !important;
        aspect-ratio: 9/16;
    }
}

/* ========================================
   Footer Mobile
   ======================================== */

@media (max-width: 991px) {
    footer .container {
        padding: 30px 15px;
    }

    footer h5 {
        font-size: 1.1rem !important;
        margin-top: 20px;
    }

    footer p,
    footer a,
    footer li {
        font-size: 0.9rem !important;
    }

    footer .row {
        text-align: center;
    }

    footer .col-md-3,
    footer .col-md-4,
    footer .col-md-6 {
        margin-bottom: 20px;
    }
}

/* ========================================
   Buttons & CTAs Mobile
   ======================================== */

@media (max-width: 767px) {
    .btn,
    .hero-btn-primary,
    .hero-btn-secondary,
    .about-appointment-cta,
    .home-gallery-cta-btn,
    .service-btn-primary {
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        display: block;
    }

    .hero-cta-group {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
}

@media (max-width: 575px) {
    .btn,
    .hero-btn-primary,
    .hero-btn-secondary,
    .about-appointment-cta,
    .home-gallery-cta-btn,
    .service-btn-primary {
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
    }
}

/* ========================================
   Service Pages Sidebar Mobile
   ======================================== */

@media (max-width: 991px) {
    .sidebar {
        margin-top: 40px;
        padding: 20px 15px;
    }

    .sidebar h4 {
        font-size: 1.2rem !important;
    }

    .sidebar ul {
        padding-left: 0;
    }

    .sidebar li {
        padding: 10px 0;
    }
}

/* ========================================
   Contact Form Mobile
   ======================================== */

@media (max-width: 767px) {
    .contact-form .form-control,
    .contact-form .form-select,
    .contact-form textarea {
        font-size: 0.95rem !important;
        padding: 10px !important;
    }

    .contact-form .btn-submit {
        width: 100%;
        padding: 12px !important;
    }
}

/* ========================================
   Tables Mobile
   ======================================== */

@media (max-width: 767px) {
    table {
        font-size: 0.85rem;
    }

    table thead {
        display: none;
    }

    table,
    table tbody,
    table tr,
    table td {
        display: block;
        width: 100%;
    }

    table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        padding: 10px;
    }

    table td {
        text-align: left;
        padding: 8px 0;
        position: relative;
        padding-left: 50%;
    }

    table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-left: 10px;
        font-weight: bold;
        text-align: left;
    }
}

/* ========================================
   Navbar Spacer
   ======================================== */

@media (max-width: 991px) {
    .navbar-spacer {
        height: 70px;
    }
}

@media (max-width: 575px) {
    .navbar-spacer {
        height: 65px;
    }
}

/* ========================================
   Fix overflow issues
   ======================================== */

@media (max-width: 991px) {
    section {
        overflow-x: hidden;
    }

    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ========================================
   Service Page Content Mobile
   ======================================== */

@media (max-width: 991px) {
    .service-content {
        padding: 20px 15px;
    }

    .service-content h1 {
        font-size: 1.75rem !important;
        margin-bottom: 20px;
    }

    .service-content h2 {
        font-size: 1.5rem !important;
        margin-top: 25px;
        margin-bottom: 15px;
    }

    .service-content h3 {
        font-size: 1.25rem !important;
        margin-top: 20px;
        margin-bottom: 12px;
    }

    .service-content ul,
    .service-content ol {
        padding-left: 20px;
    }

    .service-content li {
        margin-bottom: 10px;
    }

    .service-content img {
        margin: 20px 0;
    }
}

/* ========================================
   Carousel & Sliders Mobile
   ======================================== */

@media (max-width: 767px) {
    .carousel-item {
        min-height: 300px;
    }

    .carousel-caption {
        padding: 15px;
    }

    .carousel-caption h5 {
        font-size: 1.1rem !important;
    }

    .carousel-caption p {
        font-size: 0.85rem !important;
    }
}

/* ========================================
   Accordion & Collapse Mobile
   ======================================== */

@media (max-width: 767px) {
    .accordion-button {
        font-size: 0.95rem !important;
        padding: 12px 15px !important;
    }

    .accordion-body {
        padding: 15px !important;
        font-size: 0.9rem !important;
    }
}

/* ========================================
   Modal Mobile
   ======================================== */

@media (max-width: 767px) {
    .modal-dialog {
        margin: 10px;
    }

    .modal-content {
        border-radius: 8px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }

    .modal-title {
        font-size: 1.2rem !important;
    }
}

/* ========================================
   Cards Mobile
   ======================================== */

@media (max-width: 767px) {
    .card {
        margin-bottom: 20px;
    }

    .card-body {
        padding: 15px;
    }

    .card-title {
        font-size: 1.2rem !important;
    }

    .card-text {
        font-size: 0.9rem !important;
    }
}

/* ========================================
   Utilities - Show/Hide on Mobile
   ======================================== */

@media (max-width: 991px) {
    .mobile-hide {
        display: none !important;
    }

    .mobile-show {
        display: block !important;
    }

    .mobile-text-center {
        text-align: center !important;
    }
}

/* ========================================
   Flexbox Alignment Mobile
   ======================================== */

@media (max-width: 767px) {
    .d-flex {
        flex-direction: column !important;
    }

    .flex-row-mobile {
        flex-direction: row !important;
    }

    .justify-content-center-mobile {
        justify-content: center !important;
    }

    .align-items-center-mobile {
        align-items: center !important;
    }
}

/* ========================================
   Spacing Utilities Mobile
   ======================================== */

@media (max-width: 767px) {
    .mb-lg-5 {
        margin-bottom: 2rem !important;
    }

    .mt-lg-5 {
        margin-top: 2rem !important;
    }

    .py-lg-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .px-lg-5 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* ========================================
   Iframe & Embedded Content Mobile
   ======================================== */

@media (max-width: 767px) {
    iframe {
        max-width: 100%;
        height: auto;
    }

    .embed-responsive {
        position: relative;
        display: block;
        width: 100%;
        padding: 0;
        overflow: hidden;
    }

    .embed-responsive::before {
        display: block;
        content: "";
    }

    .embed-responsive-16by9::before {
        padding-top: 56.25%;
    }

    .embed-responsive-4by3::before {
        padding-top: 75%;
    }

    .embed-responsive iframe {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }
}

/* ========================================
   Fixed Elements Mobile
   ======================================== */

@media (max-width: 767px) {
    .fixed-top {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 1030;
    }

    .fixed-bottom {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1030;
    }
}

/* ========================================
   Animation Performance Mobile
   ======================================== */

@media (max-width: 767px) {
    /* Reduce animations for better performance on mobile */
    .wow,
    .animate-fade-in,
    .animate-slide-up,
    .animate-float {
        animation-duration: 0.5s !important;
    }

    /* Disable complex animations on very small screens */
    @media (max-width: 400px) {
        .wow,
        .animate-fade-in,
        .animate-slide-up,
        .animate-float {
            animation: none !important;
        }
    }
}

/* ========================================
   Print Styles (Bonus)
   ======================================== */

@media print {
    .navbar,
    .footer,
    .hero-carousel-control,
    .btn,
    footer {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

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

    img {
        max-width: 100% !important;
    }
}

/* ========================================
   Touch-Friendly Elements
   ======================================== */

@media (max-width: 767px) {
    /* Increase touch target sizes */
    a,
    button,
    .btn,
    .nav-link {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Better tap feedback */
    a:active,
    button:active,
    .btn:active {
        opacity: 0.7;
    }

    /* Fix Footer Addresses Mobile Layout overriding inline-flex side-by-side */
    .footer-addresses a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 5px 0 !important;
    }
    
    .footer-addresses h6 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .footer-addresses h6 i {
        font-size: 1.15rem !important;
    }
    
    .footer-addresses p {
        font-size: 0.85rem !important;
    }
}

/* ========================================
   Landscape Mode Adjustments
   ======================================== */

@media (max-width: 767px) and (orientation: landscape) {
    .hero-carousel-section-modern {
        min-height: 100vh;
    }

    .navbar {
        padding: 5px 0;
    }

    .navbar-brand h4 {
        font-size: 0.9rem !important;
    }

    .navbar-logo {
        height: 35px !important;
    }
}

/* ========================================
   End of Mobile Responsive Styles
   ======================================== */
