/* ==========================================================================
   Satit UP Primary School - Custom Stylesheet
   Demonstration School of University of Phayao (Primary Section)
   โรงเรียนสาธิตมหาวิทยาลัยพะเยา (ระดับประถมศึกษา)
   ========================================================================== */

:root {
    /* Main Brand Palette (UP Purple & Playful Harmonious Accents) */
    --up-purple-primary: #702C8D;
    --up-purple-dark: #581C87;
    --up-purple-light: #8B7AA8;
    --up-purple-soft: #F3E8FF;

    /* Kid-friendly Joyful Secondary Accents */
    --accent-amber: #F59E0B;
    --accent-amber-light: #FEF3C7;
    --accent-emerald: #10B981;
    --accent-emerald-light: #D1FAE5;
    --accent-sky: #0EA5E9;
    --accent-sky-light: #E0F2FE;
    --accent-rose: #F43F5E;
    --accent-rose-light: #FFE4E6;

    /* Neutral & Background Tones */
    --bg-warm: #FAF8F5;
    --bg-card: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-soft: #E2E8F0;

    /* Rounded shapes & transitions */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0 2px 8px rgba(112, 44, 141, 0.05);
    --shadow-md: 0 8px 24px rgba(112, 44, 141, 0.08);
    --shadow-lg: 0 16px 40px rgba(112, 44, 141, 0.12);
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    font-family: 'Prompt', 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-warm);
    color: var(--text-main);
    line-height: 1.65;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Prompt', sans-serif;
    font-weight: 700;
    color: #0F172A;
}

p, span, li, a {
    font-family: 'Prompt', 'Sarabun', sans-serif;
}

/* ==========================================================================
   1. Utility Top Bar (Link back to Satit UP Main)
   ========================================================================== */
.primary-topbar {
    background: linear-gradient(90deg, #581C87 0%, #702C8D 100%);
    color: #F8FAFC;
    font-size: 0.85rem;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.primary-topbar a {
    color: #F8FAFC;
    text-decoration: none;
    transition: var(--transition);
}

.primary-topbar a:hover {
    color: var(--accent-amber);
}

.topbar-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==========================================================================
   2. Main Navigation Bar
   ========================================================================== */
.primary-navbar {
    background: #FFFFFF;
    box-shadow: 0 4px 20px rgba(112, 44, 141, 0.06);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1040;
    transition: var(--transition);
}

.primary-navbar .brand-logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.primary-navbar .brand-badge {
    background: var(--accent-amber);
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
}

.primary-navbar .brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--up-purple-primary);
    line-height: 1.2;
}

.primary-navbar .brand-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.primary-navbar .nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: #334155 !important;
    padding: 8px 14px !important;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.primary-navbar .nav-link:hover,
.primary-navbar .nav-link.active {
    color: var(--up-purple-primary) !important;
    background: var(--up-purple-soft);
}

.btn-admission-nav {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #FFFFFF !important;
    font-weight: 700;
    padding: 8px 20px !important;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    transition: var(--transition);
}

.btn-admission-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
    color: #FFFFFF !important;
}

/* ==========================================================================
   3. Hero Section
   ========================================================================== */
.primary-hero {
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(112, 44, 141, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
                #FAF8F5;
    padding: 70px 0 90px;
    overflow: hidden;
}

.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    color: var(--up-purple-primary);
    border: 1.5px solid rgba(112, 44, 141, 0.2);
    box-shadow: 0 4px 12px rgba(112, 44, 141, 0.06);
    border-radius: var(--radius-full);
    padding: 6px 18px;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 22px;
}

.hero-pill-badge .dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    display: inline-block;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.hero-headline {
    font-size: 2.85rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0F172A;
    margin-bottom: 20px;
}

