/* Index Page Responsive Enhancements */

/* Calendar Container - Force Responsive */
#calendar {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.fc {
    max-width: 100%;
    width: 100% !important;
}

.fc-view-harness {
    overflow-x: auto;
}

.fc table {
    width: 100% !important;
    table-layout: fixed;
}

.fc .fc-toolbar {
    flex-wrap: wrap;
    gap: 10px;
}

.fc .fc-toolbar-title {
    font-size: 1.5rem;
}

.fc .fc-scrollgrid {
    border-collapse: collapse;
    width: 100% !important;
}

.fc-theme-standard td, .fc-theme-standard th {
    border: 1px solid #ddd;
}

/* Extra Large Devices (1200px+) */
@media (min-width: 1200px) {
    #calendar {
        max-width: 900px;
    }
    
    .input-group {
        max-width: 500px;
    }
    
    .fc .fc-toolbar-title {
        font-size: 1.75rem;
    }
}

/* Large Devices (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    #calendar {
        max-width: 800px;
    }
    
    .service-card .card-img-top {
        height: 180px;
    }
    
    .fc .fc-toolbar-title {
        font-size: 1.5rem;
    }
}

/* Medium Devices (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    #calendar {
        max-width: 100%;
        padding: 10px;
    }
    
    .service-card .card-img-top {
        height: 200px;
    }
    
    .chart-bar {
        height: 180px;
    }
    
    #home img {
        height: 60vh;
    }
    
    .fc .fc-toolbar {
        flex-direction: column;
        align-items: center;
    }
    
    .fc .fc-toolbar-title {
        font-size: 1.25rem;
    }
    
    .fc .fc-button {
        padding: 0.4rem 0.65rem;
        font-size: 0.9rem;
    }
    
    .fc .fc-daygrid-day-number {
        font-size: 0.85rem;
    }
}

/* Small Devices (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    #calendar {
        max-width: 100%;
        padding: 10px;
        margin: 0 auto;
    }
    
    .service-card .card-img-top {
        height: 180px;
    }
    
    .chart-bar {
        height: 150px;
    }
    
    #home img {
        height: 50vh;
    }
    
    .fc .fc-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 5px;
    }
    
    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        margin-bottom: 8px;
    }
    
    .fc .fc-toolbar-title {
        font-size: 1rem;
        text-align: center;
    }
    
    .fc .fc-button {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .fc .fc-daygrid-day-number {
        font-size: 0.8rem;
        padding: 2px;
    }
    
    .fc .fc-col-header-cell-cushion {
        font-size: 0.8rem;
        padding: 4px 2px;
    }
    
    .fc .fc-daygrid-day-frame {
        min-height: 35px;
    }
}

/* Extra Small Devices (up to 575px) */
@media (max-width: 575px) {
    #calendar {
        max-width: 100%;
        padding: 5px;
        margin: 0;
    }
    
    .service-card .card-img-top {
        height: 150px;
    }
    
    .chart-bar {
        height: 120px;
        gap: 5px;
    }
    
    .bar .label {
        font-size: 10px;
        bottom: -35px;
    }
    
    .bar .quantity {
        font-size: 10px;
    }
    
    #home img {
        height: 40vh;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .carousel-item img {
        height: 250px;
    }
    
    /* FullCalendar Mobile Optimizations */
    .fc .fc-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        padding: 5px;
    }
    
    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        margin-bottom: 5px;
    }
    
    .fc .fc-toolbar-title {
        font-size: 0.9rem;
        text-align: center;
        padding: 5px 0;
    }
    
    .fc .fc-button {
        padding: 0.25rem 0.35rem;
        font-size: 0.7rem;
    }
    
    .fc .fc-button-group {
        display: flex;
        gap: 3px;
    }
    
    .fc .fc-daygrid-day-number {
        font-size: 0.75rem;
        padding: 1px;
    }
    
    .fc .fc-col-header-cell-cushion {
        font-size: 0.7rem;
        padding: 3px 1px;
    }
    
    .fc .fc-daygrid-day-frame {
        min-height: 30px;
    }
    
    .fc .fc-event-title {
        font-size: 0.65rem;
    }
    
    .fc-direction-ltr .fc-daygrid-event {
        font-size: 0.65rem;
    }
    
    .fc .fc-daygrid-day-top {
        flex-direction: row;
    }
    
    .fc .fc-scrollgrid-section table {
        width: 100% !important;
    }
}

/* Responsive Typography */
@media (max-width: 768px) {
    h2.text-primary {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    h2.text-primary {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    h3.text-primary {
        font-size: 1.25rem;
    }
    
    .fc .fc-toolbar-title {
        font-size: 0.85rem;
    }
    
    .fc .fc-button {
        padding: 0.2rem 0.3rem;
        font-size: 0.65rem;
    }
    
    .fc .fc-col-header-cell {
        padding: 2px 0;
    }
}


/* Dark Mode Calendar Styles */
[data-bs-theme="dark"] #calendar {
    background-color: #212529;
}

[data-bs-theme="dark"] .fc {
    background-color: #212529;
    color: #dee2e6;
}

[data-bs-theme="dark"] .fc-theme-standard td,
[data-bs-theme="dark"] .fc-theme-standard th {
    border-color: #495057;
}

[data-bs-theme="dark"] .fc .fc-toolbar-title {
    color: #dee2e6;
}

[data-bs-theme="dark"] .fc .fc-button-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

[data-bs-theme="dark"] .fc .fc-button-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

[data-bs-theme="dark"] .fc .fc-button-primary:disabled {
    background-color: #495057;
    border-color: #495057;
}

[data-bs-theme="dark"] .fc .fc-col-header-cell {
    background-color: #343a40;
    color: #dee2e6;
}

[data-bs-theme="dark"] .fc .fc-daygrid-day {
    background-color: #212529;
}

[data-bs-theme="dark"] .fc .fc-daygrid-day:hover {
    background-color: #2c3034;
}

[data-bs-theme="dark"] .fc .fc-daygrid-day-number {
    color: #dee2e6;
}

[data-bs-theme="dark"] .fc .fc-day-today {
    background-color: #1a4d7a !important;
}

[data-bs-theme="dark"] .fc .fc-day-past {
    background-color: #1a1d20;
    opacity: 0.6;
}

[data-bs-theme="dark"] .fc .fc-day-disabled {
    background-color: #1a1d20;
    opacity: 0.4;
}

[data-bs-theme="dark"] .fc .fc-event {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

[data-bs-theme="dark"] .fc .fc-event:hover {
    background-color: #0b5ed7;
}

[data-bs-theme="dark"] .fc .fc-scrollgrid {
    border-color: #495057;
}

[data-bs-theme="dark"] .fc .fc-list {
    border-color: #495057;
}

[data-bs-theme="dark"] .fc .fc-list-event:hover td {
    background-color: #2c3034;
}

/* Mobile-first homepage layout */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
canvas,
iframe {
    max-width: 100%;
}

.home-hero {
    align-items: center;
    background: #006f9f;
    display: flex;
    height: 100svh;
    min-height: 100svh;
}

.home-hero-img {
    display: block;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    object-position: center;
    width: 100%;
}

.homepage-section {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 0;
}

.homepage-section .container {
    max-width: 1140px;
}

.homepage-section .lead {
    max-width: 44rem;
}

.homepage-section .row {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.homepage-section .row > * {
    min-width: 0;
}

#trackTicketForm .input-group {
    align-items: stretch;
    display: flex;
    flex-wrap: nowrap;
    max-width: 100%;
}

#trackTicketInput,
#trackTicketForm .btn {
    min-height: 48px;
}

#trackTicketInput {
    min-width: 0;
}

