/* ============================================================
   STUDENT GALLERY - SHARED STYLESHEET
   All India Exam Result - Student Learning Section
   ============================================================ */

/* ============ WRAPPER ============ */
.sg-wrapper {
    width: 1100px;
    max-width: 94%;
    margin: 20px auto 40px;
}

/* ============ NOTIFICATION MARQUEE ============ */
.sg-notice-bar {
    background: linear-gradient(90deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(245,158,11,0.15);
}
.sg-notice-label {
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 4px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    animation: pulseNotice 1.5s ease-in-out infinite;
}
@keyframes pulseNotice {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.sg-notice-marquee {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}
.sg-notice-content {
    display: inline-block;
    padding-left: 100%;
    animation: marqueeScroll 35s linear infinite;
    font-size: 13px;
    font-weight: 600;
    color: #78350f;
}
.sg-notice-content:hover {
    animation-play-state: paused;
}
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
.sg-notice-content a {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 800;
    margin-left: 6px;
}
.sg-notice-content a:hover { text-decoration: underline; }
.sg-notice-sep {
    color: #b45309;
    margin: 0 12px;
    font-weight: 900;
}

/* ============ RESULT CHECK BAR ============ */
.sg-result-bar {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: #fff;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 4px 14px rgba(124,58,237,0.25);
}
.sg-result-text {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 700;
}
.sg-result-text .icon { font-size: 26px; }
.sg-result-text small {
    display: block;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 2px;
}
.sg-result-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #7c3aed;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 900;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
}
.sg-result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,255,255,0.3);
    color: #2563eb;
}

