/* ────────────────────────────────────────────────────────────
   kalon-tides — page-specific overrides
   ──────────────────────────────────────────────────────────── */

/* ─── Hero ─── */

.kt-hero {
    position: relative;
    width: 100%;
    min-height: 360px;
    background-size: cover;
    background-position: center 55%;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
}

.kt-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient( to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 35%, rgba(0,0,0,0.40) 100% );
}

.kt-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 80px 24px 60px;
    max-width: 900px;
}

.kt-hero__title {
    font-size: clamp(28px, 4.5vw, 46px);
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.15;
    margin: 0 0 12px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.kt-hero__subtitle {
    font-size: clamp(14px, 1.8vw, 17px);
    margin: 0;
    opacity: 0.92;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    letter-spacing: 0.3px;
}

@media (max-width: 720px) {
    .kt-hero { min-height: 280px; }
    .kt-hero__content { padding: 60px 18px 40px; }
}


.kt-meta {
    font-size: 14px;
    color: var(--kalon-text-light, #6b6f74);
    text-align: center;
    margin: 0 auto 24px;
    max-width: 720px;
    line-height: 1.55;
}

.kt-meta strong {
    color: var(--kalon-text, #1a1f24);
    font-weight: 600;
}

/* ─── Tabs ─── */

.kt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 0 0 24px;
    padding: 0;
}

.kt-tab {
    background: #fff;
    border: 1px solid #d8d4cb;
    color: var(--kalon-text, #1a1f24);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    line-height: 1;
}

.kt-tab:hover {
    border-color: var(--kalon-cyan, #2a9d8f);
    color: var(--kalon-cyan, #2a9d8f);
}

.kt-tab--active,
.kt-tab--active:hover {
    background: var(--kalon-cyan, #2a9d8f);
    color: #fff;
    border-color: var(--kalon-cyan, #2a9d8f);
}

.kt-tab:focus-visible {
    outline: 2px solid var(--kalon-green, #5fa779);
    outline-offset: 2px;
}

/* ─── Table ─── */

.kt-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #ece8df;
    border-radius: 10px;
    background: #fff;
}

.kt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    line-height: 1.4;
}

.kt-table thead th {
    background: var(--kalon-cream, #f7f3ec);
    color: var(--kalon-text, #1a1f24);
    font-weight: 600;
    text-align: center;
    padding: 12px 8px;
    border-bottom: 2px solid #e0dccf;
    white-space: nowrap;
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.kt-table .kt-th--low  { color: #2a7596; }
.kt-table .kt-th--high { color: #b27340; }

.kt-table tbody td,
.kt-table tbody th {
    padding: 0;
    border-bottom: 1px solid #f0ece1;
    text-align: center;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

.kt-table tbody th {
    padding: 10px 12px 10px 16px;
}

.kt-cell-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 12px 10px;
    line-height: 1.2;
    min-height: 56px;
}

.kt-table tbody tr:last-child td,
.kt-table tbody tr:last-child th {
    border-bottom: none;
}

.kt-table tbody tr:nth-child(even) {
    background: #fbfaf6;
}

.kt-table tbody tr:hover {
    background: #f4f0e6;
}

.kt-table .kt-date {
    text-align: left;
    white-space: nowrap;
    padding-left: 16px;
    padding-right: 12px;
}

.kt-table .kt-dow {
    display: block;
    color: var(--kalon-text-light, #6b6f74);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.kt-table .kt-md {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: var(--kalon-text, #1a1f24);
}

/* ─── Tide cells (stacked time + height) ─── */

.kt-cell {
    line-height: 1.25;
}

.kt-cell .kt-time {
    font-size: 15px;
    font-weight: 600;
    color: var(--kalon-text, #1a1f24);
    letter-spacing: 0.2px;
}

.kt-cell .kt-arrow {
    display: inline-block;
    margin-right: 4px;
    font-size: 11px;
    opacity: 0.55;
    vertical-align: 1px;
}

.kt-cell .kt-height {
    font-size: 12px;
    color: var(--kalon-text-light, #6b6f74);
}

.kt-cell--low  { background: #eef6f9; }
.kt-cell--high { background: #faf2e6; }

.kt-table tbody tr:nth-child(even) .kt-cell--low  { background: #e6f0f5; }
.kt-table tbody tr:nth-child(even) .kt-cell--high { background: #f5ecdb; }

.kt-cell--low .kt-time  { color: #1f5874; }
.kt-cell--high .kt-time { color: #8a522a; }

.kt-cell--empty {
    color: #cbcbcb;
}

/* ─── Sun cell ─── */

.kt-cell--sun {
    font-size: 12px;
    color: var(--kalon-text-light, #6b6f74);
    white-space: nowrap;
}

.kt-cell--sun .kt-cell-inner {
    gap: 4px;
}

.kt-sun-row {
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}

.kt-sun-icon {
    display: inline-block;
    width: 1em;
    margin-right: 3px;
    color: #c89e4a;
    font-weight: 700;
}

.kt-sun-icon--down { color: #b27340; }

/* ─── Moon cell ─── */

.kt-cell--moon .kt-cell-inner {
    gap: 4px;
}

.kt-moon-emoji {
    font-size: 22px;
    line-height: 1;
}

.kt-moon-name {
    font-size: 11px;
    color: var(--kalon-text-light, #6b6f74);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.kt-cell--moon-mark .kt-moon-name {
    color: var(--kalon-text, #1a1f24);
    font-weight: 600;
}

/* ─── Date-picker lookup card ─── */

.kt-lookup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 24px;
    flex-wrap: wrap;
}

.kt-lookup__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--kalon-text, #1a1f24);
}

.kt-lookup__input {
    font-family: inherit;
    font-size: 16px;
    padding: 10px 14px;
    border: 1px solid #d8d4cb;
    border-radius: 8px;
    background: #fff;
    color: var(--kalon-text, #1a1f24);
    min-width: 180px;
}

.kt-lookup__input:focus {
    outline: 2px solid var(--kalon-cyan, #2a9d8f);
    outline-offset: 1px;
    border-color: var(--kalon-cyan, #2a9d8f);
}

.kt-lookup__result {
    max-width: 560px;
    margin: 0 auto;
}

.kt-card {
    background: #fff;
    border: 1px solid #ece8df;
    border-radius: 12px;
    padding: 22px 26px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.kt-card__date {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 18px;
    color: var(--kalon-text, #1a1f24);
}

.kt-card__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
    margin-bottom: 18px;
}

.kt-card__row {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: #fafaf7;
    border: 1px solid #f0ece1;
}

.kt-card__row--low  { background: #eef6f9; border-color: #d8eaf0; }
.kt-card__row--high { background: #faf2e6; border-color: #f3e4cf; }

.kt-card__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--kalon-text-light, #6b6f74);
    margin-bottom: 4px;
}

.kt-card__time {
    font-size: 20px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--kalon-text, #1a1f24);
}

.kt-card__height {
    font-size: 14px;
    color: var(--kalon-text-light, #6b6f74);
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

.kt-card__sun {
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 14px 0;
    border-top: 1px solid #f0ece1;
    border-bottom: 1px solid #f0ece1;
    font-size: 14px;
    color: var(--kalon-text-light, #6b6f74);
}

.kt-card__sun strong {
    color: var(--kalon-text, #1a1f24);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.kt-card__moon {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    font-size: 14px;
    color: var(--kalon-text-light, #6b6f74);
}

.kt-card__moon .kt-card__moon-emoji {
    font-size: 22px;
    line-height: 1;
}

/* ─── Per-month narrative intro ─── */

.kt-intro__inner {
    max-width: 760px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.7;
    color: var(--kalon-text, #1a1f24);
}

.kt-intro__inner p {
    margin: 0 0 16px;
}

.kt-intro__inner p:last-child {
    margin-bottom: 0;
}

.kt-intro__inner a {
    color: var(--kalon-cyan, #2a9d8f);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.kt-intro__inner a:hover {
    text-decoration-thickness: 2px;
}

@media (max-width: 720px) {
    .kt-intro__inner { font-size: 15px; line-height: 1.65; }
}

/* ─── Month navigation (prev / hub / next) ─── */

.kt-monthnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 18px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #ece8df;
    border-radius: 10px;
}

.kt-monthnav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--kalon-text, #1a1f24);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.kt-monthnav__link:hover {
    background: var(--kalon-cream, #f7f3ec);
    color: var(--kalon-cyan, #2a9d8f);
}

.kt-monthnav__arrow {
    font-size: 16px;
    opacity: 0.6;
}

.kt-monthnav__hub {
    color: var(--kalon-cyan, #2a9d8f);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 6px 14px;
    border: 1px solid var(--kalon-cyan, #2a9d8f);
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}

.kt-monthnav__hub:hover {
    background: var(--kalon-cyan, #2a9d8f);
    color: #fff;
}

.kt-monthnav__spacer {
    flex: 1;
    min-width: 80px;
}

/* ─── All-months strip (footer of monthly + hub pages) ─── */

.kt-allmonths {
    margin: 22px 0 0;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #ece8df;
    border-radius: 10px;
    text-align: center;
    line-height: 2;
}

.kt-allmonths__label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--kalon-text-light, #6b6f74);
    margin-right: 8px;
}

.kt-allmonths__link {
    display: inline-block;
    color: var(--kalon-text, #1a1f24);
    text-decoration: none;
    padding: 4px 10px;
    margin: 2px 1px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.kt-allmonths__link:hover {
    background: var(--kalon-cream, #f7f3ec);
    border-color: #e0dccf;
    color: var(--kalon-cyan, #2a9d8f);
}

.kt-allmonths__link--active {
    background: var(--kalon-cyan, #2a9d8f);
    color: #fff;
    border-color: var(--kalon-cyan, #2a9d8f);
}

.kt-allmonths__link--active:hover {
    background: var(--kalon-cyan, #2a9d8f);
    color: #fff;
}

/* ─── Swell forecast (7-day cards) ─── */

.kt-swell {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-top: 6px;
}

.kt-swell__card {
    background: #fff;
    border: 1px solid #ece8df;
    border-radius: 10px;
    padding: 16px 10px 14px;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kt-swell__card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.kt-swell__dow {
    font-size: 11px;
    font-weight: 600;
    color: var(--kalon-text-light, #6b6f74);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kt-swell__date {
    font-size: 13px;
    font-weight: 600;
    color: var(--kalon-text, #1a1f24);
    margin-bottom: 10px;
}

.kt-swell__height {
    font-size: 28px;
    font-weight: 700;
    color: var(--kalon-cyan, #2a9d8f);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.kt-swell__height span {
    font-size: 12px;
    font-weight: 500;
    color: var(--kalon-text-light, #6b6f74);
    margin-left: 2px;
}

.kt-swell__meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--kalon-text-light, #6b6f74);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kt-swell__dir {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.kt-swell__arrow {
    display: inline-block;
    width: 14px;
    height: 14px;
    text-align: center;
    line-height: 14px;
    font-size: 14px;
    color: var(--kalon-cyan, #2a9d8f);
    transform-origin: center;
}

.kt-swell__split {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0ece1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: var(--kalon-text-light, #6b6f74);
}

.kt-swell__sub {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kt-swell__sub-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--kalon-cyan, #2a9d8f);
}

.kt-swell__sub-val {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 920px) {
    .kt-swell { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .kt-swell { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kt-swell__height { font-size: 24px; }
}

/* ─── Mobile ─── */

@media (max-width: 720px) {
    .kt-table {
        font-size: 12px;
    }
    .kt-table thead th {
        padding: 8px 5px;
        font-size: 11px;
    }
    .kt-table tbody td,
    .kt-table tbody th {
        padding: 7px 5px;
    }
    .kt-table .kt-date {
        padding-left: 10px;
    }
    .kt-cell .kt-time  { font-size: 13px; }
    .kt-cell .kt-height { font-size: 11px; }
    .kt-moon-emoji { font-size: 18px; }
    .kt-moon-name  { font-size: 10px; }

    .kt-meta {
        font-size: 13px;
        text-align: left;
    }
    .kt-tab {
        padding: 7px 12px;
        font-size: 13px;
    }
    .kt-card {
        padding: 18px 16px;
    }
    .kt-card__time {
        font-size: 17px;
    }
    .kt-card__sun {
        gap: 16px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
