/* Mobile Responsive Fixes - Add to end of styles.css */

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    .site-header {
        padding: 0.75rem 0;
    }

    .header-inner {
        gap: 0.5rem;
    }

    .header-inner .brand {
        flex-shrink: 1;
        min-width: 0;
        max-width: calc(100% - 60px);
    }

    .brand-logo {
        height: 40px;
    }

    .brand-text {
        min-width: 0;
        overflow: hidden;
    }

    .brand-name {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .brand-tagline {
        font-size: 0.6rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .nav {
        display: flex;
        justify-content: flex-end;
    }

    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1300;
        margin-left: auto;
    }

    /* Nav links — full-width tap targets in the slide-in panel */
    .nav-list>li>a:not(.btn) {
        display: block;
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 10px;
        font-size: 1rem;
        white-space: normal;
    }

    /* Remove the desktop underline ::after — looks wrong in the panel */
    .nav-list>li>a:not(.btn)::after {
        display: none;
    }

    /* Active page link — blue pill highlight */
    .nav-list>li>a:not(.btn).active,
    .dropdown-menu>li>a.active {
        background: rgba(15, 78, 152, 0.08);
        color: var(--tory-blue);
        font-weight: 700;
    }

    /* Hover state for links in mobile nav */
    .nav-list>li>a:not(.btn):hover,
    .dropdown-menu>li>a:hover {
        background: rgba(15, 78, 152, 0.06);
        color: var(--tory-blue);
    }

    /* Make sure each list item takes full width and stacks its dropdown vertically */
    .nav-list>li {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    /* Dropdown parent link in mobile nav */
    .nav-dropdown>a {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 10px;
    }

    /* Hide the dynamically injected backdrop on mobile because nav is full-width */
    .nav-backdrop {
        display: none !important;
    }

    .hero {
        padding-top: 7rem;
    }

    .split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .split-layout.reverse {
        direction: ltr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    /* Mobile dropdown styles - Reset desktop properties fully */
    .nav-dropdown>a .dropdown-arrow {
        font-size: 0.55rem;
    }

    .dropdown-menu {
        position: static !important;
        transform: none !important;
        background: rgba(0, 0, 0, 0.03) !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        border-radius: 10px;
        padding: 0.25rem 0;
        margin-top: 0.5rem;
        min-width: 0 !important;
        left: auto !important;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }

    /* Cancel any desktop hover leaks on mobile by resetting hover state to hidden */
    .nav-dropdown:hover .dropdown-menu {
        transform: none !important;
        box-shadow: none !important;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
    }

    /* But DO show it if it has the .open class, taking precedence over hover */
    .nav-dropdown.open .dropdown-menu,
    .nav-dropdown.open:hover .dropdown-menu {
        max-height: 300px;
        opacity: 1;
        visibility: visible;
    }

    .nav-dropdown.open>a .dropdown-arrow {
        transform: rotate(180deg);
    }

    .dropdown-menu li a {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    .dropdown-menu li a .dropdown-icon {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .container {
        width: 95%;
    }

    .site-header {
        padding: 0.6rem 0;
    }

    .brand-logo {
        height: 36px;
    }

    .brand-name {
        font-size: 0.95rem;
    }

    .brand-tagline {
        font-size: 0.5rem;
        letter-spacing: 0;
    }

    .nav-toggle .bar {
        width: 24px;
        height: 2.5px;
    }

    .hero {
        padding-top: 6rem;
        min-height: 85vh;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .trust-bar {
        margin-top: -40px;
        margin-bottom: 2rem;
    }

    .trust-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1rem;
    }

    .trust-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .section {
        padding: 3rem 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .cta-box {
        padding: 2.5rem 1.5rem;
    }

    .cta-box h2 {
        font-size: 1.8rem;
    }

    .cta-box p {
        font-size: 1rem;
    }

    .site-footer .container {
        grid-template-columns: 1fr;
    }

    .wa-fab {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }

    .wa-icon {
        width: 26px;
        height: 26px;
    }
}