/* ============================================
   ЛІЦЕЙ «САМАРА» — DESIGN SYSTEM
   Colors derived from the school logo:
   Pink/Magenta circle, Dark Purple border, Gold/Yellow oval
   ============================================ */

:root {
    --primary: #C2549B;
    --primary-dark: #3E1B50;
    --primary-light: #D87DB8;
    --primary-hover: #A84585;
    --secondary: #F5D547;
    --secondary-light: #FFE88A;
    --secondary-dark: #D4B82E;
    --neutral-dark: #2B2B2B;
    --neutral-text: #3A3A3A;
    --neutral-mid: #777777;
    --neutral-light: #F7F5F8;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 6px rgba(62, 27, 80, 0.07);
    --shadow-md: 0 4px 16px rgba(62, 27, 80, 0.10);
    --shadow-lg: 0 8px 32px rgba(62, 27, 80, 0.14);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.22s ease;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

html, body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--neutral-text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    line-height: 1.25;
    font-weight: 700;
    outline: none;
}
h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.35rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; color: #555; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }

/* --- Loading (removed full-screen loader — Blazor renders inline) --- */

/* --- Error --- */
#blazor-error-ui { color-scheme: light only; background: #fee; border-top: 3px solid #c00; bottom: 0; box-shadow: var(--shadow-md); display: none; left: 0; padding: 0.75rem 1.5rem; position: fixed; width: 100%; z-index: 9999; font-size: 0.9rem; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: 0.5rem; font-size: 1.2rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; border-radius: var(--radius-sm); }
.blazor-error-boundary::after { content: "Сталася помилка." }

/* --- Buttons --- */
.btn-primary-custom {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--secondary); color: var(--primary-dark);
    padding: 0.65rem 1.6rem; border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer;
    transition: var(--transition); text-decoration: none;
}
.btn-primary-custom:hover { background: var(--secondary-light); color: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }

.btn-outline-custom {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: var(--primary);
    padding: 0.6rem 1.5rem; border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.95rem; border: 2px solid var(--primary);
    cursor: pointer; transition: var(--transition); text-decoration: none;
}
.btn-outline-custom:hover { background: var(--primary); color: var(--white); text-decoration: none; }

.btn-hero-outline {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: var(--white);
    padding: 0.65rem 1.6rem; border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.95rem; border: 2px solid rgba(255,255,255,0.5);
    cursor: pointer; transition: var(--transition); text-decoration: none;
}
.btn-hero-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); color: var(--white); text-decoration: none; }