#trackTicketForm .btn {
    flex: 0 0 auto;
}

#booking {
    margin-left: auto;
    margin-right: auto;
    max-width: 960px;
    width: 100%;
}

#booking h2 {
    font-size: clamp(1.45rem, 6vw, 2.35rem);
    line-height: 1.18;
    margin-left: auto;
    margin-right: auto;
    max-width: 22ch;
}

#calendar {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    overflow: hidden;
    padding: 1rem;
    width: 100%;
}

#calendar table,
#calendar .fc table,
#calendar .fc-scrollgrid,
#calendar .fc-col-header,
#calendar .fc-daygrid-body,
#calendar .fc-daygrid-body table,
#calendar .fc-scrollgrid-section table {
    min-width: 0 !important;
    width: 100% !important;
}

#calendar .fc-scroller,
#calendar .fc-scroller-harness {
    max-width: 100%;
    overflow: hidden !important;
}

#calendar .fc-toolbar {
    align-items: stretch;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
}

#calendar .fc-toolbar-chunk {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    min-width: 0;
}

#calendar .fc-toolbar-title {
    font-size: clamp(1rem, 5vw, 1.45rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
    text-align: center;
}

#calendar .fc-button {
    font-size: 0.75rem;
    min-height: 40px;
    padding: 0.35rem 0.55rem;
    touch-action: manipulation;
}

#calendar .fc-daygrid-day-frame {
    min-height: 42px;
}

#calendar .fc-daygrid-day-number,
#calendar .fc-col-header-cell-cushion {
    font-size: 0.72rem;
    padding: 0.15rem;
}

#calendar .fc-event,
#calendar .fc-event-title {
    font-size: 0.68rem;
    line-height: 1.15;
}

.chart-container {
    height: clamp(230px, 70vw, 350px);
    position: relative;
}

.service-card {
    border-radius: 0.75rem !important;
}

.service-card .card-img-top {
    aspect-ratio: 16 / 10;
    height: auto !important;
    object-fit: cover;
}

.about-carousel-wrap {
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
}

#aboutCarousel .carousel-item img {
    aspect-ratio: 4 / 3;
    height: auto !important;
    max-height: 440px;
    object-fit: cover;
}

#about .card h3,
#about .card p {
    overflow-wrap: anywhere;
}

.map-frame {
    aspect-ratio: 4 / 3;
    border-radius: 0.75rem;
    overflow: hidden;
}

.dark-mode-toggle {
    bottom: max(1rem, env(safe-area-inset-bottom));
    min-height: 48px;
    min-width: 48px;
    right: max(1rem, env(safe-area-inset-right));
}

@media (max-width: 380px) {
    .container {
        --bs-gutter-x: 1.25rem;
    }

    #trackTicketForm .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    #trackTicketForm .form-control,
    #trackTicketForm .btn {
        border-radius: var(--bs-border-radius-lg) !important;
        width: 100%;
    }

    #calendar {
        padding: 0.75rem;
    }

    #calendar .fc-button {
        font-size: 0.68rem;
        min-height: 38px;
        padding: 0.3rem 0.45rem;
    }

    #calendar .fc-daygrid-day-frame {
        min-height: 36px;
    }
}

@media (min-width: 576px) {
    .homepage-section {
        padding: 5rem 0;
    }

    #booking h2 {
        max-width: 28ch;
    }

    #calendar {
        padding: 1.25rem;
    }

    #calendar .fc-toolbar {
        grid-template-columns: 1fr;
    }

    #calendar .fc-button {
        font-size: 0.85rem;
    }

    #calendar .fc-daygrid-day-frame {
        min-height: 56px;
    }

    #calendar .fc-daygrid-day-number,
    #calendar .fc-col-header-cell-cushion {
        font-size: 0.82rem;
    }

    .map-frame {
        aspect-ratio: 16 / 10;
    }
}

@media (min-width: 768px) {
    .home-hero,
    .home-hero-img {
        min-height: 100dvh;
    }

    .homepage-section {
        min-height: 100dvh;
        padding: 6rem 0;
    }

    #calendar {
        padding: 1.5rem;
    }

    #calendar .fc-toolbar {
        align-items: center;
        grid-template-columns: 1fr auto 1fr;
    }

    #calendar .fc-toolbar-chunk:first-child {
        justify-content: flex-start;
    }

    #calendar .fc-toolbar-chunk:last-child {
        justify-content: flex-end;
    }

    #calendar .fc-daygrid-day-frame {
        min-height: 78px;
    }

    #aboutCarousel .carousel-item img {
        aspect-ratio: 16 / 9;
    }

    .map-frame {
        aspect-ratio: 21 / 9;
    }
}

