/* FamyHub Portal — Mobile-first Orange Theme */
:root {
    --orange: #FF6B00;
    --orange-dark: #E05A00;
    --orange-light: #FF8C38;
    --orange-pale: #FFF3E8;
    --orange-bg: #FFF8F2;
    --white: #FFFFFF;
    --text-dark: #2D2D2D;
    --text-mid: #555555;
    --text-light: #888888;
    --border: #FFD9B8;
    --shadow: 0 2px 12px rgba(255,107,0,0.12);
    --shadow-lg: 0 4px 24px rgba(255,107,0,0.18);
    --radius: 14px;
    --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--orange-bg);
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
}

/* ── Header ── */
.site-header {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    max-width: 600px;
    margin: 0 auto;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    line-height: 1;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.logo-text span {
    font-size: 11px;
    opacity: 0.85;
    display: block;
    margin-top: -2px;
}

.header-time {
    text-align: right;
    font-size: 11px;
    opacity: 0.9;
}

.header-time .clock {
    font-size: 16px;
    font-weight: 600;
    display: block;
}

/* ── Disclaimer Banner ── */
.disclaimer-banner {
    background: rgba(255,107,0,0.08);
    border-bottom: 1px solid var(--border);
    padding: 7px 16px;
    text-align: center;
    font-size: 11px;
    color: var(--text-mid);
    max-width: 600px;
    margin: 0 auto;
}

.disclaimer-banner strong { color: var(--orange); }

/* ── Main Container ── */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 12px 24px;
}

/* ── Weather Card ── */
.weather-card {
    background: linear-gradient(145deg, var(--orange) 0%, var(--orange-dark) 100%);
    border-radius: var(--radius);
    color: var(--white);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.weather-card::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.weather-card::after {
    content: '';
    position: absolute;
    bottom: -20px; left: -20px;
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.weather-location {
    font-size: 12px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.weather-date {
    font-size: 12px;
    opacity: 0.75;
    margin-bottom: 12px;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.weather-icon-big {
    font-size: 56px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.weather-temp-wrap .temp {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.weather-temp-wrap .feels {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

.weather-condition {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
}

.weather-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.weather-detail-item {
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 12px;
    backdrop-filter: blur(4px);
}

.weather-detail-item .label {
    opacity: 0.8;
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.weather-detail-item .value {
    font-weight: 600;
    font-size: 14px;
}

.weather-loading, .weather-error {
    text-align: center;
    padding: 30px;
    font-size: 14px;
    opacity: 0.85;
}

.spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 3px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forecast Strip ── */
.forecast-strip {
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.forecast-strip h3 {
    font-size: 13px;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    font-weight: 700;
}

.forecast-row {
    display: flex;
    gap: 8px;
    min-width: max-content;
}

.forecast-day {
    background: var(--orange-pale);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    text-align: center;
    min-width: 68px;
    border: 1px solid var(--border);
}

.forecast-day .day-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.forecast-day .day-icon { font-size: 22px; margin: 4px 0; }

.forecast-day .day-high {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.forecast-day .day-low {
    font-size: 11px;
    color: var(--text-light);
}

.forecast-day .day-rain {
    font-size: 10px;
    color: #4A90D9;
    margin-top: 2px;
}

/* ── Tabs ── */
.tabs-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 12px;
}

.tab-nav {
    display: flex;
    background: var(--orange-pale);
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
    flex: 0 0 auto;
    padding: 12px 14px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mid);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    min-width: 60px;
}

.tab-btn:hover { background: rgba(255,107,0,0.08); color: var(--orange); }

.tab-btn.active {
    color: var(--orange);
    border-bottom-color: var(--orange);
    background: var(--white);
}

.tab-btn .tab-icon { font-size: 18px; line-height: 1; }
.tab-btn .tab-label { font-size: 10px; }

.tab-panel { display: none; padding: 16px; }
.tab-panel.active { display: block; }

/* ── Empty note ── */
.empty-note {
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    padding: 20px 0;
}
.empty-note a { color: var(--orange); }

/* ── Hotlines ── */
.hotline-category {
    margin-bottom: 18px;
}

.hotline-category:last-child { margin-bottom: 0; }

.category-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--orange);
    padding: 4px 10px;
    background: var(--orange-pale);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.hotline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--orange-pale);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    border: 1px solid var(--border);
    gap: 12px;
}

.hotline-info { flex: 1; min-width: 0; }

.hotline-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hotline-desc {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hotline-call-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--orange);
    color: var(--white);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.hotline-call-btn:hover { background: var(--orange-dark); }

/* ── About Tab ── */
.about-section { font-size: 13px; color: var(--text-mid); }

.about-section h4 {
    color: var(--orange);
    font-size: 14px;
    margin-bottom: 6px;
    margin-top: 14px;
}

.about-section h4:first-child { margin-top: 0; }

.about-section p { margin-bottom: 8px; line-height: 1.6; }

.disclaimer-box {
    background: var(--orange-pale);
    border: 1px solid var(--border);
    border-left: 4px solid var(--orange);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-mid);
    line-height: 1.6;
}

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 16px;
    font-size: 11px;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    background: var(--white);
    margin-top: 8px;
}

.site-footer a {
    color: var(--orange);
    text-decoration: none;
}

/* ── Admin Link ── */
.admin-link-wrap {
    text-align: center;
    padding: 8px;
}

.admin-link-wrap a {
    font-size: 11px;
    color: var(--text-light);
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
}

.admin-link-wrap a:hover { color: var(--orange); border-color: var(--orange); }

/* ── Pulse Badge ── */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--white);
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pulse-dot {
    width: 6px; height: 6px;
    background: #7FFF7F;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ── Content Sections (History, Officials, Tourism) ── */
.content-section { font-size: 14px; }

.content-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--orange);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.content-title-icon { font-size: 20px; }

/* ── Rich HTML content (history) ── */
.rich-content { color: var(--text-dark); line-height: 1.7; font-size: 13.5px; }
.rich-content p { margin-bottom: 12px; }
.rich-content h4 {
    color: var(--orange);
    font-size: 14px;
    font-weight: 700;
    margin: 18px 0 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.rich-content strong { color: var(--text-dark); }

/* ── Officials ── */
.officials-term-note {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 14px;
    background: var(--orange-pale);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    border: 1px solid var(--border);
}

.officials-group { margin-bottom: 18px; }
.officials-group:last-child { margin-bottom: 0; }

.officials-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--orange);
    margin-bottom: 10px;
}

.official-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--orange-pale) 0%, var(--white) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
}

