/* ============================================================
   CUSTOM RESPONSIVE FIXES
   Loaded last — overrides theme defaults where needed
   ============================================================ */

/* Hide colorbox title bar */
#cboxTitle { display: none !important; }

/* ----------------------------------------------------------
   1. GLOBAL — prevent horizontal scrollbar on all viewports
   ---------------------------------------------------------- */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Ensure every element respects the viewport box */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* All images are fluid by default */
img {
    max-width: 100%;
    height: auto;
}

/* Embedded iframes (YouTube, etc.) */
iframe {
    max-width: 100%;
}

/* ----------------------------------------------------------
   2. FOOTER — latest-post thumbnail responsive layout
   ---------------------------------------------------------- */
.recent-blog-footer ul li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.recent-blog-footer .thum {
    flex-shrink: 0;
    width: 80px;
    min-width: 80px;
}

.recent-blog-footer .thum img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.recent-blog-footer .text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    text-align: left !important;
}

.recent-blog-footer .text a {
    text-align: left !important;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer copyright centre on small screens */
@media (max-width: 767px) {
    .copyright-wrap .copy-text {
        text-align: center;
        margin-bottom: 8px;
    }

    .copyright-wrap .col-lg-6:last-child {
        text-align: center !important;
    }
}

/* ----------------------------------------------------------
   3. TABLES — horizontal scroll instead of layout break
   ---------------------------------------------------------- */
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* ----------------------------------------------------------
   4. TABLET (768 – 991 px) fixes
   ---------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 991px) {
    /* Progress bar width — was hardcoded 330 px */
    .progress {
        width: 100% !important;
    }

    /* Booking form inputs */
    .booking-area input,
    .booking-area .custom-select {
        width: 100% !important;
    }

    /* Section headings */
    .section-title h2 {
        font-size: 34px;
    }

    /* Make sure nav-admin-icon wraps properly */
    .nav-admin-icon .row {
        flex-wrap: wrap;
    }
}

/* ----------------------------------------------------------
   5. MOBILE (≤ 767 px) fixes
   ---------------------------------------------------------- */
@media (max-width: 767px) {

    /* Blog meta list — was 130%, causing horizontal scroll */
    .bsingle__content .meta-info ul {
        width: 100% !important;
        flex-wrap: wrap;
        overflow: hidden;
    }

    /* Search form control — was 140%, causing overflow */
    .search-icon .form-control {
        width: 100% !important;
    }

    /* Progress bar */
    .progress {
        width: 100% !important;
    }

    /* Truncate helper — use max-width, not fixed width */
    .truncate {
        max-width: 100% !important;
        width: auto !important;
    }

    /* Booking area inputs */
    .booking-area input,
    .booking-area .custom-select {
        width: 100% !important;
    }

    /* Service icon width */
    .service-details-three .services-box07 .sr-contner .icon {
        width: 100% !important;
        max-width: 260px;
    }

    /* Appointment buttons — remove hardcoded left margin */
    .appoint-btns {
        margin-left: 0 !important;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Side-by-side icon + text rows */
    .sr-tw-ul li .icon,
    .sr-tw-ul li .icon-right {
        width: 100% !important;
        max-width: 150px;
    }

    /* Cart coupon button */
    .cart-total .coupon-apply .btn-primary {
        position: relative !important;
        right: auto !important;
        margin-top: 8px;
        width: 100%;
    }

    /* Affiliate input */
    .input-group.affiliate-input {
        left: 0 !important;
        width: 100% !important;
    }

    /* Course category badge */
    .courses-content .cat {
        position: absolute;
        top: -10px;
        right: 5px;
        padding: 4px 8px;
        font-size: 11px;
        white-space: nowrap;
    }

    /* Section title responsive */
    .section-title h2 {
        font-size: 30px;
    }

    /* Slider heading on mobile */
    .slider-content h2 {
        font-size: 32px;
    }

    /* Countdown deal */
    .countdown-deal ul li {
        font-size: 18px;
        padding: 10px 6px;
    }
}

/* ----------------------------------------------------------
   6. SMALL MOBILE (≤ 480 px)
   ---------------------------------------------------------- */
@media (max-width: 480px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .footer-widget {
        padding-left: 0;
        padding-right: 0;
    }

    .breadcrumb-area {
        min-height: 180px !important;
    }

    .section-title h2 {
        font-size: 26px !important;
    }

    .slider-content h2 {
        font-size: 26px !important;
    }

    .courses-img img {
        width: 100%;
        height: 180px;
        object-fit: cover;
    }

    /* Touch-friendly minimum button size */
    .btn {
        min-height: 44px;
        line-height: 1.4;
    }

    .footer-social a,
    .header-social a {
        padding: 6px;
        display: inline-block;
    }

    .mobile-bottom-bar {
        padding: 12px 8px;
        right: 8px;
        left: 8px;
    }

    .mobile-bottom-bar .col {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ----------------------------------------------------------
   7. VERY SMALL (≤ 360 px)
   ---------------------------------------------------------- */
@media (max-width: 360px) {
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .section-title h2 {
        font-size: 22px !important;
    }

    .slider-content h2 {
        font-size: 22px !important;
    }

    .countdown-deal ul li {
        font-size: 14px !important;
        padding: 8px 4px !important;
        margin-right: 3px !important;
    }

    .mobile-bottom-menu svg.feather {
        width: 20px !important;
        height: 20px !important;
    }

    .breadcrumb-area {
        min-height: 140px !important;
    }

    .btn.ss-btn {
        padding: 14px 10px;
        font-size: 13px;
    }
}

/* ----------------------------------------------------------
   8. RESPONSIVE VIDEO EMBEDS
   ---------------------------------------------------------- */
.video-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.video-wrap iframe,
.video-wrap video {
    max-width: 100%;
}

/* ----------------------------------------------------------
   9. QUILL EDITOR — responsive in forms
   ---------------------------------------------------------- */
.ql-container {
    min-height: 120px;
}

@media (max-width: 767px) {
    .ql-toolbar.ql-snow {
        flex-wrap: wrap;
    }
}

/* ----------------------------------------------------------
   10. ADA / WCAG COMPLIANCE
   ---------------------------------------------------------- */
/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 100000;
    font-size: 14px;
    text-decoration: none;
    transition: top 0.3s;
}
.skip-to-content:focus {
    top: 0;
}

/* Focus outlines for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 2px solid #4A90D9 !important;
    outline-offset: 2px;
}

/* Ensure minimum touch target size (44x44px) */
a.btn,
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.nav-link,
.page-link {
    min-height: 44px;
    min-width: 44px;
}

/* Ensure sufficient color contrast for form labels */
label,
.form-label {
    font-weight: 500;
}

/* Screen reader only class */
.sr-only,
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Password toggle button styles */
.pwd-toggle-wrap {
    position: relative;
    display: block;
    width: 100%;
}
.pwd-toggle-wrap input {
    padding-right: 40px !important;
}
.pwd-toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    z-index: 3;
    padding: 4px;
    line-height: 1;
}
.pwd-toggle-btn:hover {
    color: #333;
}