@media (min-width: 1200px) {
    #booking {
        max-width: 1040px;
    }

    #calendar {
        max-width: 980px;
    }
}

/* Full index redesign: mobile-first minimal glass */
:root {
    --home-blue: #0d8aff;
    --home-blue-deep: #0757bc;
    --home-sky: #eaf7ff;
    --home-ink: #102033;
    --home-muted: #5f7288;
    --home-border: rgba(13, 138, 255, 0.16);
    --home-glass: rgba(255, 255, 255, 0.78);
    --home-glass-strong: rgba(255, 255, 255, 0.92);
    --home-shadow: 0 24px 70px rgba(9, 68, 124, 0.16);
    --home-radius: 1.45rem;
}

body[data-page="index"] {
    background:
        radial-gradient(circle at 18% 4%, rgba(13, 138, 255, 0.2), transparent 26rem),
        linear-gradient(180deg, #f7fcff 0%, #eef8ff 46%, #ffffff 100%);
    color: var(--home-ink);
}

.homepage-shell {
    isolation: isolate;
    overflow: hidden;
    position: relative;
}

.homepage-shell::before {
    background:
        linear-gradient(135deg, rgba(13, 138, 255, 0.12), transparent 34%),
        linear-gradient(315deg, rgba(0, 119, 182, 0.08), transparent 42%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

body[data-page="index"] table {
    min-width: 0 !important;
}

.home-hero {
    background: transparent;
    display: block;
    height: auto;
    min-height: auto;
    padding: 7.2rem 0 2.5rem;
}

.home-hero .container,
.homepage-section .container {
    max-width: 1120px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.hero-glass,
.glass-panel {
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    background: var(--home-glass);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    box-shadow: var(--home-shadow);
}

.hero-glass {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(232, 248, 255, 0.72)),
        linear-gradient(135deg, rgba(13, 138, 255, 0.16), transparent);
    overflow: hidden;
    padding: 1.35rem;
    position: relative;
}

.hero-glass::before {
    background:
        linear-gradient(90deg, rgba(13, 138, 255, 0.16), transparent),
        repeating-linear-gradient(135deg, rgba(13, 138, 255, 0.08) 0 1px, transparent 1px 12px);
    content: "";
    inset: 0;
    opacity: 0.72;
    pointer-events: none;
    position: absolute;
}

.hero-glass > * {
    position: relative;
}

.hero-kicker {
    color: var(--home-blue-deep);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 0.7rem;
}

.hero-glass h1 {
    color: var(--home-ink);
    font-size: clamp(1.7rem, 9vw, 4.8rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.04;
    margin: 0;
    max-width: 13ch;
    overflow-wrap: anywhere;
}

.hero-actions {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.2rem;
}

.hero-actions .btn,
.track-panel .btn {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    gap: 0.45rem;
    justify-content: center;
    min-height: 48px;
}

.hero-actions .btn-primary,
.track-panel .btn-primary {
    background: linear-gradient(135deg, var(--home-blue), var(--home-blue-deep));
    border-color: transparent;
    box-shadow: 0 16px 36px rgba(13, 138, 255, 0.28);
}

.hero-actions .btn-outline-primary {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(13, 138, 255, 0.28);
    color: var(--home-blue-deep);
}

.hero-actions .btn:hover,
.hero-actions .btn:focus-visible,
.track-panel .btn:hover,
.track-panel .btn:focus-visible {
    box-shadow: 0 18px 40px rgba(13, 138, 255, 0.34);
    outline: none;
    transform: translateY(-1px);
}

.track-panel {
    margin-top: 1rem;
    padding: 1rem;
}

.track-panel h2 {
    color: var(--home-ink);
    font-size: 1.05rem;
    font-weight: 750;
    margin-bottom: 0.8rem;
    text-align: left;
}

#trackTicketForm .input-group {
    flex-direction: column;
    gap: 0.6rem;
}

#trackTicketForm .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(13, 138, 255, 0.2);
    border-radius: 999px !important;
    color: var(--home-ink);
    min-height: 50px;
    padding-left: 1rem;
}

#trackTicketForm .btn {
    border-radius: 999px !important;
    min-width: 104px;
    width: 100%;
}

.homepage-section {
    background: transparent !important;
    display: block;
    min-height: auto;
    padding: 2.2rem 0;
}

.section-heading {
    margin-bottom: 1.1rem;
    text-align: left;
}

.section-heading h2 {
    color: var(--home-ink);
    font-size: clamp(1.6rem, 8vw, 3rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    margin-bottom: 0.55rem;
}

.section-heading .lead {
    color: var(--home-muted);
    font-size: 1rem;
    line-height: 1.55;
    margin: 0;
}

.mobile-scroll-hint {
    align-items: center;
    color: #0b66d0;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    gap: 0.4rem;
    margin-top: 0.65rem;
}

#booking {
    max-width: none;
}

#booking h2 {
    max-width: 13ch;
}

#calendar {
    background: var(--home-glass-strong) !important;
    border-radius: var(--home-radius) !important;
    box-shadow: var(--home-shadow) !important;
    padding: 0.85rem;
}

#calendar .fc {
    color: var(--home-ink);
}

#calendar .fc-toolbar {
    border-bottom: 1px solid rgba(13, 138, 255, 0.12);
    gap: 0.65rem;
    margin-bottom: 0.85rem !important;
    padding-bottom: 0.85rem;
}

#calendar .fc-toolbar-title {
    color: var(--home-ink);
    font-size: 1.05rem;
    font-weight: 800;
}

#calendar .fc-button {
    background: rgba(13, 138, 255, 0.1);
    border: 1px solid rgba(13, 138, 255, 0.14);
    border-radius: 0.8rem !important;
    color: var(--home-blue-deep);
    font-weight: 700;
    min-height: 42px;
    text-transform: lowercase;
}

#calendar .fc-button-primary:not(:disabled).fc-button-active,
#calendar .fc-button:hover,
#calendar .fc-button:focus {
    background: var(--home-blue);
    border-color: var(--home-blue);
    box-shadow: 0 10px 24px rgba(13, 138, 255, 0.22);
    color: #fff;
}

#calendar .fc-scrollgrid {
    border: 0;
}

