
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #f59e0b;
    --secondary-hover: #d97706;
    --text: #334155;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: 70px; }
body { font-family: 'Inter', sans-serif; color: var(--text); line-height: 1.6; background: var(--bg); display: flex; flex-direction: column; min-height: 100vh;}
main { flex: 1; }

.container { width: 90%; max-width: 1100px; margin: 0 auto; }
.navbar { background: var(--bg); box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: fixed; width: 100%; top: 0; z-index: 1000; }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 70px; }

/* Логотип */
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 700; color: var(--primary); text-decoration: none;}
.logo-img { height: 42px; width: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary);}

.nav-links { list-style: none; display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 600; transition: color 0.3s; }
.nav-links a:hover { color: var(--primary); }
.nav-blog { color: #0284c7 !important; font-weight: 700 !important; }
.nav-blog:hover { color: #0369a1 !important; }

.btn-nav { background: var(--primary); color: white !important; padding: 0.5rem 1rem; border-radius: 5px; }
.btn-nav:hover { background: var(--primary-dark); }

/* Hero section */
.hero { margin-top: 70px; background: linear-gradient(135deg, var(--bg-light) 0%, #e2e8f0 100%); padding: 2rem 0 1rem 0; text-align: center; }
.hero h1 { font-size: 2.5rem; color: var(--primary-dark); margin-bottom: 0.5rem; }
.hero h2 { font-size: 1.3rem; font-weight: 400; margin-bottom: 0.5rem; }
.hero p { font-size: 1rem; max-width: 800px; margin: 0 auto 1.2rem auto; }
.btn-primary { display: inline-block; background: var(--secondary); color: white; padding: 0.8rem 1.8rem; text-decoration: none; border-radius: 8px; font-size: 1.1rem; font-weight: 600; transition: background 0.3s; }
.btn-primary:hover { background: var(--secondary-hover); }

/* Sections */
.section { padding: 2.5rem 0; }
.bg-light { background: var(--bg-light); }
.bg-dark { background: var(--bg-dark); }
.text-white, .text-white h2, .text-white p { color: white; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 1.5rem; color: var(--primary-dark); }

/* Стили для изображения репетитора */
.about-images { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1.5rem; }
.about-images img { max-width: 380px; width: 100%; height: auto; max-height: 380px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); object-fit: cover; }

.about-content p { font-size: 1.05rem; margin-bottom: 0.8rem; }

/* Таймлайн образования и опыта */
.timeline { list-style: none !important; margin-top: 1rem; border-left: 3px solid var(--primary); padding-left: 1.5rem !important; }
.timeline li { position: relative; margin-bottom: 1rem; font-size: 1.05rem; }
.timeline li::before { content: ''; position: absolute; left: -1.9rem; top: 0.3rem; width: 14px; height: 14px; background: var(--secondary); border-radius: 50%; box-shadow: 0 0 0 4px white; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.card { background: white; padding: 2rem; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); text-align: center; transition: transform 0.3s; }
.card:hover { transform: translateY(-5px); }
.card h3 { font-size: 1.2rem; margin-bottom: 1rem; color: var(--primary); }
.card p { font-size: 0.95rem; }

/* Обложки 3 книг строго в один ряд, одинакового размера */
.materials-desc { text-align: center; max-width: 800px; margin: 0 auto 2rem auto; font-size: 1.1rem; }
.books-row { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 2rem; 
    flex-wrap: nowrap; 
}
.book-item { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    background: white; 
    padding: 8px; 
    border-radius: 12px; 
    box-shadow: 0 6px 18px rgba(0,0,0,0.08); 
    transition: transform 0.3s, box-shadow 0.3s; 
    box-sizing: border-box;
}
.book-item:hover { 
    transform: translateY(-6px); 
    box-shadow: 0 12px 24px rgba(0,0,0,0.15); 
}
.book-img { 
    height: 45vh; 
    max-height: 440px; 
    min-height: 280px; 
    width: auto; 
    max-width: 100%; 
    object-fit: contain; 
    border-radius: 6px; 
    display: block; 
}

.format-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.format-item { background: white; padding: 2rem; border-left: 4px solid var(--primary); border-radius: 0 8px 8px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.format-item h3 { margin-bottom: 1rem; color: var(--primary-dark); }
.metro-bullets { list-style: none; margin-top: 8px; line-height: 1.8; font-size: 1rem; }
.metro-bullets li { margin-bottom: 0.3rem; }

.center-text { text-align: center; }

.contact-links { margin-top: 2rem; display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.btn-secondary { display: inline-block; background: rgba(255,255,255,0.1); color: white; border: 2px solid white; padding: 0.8rem 1.5rem; text-decoration: none; border-radius: 5px; font-weight: 600; transition: all 0.3s; }
.btn-secondary:hover { background: white; color: var(--bg-dark); }

footer { background: #020617; color: #94a3b8; padding: 2rem 0; font-size: 0.9rem; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { color: #94a3b8; text-decoration: underline; transition: color 0.3s; }
.footer-legal a:hover { color: white; }

/* Legal Pages Styling */
.legal-page { padding: 8rem 0 5rem 0; }
.legal-page h1 { color: var(--primary-dark); margin-bottom: 1.5rem; font-size: 2rem; }
.legal-page h2 { color: var(--primary); margin: 2rem 0 0.8rem 0; font-size: 1.3rem; }
.legal-page p { margin-bottom: 0.8rem; line-height: 1.7; }
.legal-page ul, .legal-page ol { margin-left: 2rem; margin-bottom: 1rem; line-height: 1.7; }
.legal-page li { margin-bottom: 0.4rem; }

/* Cookie Banner Styling */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: #ffffff; box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
    padding: 1.5rem 2rem; z-index: 9999;
    display: flex; justify-content: space-between; align-items: center;
    gap: 2rem; flex-wrap: wrap; border-top: 2px solid var(--primary);
}
.cookie-content { flex: 1; min-width: 300px; font-size: 0.95rem; color: var(--text); }
.cookie-content a { color: var(--primary); text-decoration: underline; font-weight: 600; }
.cookie-buttons { display: flex; gap: 1rem; }
.btn-accept { background: var(--primary); color: white; border: none; padding: 0.8rem 1.5rem; border-radius: 5px; font-weight: 700; cursor: pointer; transition: background 0.3s; }
.btn-accept:hover { background: var(--primary-dark); }

/* Мобильная адаптивность */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2rem; }
    .footer-content { flex-direction: column; text-align: center; }
    .cookie-banner { flex-direction: column; text-align: center; padding: 1rem; }
    .btn-accept { width: 100%; }
    .about-images img { max-width: 280px; height: auto; }
    
    /* Ограничение и выравнивание обложек книг на телефоне */
    .books-row { 
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    .book-item {
        width: 242px;
        max-width: 85vw;
        height: 368px;
        padding: 6px;
    }
    .book-img { 
        width: 100%;
        height: 100%;
        max-height: 356px;
        object-fit: contain; 
    }
}
