/* --- THE VIZCACHAS DESIGN SYSTEM --- */
/* VDB Green: #263C30 | Deep Green: #14221B | Mint: #BFD8C6 | Body Grey-Green: #E4EEE7 | Secondary: #798487 */
/* Chart marks use #2F6B4F (saturated green, validated >= 3:1 on white card surface) */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;1,600;1,700&display=swap');

:root {
    --vdb-green: #263C30;
    --deep-green: #14221B;
    --mint: #BFD8C6;
    --body-green: #E4EEE7;
    --grey: #798487;
    --chart-green: #2F6B4F;
}

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

body {
    background-color: var(--vdb-green);
    color: var(--body-green);
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.02em;
}

/* Display headings echo the italic slant of the VDB logotype */
h1, h2 { font-style: italic; font-weight: 700; }
h3, h4 { font-weight: 600; }

h2 { font-size: 2.4rem; margin-bottom: 20px; color: #ffffff; }
.form-container h2 { color: var(--vdb-green); }

/* --- BRAND ELEMENTS (eyebrow / accent rule / CTA) --- */
.eyebrow {
    color: var(--mint);
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-weight: 500;
    font-size: 0.8rem;
}

.accent-rule {
    display: inline-block;
    width: 56px;
    height: 4px;
    background: var(--mint);
    flex: 0 0 auto;
}

.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.cta-pill {
    display: inline-block;
    border: 3px solid var(--mint);
    border-radius: 42px;
    padding: 12px 26px;
    color: var(--mint);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    background: transparent;
    text-decoration: none;
    transition: all 0.3s ease;
}
.cta-pill:hover {
    background: var(--mint);
    color: var(--deep-green);
    transform: translateY(-2px);
}

/* --- FLUID SCROLL ANIMATIONS --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
/* Staggered delays for a cascading effect */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

.view-section { display: none; opacity: 0; transition: opacity 0.5s ease; }
.view-section.active { display: block; opacity: 1; }

.navbar {
    background: transparent;
    display: flex;
    justify-content: space-between;
    padding: 2rem 5%;
    align-items: center;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    color: white;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.logo:hover { transform: scale(1.05) rotate(-2deg); }
.logo-img { height: 35px; margin-right: 12px; mix-blend-mode: screen; pointer-events: none;}

.nav-links button {
    background: none;
    border: none;
    color: var(--body-green);
    cursor: pointer;
    margin-left: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
}
.nav-links button:hover {
    color: var(--mint);
    background: rgba(255,255,255,0.05);
    transform: translateY(-2px);
}

/* --- SIGNATURE GRADIENT HERO (photo eased into brand green) --- */
.hero-banner {
    position: relative;
    min-height: 72vh;
    display: flex;
    align-items: flex-end;
    margin-top: -100px; /* photo runs behind the transparent navbar */
    background:
        linear-gradient(to top, #14221B 0%, rgba(20, 34, 27, 0.92) 18%, rgba(20, 34, 27, 0.58) 48%, rgba(20, 34, 27, 0) 82%),
        linear-gradient(to bottom, rgba(38, 60, 48, 0.3) 0%, rgba(38, 60, 48, 0) 40%),
        url('VDB_Penang2022.jpg') center 30% / cover no-repeat;
}
.hero-banner-content {
    padding: 140px 5% 70px;
    max-width: 980px;
}
.hero-banner .eyebrow { display: block; margin-bottom: 18px; }
.hero-banner h1 {
    font-size: 5.4rem;
    color: #ffffff;
    line-height: 1.05;
    margin-bottom: 16px;
}
.hero-body {
    color: var(--body-green);
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.7;
    max-width: 640px;
    margin-bottom: 30px;
}

/* Secondary heroes (inner pages) */
.hero {
    text-align: center;
    padding: 80px 20px 40px;
}
.hero h1 { font-size: 3.6rem; color: #ffffff; margin-bottom: 12px; }
.hero p { font-size: 1.15rem; color: var(--body-green); font-weight: 300; }

.container { max-width: 1100px; margin: 20px auto 60px; padding: 0 20px; }
.form-container { max-width: 500px; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* --- OBJECT-LIKE CARDS --- */
.card, .form-container {
    background: #fdfdfd;
    color: var(--vdb-green);
    padding: 35px;
    border-radius: 24px;
    /* Soft, multi-layered shadow for 3D depth */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1), 0 20px 60px rgba(0,0,0,0.15);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    z-index: 1;
}

.card:hover, .form-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15), 0 30px 80px rgba(0,0,0,0.2);
    z-index: 2;
}

.card h3 {
    border-bottom: 1px solid rgba(121, 132, 135, 0.2);
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.6rem;
    color: var(--vdb-green);
}

.card h4 { color: var(--vdb-green) !important; border-bottom-color: rgba(121, 132, 135, 0.2) !important;}
.card p, .card strong, .card small, .card span { color: var(--vdb-green) !important; }

ul { list-style: none; }
ul li {
    background: #ffffff;
    padding: 14px 18px;
    margin-bottom: 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    border-left: 4px solid var(--grey);
    color: var(--vdb-green);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
ul li:hover {
    transform: translateX(6px) scale(1.01);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    border-left-color: var(--mint);
}

input, textarea, select {
    width: 100%;
    padding: 14px 16px;
    margin: 8px 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: var(--vdb-green);
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--chart-green);
    box-shadow: 0 0 0 4px rgba(191, 216, 198, 0.35), inset 0 2px 4px rgba(0,0,0,0.02);
}

.split-inputs { display: flex; gap: 15px; }
.input-group { display: flex; align-items: center; margin-bottom: 10px; }
.input-group label { flex: 1; font-weight: 500; color: var(--vdb-green); font-size: 0.9rem; }
.input-group input, .input-group select { flex: 2; margin: 0; }

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

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.btn-primary {
    background: var(--vdb-green);
    color: white;
    box-shadow: 0 6px 15px rgba(38, 60, 48, 0.2);
}
.btn-primary:hover {
    background: var(--deep-green);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(38, 60, 48, 0.3);
}
.btn-primary:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(38, 60, 48, 0.2); }

.btn-secondary {
    background: var(--grey);
    color: white;
    box-shadow: 0 6px 15px rgba(121, 132, 135, 0.2);
}
.btn-secondary:hover {
    background: #636d70;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(121, 132, 135, 0.3);
}
.btn-secondary:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(121, 132, 135, 0.2); }