#calendar .fc-theme-standard td,
#calendar .fc-theme-standard th,
#calendar .fc-scrollgrid td,
#calendar .fc-scrollgrid th {
    border-color: rgba(13, 138, 255, 0.08);
}

#calendar .fc-col-header-cell {
    background: transparent !important;
}

#calendar .fc-col-header-cell-cushion {
    color: #fff;
    display: block;
    font-weight: 800;
    text-decoration: none;
}

#calendar .fc-col-header-cell {
    background: var(--home-blue) !important;
}

#calendar .fc-col-header-cell:first-child,
#calendar .fc-col-header-cell:last-child {
    background: #ff8c00 !important;
}

#calendar .fc-daygrid-day {
    background: rgba(255, 255, 255, 0.68);
}

#calendar .fc-daygrid-day-frame {
    min-height: clamp(32px, 9vw, 58px);
}

#calendar th,
#calendar td {
    padding: 0 !important;
}

#calendar .fc-daygrid-day-events {
    min-height: 0;
}

#calendar .fc-daygrid-day-number {
    color: var(--home-ink);
    font-weight: 700;
    text-decoration: none;
}

#calendar .fc-day-today {
    background: rgba(13, 138, 255, 0.14) !important;
}

#calendar .fc-event {
    border-radius: 999px;
    padding: 0 0.25rem;
}

.inventory-section .row {
    row-gap: 1rem;
}

.info-card {
    padding: 1rem;
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
}

.chart-container {
    height: clamp(220px, 65vw, 320px);
}

.services-section {
    padding-right: 0;
}

.services-slider {
    display: grid;
    grid-auto-columns: minmax(78%, 1fr);
    grid-auto-flow: column;
    gap: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    overflow-x: auto;
    padding: 0 1rem 1rem;
    scroll-padding-left: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.services-slider::-webkit-scrollbar {
    display: none;
}

@media (max-width: 767.98px) {
    .services-slider {
        scrollbar-width: none;
    }
}

.service-slide {
    scroll-snap-align: center;
}

.service-card {
    background: var(--home-glass);
    border: 1px solid var(--home-border) !important;
    box-shadow: var(--home-shadow);
    height: 100%;
    overflow: hidden;
}

.service-card:hover,
.service-card:focus-within {
    border-color: rgba(13, 138, 255, 0.28) !important;
    transform: translateY(-3px);
}

.service-card .card-img-top {
    aspect-ratio: 4 / 3;
    display: block;
    height: auto !important;
    object-fit: cover;
    width: 100%;
}

.service-card .card-body {
    padding: 1rem;
}

.service-card .card-title {
    color: var(--home-ink);
    font-size: 1.05rem;
    font-weight: 800;
}

.service-card .card-text {
    color: var(--home-muted);
    font-size: 0.95rem;
}

.about-layout {
    display: grid;
    gap: 1rem;
}

.about-carousel-wrap {
    max-width: none;
    overflow: hidden;
    padding: 0.55rem;
}

#aboutCarousel {
    border-radius: calc(var(--home-radius) - 0.45rem);
    overflow: hidden;
}

#aboutCarousel .carousel-item img {
    aspect-ratio: 16 / 11;
    height: auto !important;
    max-height: none;
    object-fit: cover;
}

#aboutCarousel .carousel-control-prev,
#aboutCarousel .carousel-control-next {
    opacity: 1;
}

#aboutCarousel .carousel-control-prev-icon,
#aboutCarousel .carousel-control-next-icon {
    background-color: rgba(13, 138, 255, 0.92);
    background-size: 54%;
    border-radius: 999px;
    height: 2.4rem;
    width: 2.4rem;
}

.contact-grid {
    display: grid;
    gap: 0.85rem;
}

.contact-card {
    padding: 1rem;
}

.contact-card h3 {
    color: var(--home-ink);
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.contact-card p {
    color: var(--home-muted);
    line-height: 1.5;
    margin: 0;
}

.map-frame {
    background: var(--home-glass);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    box-shadow: var(--home-shadow);
    min-height: 280px;
}

.dark-mode-toggle {
    display: none;
}

@media (max-width: 380px) {
    .home-hero .container,
    .homepage-section .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .hero-actions {
        grid-template-columns: 1fr;
    }

    .services-slider {
        grid-auto-columns: minmax(84%, 1fr);
    }
}

@media (min-width: 576px) {
    .home-hero {
        padding-top: 8rem;
    }

    .hero-glass,
    .track-panel,
    .info-card,
    .contact-card {
        padding: 1.4rem;
    }

    .hero-actions {
        display: flex;
        flex-wrap: wrap;
    }

    #trackTicketForm .input-group {
        flex-direction: row;
    }

    #trackTicketForm .btn {
        width: auto;
    }

    .services-slider {
        grid-auto-columns: minmax(45%, 1fr);
    }
}

@media (min-width: 768px) {
    .home-hero {
        min-height: 100dvh;
        padding: 9rem 0 4rem;
    }

    .home-hero .container {
        display: grid;
        gap: 1.2rem;
        grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    }

    .track-panel {
        align-self: end;
        margin-top: 0;
    }

    .hero-glass h1 {
        font-size: clamp(2.7rem, 5vw, 4.2rem);
        max-width: 18ch;
    }

    .homepage-section {
        padding: 4rem 0;
    }

    .section-heading {
        text-align: center;
    }

    .section-heading .lead {
        margin-left: auto;
        margin-right: auto;
    }

    .mobile-scroll-hint {
        display: none;
    }

    #booking h2 {
        margin-left: auto;
        margin-right: auto;
        max-width: 18ch;
    }

    #calendar {
        margin-left: auto;
        margin-right: auto;
        max-width: 920px;
        padding: 1.25rem;
    }

    .services-slider {
        display: grid;
        gap: 1.2rem;
        grid-auto-flow: row;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 0;
        overflow: visible;
        padding: 0;
        scroll-snap-type: none;
    }

    .about-layout {
        align-items: stretch;
        grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    }

    .contact-grid {
        align-content: stretch;
    }

    .map-frame {
        min-height: 380px;
    }
}

