/* ================================================
   FORTU FAMILY — MOBILE LAYOUT
   Handles all responsive behavior for screens
   under 768px wide, with tablet adjustments at 900px
   ================================================ */

/* ── Hamburger Button ─────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
    z-index: 200;
}

.hamburger:hover {
    background: rgba(10, 49, 97, 0.08);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary-blue);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

/* Hamburger open state */
.hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Nav Drawer ────────────────────────── */
@media (max-width: 768px) {

    /* Header layout */
    .site-header .container {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 60px;
        padding: 0 1.25rem;
    }

    .hamburger {
        display: flex;
    }

    /* Nav becomes slide-down drawer */
    .main-nav {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid var(--border-color);
        border-bottom: 3px solid var(--primary-blue);
        box-shadow: 0 8px 20px rgba(0,0,0,0.07);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.3s ease;
        opacity: 0;
        z-index: 150;
    }

    .main-nav.nav-open {
        max-height: 300px;
        opacity: 1;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
    }

    .main-nav ul li a {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-color);
        transition: background 0.2s, color 0.2s;
    }

    .main-nav ul li:last-child a {
        border-bottom: none;
    }

    .main-nav ul li a:hover {
        background: rgba(10,49,97,0.05);
        color: var(--primary-blue);
    }

    /* ── Hero / Manifesto ─────────────────────── */
    .hero {
        min-height: 100dvh;
        padding: 4rem 1.5rem 5rem;
    }

    .hero h2 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
    }

    .scroll-indicator {
        bottom: 1.75rem;
    }

    .scroll-label {
        font-size: 0.65rem;
    }

    /* ── Members Grid ─────────────────────────── */
    .members-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2.5rem;
    }

    .kids-grid {
        grid-template-columns: 1fr;
    }

    .member-img {
        height: 280px;
    }

    .small-card .member-img {
        height: 240px;
    }

    .member-info h3 {
        font-size: 1.5rem;
    }

    /* ── Section Headers ──────────────────────── */
    .section-header h2 {
        font-size: 2rem;
    }

    /* ── Profile Hero ─────────────────────────── */
    .profile-hero {
        padding: 3rem 1rem 0;
    }

    .profile-portrait {
        width: 180px;
        height: 180px;
    }

    .profile-portrait-placeholder {
        width: 180px;
        height: 180px;
        font-size: 4rem;
    }

    .profile-name {
        font-size: 1.9rem;
        padding: 0 1rem;
    }

    .profile-role {
        font-size: 0.78rem;
        padding: 0 1rem;
        letter-spacing: 1.5px;
    }

    .profile-wave {
        height: 44px;
        margin-top: 2rem;
    }

    /* ── Profile Body ─────────────────────────── */
    .profile-body {
        padding: 2rem 0 4rem;
    }

    .profile-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .profile-card {
        padding: 1.5rem;
    }

    .profile-card[style*="grid-column"] {
        grid-column: auto !important;
    }

    .info-row {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }

    .info-value {
        text-align: left;
    }

    /* ── Charts ───────────────────────────────── */
    .member-charts {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .chart-wrapper {
        padding: 1.25rem;
    }

    .chart-wrapper h3 {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }

    /* ── Pending Overlay Badge ─────────────────── */
    .pending-badge {
        padding: 1rem 1.5rem;
        white-space: normal;
        width: 85%;
        text-align: center;
    }

    .pending-badge-label {
        font-size: 0.85rem;
        letter-spacing: 2.5px;
    }

    /* ── Back Link ─────────────────────────────── */
    .back-link {
        padding: 1rem 0 0;
        font-size: 0.85rem;
    }

    /* ── Footer ────────────────────────────────── */
    .site-footer {
        padding: 1.5rem 1rem;
    }

    .site-footer p {
        font-size: 0.9rem;
    }
}

/* ── Tablet (900px) ───────────────────────────── */
@media (max-width: 900px) and (min-width: 769px) {
    .members-grid {
        grid-template-columns: 1fr;
    }

    .kids-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-content-grid {
        grid-template-columns: 1fr;
    }

    .profile-card[style*="grid-column"] {
        grid-column: auto !important;
    }

    .member-charts {
        grid-template-columns: 1fr;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }
}
