/*
Theme Name: ToPwWw
Author: ToPwWw
Author URI: http://topwww.ru
Version: 7.0
*/

/* ================================================================
   1. Custom Properties
   ================================================================ */
:root {
    --color-primary: #2D3F91;
    --color-primary-dark: #1a2b66;
    --color-text: #1a1a2e;
    --color-text-light: #555;
    --color-bg: #ffffff;
    --color-bg-alt: #f5f6fa;
    --color-border: #e0e0e8;
    --color-white: #ffffff;
    --color-overlay: rgba(26, 26, 46, 0.7);

    --font-main: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 50px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --container-max: 1200px;
    --header-height: 72px;
}

/* ================================================================
   2. Reset & Base
   ================================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

a:hover {
    color: var(--color-primary-dark);
}

ul, ol {
    list-style: none;
}

/* ================================================================
   3. Typography
   ================================================================ */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 600;
    color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p {
    margin-bottom: 1.25rem;
}

/* ================================================================
   4. Layout Utilities
   ================================================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

.section-title--light {
    color: var(--color-white);
}

.section-action {
    text-align: center;
    margin-top: 40px;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ================================================================
   5. Buttons
   ================================================================ */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-main);
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}


/* ================================================================
   6. Header (ИСПРАВЛЕНО)
   ================================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    min-height: var(--header-height); /* Было height -> стало min-height */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap; /* Разрешаем перенос на мобильных */
}

.header-logo {
    flex-shrink: 0;
}

.logo-img {
    height: 64px;
    width: auto;
}

.header-nav {
    display: flex;
    gap: 32px;
}

.header-nav a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 4px 0;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition);
}

.header-nav a:hover {
    color: var(--color-primary);
}

.header-nav a:hover::after {
    width: 100%;
}

.header-contacts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.85rem;
}

.header-phone, .header-email {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text);
    font-weight: 500;
}

.header-phone:hover, .header-email:hover {
    color: var(--color-primary);
}

.header-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Burger */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.burger span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition);
}

.burger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger.is-active span:nth-child(2) {
    opacity: 0;
}
.burger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
    z-index: 100000; /* Было 999 -> стало 100000 (выше попапа) */
}

.mobile-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 16px 24px;
}

.mobile-nav a {
    padding: 14px 0;
    color: var(--color-text);
    font-weight: 500;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--color-border);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

/* ================================================================
   7. Hero
   ================================================================ */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #1a1a2e; /* Страховочный цвет */
    background: linear-gradient(135deg, #1a1a2e 0%, #2D3F91 100%);
    position: relative;
    padding: 80px 24px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://meta.sitestest.ru/wp-content/uploads/2026/07/network-connection-background-gradient_23-2148879893.jpg') center / cover;
    opacity: 0.15;
    z-index: 0; /* Явно указываем слой */
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    color: #f0f0f0;
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.3;
    margin-bottom: 40px;
}

/* ================================================================
   8. Sections
   ================================================================ */
.section-about {
    background: var(--color-bg);
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

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

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

.section-cta {
    background: linear-gradient(135deg, #1a1a2e 0%, #2D3F91 100%);
    text-align: center;
    padding: 60px 24px;
}

/* ================================================================
   9. Footer
   ================================================================ */
.site-footer {
    background: #1a1a2e;
    color: #c0c0d0;
    padding: 64px 0 0;
}

.site-footer .section-title {
    color: var(--color-white);
    margin-bottom: 40px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-bottom: 48px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

.contact-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    opacity: 0.8;
}

.contact-text {
    color: #c0c0d0;
    font-size: 0.95rem;
    line-height: 1.7;
}

.contact-text strong {
    color: var(--color-white);
    font-weight: 600;
}

.contact-text a {
    color: #8a9ee0;
}

.contact-text a:hover {
    color: var(--color-white);
}

.footer-map {
    width: 100%;
    overflow: hidden;
}

.footer-map iframe,
.footer-map script + div {
    width: 100% !important;
}

.footer-bar {
    background: var(--color-primary);
    padding: 20px 0;
    margin-top: 0;
}

.footer-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--color-white);
}