@media (min-width: 992px) {
    .hero-glass h1 {
        max-width: 20ch;
    }

    .services-slider {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

[data-bs-theme="dark"] body[data-page="index"] {
    background:
        radial-gradient(circle at 18% 4%, rgba(56, 189, 248, 0.16), transparent 28rem),
        linear-gradient(180deg, #07111f 0%, #0b1526 48%, #09111f 100%);
    color: #e5eefb;
}

[data-bs-theme="dark"] .hero-glass,
[data-bs-theme="dark"] .glass-panel,
[data-bs-theme="dark"] .service-card,
[data-bs-theme="dark"] .map-frame {
    background: rgba(11, 18, 32, 0.76) !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

[data-bs-theme="dark"] .hero-glass h1,
[data-bs-theme="dark"] .section-heading h2,
[data-bs-theme="dark"] .track-panel h2,
[data-bs-theme="dark"] .service-card .card-title,
[data-bs-theme="dark"] .contact-card h3,
[data-bs-theme="dark"] #calendar .fc-toolbar-title,
[data-bs-theme="dark"] #calendar .fc-daygrid-day-number {
    color: #f4f8ff;
}

[data-bs-theme="dark"] .section-heading .lead,
[data-bs-theme="dark"] .service-card .card-text,
[data-bs-theme="dark"] .contact-card p {
    color: #b7c7d9;
}

[data-bs-theme="dark"] #trackTicketForm .form-control,
[data-bs-theme="dark"] #calendar .fc-daygrid-day {
    background: rgba(15, 23, 42, 0.76);
    border-color: rgba(96, 165, 250, 0.18);
    color: #e5eefb;
}

[data-bs-theme="dark"] #calendar .fc-button {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.18);
    color: #bfdbfe;
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .menu-item,
    .service-card {
        transition: none !important;
    }

    .btn:hover,
    .menu-item:hover,
    .service-card:hover {
        transform: none !important;
    }
}

/* Editorial clinic redesign pass */
body[data-page="index"] {
    background:
        linear-gradient(180deg, rgba(244, 250, 255, 0.96) 0%, rgba(232, 246, 255, 0.92) 42%, rgba(249, 252, 255, 1) 100%),
        radial-gradient(circle at 12% 8%, rgba(13, 138, 255, 0.2), transparent 24rem);
}

.home-hero {
    align-items: end;
    background:
        linear-gradient(90deg, rgba(5, 16, 31, 0.78) 0%, rgba(7, 30, 56, 0.58) 34%, rgba(7, 30, 56, 0.22) 62%, rgba(5, 16, 31, 0.14) 100%),
        linear-gradient(0deg, rgba(5, 16, 31, 0.58), rgba(5, 16, 31, 0.08) 38%, rgba(5, 16, 31, 0.15)),
        url("../img/home-hero-clinic-front.jpg") center right / cover no-repeat;
    display: flex;
    isolation: isolate;
    min-height: min(820px, 100svh);
    overflow: hidden;
    padding: calc(6.5rem + env(safe-area-inset-top)) 0 1.2rem;
    position: relative;
}

.home-hero::after {
    background: linear-gradient(180deg, transparent 0%, rgba(244, 250, 255, 0.96) 100%);
    bottom: -1px;
    content: "";
    height: 18%;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    z-index: -1;
}

.home-hero .container {
    display: grid;
    gap: 1rem;
    width: 100%;
}

.hero-content {
    color: #fff;
    max-width: 680px;
    padding-bottom: 0.4rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-kicker {
    color: #a7dcff;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.hero-content h1 {
    color: #fff;
    font-size: clamp(1.85rem, 10vw, 3.4rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.02;
    margin: 0;
    max-width: min(100%, 14ch);
    overflow-wrap: break-word;
}

.hero-content h1 span {
    display: block;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.25rem;
}

.hero-actions .btn {
    border-radius: 999px;
    min-height: 48px;
    padding: 0.72rem 1rem;
}

.hero-actions .btn-outline-primary {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.48);
    color: #0757bc;
}

.hero-mini-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.hero-mini-info span {
    align-items: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 750;
    gap: 0.38rem;
    padding: 0.45rem 0.65rem;
}

.track-panel {
    background: rgba(255, 255, 255, 0.84) !important;
    border-color: rgba(255, 255, 255, 0.36) !important;
    border-radius: 1.25rem;
    margin-top: 0;
    padding: 0.85rem;
}

.track-panel h2 {
    color: #102033;
    font-size: 0.92rem;
    margin-bottom: 0.65rem;
}

#trackTicketForm .form-control {
    background: rgba(255, 255, 255, 0.92);
}

.homepage-section {
    padding: 2.5rem 0;
    scroll-margin-top: 5.6rem;
}

#home img {
    height: auto;
}

.section-heading {
    margin-bottom: 1.25rem;
}

.section-heading h2 {
    font-size: clamp(1.72rem, 9vw, 3.2rem);
}

.glass-panel,
.info-card,
.service-card,
.contact-card,
.map-frame {
    border-radius: 1.25rem;
}

.services-slider {
    grid-auto-columns: minmax(82%, 1fr);
    scroll-behavior: smooth;
}