.official-icon { font-size: 32px; flex-shrink: 0; }

.official-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
}

.official-position {
    font-size: 12px;
    color: var(--orange);
    font-weight: 600;
    margin-top: 2px;
}

.official-office {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.councilors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.councilor-card {
    background: var(--orange-pale);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    text-align: center;
}

.councilor-icon { font-size: 20px; margin-bottom: 4px; }

.councilor-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

.councilor-pos {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ── Tourist Spots ── */
.spot-category-section { margin-bottom: 18px; }
.spot-category-section:last-child { margin-bottom: 0; }

.spot-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.spot-header { margin-bottom: 8px; }

.spot-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.spot-location {
    font-size: 11px;
    color: var(--orange);
    margin-top: 3px;
    font-weight: 600;
}

.spot-desc {
    font-size: 12.5px;
    color: var(--text-mid);
    line-height: 1.6;
    margin-bottom: 10px;
}

.spot-directions {
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 4px;
}

.spot-directions summary {
    font-size: 12px;
    font-weight: 700;
    color: var(--orange);
    cursor: pointer;
    outline: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 0;
}

.spot-directions summary::-webkit-details-marker { display: none; }

.spot-directions[open] summary { margin-bottom: 8px; }

.spot-directions p {
    font-size: 12px;
    color: var(--text-mid);
    line-height: 1.6;
    background: var(--orange-pale);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    border: 1px solid var(--border);
}

/* ── Responsive tweak for slightly wider screens ── */
@media (min-width: 480px) {
    .weather-temp-wrap .temp { font-size: 52px; }
    .weather-icon-big { font-size: 64px; }
    .tab-btn { padding: 13px 18px; }
    .tab-btn .tab-label { font-size: 11px; }
    .councilors-grid { grid-template-columns: 1fr 1fr 1fr; }
}
