/* ---- TABLET (768 - 991px) ---- */
@media (max-width: 991px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .nav-toolbar { display: none; }

    .hero-right { display: none; }
    .hero-left { max-width: 100%; }

    /* Blog intro */
    .blog-intro-grid {
        flex-direction: column;
    }
    .blog-intro-right {
        width: 100%;
        height: 280px;
    }

    /* Topics */
    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Recommended */
    .recommended-grid {
        flex-direction: column;
    }
    .rec-card-stack {
        width: 100%;
        flex-direction: row;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
    .junction-btn {
        width: 70px;
        height: 70px;
    }
    .junction-btn svg {
        width: 10px;
        height: 10px;
    }
    .about-card {
        min-height: 350px;
        flex-direction: column-reverse;
    }
    .about-card-img {
        width: 100%;
        height: 250px;
    }

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

    .post-layout {
        flex-direction: column;
    }

    .footer-main {
        flex-direction: column;
        gap: 2rem;
    }

    /* About page */
    .about-bio-grid {
        flex-direction: column;
    }
    .about-bio-photo {
        flex: none;
        height: 350px;
    }
    .about-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    .about-callout {
        gap: 2rem;
    }
    .about-focus-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Services page */
    .services-table {
        flex-direction: column;
    }
    .services-table-left {
        flex: none;
        width: 100%;
    }
    .services-table-right {
        width: 100%;
    }
    .services-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact page */
    .contact-form-grid {
        flex-direction: column;
        gap: 2.5rem;
    }
    .contact-form-left {
        flex: none;
        width: 100%;
    }
    .contact-form-right {
        width: 100%;
    }
    .contact-form-row {
        flex-direction: column;
    }
    .form-input,
    .form-textarea {
        width: 100%;
    }

    /* Emergency page */
    .emergency-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Notfall carousel split */
    .notfall-carousel-split {
        flex-direction: column;
    }
}

/* ---- MOBILE LANDSCAPE (480 - 767px) ---- */
@media (max-width: 767px) {
    .navbar.menu-open {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .container, .nav-container, .container-md {
        padding: 0 1.25rem;
    }

    .hero {
        height: 80vh;
        min-height: 500px;
    }

    .cms-carousel-img {
        height: 200px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .carousel-card {
        flex: 0 0 280px;
    }

    .post-author > div {
        text-align: left;
    }
    .post-meta-info {
        justify-content: flex-start;
    }

    .post-images {
        flex-direction: column;
    }
    .post-images img {
        height: 200px;
    }

    .inner-hero {
        min-height: 280px;
    }

    .dark-text-content {
        position: relative;
        z-index: 1;
    }
    .dark-text-deco {
        position: absolute;
        left: 1.25rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 3;
        pointer-events: none;
    }
    .dark-text-circles { display: none; }
    .dark-text-star {
        width: 60px !important;
        height: 60px !important;
        opacity: 0.15;
    }

    .about-wave-divider .wave-desktop { display: none; }
    .about-wave-divider .wave-mobile { display: block; }
    .about-wave-divider svg { height: 80px; }
    .about-wave-divider {
        margin-top: -48px;
        position: relative;
        z-index: 2;
        background: var(--bg-light);
    }
    .about-wave-junction { top: 6px; }
    .junction-btn { width: 60px; height: 60px; }
    .junction-btn svg { width: 9px; height: 9px; }

    .hero,
    .inner-hero,
    .content-block,
    .about-wave-divider,
    .about-section,
    .carousel-section,
    .dark-text-section,
    .about-bio-section,
    .about-timeline-section,
    .about-focus-section,
    .about-stats-section,
    .about-callout-section,
    .services-table-section,
    .services-cards-section,
    .contact-bento-section,
    .emergency-section,
    .emergency-bento-section,
    .faq-section,
    .contact-form-section,
    .blog-section,
    .post-section,
    .related-section,
    .comments-section,
    .footer-wrap {
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
    }

    .hero,
    .inner-hero,
    .content-block,
    .about-wave-divider,
    .about-bio-section,
    .about-timeline-section,
    .about-focus-section,
    .about-stats-section,
    .about-callout-section,
    .carousel-section,
    .dark-text-section,
    .emergency-section,
    .emergency-bento-section,
    .blog-section,
    .post-section,
    .related-section,
    .comments-section,
    .services-table-section,
    .services-cards-section,
    .contact-bento-section,
    .contact-form-section,
    .faq-section,
    .footer-wrap {
        margin-top: 0;
        margin-bottom: 0;
    }

    .about-section {
        margin: -30px 20px 0;
        background: transparent;
        overflow: visible;
        box-shadow: none;
    }

    .about-card--active {
        box-shadow: none;
    }

    .footer {
        background: var(--text-white);
    }

    .footer-wrap {
        padding: 2rem 1.25rem;
        border-radius: 0;
    }

    /* Hero content lower on mobile */
    .hero-content {
        align-items: flex-end;
        padding-bottom: 3rem;
    }

    /* Blog intro */
    .blog-intro-grid {
        flex-direction: column;
        gap: 2rem;
    }
    .blog-intro-right {
        width: 100%;
        height: 240px;
    }
    .blog-intro-title {
        font-size: var(--h3);
    }

    /* Topics */
    .topics-grid {
        grid-template-columns: 1fr;
    }

    /* Recommended */
    .recommended-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .recommended-grid {
        flex-direction: column;
    }
    .rec-card-stack {
        width: 100%;
        flex-direction: column;
    }
    .rec-card-featured .rec-card-img {
        height: 220px;
        min-height: unset;
        flex: none;
    }
    .rec-card-featured .rec-card-body {
        flex: none;
    }

    /* Emergency */
    .emergency-grid {
        grid-template-columns: 1fr;
    }
    .emergency-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding: 0 1.25rem 0.5rem;
        margin: 0 -1.25rem;
        width: calc(100% + 2.5rem);
    }
    .emergency-filters::-webkit-scrollbar { display: none; }
    .emergency-filter { flex-shrink: 0; }

    /* Focus cards + timeline */
    .about-focus-grid {
        grid-template-columns: 1fr;
    }
    .about-timeline {
        padding-left: 2rem;
    }
    .timeline-item {
        padding-left: 1.5rem;
    }

    /* Services */
    .services-table-section {
        margin-top: 0;
    }
    .services-cards-grid {
        grid-template-columns: 1fr;
    }

    /* Emergency bento */
    .emergency-bento-grid {
        grid-template-columns: 1fr;
    }
    .emergency-search-bar {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }

    /* Contact bento */
    .contact-bento-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* About */
    .about-bio-photo {
        height: 280px;
    }
    .about-bio-contact {
        flex-direction: column;
    }
    .about-stats-grid {
        grid-template-columns: 1fr;
    }
    .about-stat {
        padding: 1rem 2rem;
    }

    /* /uber hero-to-card gap fix - vertical margins handled globally above */

    /* Footer flush on mobile */
    .footer {
        padding: 0;
    }

    /* FAQ */
    .faq-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding: 0 1.25rem 0.5rem;
        margin: 0 -1.25rem;
        width: calc(100% + 2.5rem);
    }
    .faq-tabs::-webkit-scrollbar { display: none; }
    .faq-tab {
        flex-shrink: 0;
    }

    /* Comments - reduce nesting indent on mobile */
    .comment-replies {
        margin-left: 1.5rem;
        padding-left: 0.75rem;
    }
    .comment-item {
        padding-right: 0;
    }
}

/* ---- MOBILE (< 480px) ---- */
@media (max-width: 479px) {
    .hero {
        height: 70vh;
        min-height: 420px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .about-card-content {
        padding: 2rem;
    }
    .about-name {
        font-size: var(--h3);
    }
    .about-card-img {
        height: 200px;
    }

    .carousel-card {
        flex: 0 0 85vw;
    }

    .blog-filters {
        gap: 0.5rem;
    }
    .tag-pill {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }

    .post-meta-info {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .post-social {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .inner-hero h1 {
        font-size: 1.75rem;
    }

    .footer-main {
        gap: 1.5rem;
    }

    .scroll-top-float {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 46px;
        height: 46px;
    }

    /* About */
    .about-bio-card {
        padding: 2rem;
    }
    .about-stat-number {
        font-size: 2.5rem;
    }

    /* Emergency */
    .emergency-phone {
        font-size: var(--h3);
    }
    .emergency-card {
        padding: 1.5rem;
    }
    .emergency-bento-card {
        padding: 1.75rem;
    }
    .emergency-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* FAQ */
    .faq-question {
        font-size: var(--body);
        padding: 1.25rem 0;
    }

    /* Contact */
    .contact-bento-card {
        padding: 1.75rem 1.5rem;
    }
    .contact-form-left h2 {
        font-size: var(--h3);
    }

    /* Topic cards - collapsible on mobile */
    .topic-card {
        padding: 1.25rem;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        position: relative;
    }
    .topic-card::after {
        content: '';
        width: 8px;
        height: 8px;
        border-right: 2px solid #999;
        border-bottom: 2px solid #999;
        transform: rotate(45deg);
        flex-shrink: 0;
        margin-left: auto;
        transition: transform 0.3s;
    }
    .topic-card.expanded::after {
        transform: rotate(-135deg);
    }
    .topic-card-icon {
        flex-shrink: 0;
    }
    .topic-card-body {
        flex: 1;
        min-width: 0;
    }
    .topic-card-body p,
    .topic-card-link,
    .topic-card-num {
        display: none;
    }
    .topic-card.expanded .topic-card-body p {
        display: block;
    }
    .topic-card.expanded .topic-card-link {
        display: inline-flex;
    }
    .topic-card.expanded .topic-card-num {
        display: block;
    }
    .topic-card.expanded {
        flex-direction: column;
        align-items: stretch;
    }
    .topic-card.expanded::after {
        position: absolute;
        top: 1.5rem;
        right: 1.25rem;
    }
    .topic-card-tag {
        display: none;
    }
    .topic-card.expanded .topic-card-tag {
        display: block;
    }

    .about-team-grid {
        grid-template-columns: 1fr;
    }
    .about-team-img {
        height: 250px;
    }
}