.service-card {
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.service-card .card-img-top {
    aspect-ratio: 1 / 0.82;
}

.about-layout {
    gap: 1rem;
}

.about-gallery {
    display: grid;
    gap: 0.75rem;
    grid-auto-columns: minmax(86%, 1fr);
    grid-auto-flow: column;
    margin-left: -1rem;
    margin-right: -1rem;
    overflow-x: auto;
    padding: 0.6rem 1rem 0.9rem;
    scroll-padding-left: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.about-gallery::-webkit-scrollbar {
    display: none;
}

.about-gallery img {
    aspect-ratio: 4 / 3;
    background: #f1f8f8;
    border-radius: 0.95rem;
    box-shadow: 0 16px 42px rgba(12, 57, 105, 0.16);
    display: block;
    height: auto;
    object-fit: contain;
    object-position: center;
    scroll-snap-align: center;
    width: 100%;
}

.contact-card {
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.contact-card:hover,
.contact-card:focus-within {
    border-color: rgba(13, 138, 255, 0.28) !important;
    box-shadow: 0 24px 58px rgba(12, 57, 105, 0.16);
    transform: translateY(-2px);
}

.contact-card h3 {
    align-items: center;
    display: flex;
    gap: 0.45rem;
    margin: 0;
}

.contact-card h3 i {
    color: var(--home-blue);
}

.contact-action {
    align-items: center;
    background: rgba(13, 138, 255, 0.1);
    border: 1px solid rgba(13, 138, 255, 0.16);
    border-radius: 999px;
    color: #0757bc;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 800;
    gap: 0.45rem;
    justify-content: center;
    min-height: 44px;
    padding: 0.58rem 0.9rem;
    text-decoration: none;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.contact-action:hover,
.contact-action:focus-visible {
    background: var(--home-blue);
    box-shadow: 0 14px 30px rgba(13, 138, 255, 0.24);
    color: #fff;
    outline: none;
    transform: translateY(-1px);
}

.map-frame {
    overflow: hidden;
}

.site-footer {
    background: rgba(8, 24, 43, 0.94);
    color: #dbeafe;
    padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom));
}

.site-footer .container {
    display: grid;
    gap: 1rem;
}

.footer-brand {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.footer-brand img {
    background: #fff;
    border-radius: 999px;
    height: 46px;
    object-fit: contain;
    width: 46px;
}

.footer-brand strong,
.footer-brand span {
    display: block;
}

.footer-brand span,
.footer-copy {
    color: #a9c8e8;
    font-size: 0.9rem;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-links a {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #e6f4ff;
    font-size: 0.88rem;
    font-weight: 750;
    padding: 0.48rem 0.72rem;
    text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    background: rgba(59, 166, 255, 0.18);
    border-color: rgba(125, 211, 252, 0.34);
    outline: none;
}

#calendar .fc-toolbar {
    align-items: center;
    display: grid;
    grid-template-columns: auto 1fr auto;
}

#calendar .fc-toolbar-title {
    text-align: center;
}

#calendar .fc-button-group {
    background: rgba(13, 138, 255, 0.08);
    border: 1px solid rgba(13, 138, 255, 0.12);
    border-radius: 999px;
    gap: 0.25rem;
    padding: 0.25rem;
}

#calendar .fc-button {
    border-radius: 999px !important;
    min-height: 44px;
    min-width: 44px;
    padding: 0.35rem 0.65rem;
}

#calendar .fc-prev-button,
#calendar .fc-next-button {
    font-size: 0.84rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

@media (max-width: 575.98px) {
    .home-hero {
        background-position: 62% center;
        min-height: 100svh;
        padding-bottom: 1rem;
    }

    .home-hero .container {
        min-height: calc(100svh - 7.5rem);
    }

    .hero-content {
        align-self: end;
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }

    .hero-content h1 {
        font-size: clamp(1.34rem, 6.35vw, 1.72rem);
        line-height: 1.08;
        max-width: min(100%, 17rem);
        word-break: keep-all;
    }

    .hero-actions .btn {
        flex: 1 1 100%;
        font-size: 0.98rem;
        max-width: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        white-space: normal;
        width: 100%;
    }

    .hero-actions {
        max-width: min(100%, 19rem);
        min-width: 0;
        width: 100%;
    }

    .track-panel {
        max-width: min(100%, 19rem);
    }

    .hero-actions .btn span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    #calendar .fc-toolbar {
        grid-template-columns: 1fr;
    }

    #calendar .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    #calendar .fc-toolbar-chunk:first-child {
        order: 2;
    }

    #calendar .fc-toolbar-chunk:nth-child(2) {
        order: 1;
    }

    #calendar .fc-toolbar-chunk:last-child {
        order: 3;
    }

    #calendar .fc-toolbar-title {
        font-size: 1.18rem;
        line-height: 1.15;
    }

    #calendar .fc-button {
        min-height: 44px;
    }

    #trackTicketForm .input-group {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    #trackTicketForm .form-control,
    #trackTicketForm .btn {
        min-width: 0;
        width: 100%;
    }

    .about-gallery img {
        aspect-ratio: 16 / 10;
    }
}

@media (min-width: 576px) {
    .home-hero {
        padding-bottom: 2rem;
    }

    .track-panel {
        max-width: 460px;
    }
}

@media (min-width: 768px) {
    .home-hero {
        align-items: center;
        min-height: min(760px, 100svh);
        padding: 8rem 0 4rem;
    }

    .home-hero .container {
        gap: 1.25rem;
        grid-template-columns: minmax(0, 0.86fr) minmax(330px, 0.54fr);
    }

    .hero-content {
        align-self: center;
    }

    .hero-content h1 {
        font-size: clamp(2.85rem, 4.45vw, 4.35rem);
        max-width: 14.5ch;
    }

    .track-panel {
        align-self: end;
        justify-self: end;
        max-width: 430px;
        width: 100%;
    }

    .homepage-section {
        padding: 4.6rem 0;
    }

    .about-gallery {
        grid-auto-flow: row;
        grid-template-columns: 1fr 1fr;
        margin: 0;
        overflow: visible;
        padding: 0.65rem;
        scrollbar-width: auto;
    }

    .about-gallery img:first-child {
        grid-row: span 2;
        height: 100%;
    }

    .site-footer .container {
        align-items: center;
        grid-template-columns: 1fr auto;
    }

    .footer-copy {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1200px) {
    .home-hero .container,
    .homepage-section .container,
    .site-footer .container {
        max-width: 1180px;
    }
}

[data-bs-theme="dark"] body[data-page="index"] {
    background:
        linear-gradient(180deg, rgba(5, 16, 31, 0.98) 0%, rgba(8, 24, 43, 0.98) 48%, rgba(5, 16, 31, 1) 100%),
        radial-gradient(circle at 12% 8%, rgba(13, 138, 255, 0.22), transparent 24rem);
}

[data-bs-theme="dark"] .home-hero::after {
    background: linear-gradient(180deg, transparent 0%, rgba(5, 16, 31, 0.98) 100%);
}

[data-bs-theme="dark"] .track-panel {
    background: rgba(8, 18, 32, 0.78) !important;
    border-color: rgba(147, 197, 253, 0.2) !important;
}

[data-bs-theme="dark"] .contact-action {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.18);
    color: #bfdbfe;
}

