/* 
 * schoolstyle.ru - Premium Design System (CSS)
 * Custom Dark Theme / Glassmorphism / Mobile-First
 */

/* 1. CSS VARIABLES & DESIGN TOKENS */
:root {
    --bg-primary: #070a13;
    --bg-secondary: #0e1424;
    --bg-glass: rgba(14, 20, 36, 0.65);
    --bg-glass-heavy: rgba(7, 10, 19, 0.85);
    
    /* Harmonious Premium Palette */
    --accent-gold: #c5a028;
    --accent-gold-glow: rgba(197, 160, 40, 0.3);
    --accent-gold-light: #f7d070;
    --accent-indigo: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.25);
    
    /* Border and Shadows */
    --border-glass: rgba(255, 255, 255, 0.05);
    --border-gold-glass: rgba(197, 160, 40, 0.15);
    --shadow-gold: 0 8px 32px 0 rgba(0, 0, 0, 0.37), 0 0 15px rgba(197, 160, 40, 0.05);
    --shadow-neon: 0 8px 32px 0 rgba(0, 0, 0, 0.4), 0 0 20px rgba(6, 182, 212, 0.1);
    
    /* Typography */
    --font-primary: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-math: 'Fira Code', 'Courier New', Courier, monospace;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Transitions & Layout */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --container-max-width: 100%;
    --header-height: 80px;
}

/* 2. RESET & BASE STYLES */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Ambient glow blobs for deep organic visual premium feeling */
body::before, body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
}
body::before {
    top: 10%;
    left: -5%;
    background: var(--accent-gold);
}
body::after {
    top: 50%;
    right: -5%;
    background: var(--accent-cyan);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border: 2px solid var(--bg-primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* 3. LAYOUT COMPONENTS */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-right: auto;
    margin-left: auto;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

/* 4. HEADER & NAV (STICKY & GLASSMORPHISM) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
}

.header.scrolled {
    height: 70px;
    background-color: var(--bg-glass-heavy);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-transform: uppercase;
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.logo span {
    color: var(--accent-gold);
}

.nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-glass-heavy);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transition: var(--transition-smooth);
    padding: 2rem;
}

.nav-menu.active {
    left: 0;
}

.nav-link {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    border: 1px solid var(--border-gold-glass);
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    background: rgba(197, 160, 40, 0.05);
    white-space: nowrap;
    margin-left: auto;
    margin-right: 1.5rem;
    transition: var(--transition-smooth);
}

.header-phone:hover {
    border-color: var(--accent-gold);
    background: rgba(197, 160, 40, 0.1);
    box-shadow: 0 0 10px rgba(197, 160, 40, 0.1);
}

@media (max-width: 500px) {
    .header-phone .phone-text {
        display: none;
    }
    .header-phone {
        padding: 0.4rem;
        margin-right: 1rem;
    }
    .header-phone svg {
        margin-right: 0 !important;
    }
}

/* Burger Button */
.burger {
    display: block;
    cursor: pointer;
    background: none;
    border: none;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.burger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--text-primary);
    border-radius: 9px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.burger span:nth-child(1) { top: 0px; }
.burger span:nth-child(2) { top: 10px; }
.burger span:nth-child(3) { top: 20px; }

.burger.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
    background: var(--accent-gold);
}
.burger.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}
.burger.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
    background: var(--accent-gold);
}

/* 5. HERO SECTION */
.hero {
    min-height: 85vh;
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 4rem;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(7, 10, 19, 0.4) 0%, var(--bg-primary) 85%);
    z-index: -1;
}

.hero-content {
    max-width: 750px;
    text-align: center;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(197, 160, 40, 0.08);
    border: 1px solid var(--border-gold-glass);
    border-radius: 50px;
    color: var(--accent-gold);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(197, 160, 40, 0.05);
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

/* Multi-colored glowing title text */
.gradient-text {
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-gold-light) 70%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* Premium Buttons */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    max-width: 280px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b28e20 100%);
    color: var(--bg-primary);
    border: 1px solid var(--accent-gold);
    box-shadow: 0 4px 20px rgba(197, 160, 40, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(197, 160, 40, 0.4);
    background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--accent-gold) 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 6. GLASSMORPHIC CARDS & SERVICES SECTION */
.section {
    padding: 6rem 0;
}

