   
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* Theme variables. Default: light theme */
        :root {
            --bg: #f7f8fa;
            --text: #0b1115;
            --card-bg: #ffffff;
            --card-bg-2: #f3f6f8;
            --header-overlay-bg: rgba(255,255,255,0.55);
            --border: #e3eaef;
            --placeholder-bg: #eef3f6;
            --placeholder-border: #c9d6df;
            --placeholder-border-hover: #9fb7c9;
            --placeholder-text: #2b3a43;
            --accent: #8b0000;
            --muted: #5b6b74;
            --footer-bg: #f0f4f7;
        }

        /* Dark theme overrides */
        .theme-dark {
            --bg: #030507;
            --text: #e2eaf1;
            --card-bg: #0b0f13;
            --card-bg-2: #0f1921;
            --header-overlay-bg: rgba(11,15,19,0.45);
            --border: #19232b;
            --placeholder-bg: #131d26;
            --placeholder-border: #3f5568;
            --placeholder-border-hover: #5d83a8;
            --placeholder-text: #6987a2;
            --accent: #8b0000;
            --muted: #cde1f5;
            --footer-bg: #111f29;
        }

        body {
            background-color: var(--bg);
            font-family: 'Nunito', 'Inter', sans-serif;
            line-height: 1.5;
            color: var(--text);
            padding: 2rem 1.5rem;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        /* Smooth scrolling for anchor navigation */
        html { scroll-behavior: smooth; }

        /* sections used by header anchors */
        .section { padding: 3rem 0; scroll-margin-top: 96px; }

        /* Reviews styling */
        .reviews-summary { margin: 0.5rem 0 1rem 0; color: var(--muted); }
        .review-list { display: flex; flex-direction: column; gap: 1rem; }

        .review-card { display: flex; flex-direction: column; gap: 0.6rem; background: var(--card-bg-2); border: 1px solid var(--border); padding: 1rem; border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,0.04); }
        .review-stars { display: flex; flex-direction: row; gap: 6px; color: #f2b01e; font-size: 18px; line-height: 1; }
        .review-body { display: block; }
        .review-meta { font-weight: 700; margin-bottom: 0.4rem; }
        .review-text { margin: 0; color: var(--text); line-height: 1.45; }

        @media (min-width: 900px) {
            .review-card { flex: 1 1 0; }
        }

        /* small utility for the reviews update notice */
        .reviews-updated { font-size: 0.95rem; color: var(--muted); margin-top: 0.6rem; }

       

        .layout {
            max-width: 1000px;
            width: 100%;
            background: var(--card-bg);
            border-radius: 40px;
            

        /* Extra mobile safety: make CTA fill available width and never overflow */
            @media (max-width: 768px) {
            .cta-btn {
        width: 90%;
        height: 70px;
        font-size: 110%;
    }
}
            padding: 3rem;
            box-shadow: 0 25px 40px -15px rgba(0,0,0,0.12), inset 0 0 0 1px var(--border);
            border: 1px solid var(--border);
        }

        /* ЗАГОЛОВКИ С ИЕРАРХИЕЙ РАЗМЕРОВ — как в оригинале, от h1 до h6 */
        .title-h1 {
            font-size: 3.8rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            color: white;
            line-height: 1.1;
            margin-bottom: 0.75rem;
        }

       
       .h1-like { 
    font-size: 3.2rem; 
    font-weight: 400; 
    color: var(--text);
}

@media (max-width: 768px) {
    .h1-like {
        font-size: 2rem;
    }
}

        .h2-like { font-size: 2.0rem; font-weight: 100; color: var(--text); }
        .h3-like { font-size: 1.9rem; font-weight: 650; color: var(--text); }
        .h4-like { font-size: 1.65rem; font-weight: 600; color: var(--text); }
        .h5-like { font-size: 1.45rem; font-weight: 600; color: var(--text); }
        .h6-like { font-size: 1.25rem; font-weight: 600; color: var(--text); }

      
        /* адаптивность */
        @media (max-width: 750px) {
            .layout { padding: 2rem 2rem; }
            .title-h1 { font-size: 2.8rem; }
            .h2-like { font-size: 1.8rem; }
            .h3-like { font-size: 1.6rem; }
            .h4-like { font-size: 1.4rem; }
            .h5-like { font-size: 1.25rem; }
            .h6-like { font-size: 1.1rem; }
            .free-lesson-block { font-size: 1.5rem; }
        }

        @media (max-width: 500px) {
            .hierarchy-row { gap: 1rem; }
        }

        /* микро-текст для плейсхолдера */
        .placeholder-icon {
            font-size: 2rem;
            opacity: 0.8;
            filter: drop-shadow(0 2px 2px black);
        }

       

        /* Links in the hierarchy should look like headings but be clickable */
        .hierarchy-row a.h2-like {
            text-decoration: none;
            color: inherit;
        }

        /* Photo links inside grid */
        .photo-item a.photo-link {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            color: inherit;
            text-decoration: none;
        }

        .photo-item img { max-width: 100%; height: auto; border-radius: 10px; }

        /* Footer link styling */
        .footer-link { display: inline-block; text-decoration: none; }

        /* Small hover affordance for clickable blocks */
        .photo-item:hover, .footer-link:hover, .hierarchy-row a.h2-like:hover {
            transform: translateY(-3px);
            transition: transform 0.12s ease-out;
        }

        .site-header {
            position: sticky;
            top: 0;
            z-index: 999;
            background: transparent;
            border-bottom: none;
            padding: 0.06rem 0; /* height reduced by ~50% */
            isolation: isolate;
            overflow: visible;
        }
        /* translucent blurred layer behind header content */
        .site-header::before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 1;
            background: var(--header-overlay-bg);
            -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
            pointer-events: none;
        }
        .site-header .header-inner { position: relative; z-index: 2; }
        .site-header .header-inner {
            width: 90vw; /* shortened by 10% */
            margin-left: calc(50% - 45vw);
            margin-right: calc(50% - 45vw);
            padding: 0.175rem 0.45rem; /* vertical padding roughly halved */
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            background: var(--card-bg); /* theme-aware header background */
            border-radius: 24px; /* slightly smaller oval corners */
            box-shadow: 0 12px 20px -16px rgba(0,0,0,0.08), inset 0 0 0 1px var(--border);
            border: none;
        }
        .site-title h1 { font-size: 1.4rem; margin: 0; line-height: 1; color: var(--text); }
        .site-title .subtitle { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
        .site-title-link { text-decoration: none; color: inherit; }
        .site-flag {
            height: 56px;
            width: 56px;
            display: block;
            border-radius: 50%;
            overflow: hidden;
            object-fit: cover;
            border: 2px solid var(--border);
            box-shadow: 0 8px 18px rgba(0,0,0,0.08);
            background: var(--card-bg-2);
        }

        /* Header navigation layout: span nav to fill space */
        .site-header .hierarchy-row { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 6px; }
        .site-header .hierarchy-row a.h2-like { flex: 1 1 0; text-align: center; margin: 0 6px; border-radius: 12px; background: transparent; box-shadow: none; transition: all 0.12s ease; padding: 0.6rem 0.5rem; }
        .site-header .hierarchy-row a.h2-like.active { box-shadow: inset 0 8px 18px rgba(0,0,0,0.06); background: var(--card-bg-2); }

        /* Theme switch (slider) */
        .theme-toggle { margin-left: 12px; display: flex; align-items: center; }
        .theme-toggle .theme-toggle-input { position: absolute; left: -9999px; }
        .theme-switch {
            display: inline-block;
            width: 64px;
            height: 36px;
            background: var(--card-bg-2);
            border-radius: 36px;
            position: relative;
            border: 1px solid var(--border);
            box-shadow: inset 0 2px 6px rgba(0,0,0,0.03);
            cursor: pointer;
        }
        .theme-switch .switch-knob {
            position: absolute;
            top: 4px;
            left: 4px;
            width: 28px;
            height: 28px;
            background: var(--card-bg);
            border-radius: 50%;
            transition: transform 0.18s ease, background 0.18s ease;
            box-shadow: 0 3px 8px rgba(0,0,0,0.12);
        }
        .theme-toggle-input:checked + .theme-switch { background: var(--accent); }
        .theme-toggle-input:checked + .theme-switch .switch-knob { transform: translateX(28px); background: #fff; }

        /* Telegram icon in header */
        .telegram-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            color: var(--accent);
            text-decoration: none;
            transition: transform 0.12s ease, color 0.12s ease;
        }
        .telegram-link:hover { transform: translateY(-2px); color: #0098ff; }
        
        .phone-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            color: var(--accent);
            text-decoration: none;
            transition: transform 0.12s ease, color 0.12s ease;
        }
        .phone-link:hover { transform: translateY(-2px); color: #02016b; }
        .gal {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            color: var(--accent);
            text-decoration: none;
            transition: transform 0.12s ease, color 0.12s ease;
        }
        .whatsapp-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            color: var(--accent);
            text-decoration: none;
            transition: transform 0.12s ease, color 0.12s ease;
        }
        .whatsapp-link:hover { transform: translateY(-2px); color: #25D366; }

        .header-icons { display: flex; align-items: center; gap: 8px; }

        .telegram-icon { width: 40px; height: 40px; display: inline-block; }
        .whatsapp-icon { width: 40px; height: 40px; display: inline-block; }
        .phone-icon { width: 40px; height: 40px; display: inline-block;  }

        .free-lesson-link { text-decoration: none; color: inherit; display: block; }
        .free-lesson-link .free-lesson-block { transition: transform 0.12s ease, box-shadow 0.12s ease; }
        .free-lesson-link:hover .free-lesson-block { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(0,0,0,0.08); }

        /* external telegram svg styling */
        .telegram-icon { width: 40px; height: 40px; display: inline-block; }

        /* keep layout content a bit lower so header doesn't overlap */
        .layout { margin-top: 0.6rem; }

        /* Move the whole layout upward by 40% to reduce empty space above */
        .layout { transform: translateY(-1%); }

         /* Center images and text on all content layouts, but keep Profi.ru reviews left-aligned */
        .layout { text-align: center; }
        #reviews .layout { text-align: left; }
        .layout .media-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 2rem;
            flex-wrap: wrap;
        }
        .layout .media-row .media-text {
            margin: 0 auto;
            text-align: center;
            transform: none;
        }
        .cta-btn {
            margin: 0 auto;
            transform: none;
        }
        .layout .media-img {
            margin: 0 auto;
        }
        .layout .feature-list {
            display: inline-block;
            text-align: left;
        }
        
        /* Left column grouping for stacked text blocks */
        .media-left { flex: 0 0 90%; display: flex; flex-direction: column; gap: 1rem; }
        .media-right { flex: 0 0 50%; display: flex; align-items: center; justify-content: center; }

        /* Image occupies fixed half of the row; text occupies the other half.
           Text length will not change the image width. */
        

        
        .media-img {
            
            width: 150%;
            max-width: 100%;
            flex: 0 0 60%; /* do not grow or shrink */
            height: auto; /* preserve intrinsic height */
            object-fit: contain;
            border-radius: 12px;
            box-shadow: 0 10px 24px rgba(0,0,0,0.06);
            display: block;
            align-self: flex-start;
        }

        .media-text {
          
            flex: 1 1 70%;
            transform: translateX(-1%);
            max-width: 70%;
            background: var(--card-bg-2);
            border: 1px solid var(--border);
            padding: 1.4rem 1.6rem;
            border-radius: 12px;
            box-shadow: 0 8px 20px rgba(0,0,0,0.04);
            color: var(--text);
            box-sizing: border-box;
            overflow-wrap: break-word;
        }

        .media-text h3 { margin: 0 0 0.6rem 0; font-size: 1.6rem; font-weight: 700; }
        .media-text p { margin: 0; color: var(--muted); line-height: 1.45; }

        /* Highlight ALL‑CAPS phrases inside media text */
        .media-text .caps { color: #8b0000; font-weight: 800; }

        /* CTA button style for the first media block */
        
        .cta-wrapper { margin-top: 0.6rem; }
        .cta-btn {
            
            display: flex;
            transform: translateX(-1%);
            justify-content: center; 
            align-items: center;     
            width: 883px;
            height: 100px;
            background: #8b0000;
            color: #ffffff;
            text-decoration: none;
            padding: 0.85rem 1.2rem;
            border-radius: 12px;
            font-weight: 900;
            font-size: 180%;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            box-shadow: 0 8px 20px rgba(0,0,0,0.12);
        }
        .cta-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,0.12); }

        /* Mobile: stack image above text */
        @media (max-width: 850px) {
            .media-row { flex-direction: column; }
            .media-img { width: 100%; max-width: 150%; }
            .media-text { width: 100%; max-width: none; margin: 0; box-sizing: border-box; align-self: stretch; }

            
            /* hide header navigation tabs on small screens */
            .site-header .hierarchy-row .h6-like { display: none; }

            /* move header icons to the right and scale them up 5% */
            .header-icons { margin-left: auto; }
            .telegram-icon, .whatsapp-icon { width: 42px; height: 42px; margin: 10px; }
            
        }

        /* Limit general body paragraphs to half of the layout width on wide screens */
        .layout p {
            max-width: 50%;
        }

        @media (max-width: 900px) {
            .layout p { max-width: 100%; }
        }

        /* Desktop: shift the highlighted image 30% toward center */
        @media (min-width: 851px) {
            .wabtn.shift-center { transform: translateX(-71.8%) translateY(11%); transition: transform 0.22s ease; position: relative; z-index: 2; }
        }
        .btn {
    display: inline-flex;
    padding: 10px 20px;
    justify-content: center; 
    align-items: center;  
    background:#8b0000;
    color: white;
    border: none;
    text-decoration: none;
    border-radius: 6px;
    
}
   .tgbtn {
    display: inline-flex;
    width: 250px;
    padding: 10px 20px;
    justify-content: center; 
    align-items: center;  
    background: rgb(32, 160, 225);
    color: white;
    border: none;
    text-decoration: none;
    border-radius: 6px;
    
}
.wabtn {
    display: inline-flex;
    width: 250px;
    padding: 10px 20px;
    justify-content: center; 
    align-items: center;  
    background:rgb(64, 195, 81);
    color: white;
    border: none;
    text-decoration: none;
    border-radius: 6px;
   
    
    
}
.phbtn {
    display: inline-flex;
    width: 250px;
    padding: 10px 20px;
    justify-content: center; 
    align-items: center;  
    background:rgb(148, 148, 148);
    color: white;
    border: none;
    text-decoration: none;
    border-radius: 6px;
    
    
}
@media (max-width: 850px) {
    .tgbtn, .wabtn, .phbtn { width: 100%;height: 70%; max-width: 100% !important; display: block; display: flex;
    flex-direction: column; gap: 10px;display: flex; margin-bottom: 10px; }
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,0.12); }
.tgbtn:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,0.12); }
.wabtn:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,0.12); }
.phbtn:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,0.12); }
.tgbtn {
    background: rgb(32, 160, 225);
    text-decoration: none;
    height: 50px;
}
.h6-like {
    display: none;
}
.wabtn {
   
    text-decoration: none;
    height: 50px;
}
.btn-secondary {
    background: gray;
}


.image-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    color: white;
    font-size: 24px;
    font-weight: bold;
}
