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

/* Ensure no horizontal overflow */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

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

/* Large Devices (< 1200px) */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium Devices (< 992px) — Tablets & Mobile App Mode */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    /* ── HIDE SITE-HEADER & TOP BAR ON MOBILE (nav bar becomes the header) ── */
    .site-header {
        display: none !important;
    }

    .top-bar {
        display: none;
    }

    /* ── COMPACT APP-LIKE NAV BAR (56px — Material Design standard) ── */
    .main-navigation {
        position: sticky;
        top: 0;
        z-index: 999;
        background: var(--secondary);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .main-navigation .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 56px;
        padding: 0 12px;
    }

    /* ── HAMBURGER BUTTON — left side ── */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1101;
        background: transparent;
        color: var(--white);
        border: none;
        border-radius: 6px;
        width: 40px;
        height: 40px;
        font-size: 22px;
        cursor: pointer;
        transition: all 0.2s ease;
        order: 1;
        flex-shrink: 0;
    }

    .menu-toggle:active {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(0.92);
    }

    /* ── HIDE GET A QUOTE ON MOBILE (bottom nav has Contact) ── */
    .nav-cta {
        display: none !important;
    }

    /* ── MOBILE LOGO IN NAV BAR ── */
    .nav-mobile-logo {
        order: 2;
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .nav-mobile-logo a {
        display: flex;
        align-items: center;
    }

    .nav-mobile-logo img {
        max-height: 36px;
        width: auto;
    }

    /* ── HIDE DESKTOP MENU ON MOBILE (sidebar is handled by mobile-sidebar.css) ── */
    .nav-menu,
    .nav-cta {
        display: none !important;
    }

    /* ── MOBILE BOTTOM NAVIGATION BAR ── */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--white);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
        border-top: 1px solid var(--border);
        padding: 6px 0;
        padding-bottom: max(6px, env(safe-area-inset-bottom));
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 6px 4px;
        text-decoration: none;
        color: var(--gray);
        font-size: 10px;
        font-weight: 500;
        transition: color 0.2s;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-item i {
        font-size: 18px;
    }

    .bottom-nav-item:active {
        color: var(--primary);
        transform: scale(0.92);
    }

    .bottom-nav-item.bottom-nav-cta {
        position: relative;
    }

    .bottom-nav-item.bottom-nav-cta i {
        background: var(--primary);
        color: var(--white);
        width: 42px;
        height: 42px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        margin-top: -16px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    /* Add body padding for bottom nav */
    body {
        padding-bottom: 70px;
    }

    /* Move WhatsApp floating widget above bottom nav */
    .whatsapp-widget {
        bottom: 85px;
    }

    /* ── MOBILE CONTACT INFO STRIP ── */
    .mobile-contact-strip {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        background: var(--dark-alt, #1a1a2e);
        padding: 6px 12px;
        flex-wrap: wrap;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.85);
    }

    .mobile-contact-strip a {
        color: rgba(255, 255, 255, 0.85);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
    }

    .mobile-contact-strip a:hover {
        color: var(--primary);
    }

    .mobile-contact-strip i {
        font-size: 12px;
        color: var(--primary);
    }

    .mobile-contact-strip .contact-divider {
        width: 1px;
        height: 14px;
        background: rgba(255, 255, 255, 0.2);
    }

    /* ── HERO ── */

    .hero-content h1 {
        font-size: 30px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .hero-content {
        padding-left: 30px;
    }

    /* ── SERVICES ── */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .service-card-thumb {
        height: 150px;
    }

    /* ── ABOUT ── */
    .about-section .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .about-image {
        margin-top: 30px;
    }

    /* ── BLOG ── */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ── SERVICE LAYOUT ── */
    .service-layout {
        grid-template-columns: 1fr;
    }

    .service-layout .service-sidebar {
        order: 2;
    }

    .service-layout .service-main-content {
        order: 1;
    }

    /* ── GRID COLUMNS ── */
    .col-3,
    .col-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-8,
    .col-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* ── RELATED SERVICES ── */
    .related-services-grid {
        grid-template-columns: 1fr;
    }

    /* ── RAC TABLE ── */
    .page-content table.rac-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ── TESTIMONIALS ── */
    .testimonial-item {
        flex-direction: column;
        text-align: center;
    }

    .testimonial-item .author-photo {
        margin: 0 auto 15px;
    }
}

/* Small Devices (< 768px) — Phones */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    /* ── TOP BAR (already hidden via 992px rule, but keep fallback) ── */
    .top-bar .container {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    .top-bar-text {
        font-size: 11px;
        line-height: 1.4;
    }

    .top-bar-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .top-bar-links a {
        font-size: 11px;
    }

    /* ── HEADER ── */
    .site-header .container {
        flex-direction: column;
        gap: 8px;
        padding: 10px 15px;
    }

    .site-header .site-logo {
        text-align: center;
    }

    .site-header .site-logo img {
        max-height: 50px;
        width: auto;
    }

    .header-contact {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .header-contact-item {
        font-size: 11px;
        gap: 6px;
    }

    .header-contact-item .label {
        display: none;
    }

    .header-contact-item .value {
        font-size: 11px;
    }

    .header-contact-item i {
        font-size: 14px;
        width: 30px;
        height: 30px;
        min-width: 30px;
    }

    /* ── NAVIGATION ── */
    .primary-nav,
    .main-navigation {
        position: relative;
    }

    .primary-nav .container,
    .main-navigation .container {
        padding: 0 15px;
    }

    .menu-toggle {
        padding: 8px 14px;
        font-size: 20px;
    }

    .nav-menu li a {
        padding: 12px 16px;
        font-size: 14px;
    }

    .nav-cta {
        padding: 8px 16px;
    }

    .nav-cta a {
        padding: 10px 20px;
        font-size: 12px;
    }

    /* ── HERO SLIDER ── */

    .hero-content {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 20px;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 12px;
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .hero-buttons .btn {
        display: block;
        text-align: center;
        padding: 10px 16px;
        font-size: 12px;
    }

    .hero-slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .hero-slider-arrow.prev {
        left: 5px;
    }

    .hero-slider-arrow.next {
        right: 5px;
    }

    /* ── SECTION HEADINGS ── */
    .section-heading h2 {
        font-size: 20px;
    }

    .section-heading p {
        font-size: 13px;
    }

    .section {
        padding: 35px 0;
    }

    /* ── SERVICE CARDS ── */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .service-card-with-image {
        flex-direction: row;
        border-radius: var(--radius-md);
    }

    .service-card-with-image .service-card-thumb {
        width: 120px;
        min-width: 120px;
        height: auto;
        min-height: 110px;
        border-radius: var(--radius-md) 0 0 var(--radius-md);
    }

    .service-card-with-image .service-card-body {
        padding: 12px 14px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .service-card-with-image .service-card-body h3 {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .service-card-with-image .service-card-body p {
        font-size: 12px;
        margin-bottom: 5px;
        line-height: 1.4;
    }

    .service-card-with-image .service-card-body .read-more {
        font-size: 11px;
    }

    .service-card-thumb {
        height: 160px;
    }

    .service-card:not(.service-card-with-image) {
        padding: 15px;
        gap: 12px;
    }

    .service-card-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 18px;
    }

    /* ── ABOUT SECTION ── */
    .about-content {
        padding: 0;
    }

    .about-content h2 {
        font-size: 20px;
    }

    .about-section .about-content p {
        font-size: 13px;
        line-height: 1.6;
    }

    .about-image img {
        border-radius: var(--radius-md);
    }

    /* ── TESTIMONIALS ── */
    .testimonials-slider {
        max-width: 100%;
        padding: 0 10px;
    }

    .testimonial-item.active {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .testimonial-item .author-photo {
        width: 65px;
        height: 65px;
        min-width: 65px;
        margin: 0 auto;
    }

    .testimonial-item blockquote {
        font-size: 13px;
        line-height: 1.6;
    }

    .testimonial-item .author {
        font-size: 14px;
    }

    .testimonial-item .author span {
        font-size: 12px;
    }

    .testimonial-card {
        padding: 20px;
    }

    .testimonial-card .author-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .testimonial-card .author-photo {
        margin: 0 auto;
    }

    /* ── CALLBACK / FORM ── */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group {
        width: 100% !important;
        flex: 0 0 100%;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        min-height: 44px;
    }

    .btn {
        min-height: 44px;
        padding: 10px 20px;
        font-size: 14px;
    }

    /* ── BLOG ── */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .blog-card-image {
        height: 160px;
    }

    .blog-date-badge {
        font-size: 12px;
        padding: 5px 8px;
    }

    .blog-card-content {
        padding: 12px 14px;
    }

    .blog-card-content h3 {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .blog-card-content h3 a {
        line-height: 1.3;
    }

    .blog-card-content p {
        font-size: 12px;
        line-height: 1.5;
    }

    /* ── FOOTER ── */
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .site-footer {
        padding: 30px 0 0;
    }

    .footer-column {
        text-align: center;
    }

    .footer-column h3 {
        font-size: 16px;
    }

    .footer-column p,
    .footer-column li {
        font-size: 13px;
    }

    .footer-column ul {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 15px 0;
    }

    .footer-bottom p {
        font-size: 11px;
    }

    /* ── BREADCRUMB ── */
    .breadcrumb-section {
        padding: 20px 0;
    }

    .breadcrumb-section h1 {
        font-size: 18px;
    }

    .breadcrumb-trail {
        font-size: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* ── CTA BANNER ── */
    .cta-banner h2 {
        font-size: 20px;
    }

    .cta-banner p {
        font-size: 13px;
    }

    .cta-banner {
        padding: 30px 0;
    }

    /* ── TABLES ── */
    .fee-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fee-table thead th,
    .fee-table tbody td {
        font-size: 12px;
        padding: 10px 12px;
        white-space: nowrap;
    }

    /* ── GRID COLUMNS ── */
    .col-3,
    .col-4,
    .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* ── CONTACT PAGE ── */
    .contact-info-card {
        margin-bottom: 12px;
    }

    .contact-info-card h4 {
        font-size: 14px;
    }

    .contact-info-card p {
        font-size: 12px;
    }

    .map-container iframe {
        height: 250px;
    }

    .office-address {
        padding: 12px;
    }

    .office-address h4 {
        font-size: 14px;
    }

    .office-address p {
        font-size: 12px;
    }

    /* ── CAREER PAGE ── */
    .career-why-work {
        flex-direction: column;
    }

    .career-why-work>* {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* ── RELATED SERVICES ── */
    .related-services-section {
        margin-top: 20px;
        padding-top: 15px;
    }

    .related-services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .related-service-image {
        height: 130px;
    }

    /* ── SIDEBAR ── */
    .sidebar-service-menu {
        margin-bottom: 15px;
    }

    .sidebar-service-menu ul li a {
        padding: 10px 14px;
        font-size: 13px;
    }

    .sidebar-contact {
        padding: 15px;
        margin-top: 15px;
    }

    /* ── SERVICE PAGE CONTENT ── */
    .page-content h2 {
        font-size: 20px;
    }

    .page-content h3 {
        font-size: 16px;
    }

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

    .page-content p {
        font-size: 14px;
        line-height: 1.7;
    }

    /* RAC table mobile */
    .page-content table.rac-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .page-content table.rac-table thead th {
        font-size: 12px;
        padding: 10px 12px;
    }

    .page-content table.rac-table tbody td {
        font-size: 11px;
        padding: 8px 12px;
        min-width: 150px;
    }

    .page-content table.rac-table tbody td:last-child {
        min-width: 250px;
    }

    /* Accordion */
    .accordion-header {
        padding: 12px 16px;
        font-size: 14px;
    }

    .accordion-body.open {
        padding: 12px 16px;
    }

    /* Google reviews */
    .google-reviews {
        padding: 15px;
    }

    .google-reviews h2 {
        font-size: 18px;
    }
}

/* Extra Small Devices (< 576px) — Small Phones */
@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }

    /* Top bar — hide on very small screens to save space */
    .top-bar {
        padding: 3px 0;
    }

    .top-bar-text {
        font-size: 10px;
    }

    .top-bar-links a {
        font-size: 10px;
    }

    /* Header — compact logo + icon-only contacts */
    .site-header .site-logo img {
        max-height: 42px;
    }

    .header-contact {
        gap: 6px;
    }

    .header-contact-item {
        font-size: 10px;
    }

    .header-contact-item i {
        font-size: 14px;
        width: 26px;
        height: 26px;
        min-width: 26px;
    }

    .header-contact-item .value {
        font-size: 10px;
    }

    /* Hero */

    .hero-content {
        padding: 0 12px;
    }

    .hero-content h1 {
        font-size: 16px;
    }

    .hero-slider-arrow {
        display: none;
    }

    .hero-slider-dots {
        bottom: 6px;
    }

    .hero-slider-dot {
        width: 8px;
        height: 8px;
    }

    /* Section */
    .section {
        padding: 25px 0;
    }

    .section-heading h2 {
        font-size: 18px;
    }

    .section-heading p {
        font-size: 12px;
    }

    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    /* Service cards — side-by-side compact */
    .service-card-with-image {
        flex-direction: row;
    }

    .service-card-with-image .service-card-thumb {
        width: 90px;
        min-width: 90px;
        min-height: 90px;
    }

    .service-card-with-image .service-card-body {
        padding: 10px 12px;
    }

    .service-card-with-image .service-card-body h3 {
        font-size: 13px;
        margin-bottom: 3px;
    }

    .service-card-with-image .service-card-body p {
        font-size: 11px;
        line-height: 1.3;
        margin-bottom: 4px;
    }

    .service-card-with-image .service-card-body .read-more {
        font-size: 10px;
    }

    .service-card-thumb {
        height: 110px;
    }

    .service-card-body h3 {
        font-size: 14px;
    }

    .service-card-body p {
        font-size: 12px;
    }

    /* Blog cards */
    .blog-card-image {
        height: 140px;
    }

    .blog-card-content h3 {
        font-size: 14px;
    }

    .blog-card-content p {
        font-size: 11px;
    }

    /* WhatsApp widget — above bottom nav */
    .whatsapp-widget {
        width: 42px;
        height: 42px;
        bottom: 80px;
        left: 12px;
    }

    .whatsapp-widget i {
        font-size: 20px;
    }

    /* Footer */
    .footer-column p,
    .footer-column li a {
        font-size: 12px;
    }

    .footer-bottom p {
        font-size: 10px;
    }

    /* Related services */
    .related-service-image {
        height: 110px;
    }

    .related-service-content {
        padding: 12px;
    }

    .related-service-content h4 {
        font-size: 14px;
    }

    /* RAC table very small */
    .page-content table.rac-table tbody td {
        font-size: 10px;
        padding: 6px 8px;
        line-height: 1.5;
    }

    .page-content table.rac-table thead th {
        font-size: 11px;
        padding: 8px 10px;
    }

    /* Fee table */
    .fee-table thead th,
    .fee-table tbody td {
        font-size: 11px;
        padding: 8px 10px;
    }

    /* Contact page */
    .map-container iframe {
        height: 200px;
    }

    /* Breadcrumb */
    .breadcrumb-section {
        padding: 15px 0;
    }

    .breadcrumb-section h1 {
        font-size: 16px;
    }

    /* Testimonials */
    .testimonial-item .author-photo {
        width: 55px;
        height: 55px;
        min-width: 55px;
    }

    .testimonial-item blockquote {
        font-size: 12px;
    }
}

/* iPhone landscape specific */
@media (max-width: 812px) and (orientation: landscape) {
    .hero-slider {
        aspect-ratio: 1920 / 800;
    }

    .hero-content h1 {
        font-size: 18px;
    }

    .hero-content p {
        display: none;
    }
}

/* Touch targets — minimum 44px for interactive elements */
@media (pointer: coarse) {

    a,
    button,
    .btn,
    .menu-toggle,
    .accordion-header,
    .sidebar-service-menu ul li a,
    .nav-menu li a {
        min-height: 44px;
    }
}

/* MEA Type Buttons responsive */
@media (max-width: 768px) {
    .mea-type-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .mea-type-buttons .btn {
        width: 100%;
        min-width: unset;
    }
}