/* ================================================================
   10. Popup
   ================================================================ */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.popup-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

.popup-box {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 40px;
    max-width: 480px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: translateY(-20px);
    transition: transform var(--transition);
}

.popup-overlay.is-active .popup-box {
    transform: translateY(0);
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--color-text-light);
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    transition: color var(--transition);
}

.popup-close:hover {
    color: var(--color-text);
}

/* ================================================================
   11. Forms (Contact Form 7)
   ================================================================ */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-bg-alt);
    transition: border-color var(--transition);
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-white);
}

.wpcf7-form input[type="submit"],
.wpcf7-form button {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.wpcf7-form input[type="submit"]:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.wpcf7-spinner {
    display: none;
}

/* ================================================================
   12. WordPress Core (minimal)
   ================================================================ */
.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.aligncenter { display: block; margin: 0 auto; }

.wp-block-image img {
    border-radius: var(--radius-sm);
}

.wp-block-table {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.wp-block-table td {
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 1px solid var(--color-border);
}

.rt-tpg-container .isotope1 .rt-holder .rt-detail a {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ================================================================
   13. Responsive
   ================================================================ */
@media (max-width: 1024px) {
    .header-contacts {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    .burger {
        display: flex;
    }

    .section {
        padding: 56px 0;
    }

    .section-title {
        margin-bottom: 32px;
    }

    .hero {
        min-height: 60vh;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .footer-bar-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        max-width: 300px;
    }

    .section {
        padding: 40px 0;
    }

    .popup-box {
        padding: 24px;
    }
}

/* ================================================================
   14. Print
   ================================================================ */
@media print {
    .site-header,
    .mobile-menu,
    .popup-overlay,
    .section-cta,
    .footer-map {
        display: none !important;
    }
}


.icon-cloud-chip {
  width: 48px;
  height: 48px;
  display: block;
}

/* Переопределяем цвета через CSS, если нужно */
.icon-cloud-chip path, 
.icon-cloud-chip rect, 
.icon-cloud-chip circle {
  transition: fill 0.3s ease, stroke 0.3s ease;
}

/* Эффект при наведении (опционально) */
.icon-cloud-chip:hover path,
.icon-cloud-chip:hover rect,
.icon-cloud-chip:hover circle {
  filter: brightness(1.1);
}












/* Убираем внешние отступы у самой статьи, оставляем только внутренний "воздух" */
.single-post {
    padding: 0; /* Было 40px сверху — теперь 0 */
    margin: 0;
}

/* Заголовок: убираем стандартные браузерные отступы и задаём свои */
.single-header .entry-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.2;
    color: #000;
    margin:30px 0px 24px 0px; /* Сверху 0, снизу 24px для воздуха под заголовком */
}

/* Обертка контента: здесь задаём нужный вертикальный ритм */
.single-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    /* margin-bottom: 40px; <-- закомментировали, если он не нужен */
}

/* Картинка слева */
.single-thumbnail-left {
    float: left;
    width: 280px;
    height: auto;
    margin-right: 30px;   /* Отступ справа от картинки */
    margin-bottom: 20px;  /* Отступ снизу (если текст короткий) */
    margin-top: 0;        /* Сверху 0 — картинка сразу под заголовком или текстом */
}
.single-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Лёгкая тень */
}

/* Текстовый блок */
.single-text-body {
    flex: 1;
    min-width: 300px;
}
.single-text-body p {
    margin: 0 0 24px 0;   /* Убрали отступ сверху, оставили снизу */
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: #333;
}
/* Если внутри контента есть свои h2/h3 — тоже контролируем их отступы */
.single-text-body h2, .single-text-body h3 {
    margin: 24px 0 16px 0;
    font-weight: 600;
}
.single-text-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .single-header .entry-title {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .single-thumbnail-left {
        float: none;
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
        margin-top: 0;
    }
    
    .single-text-body {
        flex: none;
        min-width: auto;
        width: 100%;
    }
    
    .single-text-body p {
        margin: 0 0 18px 0;
    }
}