/**
 * PORTMASTER public homepage — v2 layout (index.php only).
 * Load Plus Jakarta Sans via a link tag in index.php (not @import) for faster first paint.
 */

:root {
    --hv2-navy: #031525;
    --hv2-navy-mid: #0a2540;
    --hv2-blue: #0c5c8c;
    --hv2-teal: #0d9488;
    --hv2-amber: #f59e0b;
    --hv2-coral: #e85d4c;
    --hv2-surface: #f4f7fb;
    --hv2-card: #ffffff;
    --hv2-text: #1e293b;
    --hv2-muted: #64748b;
    --hv2-line: rgba(15, 23, 42, 0.08);
    --hv2-radius: 1.25rem;
    --hv2-shadow: 0 20px 50px rgba(3, 21, 37, 0.08);
    --hv2-shadow-sm: 0 8px 24px rgba(3, 21, 37, 0.06);
}

body.home-v2 {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--hv2-text);
    background: var(--hv2-surface);
    -webkit-font-smoothing: antialiased;
}

body.home-v2 .navbar.pm-public-nav {
    background: linear-gradient(90deg, var(--hv2-navy) 0%, var(--hv2-navy-mid) 100%) !important;
    box-shadow: 0 4px 24px rgba(3, 21, 37, 0.25);
}

body.home-v2 .navbar.pm-public-nav .navbar-collapse .btn {
    border-radius: 0.65rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.hv2-main {
    padding-bottom: 3rem;
}

/* —— Hero —— */
.hv2-hero {
    position: relative;
    margin: 0 -0.75rem 2.5rem;
    padding: clamp(2rem, 5vw, 3.25rem) clamp(1rem, 3vw, 2rem);
    border-radius: 0 0 var(--hv2-radius) var(--hv2-radius);
    overflow: hidden;
    background: var(--hv2-navy);
    color: #fff;
}

@media (min-width: 576px) {
    .hv2-hero {
        margin-left: 0;
        margin-right: 0;
        border-radius: var(--hv2-radius);
    }
}

.hv2-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(13, 148, 136, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 90% 30%, rgba(12, 92, 140, 0.45) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 70% 100%, rgba(245, 158, 11, 0.12) 0%, transparent 45%);
    pointer-events: none;
}

.hv2-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.hv2-eyebrow {
    text-align: center;
    margin-bottom: 1.15rem;
}

.hv2-eyebrow-highlight {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0a0a0a;
    background: #fff;
    padding: 0.7rem 1.65rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.hv2-hero h1 {
    font-size: clamp(1.85rem, 5vw, 2.85rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 1.1rem;
}

.hv2-hero-ops {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 0.65rem;
    max-width: 36rem;
    margin: 0 auto 1.35rem;
    padding: 0;
}

.hv2-hero-ops li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hv2-hero-ops li i {
    color: #5eead4;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.hv2-lead {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    max-width: 38rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

.hv2-hero-cta .btn {
    border-radius: 0.75rem;
    font-weight: 800;
    padding: 0.85rem 1.5rem;
}

.hv2-hero-cta .btn-light {
    color: var(--hv2-navy-mid) !important;
}

.hv2-hero-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 1rem;
    margin-bottom: 0;
}

/* —— Section shell —— */
.hv2-section {
    margin-bottom: 2.5rem;
}

.hv2-section-head {
    margin-bottom: 1.25rem;
}

.hv2-section-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--hv2-navy);
    margin: 0 0 0.35rem;
}

.hv2-section-desc {
    font-size: 0.92rem;
    color: var(--hv2-muted);
    margin: 0;
    max-width: 40rem;
    line-height: 1.5;
}

/* —— Alerts: dual channel —— */
.hv2-channel-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .hv2-channel-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.hv2-channel-card {
    border-radius: var(--hv2-radius);
    padding: 1.35rem 1.35rem 1.25rem;
    border: 1px solid var(--hv2-line);
    background: var(--hv2-card);
    box-shadow: var(--hv2-shadow-sm);
    height: 100%;
}

.hv2-channel-card--wa {
    border-color: rgba(16, 185, 129, 0.25);
    background: linear-gradient(165deg, #ecfdf5 0%, #fff 45%);
}

.hv2-channel-card--mail {
    border-color: rgba(12, 92, 140, 0.22);
    background: linear-gradient(165deg, #eff6ff 0%, #fff 45%);
}

.hv2-channel-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.hv2-channel-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.hv2-channel-card--wa .hv2-channel-icon {
    background: #10b981;
    color: #fff;
}

.hv2-channel-card--mail .hv2-channel-icon {
    background: var(--hv2-blue);
    color: #fff;
}

.hv2-channel-name {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
    color: var(--hv2-navy);
}

.hv2-channel-text {
    font-size: 0.88rem;
    color: var(--hv2-muted);
    line-height: 1.55;
    margin: 0 0 0.85rem;
}

.hv2-channel-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.84rem;
    color: var(--hv2-text);
    line-height: 1.55;
}

.hv2-channel-list li {
    margin-bottom: 0.35rem;
}

.hv2-channel-foot {
    font-size: 0.75rem;
    color: var(--hv2-muted);
    margin: 0.85rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--hv2-line);
    line-height: 1.45;
}

/* Update topic chips */
.hv2-topic-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.hv2-topic {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: #fff;
    border: 1px solid var(--hv2-line);
    color: var(--hv2-navy-mid);
}

.hv2-topic i {
    color: var(--hv2-teal);
    font-size: 0.95rem;
}

/* —— Live stats —— */
.hv2-live-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hv2-live-updated {
    font-size: 0.8rem;
    color: var(--hv2-muted);
}