.section-bg-secondary {
    background-color: var(--bg-secondary);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

.section-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-description {
    color: var(--text-secondary);
}

.card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-gold);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-gold-glass);
    box-shadow: var(--shadow-neon);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-img-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    aspect-ratio: 16/10;
    background: var(--bg-primary);
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.card-link {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.card-link svg {
    transition: var(--transition-smooth);
}

.card-link:hover svg {
    transform: translateX(4px);
}

/* 7. MATH STYLE (LATEX SIMULATION) */
.math-block {
    background: rgba(7, 10, 19, 0.5);
    border: 1px solid var(--border-glass);
    border-left: 3px solid var(--accent-gold);
    border-radius: 6px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-family: var(--font-math);
    color: var(--accent-cyan);
    font-size: 0.95rem;
    overflow-x: auto;
    white-space: nowrap;
}

.math-inline {
    font-family: var(--font-math);
    color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

var {
    font-family: var(--font-primary);
    font-style: italic;
    font-weight: 700;
    color: var(--accent-gold-light);
    background: rgba(197, 160, 40, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    border: 1px solid rgba(197, 160, 40, 0.15);
}


/* 8. SERVICES INNER PAGE LAYOUT */
.service-header-section {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border-glass);
    position: relative;
    background: radial-gradient(ellipse at bottom, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.service-header-grid {
    display: grid;
    gap: 2.5rem;
}

.service-meta {
    max-width: 650px;
}

.service-image-container {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-gold);
    aspect-ratio: 16/9;
}

.service-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-body-grid {
    display: grid;
    gap: 3rem;
    padding: 4rem 0;
}

.service-content-block {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-gold);
    min-width: 0;
}

.service-content-block h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
}

.service-content-block p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.service-content-block ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.service-content-block li {
    margin-bottom: 0.5rem;
}

.sidebar-card {
    background: var(--bg-glass-heavy);
    border: 1px solid var(--border-gold-glass);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-neon);
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.sidebar-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
}

.sidebar-info-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 1rem;
}

.sidebar-info-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-info-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.4;
}

/* 9. CONTACTS PAGE STYLING */
.contacts-grid {
    display: grid;
    gap: 3rem;
    padding: 3rem 0;
}

.contact-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(197, 160, 40, 0.08);
    border: 1px solid var(--border-gold-glass);
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.contact-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-detail {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.contact-desc {
    color: var(--text-secondary);
    max-width: 450px;
    margin: 0 auto;
    font-size: 0.95rem;
}

/* 10. ERROR 404 PAGE STYLING */
.error-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-height);
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(197, 160, 40, 0.2);
    font-family: var(--font-math);
}

/* 11. FOOTER STYLING */
.footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-glass);
    padding: 4rem 0 2rem 0;
}

.footer-grid {
    display: grid;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-logo span {
    color: var(--accent-gold);
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links-title {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
}

.footer-links-list {
    list-style: none;
}

.footer-links-item {
    margin-bottom: 0.75rem;
}

.footer-links-item a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links-item a:hover {
    color: var(--text-primary);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-confidential {
    font-size: 0.85rem;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 12. RESPONSIVE BREAKPOINTS (MOBILE-FIRST) */

/* TABLET (>= 768px) */
@media (min-width: 768px) {
    :root {
        --container-max-width: 96%;
    }

    .hero-title {
        font-size: 3.25rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .btn-group {
        flex-direction: row;
    }
    
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr); /* 2 on tablets, 3 on desktops */
    }
    
    .service-header-grid {
        grid-template-columns: 1.2fr 0.8fr;
        align-items: center;
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-bottom {
        flex-direction: row;
    }
}

/* DESKTOP (>= 1024px) */
@media (min-width: 1024px) {
    :root {
        --container-max-width: 92%;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .service-body-grid {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 2fr 1.2fr 1.2fr;
    }

    .footer-contact-col {
        justify-self: end;
    }
}

/* WIDE DESKTOP (>= 1200px) - Show full header menu */
@media (min-width: 1200px) {
    .burger {
        display: none;
    }
    
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        flex-direction: row;
        gap: 1.25rem;
        padding: 0;
    }
    
    .nav-link {
        font-size: 0.95rem;
    }
    
    .header-phone {
        margin-left: 1.5rem;
        margin-right: 0;
        padding: 0.5rem 1.25rem;
    }
}
/* LARGE DESKTOP (>= 1440px) */
@media (min-width: 1440px) {
    :root {
        --container-max-width: 88%;
    }
    
    .nav-menu {
        gap: 2rem;
    }
    
    .header-phone {
        margin-left: 2.5rem;
    }
}

/* ULTRA WIDE (>= 1920px) */
@media (min-width: 1920px) {
    :root {
        --container-max-width: 80%;
    }
}
