/*==============================================
    RESPONSIVE CSS - MOBILE FIRST APPROACH
================================================*/

/* CSS Custom Properties for Responsive */
:root {
    --container-padding: 15px;
    --section-padding: 60px;
    --card-padding: 30px;
}

@media (max-width: 767px) {
    :root {
        --container-padding: 10px;
        --section-padding: 40px;
        --card-padding: 20px;
    }
}

/* Base Responsive Utilities */
.container-fluid {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.container {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* Hide/Show utilities */
@media (max-width: 575px) {
    .d-xs-none { display: none !important; }
    .d-xs-block { display: block !important; }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 540px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
}

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

/*==============================================
    HEADER RESPONSIVE
================================================*/

/* Mobile (up to 575px) */
@media (max-width: 575px) {
    .header-topbar {
        padding: 8px 0;
    }

    .topbar-left {
        flex-direction: column;
        gap: 8px;
    }

    .topbar-item {
        font-size: 0.75rem;
    }

    .topbar-item i {
        font-size: 0.85rem;
    }

    .header-main {
        padding: 10px 0;
    }

    .header-logo img {
        max-height: 45px;
    }

    .header-actions {
        gap: 8px;
    }

    .cart-button,
    .mobile-menu-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .cart-badge {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
        top: -6px;
        right: -6px;
    }
}

/* Tablet (576px to 991px) */
@media (min-width: 576px) and (max-width: 991px) {
    .header-topbar {
        padding: 10px 0;
    }

    .topbar-left {
        gap: 20px;
    }

    .topbar-item {
        font-size: 0.85rem;
    }

    .header-main {
        padding: 12px 0;
    }

    .header-logo img {
        max-height: 55px;
    }

    .location-selector {
        width: 160px;
    }

    .cart-button,
    .mobile-menu-btn {
        width: 42px;
        height: 42px;
    }
}

/* Desktop adjustments */
@media (min-width: 992px) and (max-width: 1199px) {
    .header-nav a {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .location-selector {
        width: 170px;
    }
}

/*==============================================
    FOOTER RESPONSIVE
================================================*/

/* Mobile (up to 575px) */
@media (max-width: 575px) {
    .footer-main {
        padding: 40px 0 20px;
    }

    .footer-brand .brand-logo {
        font-size: 1.6rem;
    }

    .footer-heading {
        font-size: 1.1rem;
        margin-top: 25px;
        margin-bottom: 20px;
    }

    .footer-description {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .certifications {
        gap: 10px;
    }

    .cert-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .social-links {
        margin-top: 20px;
        gap: 10px;
    }

    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .footer-links a {
        font-size: 0.9rem;
    }

    .contact-icon {
        width: 35px;
        height: 35px;
    }

    .contact-icon i {
        font-size: 1rem;
    }

    .contact-details h5 {
        font-size: 0.85rem;
    }

    .contact-details p,
    .contact-details a {
        font-size: 0.9rem;
    }

    .newsletter-box {
        padding: 20px;
    }

    .newsletter-box h4 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .newsletter-box p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .newsletter-form input {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .newsletter-form button {
        position: relative;
        right: auto;
        top: auto;
        bottom: auto;
        width: 100%;
        margin-top: 10px;
        padding: 12px;
    }

    .footer-bottom {
        padding: 20px 0;
    }

    .copyright-text {
        font-size: 0.85rem;
        text-align: center;
        margin-bottom: 15px;
    }

    .footer-bottom-links {
        justify-content: center;
        gap: 15px;
        font-size: 0.85rem;
    }
}

/* Tablet (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .footer-main {
        padding: 50px 0 25px;
    }

    .footer-heading {
        margin-top: 30px;
    }

    .newsletter-box {
        padding: 22px;
    }

    .newsletter-form input {
        padding: 12px 15px;
    }

    .newsletter-form button {
        position: relative;
        right: auto;
        top: auto;
        width: 100%;
        margin-top: 10px;
    }
}

/* Medium tablets (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .footer-heading {
        margin-top: 30px;
    }
}

/*==============================================
    MOBILE MENU RESPONSIVE
================================================*/

/* Mobile (up to 575px) */
@media (max-width: 575px) {
    .modern-mobile-menu {
        width: 100%;
        max-width: 320px;
    }

    .mobile-menu-header {
        padding: 20px 15px;
    }

    .mobile-menu-brand h3 {
        font-size: 1.4rem;
    }

    .mobile-menu-brand p {
        font-size: 0.85rem;
    }

    .mobile-menu-close {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }

    .mobile-user-profile {
        padding: 15px;
    }

    .mobile-user-avatar {
        width: 50px;
        height: 50px;
    }

    .mobile-user-info h4 {
        font-size: 0.95rem;
    }

    .mobile-user-info p {
        font-size: 0.8rem;
    }

    .mobile-location-box {
        padding: 15px;
    }

    .mobile-menu-section-title {
        padding: 15px;
        font-size: 0.8rem;
    }

    .mobile-menu-list a {
        padding: 12px 15px;
    }

    .mobile-menu-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .mobile-menu-text {
        font-size: 0.9rem;
    }

    .mobile-menu-cta {
        padding: 15px;
    }

    .mobile-cta-button {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .mobile-menu-footer {
        padding: 15px;
    }

    .mobile-contact-item {
        font-size: 0.85rem;
    }

    .mobile-social-links a {
        width: 35px;
        height: 35px;
    }
}

/*==============================================
    ABOUT PAGE RESPONSIVE
================================================*/

@media (max-width: 767px) {
    .about-hero {
        padding: 50px 0 40px;
    }

    .about-hero h1 {
        font-size: 1.8rem;
    }

    .about-hero p {
        font-size: 1rem;
    }

    .story-section {
        padding: 50px 0;
    }

    .story-content {
        padding: 25px;
    }

    .story-content h2 {
        font-size: 1.6rem;
    }

    .story-content p {
        font-size: 0.95rem;
    }

    .stats-section {
        padding: 40px 0;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.95rem;
    }

    .values-section {
        padding: 50px 0;
    }

    .value-card {
        padding: 30px 20px;
    }

    .value-icon {
        width: 60px;
        height: 60px;
        font-size: 1.7rem;
    }

    .value-card h3 {
        font-size: 1.2rem;
    }

    .features-section {
        padding: 50px 0;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .section-title p {
        font-size: 1rem;
    }

    .feature-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .feature-content h4 {
        font-size: 1.1rem;
    }
}

/*==============================================
    TERMS & PRIVACY PAGES RESPONSIVE
================================================*/

@media (max-width: 991px) {
    .terms-hero,
    .privacy-hero,
    .return-hero {
        padding: 50px 0 35px;
    }

    .terms-hero h1,
    .privacy-hero h1,
    .return-hero h1 {
        font-size: 2rem;
    }

    .terms-hero p,
    .privacy-hero p,
    .return-hero p {
        font-size: 1rem;
    }

    .terms-sidebar,
    .privacy-sidebar {
        position: relative;
        top: auto;
        margin-bottom: 30px;
    }

    .terms-content,
    .privacy-content,
    .return-content {
        padding: 40px 0;
    }

    .terms-main,
    .privacy-main,
    .return-main {
        padding: 30px 20px;
    }

    .terms-section h2,
    .privacy-section h2,
    .return-section h2 {
        font-size: 1.5rem;
    }

    .terms-section h3,
    .privacy-section h3,
    .return-section h3 {
        font-size: 1.2rem;
    }

    .terms-section p,
    .privacy-section p,
    .return-section p,
    .terms-section li,
    .privacy-section li,
    .return-section li {
        font-size: 0.95rem;
    }

    .data-table {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 767px) {
    .refund-timeline::before {
        display: none;
    }

    .timeline-step {
        min-width: 100%;
        margin-bottom: 20px;
    }

    .contact-box {
        padding: 30px 20px;
    }

    .contact-box h3 {
        font-size: 1.5rem;
    }

    .contact-box p {
        font-size: 1rem;
    }
}

/*==============================================
    DOCTORS PAGE RESPONSIVE
================================================*/

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

    .doctor-profile-img {
        height: 200px;
    }

    .doctor-card-body {
        padding: 20px 15px;
    }

    .doctor-name {
        font-size: 1.2rem;
    }

    .doctor-specialty {
        font-size: 0.85rem;
    }

    .doctor-stats {
        gap: 15px;
    }

    .stat-item {
        font-size: 0.85rem;
    }

    .filter-sidebar {
        position: relative;
        top: auto;
        margin-bottom: 25px;
    }
}

/*==============================================
    BRANCHES PAGE RESPONSIVE
================================================*/

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

    .branch-header {
        padding: 20px 15px;
    }

    .branch-name {
        font-size: 1.2rem;
    }

    .branch-body {
        padding: 20px 15px;
    }

    .branch-info-item {
        font-size: 0.9rem;
    }
}

/*==============================================
    CHECKOUT PAGE RESPONSIVE
================================================*/

@media (max-width: 991px) {
    .checkout-sidebar {
        position: relative;
        top: auto;
        margin-top: 30px;
    }

    .checkout-form {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .checkout-hero {
        padding: 50px 0 35px;
    }

    .checkout-hero h1 {
        font-size: 2rem;
    }

    .checkout-content {
        padding: 40px 0;
    }

    .checkout-form,
    .checkout-sidebar {
        padding: 25px 20px;
    }

    .form-section h3 {
        font-size: 1.2rem;
    }

    .order-summary-item {
        font-size: 0.9rem;
    }
}

/*==============================================
    HOME PAGE RESPONSIVE
================================================*/

@media (max-width: 767px) {
    .hero-slider-section {
        padding: 15px 0;
    }

    #hero-slider .slide-inner img {
        height: 250px;
    }

    .search-box-banner {
        padding: 20px;
        margin-bottom: 20px;
    }

    .search-box-head h5 {
        font-size: 1.1rem;
    }

    .program-box {
        margin-bottom: 20px;
    }

    .program-box img {
        height: 150px;
    }

    .video-box img {
        height: 180px;
    }

    .popular-test-point {
        min-height: 100px;
        padding: 15px;
    }

    .seasonal-test-point {
        min-height: 80px;
        padding: 12px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
}

/*==============================================
    CART MODAL RESPONSIVE
================================================*/

@media (max-width: 575px) {
    .offcanvas.cart-offcanvas {
        width: 100% !important;
        max-width: 100vw;
    }

    .cart-header {
        padding: 20px 15px;
    }

    .cart-title {
        font-size: 1.2rem;
    }

    .cart-body {
        padding: 15px;
    }

    .cart-item {
        padding: 15px;
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
    }

    .cart-item-name {
        font-size: 0.95rem;
    }

    .cart-item-price {
        font-size: 1rem;
    }

    .cart-footer {
        padding: 15px;
    }

    .cart-total {
        font-size: 1.2rem;
    }

    .btn-checkout {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/*==============================================
    COMMON RESPONSIVE UTILITIES
================================================*/

/* Text sizes */
@media (max-width: 767px) {
    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.95rem; }

    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* Spacing adjustments */
@media (max-width: 767px) {
    .py-5 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
    .py-4 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .my-5 { margin-top: 2.5rem !important; margin-bottom: 2.5rem !important; }
    .my-4 { margin-top: 2rem !important; margin-bottom: 2rem !important; }
}

/* Images */
@media (max-width: 767px) {
    img {
        max-width: 100%;
        height: auto;
    }

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

/* Tables */
@media (max-width: 767px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Forms */
@media (max-width: 767px) {
    .form-control {
        font-size: 0.9rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    select.form-select {
        font-size: 0.9rem;
    }
}

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

    .card-body {
        padding: 20px 15px;
    }

    .card-title {
        font-size: 1.1rem;
    }
}

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

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

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

    .modal-title {
        font-size: 1.1rem;
    }
}

/* Scroll to top button */
@media (max-width: 767px) {
    .scroll-top {
        width: 45px;
        height: 45px;
        right: 15px;
        bottom: 15px;
        font-size: 1.3rem;
    }
}

/* Loading states */
@media (max-width: 767px) {
    #preloader {
        width: 60px;
        height: 60px;
    }
}

/*==============================================
    LANDSCAPE ORIENTATION
================================================*/

@media (max-width: 767px) and (orientation: landscape) {
    .hero-slider-section {
        padding: 10px 0;
    }

    #hero-slider .slide-inner img {
        height: 200px;
    }

    .about-hero,
    .terms-hero,
    .privacy-hero,
    .return-hero {
        padding: 40px 0 30px;
    }
}

/*==============================================
    PRINT STYLES
================================================*/

@media print {
    .header-topbar,
    .mobile-menu-btn,
    .cart-button,
    .scroll-top,
    .footer-main,
    .newsletter-box {
        display: none !important;
    }

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

    a {
        text-decoration: underline;
    }

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

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

    .container {
        width: 100%;
        max-width: 100%;
    }
}