.hero-headline-highlight {
    background: linear-gradient(135deg, #702C8D 0%, #D97706 60%, #10B981 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-lead {
    font-size: 1.15rem;
    color: #475569;
    max-width: 580px;
    margin-bottom: 32px;
}

.hero-cta-group {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 45px;
}

.btn-hero-primary {
    background: linear-gradient(135deg, #702C8D 0%, #581C87 100%);
    color: #FFFFFF;
    padding: 14px 30px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.05rem;
    border: none;
    box-shadow: 0 8px 20px rgba(112, 44, 141, 0.28);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(112, 44, 141, 0.38);
    color: #FFFFFF;
}

.btn-hero-secondary {
    background: #FFFFFF;
    color: var(--up-purple-primary);
    padding: 14px 26px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.05rem;
    border: 2px solid rgba(112, 44, 141, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-secondary:hover {
    background: var(--up-purple-soft);
    border-color: var(--up-purple-primary);
    color: var(--up-purple-primary);
    transform: translateY(-2px);
}

/* Hero Showcase Card Stack */
.hero-image-wrapper {
    position: relative;
    z-index: 1;
}

.hero-main-img {
    width: 100%;
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(112, 44, 141, 0.16);
    border: 6px solid #FFFFFF;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.hero-floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    z-index: 2;
    transition: var(--transition);
    animation: floatAnim 4s ease-in-out infinite alternate;
}

@keyframes floatAnim {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

.hero-floating-card.card-top {
    top: -20px;
    right: -20px;
}

.hero-floating-card.card-bottom {
    bottom: -25px;
    left: -20px;
    animation-delay: -2s;
}

/* ==========================================================================
   4. Quick Stats Bar
   ========================================================================== */
.stats-banner {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px 20px;
    margin-top: -45px;
    position: relative;
    z-index: 3;
    border: 1px solid rgba(112, 44, 141, 0.08);
}

.stat-item {
    text-align: center;
    padding: 10px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.stat-icon.purple { background: var(--up-purple-soft); color: var(--up-purple-primary); }
.stat-icon.amber { background: var(--accent-amber-light); color: var(--accent-amber); }
.stat-icon.emerald { background: var(--accent-emerald-light); color: var(--accent-emerald); }
.stat-icon.sky { background: var(--accent-sky-light); color: var(--accent-sky); }

.stat-number {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 2px;
}

.stat-desc {
    font-size: 0.78rem;
    color: #94A3B8;
}

/* ==========================================================================
   5. 4 Pillars of Excellence (Strengths)
   ========================================================================== */
.section-wrapper {
    padding: 85px 0;
}

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

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--up-purple-soft);
    color: var(--up-purple-primary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.35rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: #64748B;
    max-width: 620px;
    margin: 0 auto;
}

.pillar-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--up-purple-primary);
    opacity: 0;
    transition: var(--transition);
}

.pillar-card.pillar-amber::before { background: var(--accent-amber); }
.pillar-card.pillar-emerald::before { background: var(--accent-emerald); }
.pillar-card.pillar-sky::before { background: var(--accent-sky); }
.pillar-card.pillar-rose::before { background: var(--accent-rose); }

.pillar-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(112, 44, 141, 0.15);
}

.pillar-card:hover::before {
    opacity: 1;
}

.pillar-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 22px;
}

.pillar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0F172A;
}

.pillar-desc {
    font-size: 0.93rem;
    color: #64748B;
    line-height: 1.6;
}

/* ==========================================================================
   6. Curriculum Tracks (ป.1-ป.3 & ป.4-ป.6)
   ========================================================================== */
.curriculum-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1.5px solid #F1F5F9;
    height: 100%;
    transition: var(--transition);
}

.curriculum-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.curriculum-badge {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 16px;
}

.curriculum-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.curriculum-list li {
    padding: 9px 0 9px 28px;
    position: relative;
    font-size: 0.96rem;
    color: #334155;
}

.curriculum-list li i {
    position: absolute;
    left: 0;
    top: 13px;
    color: var(--accent-emerald);
}

/* ==========================================================================
   7. News & Activities
   ========================================================================== */
.news-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #F1F5F9;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.news-thumb-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.news-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-thumb {
    transform: scale(1.05);
}

.news-category-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.news-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    font-size: 0.82rem;
    color: #94A3B8;
    margin-bottom: 8px;
}

.news-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.45;
    margin-bottom: 12px;
}

.news-summary {
    font-size: 0.9rem;
    color: #64748B;
    line-height: 1.55;
    margin-bottom: 18px;
    flex-grow: 1;
}

.news-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--up-purple-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.news-link:hover {
    color: var(--up-purple-dark);
    gap: 10px;
}

/* ==========================================================================
   8. Admission Call to Action Banner
   ========================================================================== */
.admission-banner {
    background: linear-gradient(135deg, #702C8D 0%, #581C87 50%, #3B0764 100%);
    border-radius: 30px;
    padding: 60px 45px;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(112, 44, 141, 0.25);
}

.admission-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.admission-step-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    backdrop-filter: blur(8px);
}

.admission-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-amber);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

/* ==========================================================================
   9. Primary Footer
   ========================================================================== */
.primary-footer {
    background: #0F172A;
    color: #CBD5E1;
    padding: 70px 0 25px;
    font-size: 0.94rem;
}

.footer-title {
    color: #FFFFFF;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35px;
    height: 3px;
    background: var(--accent-amber);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #94A3B8;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #FFFFFF;
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 25px;
    margin-top: 50px;
    text-align: center;
    font-size: 0.85rem;
    color: #64748B;
}

/* ==========================================================================
   10. Responsiveness
   ========================================================================== */
@media (max-width: 991.98px) {
    .hero-headline { font-size: 2.2rem; }
    .hero-image-wrapper { margin-top: 40px; }
    .hero-floating-card { display: none; }
    .admission-banner { padding: 40px 25px; }
}

@media (max-width: 575.98px) {
    .hero-headline { font-size: 1.75rem; }
    .hero-lead { font-size: 1rem; }
    .section-title { font-size: 1.85rem; }
    .btn-hero-primary, .btn-hero-secondary { width: 100%; justify-content: center; }
}
