/* ── Reset & base ─────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    height: 100%;
    overflow: hidden; /* prevent viewport expansion from overflowing content */
}

body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    -webkit-tap-highlight-color: transparent;
}

/* ── App container ────────────────────────────────────────────────────── */

.app {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgb(0,98,155); /* default — updated by JS on section change */
    transition: background 0.35s ease;
}

/* ── Sections outer wrapper — clips the sliding track ─────────────────── */

.sections-outer {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden; /* the critical clip */
}

/* ── Sections track — slides horizontally inside the outer ────────────── */

.sections-track {
    position: absolute;
    top: 0; left: 0;
    width: 400%; /* 4 sections × 100% of outer */
    height: 100%;
    display: flex;
    transition: transform 0.35s ease;
    will-change: transform;
}

.section {
    width: 25%; /* 100% / 4 sections = 25% of track = 100% of outer */
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
}

/* ── Section header ───────────────────────────────────────────────────── */

.section-header {
    flex-shrink: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 12px 0 16px;
}

.section-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.section-label {
    font-size: 26px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

.refresh-btn {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    opacity: 0.85;
}

.refresh-btn img {
    width: 28px;
    height: 28px;
    display: block;
}

/* ── Important notice ─────────────────────────────────────────────────── */

.important-fixed {
    flex-shrink: 0;
    margin: 10px 12px;
    background: rgb(235,67,52);
    border-radius: 8px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
}

.important-text {
    font-size: 17px;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
    text-align: center;
}

/* ── Scrollable content area ──────────────────────────────────────────── */

.section-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.section-scroll::-webkit-scrollbar { display: none; }

/* ── Information — slides ─────────────────────────────────────────────── */

.slide-stack { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }

.slide-img {
    width: 100%;
    max-width: 100%; /* belt and braces */
    height: auto;
    border-radius: 8px;
    display: block;
}

/* ── Weather ──────────────────────────────────────────────────────────── */



/* ── Weather — inline ─────────────────────────────────────────────────── */

.weather-list {
    padding: 16px 16px 0;
    max-width: 480px;
}

.weather-row {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 16px;
}

.weather-row:last-child {
    border-bottom: none;
}

.weather-day {
    font-size: 22px;
    color: #333;
    width: 160px;
    flex-shrink: 0;
}

.weather-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.weather-temp {
    font-size: 20px;
    font-weight: 500;
    color: #222;
    white-space: nowrap;
}

/* ── Contacts ─────────────────────────────────────────────────────────── */

.contacts-list { padding: 12px; display: flex; flex-direction: column; gap: 10px; max-width: 480px; }

.contact-card { border-radius: 10px; overflow: hidden; border: 1px solid #ebebeb; }

.contact-name { background: rgb(119,189,34); color: #fff; padding: 12px 16px; font-size: 18px; font-weight: 500; line-height: 1.2; }

.contact-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; font-size: 19px; color: rgb(68,68,68); text-decoration: none; }

.call-btn { width: 36px; height: 36px; background: rgb(119,189,34); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── News — stacked card layout ───────────────────────────────────────── */

.news-list { padding: 12px; display: flex; flex-direction: column; gap: 12px; }

.news-card { border-radius: 10px; overflow: hidden; border: 1px solid #ebebeb; display: flex; flex-direction: column; }

.news-img { width: 100%; height: 180px; object-fit: cover; display: block; flex-shrink: 0; }

.news-body { padding: 12px 14px 14px; }

.news-title { font-size: 17px; font-weight: 500; color: #222; line-height: 1.5; }

.news-desc { font-size: 17px; font-weight: 400; color: #222; line-height: 1.5; }



/* ── Arrow nav bar ────────────────────────────────────────────────────── */

.arrow-nav {
    flex-shrink: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.arrow-nav-island {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 12px;
    height: 46px;
    width: calc(100% - 28px);
    padding: 0 8px;
}

.arrow-btn { width: 42px; height: 42px; border: none; border-radius: 50%; background: #f0f0f0; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }

.arrow-btn:disabled { opacity: 0.2; cursor: default; }

.arrow-btn svg { width: 18px; height: 18px; display: block; }

.nav-centre { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }

.nav-pips { display: flex; gap: 7px; align-items: center; }

.nav-pip { width: 8px; height: 8px; border-radius: 50%; background: #ddd; transition: background 0.2s, transform 0.2s; }

.nav-pip.active { transform: scale(1.5); }

/* ── Miscellaneous ────────────────────────────────────────────────────── */

.empty-msg { padding: 32px 16px; color: #aaa; font-size: 17px; text-align: center; }