[data-bs-theme="dark"] .contact-action:hover,
[data-bs-theme="dark"] .contact-action:focus-visible {
    background: #0d8aff;
    color: #fff;
}

/* Mobile UX QA refinement layer */
.home-hero {
    background-image:
        linear-gradient(90deg, rgba(4, 17, 32, 0.82) 0%, rgba(4, 17, 32, 0.52) 44%, rgba(4, 17, 32, 0.18) 100%),
        url("../img/home-hero-clinic-front.jpg");
}

.hero-content h1 {
    max-width: 12ch;
}

.hero-system-copy {
    color: rgba(232, 246, 255, 0.9);
    font-size: clamp(0.92rem, 1.55vw, 1.05rem);
    font-weight: 650;
    line-height: 1.55;
    margin: 0.85rem 0 0;
    max-width: 42rem;
    text-wrap: balance;
}

@media (max-width: 575.98px) {
    body[data-page="index"] *,
    body[data-page="index"] *::before,
    body[data-page="index"] *::after {
        box-sizing: border-box;
    }

    body[data-page="index"] {
        background:
            linear-gradient(180deg, #f4fbff 0%, #e5f6ff 42%, #f7fbff 100%);
        max-inline-size: 100vw;
        overflow-x: hidden;
    }

    body[data-page="index"] .homepage-shell,
    body[data-page="index"] .home-hero,
    body[data-page="index"] .homepage-section,
    body[data-page="index"] .site-footer {
        inline-size: 100%;
        max-inline-size: 100vw;
        overflow-x: hidden;
    }

    .home-hero {
        background-image:
            linear-gradient(180deg, rgba(6, 20, 36, 0.14) 0%, rgba(6, 20, 36, 0.18) 30%, rgba(6, 20, 36, 0.74) 63%, rgba(6, 20, 36, 0.94) 100%),
            url("../img/home-hero-clinic-front.jpg");
        background-position: 60% top;
        background-size: auto 25.5rem;
        min-height: 0;
        padding: 5.6rem 0 1.35rem;
    }

    .home-hero::after {
        height: 4.5rem;
    }

    .home-hero .container {
        align-content: start;
        gap: 0.75rem;
        inline-size: calc(100vw - 2rem);
        max-inline-size: calc(100vw - 2rem);
        margin-inline: auto;
        min-height: 0;
        padding-inline: 0;
    }

    .hero-content {
        align-self: auto;
        background: rgba(6, 22, 40, 0.62);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 1.25rem;
        box-shadow: 0 18px 54px rgba(2, 32, 64, 0.24);
        max-inline-size: 100%;
        margin-top: 11.7rem;
        padding: 0.95rem;
        backdrop-filter: blur(14px);
    }

    .hero-kicker {
        color: #aee1ff;
        font-size: 0.67rem;
        line-height: 1.3;
        margin-bottom: 0.45rem;
        max-width: 100%;
        white-space: normal;
    }

    .hero-content h1 {
        font-size: clamp(1.72rem, 8.8vw, 2.05rem);
        letter-spacing: 0;
        line-height: 0.98;
        max-width: 8.9ch;
    }

    .hero-system-copy {
        font-size: 0.83rem;
        line-height: 1.42;
        margin-top: 0.55rem;
        max-width: 28ch;
    }

    .hero-actions {
        display: grid;
        gap: 0.55rem;
        grid-template-columns: minmax(0, 1fr);
        margin-top: 0.8rem;
        max-width: 100%;
        width: 100%;
    }

    .hero-actions .btn {
        border-radius: 1rem;
        font-size: 0.88rem;
        min-height: 45px;
        width: 100%;
    }

    .hero-mini-info {
        display: grid;
        gap: 0.4rem;
        grid-template-columns: 1fr 1fr;
        margin-top: 0.65rem;
    }

    .hero-mini-info span {
        flex: none;
        font-size: 0.66rem;
        justify-content: center;
        min-width: 0;
        overflow: hidden;
        padding: 0.36rem 0.5rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .track-panel {
        border-radius: 1.15rem;
        inline-size: 100%;
        max-inline-size: 100%;
        max-width: 100%;
        min-height: 0;
        padding: 0.85rem;
        width: 100%;
    }

    .track-panel h2 {
        font-size: 0.78rem;
        line-height: 1.25;
        margin-bottom: 0.65rem;
    }

    #trackTicketForm .input-group {
        gap: 0.55rem;
    }

    #trackTicketForm .form-control,
    #trackTicketForm .btn {
        border-radius: 0.95rem !important;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .homepage-section {
        padding: 1.9rem 0;
    }

    .homepage-section .container {
        inline-size: calc(100vw - 2rem);
        margin-inline: auto;
        max-inline-size: calc(100vw - 2rem);
        padding-inline: 0;
    }

    .section-heading {
        margin-bottom: 0.8rem;
    }

    .section-heading h2 {
        font-size: clamp(1.65rem, 9vw, 2.05rem);
        line-height: 1.02;
        max-width: 12ch;
    }

    .section-heading .lead {
        font-size: 0.84rem;
        line-height: 1.45;
        max-width: 28ch;
    }

    #calendar {
        border-radius: 1.15rem !important;
        padding: 0.72rem;
    }

    #calendar .fc-toolbar {
        display: grid;
        gap: 0.45rem;
        grid-template-columns: 1fr auto;
        margin-bottom: 0.6rem !important;
    }

    #calendar .fc-toolbar-chunk {
        align-items: center;
        display: flex;
        justify-content: flex-end;
        margin: 0;
        width: auto;
    }

    #calendar .fc-toolbar-chunk:first-child {
        order: 2;
    }

    #calendar .fc-toolbar-chunk:nth-child(2) {
        justify-content: flex-start;
        order: 1;
    }

    #calendar .fc-toolbar-chunk:last-child {
        display: none;
    }

    #calendar .fc-toolbar-title {
        font-size: 0.96rem;
        line-height: 1.15;
        text-align: left;
    }

    #calendar .fc-button-group {
        padding: 0.18rem;
    }

    #calendar .fc-button {
        font-size: 0.68rem;
        min-height: 36px;
        min-width: 36px;
        padding: 0.25rem 0.45rem;
    }

    #calendar .fc-col-header-cell-cushion {
        font-size: 0.67rem;
        padding: 0.32rem 0.1rem;
    }

    #calendar .fc-daygrid-day-frame {
        min-height: 33px;
    }

    #calendar .fc-daygrid-day-number {
        font-size: 0.68rem;
        padding: 0.2rem;
    }

    .info-card {
        border-radius: 1.15rem;
        inline-size: 100%;
        max-inline-size: 100%;
        overflow: hidden;
        padding: 0.9rem;
    }

    .info-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.7rem !important;
    }

    .chart-container {
        height: 230px;
        inline-size: 100%;
        max-inline-size: 100%;
        overflow: hidden;
    }

    .chart-container canvas {
        max-inline-size: 100% !important;
    }

    .services-slider {
        contain: layout paint;
        gap: 0.75rem;
        grid-auto-columns: minmax(82%, 82%);
        inline-size: 100%;
        margin-inline: -0.25rem;
        max-inline-size: 100%;
        overflow-x: auto;
        padding: 0.2rem 0.25rem 0.6rem;
    }

    .service-slide,
    .service-card {
        min-width: 0;
    }

    .service-card {
        border-radius: 1.15rem;
        min-height: 100%;
    }

    .service-card .card-img-top {
        aspect-ratio: 16 / 11;
        height: auto;
    }

    .service-card .card-body {
        padding: 0.82rem;
    }

    .service-card .card-title {
        font-size: 0.88rem;
    }

    .service-card .card-text {
        font-size: 0.74rem;
        line-height: 1.35;
    }

    .about-layout {
        gap: 0.75rem;
    }

    .about-gallery {
        border-radius: 1.15rem;
        contain: layout paint;
        gap: 0.65rem;
        grid-auto-columns: minmax(82%, 82%);
        inline-size: 100%;
        margin-inline: -0.25rem;
        max-inline-size: 100%;
        min-height: 0;
        overflow-x: auto;
        padding: 0.45rem;
    }

    .about-gallery img,
    .about-gallery img:first-child {
        aspect-ratio: 16 / 10;
        height: auto;
        min-height: 0;
    }

    .contact-grid {
        gap: 0.65rem;
    }

    .contact-card {
        border-radius: 1.15rem;
        padding: 0.82rem;
    }

    .contact-card h3 {
        font-size: 0.84rem;
        margin-bottom: 0.35rem;
    }

    .contact-card p {
        font-size: 0.78rem;
        line-height: 1.4;
        margin-bottom: 0.65rem;
    }

    .contact-action {
        min-height: 40px;
        padding: 0.55rem 0.75rem;
    }

    .map-frame {
        border-radius: 1.15rem;
        min-height: 230px;
    }

    .site-footer {
        padding: 1.35rem 0 1.1rem;
    }
}