/* --- Sections --- */
.section { padding: 4rem 0; }
.section-alt { padding: 4rem 0; background: var(--neutral-light); }
.section-dark { padding: 4rem 0; background: linear-gradient(135deg, var(--primary-dark) 0%, #5C2A6E 100%); color: var(--white); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--secondary); }
.section-dark p { color: rgba(255,255,255,0.85); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { margin-bottom: 0.5rem; }
.section-title p { font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.section-title .title-line { display: block; width: 50px; height: 3px; background: var(--secondary); margin: 0.6rem auto 0.8rem; border-radius: 2px; }

/* --- Grids --- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; }

/* --- Cards --- */
.card-custom {
    background: var(--white); border-radius: var(--radius-md); padding: 1.5rem;
    box-shadow: var(--shadow-sm); transition: var(--transition); height: 100%;
    border: 1px solid rgba(62, 27, 80, 0.06);
}
.card-custom:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-custom .card-icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.card-custom h3, .card-custom h4 { margin-bottom: 0.6rem; font-size: 1.1rem; }

/* --- Badge --- */
.badge-custom {
    display: inline-block; background: rgba(194, 84, 155, 0.1); color: var(--primary);
    border: 1px solid rgba(194, 84, 155, 0.25); padding: 0.25rem 0.7rem;
    border-radius: 20px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
}
.badge-date {
    display: inline-block; background: rgba(62, 27, 80, 0.06); color: var(--primary-dark);
    padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.78rem; font-weight: 500;
}

/* --- Page Header --- */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 3rem 0 2.5rem; color: var(--white); text-align: center;
}
.page-header h1 { color: var(--white); margin-bottom: 0.5rem; }
.page-header p { color: rgba(255,255,255,0.85); font-size: 1.05rem; max-width: 550px; margin: 0 auto; }
.page-header .breadcrumb-custom { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1rem; font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.page-header .breadcrumb-custom a { color: var(--secondary); }

/* --- Tables --- */
.table-custom { width: 100%; border-collapse: collapse; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.table-custom th { background: var(--primary-dark); color: var(--white); padding: 0.7rem 1rem; text-align: left; font-weight: 600; font-size: 0.9rem; font-family: var(--font-body); }
.table-custom td { padding: 0.65rem 1rem; border-bottom: 1px solid rgba(62,27,80,0.06); font-size: 0.9rem; }
.table-custom tr:last-child td { border-bottom: none; }
.table-custom tr:hover td { background: rgba(194,84,155,0.03); }

/* --- Hero --- */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #5C2A6E 40%, var(--primary) 100%);
    min-height: 85vh; display: flex; align-items: center; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; padding: 3rem 0; text-align: center; }
.hero-logo { display: block; margin: 0 auto 1.25rem; border-radius: 50%; box-shadow: 0 4px 24px rgba(0,0,0,0.25); background: rgba(255,255,255,0.1); }
.hero-badge { display: inline-block; background: rgba(245,213,71,0.18); border: 1px solid rgba(245,213,71,0.35); color: var(--secondary); padding: 0.35rem 1rem; border-radius: 20px; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.25rem; }
.hero h1 { color: var(--white); margin-bottom: 1rem; font-size: clamp(2.2rem, 5.5vw, 3.2rem); }
.hero .hero-subtitle { color: rgba(255,255,255,0.85); font-size: clamp(0.95rem, 1.8vw, 1.15rem); max-width: 520px; margin: 0 auto 2rem; line-height: 1.7; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* --- Feature cards --- */
.feature-card {
    text-align: center; padding: 2rem 1.25rem; border-radius: var(--radius-md);
    background: var(--white); box-shadow: var(--shadow-sm); transition: var(--transition);
    border-bottom: 3px solid transparent;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-bottom-color: var(--secondary); }
.feature-card .feature-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.feature-card h3 { font-size: 1rem; margin-bottom: 0.6rem; }
.feature-card p { font-size: 0.9rem; color: #666; }

/* --- Stat cards --- */
.stat-card {
    text-align: center; padding: 2rem 1rem; border-radius: var(--radius-md);
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
}
.stat-number { font-family: 'Playfair Display', Georgia, serif; font-size: 2.8rem; font-weight: 700; color: #F5D547; line-height: 1; margin-bottom: 0.5rem; }
.stat-label { font-size: 0.9rem; color: rgba(255,255,255,0.7); font-weight: 500; }

/* --- Info list --- */
.info-list { list-style: none; padding: 0; }
.info-list li { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.6rem 0; border-bottom: 1px solid rgba(62,27,80,0.05); font-size: 0.92rem; }
.info-list li:last-child { border-bottom: none; }
.info-list li::before { content: '✦'; color: var(--secondary); font-size: 0.7rem; flex-shrink: 0; margin-top: 0.2rem; }

/* --- Highlight box --- */
.highlight-box {
    background: linear-gradient(135deg, rgba(194,84,155,0.06), rgba(245,213,71,0.08));
    border-left: 3px solid var(--secondary); padding: 1.25rem 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: 1.5rem 0;
}
.highlight-box p { color: var(--primary-dark); font-style: italic; font-size: 1rem; margin: 0; }

/* --- Section divider --- */
.section-divider { width: 60px; height: 3px; background: var(--secondary); border-radius: 2px; margin: 0.75rem 0 1.5rem; }

/* --- Contact cards --- */
.contact-card {
    display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem;
    background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
    border: 1px solid rgba(62,27,80,0.06);
}
.contact-card .contact-icon { font-size: 1.5rem; background: rgba(245,213,71,0.15); width: 48px; height: 48px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-card strong { color: var(--primary-dark); display: block; margin-bottom: 0.15rem; font-size: 0.9rem; }
.contact-card span, .contact-card a { color: #666; font-size: 0.9rem; }

/* --- News cards --- */
.news-card {
    background: var(--white); border-radius: var(--radius-md); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid rgba(62,27,80,0.06);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.news-card-body { padding: 1.25rem; }
.news-card-body h3 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--primary-dark); }
.news-card-body p { font-size: 0.9rem; color: #666; }

/* --- AI feature items --- */
.ai-feature-item {
    display: flex; align-items: flex-start; gap: 0.85rem; padding: 1rem 1.25rem;
    background: rgba(194,84,155,0.04); border-radius: var(--radius-md);
    border-left: 3px solid var(--secondary); transition: var(--transition);
}
.ai-feature-item:hover { background: rgba(194,84,155,0.08); }
.ai-feature-item .ai-icon { font-size: 1.5rem; flex-shrink: 0; }
.ai-feature-item strong { color: var(--primary-dark); display: block; font-size: 0.95rem; margin-bottom: 0.2rem; }
.ai-feature-item p { font-size: 0.88rem; color: #666; margin: 0; }

.ai-prototype-box {
    background: linear-gradient(135deg, var(--primary-dark), #5C2A6E);
    border-radius: var(--radius-lg); padding: 2.5rem; text-align: center; color: var(--white);
}
.ai-prototype-box h3 { color: var(--secondary); margin-bottom: 0.75rem; }
.ai-prototype-box p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }

/* --- Map --- */
.map-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 380px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(62,27,80,0.08);
}
.map-container iframe {
    display: block;
    width: 100%;
    height: 100%;
}
.map-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.map-footer p {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--primary);
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero { min-height: auto; padding: 3rem 0; }
    .section, .section-alt, .section-dark { padding: 2.5rem 0; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero-buttons { flex-direction: column; align-items: flex-start; }
    .two-col { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr; }
    .container { padding: 0 1rem; }
}

/* --- Admin cards --- */
.admin-card { text-align: center; }
.admin-card h3 { font-size: 1.05rem; margin-bottom: 0.75rem; }
.admin-details { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
.admin-role {
    display: inline-block; background: rgba(194, 84, 155, 0.1); color: var(--primary);
    padding: 0.3rem 0.75rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600;
}
.admin-subject {
    display: inline-block; background: rgba(245, 213, 71, 0.15); color: var(--primary-dark);
    padding: 0.25rem 0.7rem; border-radius: 20px; font-size: 0.82rem; font-weight: 500;
}

/* --- Two column layout helper --- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
