/* =========================================================
   ACTIVITY CALENDAR - SINGLE VIEW & GRADE TABS
   GD Goenka Public School, Purnea
   ========================================================= */

section.ac-section {
    padding: 56px 0 72px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.ac-section .ac-header {
    text-align: center;
    margin-bottom: 10px;
}

.ac-section .ac-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: var(--secondry, #B59859);
    margin-bottom: 8px;
}

.ac-section .ac-heading {
    font-size: 34px;
    font-weight: 800;
    color: var(--main, #133a89);
    margin: 0 0 8px;
    line-height: 1.2;
    letter-spacing: -0.4px;
}

.ac-section p.ac-subtext {
    font-size: 15px;
    line-height: 1.55;
    color: #64748b;
    margin: 0 auto;
    max-width: 560px;
}

/* Grade Tabs */
.ac-tabs-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.ac-grade-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2f7;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ac-grade-tab {
    border: none;
    background: transparent;
    color: #334155;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 11px 22px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.ac-grade-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.85);
    color: var(--main, #133a89);
}

.ac-grade-tab.active {
    background: var(--main, #133a89);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(19, 58, 137, 0.24);
}

/* Single-View Calendar Card */
.ac-viewer-card {
    max-width: 960px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

/* Viewer Top Bar (Left: Month info, Right-Top: Prev/Next Arrows) */
.ac-viewer-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    background: #ffffff;
    border-bottom: 1px solid #eef2f7;
}

.ac-month-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ac-grade-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--secondry, #B59859);
    margin-bottom: 3px;
}

.ac-month-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ac-section .ac-month-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--main, #133a89);
    margin: 0;
    line-height: 1.2;
}

.ac-current-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.ac-current-badge .ac-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.ac-jump-current {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fef9ec;
    color: #9a7426;
    border: 1px solid #ebd7a7;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.2;
}

.ac-jump-current:hover {
    background: var(--secondry, #B59859);
    color: #ffffff;
    border-color: var(--secondry, #B59859);
}

/* Top-Right Arrow Controls */
.ac-nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ac-counter {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    padding: 0 6px;
    font-variant-numeric: tabular-nums;
    user-select: none;
}

.ac-arrow-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1.5px solid #dbe3ef;
    background: #ffffff;
    color: var(--main, #133a89);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.04);
}

.ac-arrow-btn:hover {
    background: var(--main, #133a89);
    color: #ffffff;
    border-color: var(--main, #133a89);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(19, 58, 137, 0.22);
}

.ac-arrow-btn:active {
    transform: scale(0.96);
}

.ac-zoom-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1.5px solid #e7d9b8;
    background: #fdf9f0;
    color: #8f6d24;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.22s ease;
}

.ac-zoom-btn:hover {
    background: var(--secondry, #B59859);
    color: #ffffff;
    border-color: var(--secondry, #B59859);
}

/* Single Photo Stage */
.ac-stage {
    position: relative;
    background: #f8fafc;
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    touch-action: pan-y;
}

.ac-image-frame {
    position: relative;
    width: 100%;
    max-width: 760px;
    background: #ffffff;
    border-radius: 14px;
    cursor: zoom-in;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ac-calendar-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 68vh;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.22s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.ac-calendar-img.is-switching {
    opacity: 0.25;
}

.ac-stage-hint {
    margin-top: 12px;
    font-size: 12.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
}

/* Bottom Month Strip */
.ac-months-footer {
    padding: 16px 20px 20px;
    background: #ffffff;
    border-top: 1px solid #eef2f7;
}

.ac-months-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
}

.ac-month-pill {
    position: relative;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 12.5px;
    font-weight: 700;
    padding: 9px 4px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.1;
}

.ac-month-pill:hover:not(.active) {
    background: #eef2f7;
    color: var(--main, #133a89);
    border-color: #cbd5e1;
}

.ac-month-pill.is-current-month:not(.active) {
    border-color: var(--secondry, #B59859);
    background: #fefaf0;
    color: #8f6d24;
}

.ac-month-pill.is-current-month::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

.ac-month-pill.active {
    background: var(--main, #133a89);
    color: #ffffff;
    border-color: var(--main, #133a89);
    box-shadow: 0 4px 10px rgba(19, 58, 137, 0.25);
}

.ac-month-pill.active.is-current-month::after {
    background: #fbbf24;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */
@media (max-width: 991px) {
    section.ac-section {
        padding: 42px 0 56px;
    }

    .ac-section .ac-heading {
        font-size: 28px;
    }

    .ac-months-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
    }

    .ac-stage {
        min-height: 340px;
        padding: 20px 16px;
    }
}

@media (max-width: 767px) {
    section.ac-section {
        padding: 32px 0 48px;
    }

    .ac-section .ac-header {
        margin-bottom: 20px;
    }

    .ac-section .ac-heading {
        font-size: 24px;
    }

    .ac-section p.ac-subtext {
        font-size: 13.5px;
        line-height: 1.5;
    }

    .ac-tabs-wrap {
        margin-bottom: 20px;
    }

    .ac-grade-tabs {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        width: 100%;
        gap: 6px;
        padding: 6px;
    }

    .ac-grade-tab {
        padding: 5px 5px;
        font-size: 11.5px;
        width: 100%;
    }

    .ac-viewer-card {
        border-radius: 16px;
    }

    .ac-viewer-topbar {
        padding: 14px 14px;
        gap: 10px;
        align-items: flex-start;
    }

    .ac-grade-label {
        font-size: 10.5px;
        letter-spacing: 1px;
    }

    .ac-section .ac-month-title {
        font-size: 18px;
    }

    .ac-month-title-row {
        gap: 6px;
    }

    .ac-current-badge,
    .ac-jump-current {
        font-size: 10.5px;
        padding: 3px 8px;
    }

    .ac-counter {
        display: none;
    }

    .ac-nav-controls {
        gap: 6px;
    }

    .ac-arrow-btn,
    .ac-zoom-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 16px;
    }

    .ac-stage {
        min-height: auto;
        padding: 12px 10px 14px;
    }


    .ac-calendar-img {
        max-height: 62vh;
    }

    .ac-stage-hint {
        font-size: 11.5px;
        margin-top: 10px;
    }

    .ac-months-footer {
        padding: 12px 12px 16px;
    }

    .ac-months-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .ac-month-pill {
        padding: 9px 4px;
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .ac-grade-tab {
        font-size: 11.5px;
        padding: 10px 6px;
    }

    .ac-section .ac-month-title {
        font-size: 16.5px;
    }

    .ac-arrow-btn,
    .ac-zoom-btn {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
}