/* Island profile pages (island.php, islands.php) — loaded only on these pages via $extra_head */

/* ---------- Hero ---------- */
.vj-island-hero {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 420px;
    box-shadow: var(--shadow);
}
.vj-island-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.vj-island-hero-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 28px 32px;
    background: linear-gradient(180deg, rgba(0,42,74,0) 0%, rgba(0,42,74,.75) 100%);
    color: #fff;
}
.vj-island-hero-caption h1 {
    font-size: 32px;
    margin: 0 0 4px;
    color: #fff;
}
.vj-island-hero-atoll {
    font-size: 14px;
    opacity: .9;
    letter-spacing: .3px;
}

/* ---------- Two-column body (reuses .vj-article-box: 1fr 320px) ---------- */
.vj-island-main { min-width: 0; font-size: 16px; line-height: 1.7; color: var(--text); }

.vj-island-main h2 {
    font-size: 24px;
    margin: 36px 0 14px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
    color: var(--navy);
}
.vj-island-main h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.vj-island-main h3 {
    font-size: 18px;
    margin: 22px 0 10px;
    color: var(--navy-2);
}
.vj-island-main p { margin: 0 0 14px; }
.vj-island-main ul { margin: 0 0 16px; padding-left: 22px; }
.vj-island-main li { margin-bottom: 6px; }
.vj-island-main strong { color: var(--text); }

.vj-island-main table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 24px;
    font-size: 14.5px;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
}
.vj-island-main table tr { border-bottom: 1px solid var(--line); }
.vj-island-main table tr:last-child { border-bottom: none; }
.vj-island-main table td, .vj-island-main table th {
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}
.vj-island-main table th {
    background: var(--navy);
    color: #fff;
    font-weight: 700;
}
.vj-island-main table tr:nth-child(even) td { background: var(--bg-soft); }
.vj-island-main table tr:first-child td:first-child { font-weight: 600; }

/* first ("at a glance") table's left column reads as a label column */
.vj-island-main table tr td:first-child { font-weight: 600; color: var(--navy-2); width: 42%; }

/* ---------- Gallery ---------- */
.vj-island-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0 4px; }
.vj-island-gallery-item img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; }
.vj-island-photo-credit { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin: 8px 0 20px; }
.vj-island-photo-credit a { color: var(--blue); }

/* ---------- Sidebar: facts card ---------- */
.vj-island-facts, .vj-island-map-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    position: sticky;
    top: 100px;
}
.vj-island-map-card { margin-top: 20px; position: static; }
.vj-island-facts-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 14px;
}
.vj-island-fact {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13.5px;
}
.vj-island-fact:last-child { border-bottom: none; }
.vj-island-fact-label { color: var(--muted); flex: 0 0 42%; }
.vj-island-fact-value { color: var(--text); font-weight: 600; text-align: right; flex: 1 1 auto; }

/* ---------- Map ---------- */
#islandMap { height: 240px; border-radius: 8px; overflow: hidden; margin-top: 4px; z-index: 1; }
.vj-island-map-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--blue);
}

/* ---------- FAQ accordion ---------- */
.vj-faq-list { border-top: 1px solid var(--line); }
.vj-faq-item { border-bottom: 1px solid var(--line); }
.vj-faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 4px;
    background: none;
    border: none;
    text-align: left;
    font: inherit;
    font-weight: 700;
    font-size: 15.5px;
    color: var(--text);
    cursor: pointer;
}
.vj-faq-icon {
    flex: 0 0 auto;
    width: 18px; height: 18px;
    position: relative;
}
.vj-faq-icon::before, .vj-faq-icon::after {
    content: '';
    position: absolute;
    background: var(--accent);
    transition: transform .2s ease;
}
.vj-faq-icon::before { left: 0; top: 8px; width: 18px; height: 2px; }
.vj-faq-icon::after { left: 8px; top: 0; width: 2px; height: 18px; }
.vj-faq-q[aria-expanded="true"] .vj-faq-icon::after { transform: rotate(90deg); opacity: 0; }
.vj-faq-a { padding: 0 4px 18px; color: var(--muted); font-size: 15px; line-height: 1.65; }

/* ---------- Islands index grid (reuses .vj-grid-box/.vj-grid-elem; small extras) ---------- */
.vj-island-card-atoll { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.vj-islands-intro { max-width: 760px; color: var(--muted); font-size: 16px; line-height: 1.7; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .vj-island-hero { height: 300px; }
    .vj-island-hero-caption h1 { font-size: 26px; }
    .vj-island-facts, .vj-island-map-card { position: static; }
}
@media (max-width: 720px) {
    .vj-island-hero { height: 220px; }
    .vj-island-gallery { grid-template-columns: repeat(2, 1fr); }
    .vj-island-main table { font-size: 13.5px; }
}