/* ============ HERO ============ */
.sg-hero {
    background: linear-gradient(135deg, #073b66, #0f766e);
    color: #fff;
    padding: 36px 30px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.sg-hero::before {
    content: '📚';
    position: absolute;
    top: -20px;
    right: -10px;
    font-size: 140px;
    opacity: 0.06;
    transform: rotate(-15deg);
}
.sg-hero::after {
    content: '✏️';
    position: absolute;
    bottom: -20px;
    left: -10px;
    font-size: 120px;
    opacity: 0.06;
    transform: rotate(15deg);
}
.sg-hero h1 {
    font-size: 30px;
    margin-bottom: 8px;
    font-weight: 900;
    position: relative;
    z-index: 2;
}
.sg-hero p {
    font-size: 14px;
    opacity: 0.95;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}
.sg-hero-tags {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
    position: relative;
    z-index: 2;
}
.sg-hero-tag {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

/* ============ PAGE HERO (reusable for inner pages) ============ */
.sg-page-hero {
    background: linear-gradient(135deg, #073b66, #0f766e);
    color: #fff;
    padding: 30px 26px;
    border-radius: 12px;
    margin-bottom: 22px;
}
.sg-page-hero h1 {
    font-size: 26px;
    margin-bottom: 6px;
    font-weight: 900;
    color: #fff;
}
.sg-page-hero p {
    font-size: 14px;
    opacity: 0.95;
    color: #fff;
    line-height: 1.5;
}

/* ============ BACK LINK ============ */
.sg-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #073b66;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: 0.2s;
}
.sg-back-link:hover {
    background: #eef3f7;
    color: #0f766e;
}

/* ============ SECTION ============ */
.sg-section {
    margin-bottom: 28px;
}
.sg-section-title {
    font-size: 17px;
    font-weight: 900;
    color: #073b66;
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 4px solid #0f766e;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.sg-section-title small {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

/* ============ CLASS CARDS ============ */

/* ============ CLASS CARDS (Allen style) ============ */
.sg-classes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.sg-class-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    min-height: 130px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}

.sg-class-card:hover {
    transform: translateY(-3px);
    border-color: #1e40af;
    box-shadow: 0 12px 28px rgba(30,64,175,0.12);
}

/* Icon box */
.sg-class-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 14px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sg-class-card:hover .sg-class-icon {
    transform: scale(1.08) rotate(-3deg);
}

/* Different colors per section */
.sg-class-icon.color-primary {
    background: linear-gradient(135deg, #10b981, #059669);
}
.sg-class-icon.color-middle {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.sg-class-icon.color-secondary {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.sg-class-icon.color-senior {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Class label */
.sg-class-label {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
    line-height: 1.3;
}

.sg-subjects-mini {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
    line-height: 1.5;
    margin-top: auto;
}

/* Arrow on hover */
.sg-class-card::after {
    content: '→';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 16px;
    color: #cbd5e1;
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.25s ease;
}

.sg-class-card:hover::after {
    opacity: 1;
    transform: translateX(0);
    color: #1e40af;
}

/* Mobile */
@media (max-width: 600px) {
    .sg-classes {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .sg-class-card {
        padding: 14px;
        min-height: 110px;
        border-radius: 12px;
    }
    .sg-class-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin-bottom: 10px;
        border-radius: 10px;
    }
    .sg-class-label {
        font-size: 13.5px;
    }
    .sg-subjects-mini {
        font-size: 10.5px;
    }
}



/* ============ GRID (2 column for chapters/subjects) ============ */
.sg-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.sg-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

/* ============ CONTENT CARD (chapter/topic card) ============ */
.sg-card {
    display: block;
    background: #fff;
    border: 1px solid #dfe5eb;
    border-radius: 10px;
    padding: 18px;
    text-decoration: none;
    color: #073b66;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.sg-card:hover {
    transform: translateY(-3px);
    border-color: #0f766e;
    color: #0f766e;
    box-shadow: 0 10px 20px rgba(15,118,110,0.10);
}
.sg-card-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 10px;
    line-height: 1;
}
.sg-card-title {
    font-size: 15px;
    font-weight: 800;
    color: #073b66;
    margin-bottom: 4px;
    display: block;
}
.sg-card-subtitle {
    font-size: 12px;
    color: #0f766e;
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
}
.sg-card-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* ============ EMPTY STATE ============ */
.sg-empty {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
}
.sg-empty-icon { font-size: 48px; margin-bottom: 10px; }
.sg-empty h3 { font-size: 16px; color: #334155; margin-bottom: 6px; }
.sg-empty p { font-size: 13px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 600px) {
    .sg-hero { padding: 26px 18px; }
    .sg-hero h1 { font-size: 22px; }
    .sg-hero p { font-size: 13px; }
    .sg-page-hero { padding: 22px 18px; }
    .sg-page-hero h1 { font-size: 20px; }
    .sg-classes { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sg-class-num { font-size: 24px; }
    .sg-class-label { font-size: 12px; }
    .sg-section-title { font-size: 15px; }
    .sg-result-bar { padding: 12px 16px; }
    .sg-result-text { font-size: 13px; }
    .sg-result-text .icon { font-size: 22px; }
    .sg-result-btn { padding: 9px 16px; font-size: 13px; }
    .sg-notice-content { font-size: 12px; }
    .sg-grid-2, .sg-grid-3 { grid-template-columns: 1fr; }
}
/* ============================================================
   BOARD SELECTION TABS
   ============================================================ */
.sg-board-tabs-wrap {
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    border: 1px solid #dfe5eb;
    overflow: hidden;
}
.sg-board-tabs-label {
    font-size: 11px;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px 8px;
    display: block;
}
.sg-board-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.sg-board-tabs::-webkit-scrollbar { height: 4px; }
.sg-board-tabs::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.sg-board-tab {
    padding: 10px 18px;
    border-radius: 8px;
    background: #f3f7fa;
    color: #073b66;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
}
.sg-board-tab:hover {
    background: #e8f0f6;
    border-color: #0f766e;
    color: #0f766e;
}
.sg-board-tab.active {
    background: linear-gradient(135deg, #073b66, #0f766e);
    color: #fff;
    border-color: #0f766e;
    box-shadow: 0 4px 12px rgba(15,118,110,0.28);
}

/* ============ COMPACT HERO (v2) ============ */
.sg-hero-v2 {
    background: linear-gradient(135deg, #073b66 0%, #0f766e 100%);
    color: #fff;
    padding: 32px 28px;
    border-radius: 14px;
    margin-bottom: 22px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.sg-hero-v2::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 70%);
    border-radius: 50%;
}
.sg-hero-v2::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.04), transparent 70%);
    border-radius: 50%;
}
.sg-hero-v2 h1 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 8px;
    color: #fff;
    position: relative;
    z-index: 2;
    letter-spacing: -0.5px;
}
.sg-hero-v2 p {
    font-size: 14px;
    color: rgba(255,255,255,0.92);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}
.sg-hero-v2-stats {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}
.sg-hero-v2-stat {
    text-align: center;
}
.sg-hero-v2-stat-num {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: #fbbf24;
    line-height: 1.1;
}
.sg-hero-v2-stat-label {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    margin-top: 2px;
}

/* ============ SECTION HEADERS (v2) ============ */
.sg-section-v2 {
    margin-bottom: 24px;
}
.sg-section-v2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 4px solid #0f766e;
    flex-wrap: wrap;
    gap: 8px;
}
.sg-section-v2-title {
    font-size: 17px;
    font-weight: 900;
    color: #073b66;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.sg-section-v2-title small {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}
.sg-section-v2-count {
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 50px;
}

/* ============ BOARD INFO BADGE ============ */
.sg-board-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    margin-top: 10px;
    position: relative;
    z-index: 2;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 600px) {
    .sg-hero-v2 { padding: 24px 16px; border-radius: 12px; }
    .sg-hero-v2 h1 { font-size: 20px; }
    .sg-hero-v2 p { font-size: 13px; }
    .sg-hero-v2-stats { gap: 20px; margin-top: 16px; }
    .sg-hero-v2-stat-num { font-size: 18px; }
    .sg-board-tab { padding: 9px 14px; font-size: 12px; }
    .sg-section-v2-title { font-size: 15px; }
}
/* ============================================================
   STATS BAR (Class page)
   ============================================================ */
.sg-stats-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.sg-stat-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    flex: 1;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}
.sg-stat-num {
    font-size: 22px;
    font-weight: 900;
    color: #1e40af;
    line-height: 1.2;
}
.sg-stat-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

@media (max-width: 600px) {
    .sg-stat-box { padding: 10px 12px; min-width: 90px; }
    .sg-stat-num { font-size: 18px; }
    .sg-stat-label { font-size: 10px; }
}