@media (max-width: 380px) {
    .home-hero .container,
    .homepage-section .container {
        inline-size: calc(100vw - 1rem);
        max-inline-size: calc(100vw - 1rem);
    }

    .home-hero {
        background-size: auto 23.5rem;
    }

    .hero-content {
        margin-top: 10.4rem;
    }

    .hero-content h1 {
        font-size: clamp(1.52rem, 8.5vw, 1.82rem);
        max-width: 9.4ch;
    }

    .hero-system-copy {
        font-size: 0.78rem;
    }

    .services-slider,
    .about-gallery {
        grid-auto-columns: minmax(86%, 86%);
    }

    .chart-container {
        height: 215px;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .home-hero {
        min-height: 0;
        padding: 6.5rem 0 2rem;
    }

    .home-hero .container {
        min-height: 0;
    }

    .hero-content {
        max-width: 32rem;
    }

    .hero-content h1 {
        font-size: clamp(2.25rem, 7.5vw, 3rem);
        max-width: 11ch;
    }

    .track-panel {
        align-self: start;
        min-height: 0;
    }
}

@media (min-width: 768px) {
    body[data-page="index"] .about-section .section-heading {
        margin-inline: auto;
        max-width: 48rem;
        text-align: center;
    }

    body[data-page="index"] .about-layout {
        align-items: stretch;
        display: grid;
        gap: 1rem;
        grid-template-columns: minmax(0, 1.28fr) minmax(18rem, 0.72fr);
        margin-inline: auto;
        max-width: 78rem;
    }

    body[data-page="index"] .about-gallery {
        cursor: grab;
        display: grid;
        gap: 0.85rem;
        grid-auto-columns: minmax(100%, 100%);
        grid-auto-flow: column;
        grid-auto-rows: minmax(0, 1fr);
        grid-template-columns: none;
        grid-template-rows: minmax(0, 1fr);
        height: clamp(24rem, 36vw, 32rem);
        margin: 0;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.75rem;
        scroll-padding-inline: 0.75rem;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        touch-action: pan-y;
        user-select: none;
    }

    body[data-page="index"] .about-gallery::-webkit-scrollbar {
        display: none;
    }

    body[data-page="index"] .about-gallery.is-dragging {
        cursor: grabbing;
        scroll-snap-type: none;
    }

    body[data-page="index"] .about-gallery.is-auto-slider {
        scroll-behavior: auto;
        scroll-snap-type: none;
    }

    body[data-page="index"] .about-gallery img,
    body[data-page="index"] .about-gallery img:first-child {
        aspect-ratio: 3 / 2;
        border-radius: 1rem;
        height: auto;
        max-height: 100%;
        grid-row: auto;
        min-height: 0;
        min-width: 0;
        object-fit: contain;
        object-position: center;
        scroll-snap-align: center;
        width: 100%;
    }

    body[data-page="index"] .contact-grid {
        display: grid;
        gap: 1rem;
        grid-template-columns: 1fr;
    }

    body[data-page="index"] .contact-card {
        align-content: start;
        min-height: 0;
        padding: 1.15rem;
    }

    body[data-page="index"] .contact-card p {
        margin-bottom: 0.85rem;
    }

    body[data-page="index"] .contact-action {
        margin-top: auto;
        min-height: 3rem;
    }
}
