/* ============================================================
   Ora Dental — Mobile Responsive CSS
   Clean, consolidated, no conflicts
   ============================================================ */

/* ── Global overflow lock ─────────────────────────────────── */
html {
    overflow-x: hidden;
}
body {
    overflow-x: clip; /* clip instead of hidden — sticky still works */
    max-width: 100%;
}

/* ── Topbar: hide on mobile ───────────────────────────────── */
@media (max-width: 991px) {
    .topbar { display: none !important; }
}

/* ── Header ───────────────────────────────────────────────── */
@media (max-width: 767px) {
    :root {
        --header-h: 64px;
        --topbar-h: 0px;
    }
    .main-header { height: 64px; }
    .navbar-custom {
        height: 64px;
        gap: 8px;
        overflow: hidden;
    }
    .logo-img     { height: 50px; }
    .logo-tagline { display: none; }
    .logo-name    { font-size: .95rem; }
    .nav-menu     { display: none; }
    .hamburger    { display: flex; }

    /* Compact book appointment button — ONLY in header */
    .header-actions .btn-appointment {
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center !important;
        flex-shrink: 0;
        box-shadow: none;
    }
    .header-actions .btn-appt-text { display: none !important; }
    .header-actions .btn-appointment i { margin: 0 !important; }

    .btn-whatsapp { display: none !important; }
    .header-actions { gap: 6px; flex-shrink: 0; }
}

@media (max-width: 360px) {
    .logo-name { font-size: .85rem; }
    .logo-img  { height: 55px; }
}

/* ── Hero Section ─────────────────────────────────────────── */
@media (max-width: 991px) {
    .hero-image-wrap,
    .hero-info-card { display: none !important; }

    .hero-floating-card { display: none !important; }

    .hero-content {
        max-width: 100%;
        text-align: center;
        padding: 0;
    }
    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }
    .hero-stats {
        justify-content: center;
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .hero-section {
        min-height: 560px;
    }
    .hero-slide {
        min-height: 560px;
    }
    .min-vh-hero {
        min-height: 560px;
        padding: 48px 0 80px;
    }
    .hero-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        word-break: break-word;
    }
    .hero-desc {
        font-size: .9rem;
        margin-bottom: 24px;
    }
    .hero-actions a {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    .hero-slide-counter { display: none; }
    .hero-swiper-controls {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        gap: 16px;
        justify-content: center;
        width: auto;
        min-width: 220px;
    }
    .hero-prev, .hero-next {
        /* Keep comfortable size on mobile — not compressed */
        width: 48px;
        height: 48px;
        font-size: 1rem;
        border-width: 2px;
        flex-shrink: 0;
    }
}

/* ── Sections ──────────────────────────────────────────────── */
@media (max-width: 767px) {
    .section-pad    { padding: 48px 0; }
    .section-pad-sm { padding: 32px 0; }
    .section-header { margin-bottom: 32px; }
    .section-title  { font-size: clamp(1.4rem, 5vw, 1.9rem); }
    .section-subtitle { font-size: .9rem; }
}

/* ── About Section ────────────────────────────────────────── */
@media (max-width: 991px) {
    .about-content   { padding-left: 0; margin-top: 28px; }
    .about-img-main img { height: 360px; }
    .about-experience-badge {
        right: 12px;
        bottom: -12px;
        padding: 14px 18px;
    }
    .about-experience-badge .exp-number { font-size: 2rem; }
}

/* ── Stats Section ────────────────────────────────────────── */
@media (max-width: 575px) {
    .stat-card    { padding: 20px 10px; }
    .stat-number  { font-size: 2rem; }
    .stat-label   { font-size: .78rem; }
    .stat-icon    { width: 48px; height: 48px; font-size: 1.2rem; }
}

/* ── Cards ─────────────────────────────────────────────────── */
@media (max-width: 575px) {
    .dept-card,
    .doctor-card,
    .blog-card,
    .why-card,
    .testimonial-card {
        overflow: hidden;
        max-width: 100%;
    }
    .dept-card-img  { height: 180px; min-height: 180px; }
    .doctor-card-img { height: 240px; min-height: 240px; }
    .blog-card-img  { height: 200px; min-height: 200px; }
}

/* ── Swiper Controls ───────────────────────────────────────── */
@media (max-width: 767px) {
    .gallery-swiper-wrap { padding: 0; }
    .gallery-prev, .gallery-next { display: none !important; }

    .doctors-swiper-controls {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    .swiper-nav-btns { order: 2; }
}

/* ── Appointment Section ───────────────────────────────────── */
@media (max-width: 767px) {
    .appointment-section::before { display: none; }
    .appointment-form-card { padding: 24px 16px; }
}

/* ── Contact ──────────────────────────────────────────────── */
@media (max-width: 767px) {
    .contact-info-card { padding: 16px 14px; gap: 12px; }
    .map-container iframe { height: 260px; }
}

/* ── Gallery page ─────────────────────────────────────────── */
@media (max-width: 767px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .gallery-filter { gap: 6px; }
    .gallery-filter-btn { padding: 6px 14px; font-size: .78rem; }
}
@media (max-width: 400px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}

/* ── Footer ───────────────────────────────────────────────── */
@media (max-width: 767px) {
    .footer-top { padding: 40px 0 28px; }
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .footer-bottom-links { justify-content: center; }
}

/* ── Page Hero Banner ─────────────────────────────────────── */
@media (max-width: 767px) {
    .page-hero { padding: 36px 0 28px; }
    .page-hero-title { font-size: 1.6rem; }
    .page-hero-subtitle { font-size: .9rem; }
}

/* ── Blog page ────────────────────────────────────────────── */
@media (max-width: 767px) {
    .blog-meta { flex-wrap: wrap; gap: 8px; }
}

/* ── Testimonials Controls ─────────────────────────────────── */
.testimonials-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

/* ── Doctors Controls ──────────────────────────────────────── */
.doctors-swiper-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
    flex-wrap: wrap;
    gap: 16px;
}
.swiper-nav-btns {
    display: flex;
    gap: 10px;
}
.swiper-nav-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--white);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    color: var(--text);
    font-size: .9rem;
}
.swiper-nav-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ── Admin Panel ───────────────────────────────────────────── */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
        z-index: 200;
        transition: transform .3s ease;
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-topbar { left: 0; width: 100%; }
    .admin-content { margin-left: 0; width: 100%; }
}
@media (max-width: 767px) {
    .admin-content-inner { padding: 16px; }
    .admin-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-card { padding: 16px; }
    .dash-card-number { font-size: 1.6rem; }
}
@media (max-width: 480px) {
    .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ── Prevent any element from causing horizontal scroll ─────── */
.hero-swiper,
.testimonials-swiper,
.doctors-swiper,
.gallery-swiper {
    overflow: hidden !important;
}

/* ── Bootstrap row gutter fix on small screens ─────────────── */
@media (max-width: 575px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}


/* ── Footer — fix button and text overflow ───────────────────── */
.footer-widget .btn-appointment {
    width: auto;
    max-width: 100%;
    border-radius: 50px !important;
    padding: 12px 24px !important;
    height: auto !important;
    font-size: .88rem;
    justify-content: center;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

/* Footer contact info — prevent text overflow */
.footer-contact span,
.footer-contact a {
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 767px) {
    .footer-widget .btn-appointment {
        width: 100%;
    }
}