/* ========================================= */
/* --- DRAGGABLE PHOTO CAROUSEL ------------ */
/* ========================================= */
.carousel-container {
    width: 100%;
    overflow-x: auto;
    cursor: grab;
    padding: 10px 20px 40px;
    scrollbar-width: none;
}
.carousel-container::-webkit-scrollbar { display: none; }
.carousel-container:active { cursor: grabbing; }

.carousel-track {
    display: flex;
    gap: 25px;
    width: max-content;
}

.carousel-img {
    height: 300px;
    width: auto;
    border-radius: 20px;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* Brand photo treatment: brightness x1.03, contrast x1.08, saturation x1.14 */
    filter: brightness(1.03) contrast(1.08) saturate(1.14);
}

.carousel-img:hover {
    transform: scale(1.04) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    filter: brightness(1.1) contrast(1.08) saturate(1.14);
}

/* ========================================= */
/* --- FLUID MULTI-BOAT BALANCER UI -------- */
/* ========================================= */
.boat-balancer-container { display: flex; gap: 25px; margin-top: 15px; }
.roster-panel { flex: 1; background: #e9ecec; padding: 20px; border-radius: 20px; border: 1px solid rgba(121, 132, 135, 0.2); }
.paddler-pool { display: flex; flex-wrap: wrap; gap: 12px; min-height: 200px; align-content: flex-start; }

.paddler-token {
    background: var(--vdb-green); color: white !important; padding: 10px 14px;
    border-radius: 12px; cursor: grab; text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); font-size: 0.85rem;
    min-width: 85px; transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.paddler-token strong, .paddler-token small { color: white !important; }
.paddler-token:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 10px 20px rgba(0,0,0,0.25); }
.paddler-token:active { transform: scale(0.95); cursor: grabbing; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.boat-panel {
    flex: 2; background: #ffffff; padding: 25px; border-radius: 20px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02); overflow-x: auto; width: 100%;
}
.boats-wrapper { display: flex; gap: 30px; }
.single-boat-container { display: flex; flex-direction: column; align-items: center; min-width: 320px; }
.weight-scoreboard {
    display: flex; justify-content: space-between; width: 100%; margin-bottom: 25px;
    background: #f4f6f6; padding: 15px; border-radius: 12px; font-weight: 600; color: var(--vdb-green);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}
.weight-box.diff { color: var(--grey) !important; text-align: center; flex: 1; }

.boat-hull {
    background: #e9ecec; padding: 25px; border-radius: 60px 60px 16px 16px;
    width: 100%; border: 2px solid var(--grey); display: flex; flex-direction: column; gap: 12px;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.05);
}
.seat-row { display: flex; justify-content: space-between; gap: 12px; }
.seat-row.single { justify-content: center; }

.seat {
    background: #ffffff; border: 2px dashed #a0abae; height: 75px;
    width: 100%; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    color: #a0abae; font-size: 0.85rem; position: relative; overflow: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.seat:hover { background: #fdfdfd; border-style: solid; border-color: var(--chart-green); color: var(--chart-green);}
.seat.wrong-side { border-color: #e63946; background-color: #fff1f2; animation: gentleShake 0.4s ease; }

@keyframes gentleShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

.seat .paddler-token {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; padding: 4px;
    box-sizing: border-box; display: flex; flex-direction: column; justify-content: center;
    align-items: center; border-radius: 10px;
}

/* Admin Image Dropzone */
.dropzone {
    border: 2px dashed var(--grey);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    color: var(--grey);
    transition: all 0.3s ease;
    background: #ffffff;
    cursor: pointer;
}
.dropzone.dragover {
    background: #e9ecec;
    border-color: var(--chart-green);
    color: var(--vdb-green);
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .navbar { flex-direction: column; padding: 1.5rem; gap: 15px; }
    .hero-banner { min-height: 60vh; margin-top: -140px; }
    .hero-banner-content { padding: 180px 24px 50px; }
    .hero-banner h1 { font-size: 3.2rem; }
    .hero-body { font-size: 1.05rem; }
    .hero { padding: 40px 20px 20px; }
    .hero h1 { font-size: 2.6rem; }
    .split-inputs { flex-direction: column; gap: 0; }
    .input-group { flex-direction: column; align-items: flex-start; }
    .input-group label { margin-bottom: 5px; }
    .input-group input, .input-group select { width: 100%; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .boat-balancer-container { flex-direction: column; }
}

/* --- MOBILE RESPONSIVE FIXES --- */
@media screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px 10px;
    }

    .nav-links {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 5px;

        /* Smooth scrolling on mobile */
        -webkit-overflow-scrolling: touch;

        /* Hide scrollbar for a cleaner app look */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

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

    .nav-links button {
        flex: 0 0 auto; /* Prevents buttons from squishing */
        white-space: nowrap;
        margin: 0 5px;
        font-size: 0.9rem;
    }
}