.hv2-stat-card {
    border-radius: var(--hv2-radius);
    border: 1px solid var(--hv2-line);
    background: var(--hv2-card);
    box-shadow: var(--hv2-shadow-sm);
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hv2-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hv2-shadow);
}

.hv2-stat-card-top {
    padding: 1.1rem 1.15rem 1rem;
    color: #fff;
    min-height: 7.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hv2-stat-card-top--a {
    background: linear-gradient(135deg, #0a2540 0%, #0c5c8c 100%);
}

.hv2-stat-card-top--b {
    background: linear-gradient(135deg, #713f12 0%, #b45309 95%);
}

.hv2-stat-card-top--c {
    background: linear-gradient(135deg, #134e4a 0%, #0d9488 100%);
}

.hv2-stat-ico {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.hv2-stat-card h3 {
    font-size: 1.02rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
    line-height: 1.25;
}

.hv2-stat-card .hv2-stat-sub {
    font-size: 0.78rem;
    margin: 0;
    opacity: 0.92;
    line-height: 1.4;
}

.hv2-stat-body {
    padding: 1.1rem 1.15rem 1.2rem;
    text-align: center;
}

.hv2-stat-num {
    display: block;
    font-size: clamp(1.85rem, 4vw, 2.35rem);
    font-weight: 800;
    color: var(--hv2-navy);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.hv2-stat-num--sm {
    font-size: clamp(1.35rem, 3vw, 1.65rem);
}

.hv2-stat-lbl {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--hv2-muted);
    margin-top: 0.4rem;
}

.hv2-stat-cta {
    margin-top: 0.85rem;
    border-radius: 0.65rem;
    font-weight: 700;
    font-size: 0.82rem;
}

/* —— Captain spotlight —— */
.hv2-captain {
    margin-bottom: 2.5rem;
    border-radius: calc(var(--hv2-radius) + 4px);
    padding: 3px;
    background: linear-gradient(125deg, var(--hv2-teal), var(--hv2-blue) 45%, var(--hv2-amber) 100%);
    box-shadow: var(--hv2-shadow);
}

.hv2-captain-inner {
    border-radius: var(--hv2-radius);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 40%);
    padding: clamp(1.25rem, 3vw, 2rem);
}

.hv2-captain-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hv2-teal);
    background: rgba(13, 148, 136, 0.12);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.hv2-captain h2 {
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    font-weight: 800;
    color: var(--hv2-navy);
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
}

.hv2-captain-lead {
    font-size: 0.95rem;
    color: var(--hv2-muted);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    max-width: 42rem;
}

.hv2-captain-grid {
    display: grid;
    gap: 0.65rem;
}

@media (min-width: 576px) {
    .hv2-captain-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .hv2-captain-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.hv2-cap-item {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.75rem 0.85rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid var(--hv2-line);
}

.hv2-cap-item i {
    color: var(--hv2-teal);
    font-size: 1.15rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.hv2-cap-item strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--hv2-navy);
    margin-bottom: 0.15rem;
}

.hv2-cap-item span {
    font-size: 0.78rem;
    color: var(--hv2-muted);
    line-height: 1.45;
}

.hv2-captain-reg {
    font-size: 0.85rem;
    color: var(--hv2-muted);
    margin: 1.15rem 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(13, 148, 136, 0.06);
    border: 1px solid rgba(13, 148, 136, 0.15);
}

.hv2-captain-reg strong {
    color: var(--hv2-navy);
}

.hv2-captain-cta .btn {
    border-radius: 0.75rem;
    font-weight: 800;
}

/* —— Directory —— */
.hv2-dir-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .hv2-dir-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .hv2-dir-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.hv2-dir-card {
    position: relative; /* for Bootstrap stretched-link */
    border-radius: 1rem;
    border: 1px solid var(--hv2-line);
    background: var(--hv2-card);
    padding: 1.1rem 0.9rem 1.15rem;
    text-align: center;
    box-shadow: var(--hv2-shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    height: 100%;
}

.hv2-dir-card:hover {
    border-color: rgba(12, 92, 140, 0.25);
    box-shadow: var(--hv2-shadow);
    transform: translateY(-2px);
}

.hv2-dir-ico {
    width: 2.85rem;
    height: 2.85rem;
    margin: 0 auto 0.65rem;
    border-radius: 0.9rem;
    background: linear-gradient(145deg, rgba(12, 92, 140, 0.1), rgba(13, 148, 136, 0.12));
    color: var(--hv2-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.hv2-dir-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--hv2-navy);
    margin: 0 0 0.3rem;
    line-height: 1.3;
}

.hv2-dir-text {
    font-size: 0.72rem;
    color: var(--hv2-muted);
    margin: 0;
    line-height: 1.4;
}

.hv2-dir-card:focus-within {
    outline: 2px solid rgba(12, 92, 140, 0.35);
    outline-offset: 2px;
}

/* —— Bottom CTA —— */
.hv2-bottom {
    border-radius: var(--hv2-radius);
    padding: clamp(1.5rem, 4vw, 2.25rem);
    text-align: center;
    background: linear-gradient(180deg, #fff 0%, #eef6ff 100%);
    border: 1px solid var(--hv2-line);
    box-shadow: var(--hv2-shadow-sm);
}

.hv2-bottom h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--hv2-navy);
    margin-bottom: 0.35rem;
}

.hv2-bottom p {
    font-size: 0.9rem;
    color: var(--hv2-muted);
    margin-bottom: 1.25rem;
}

.hv2-bottom .btn {
    border-radius: 0.75rem;
    font-weight: 800;
    padding: 0.75rem 1.5rem;
}
