/* ================================================
   ЦЕНТР ОКОН — Modern CSS
   Mobile-first, CSS Custom Properties, Grid/Flexbox
   ================================================ */

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Custom Properties --- */
:root {
    --color-primary: #4d7cff;
    --color-primary-dark: #3a5fd9;
    --color-primary-light: #a3bfff;
    --color-accent: #ffc107;
    --color-accent-dark: #e6a800;
    --color-text: #2d3436;
    --color-text-light: #636e72;
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-border: #e9ecef;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --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);
    --shadow-xl: 0 12px 40px rgba(0,0,0,0.15);

    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

/* --- Base --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* --- Utility --- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--color-text);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent), #ffcd38);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(255,193,7,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,193,7,0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ================================================
   HEADER
   ================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    width: 60px;
    height: auto;
}

.logo-link {
    flex-shrink: 0;
}

/* Desktop nav */
.nav-desktop {
    display: none;
}

.menu {
    display: flex;
    gap: 28px;
}

.menu li a {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding: 4px 0;
}

.menu li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition);
}

.menu li a:hover::after {
    width: 100%;
}

.menu li a:hover {
    color: var(--color-primary);
}

/* Header right */
.header-right {
    display: none;
    align-items: center;
    gap: 20px;
}

.header-phones {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.phone {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-primary);
}

.header-address {
    display: none;
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
    font-style: normal;
}

/* Mobile controls */
.mobile-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-call img {
    width: 36px;
    height: 36px;
}

.burger {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 4px;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition);
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
.nav-mobile {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.nav-mobile.open {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nav-mobile ul {
    padding: 8px 0;
}

.nav-mobile li a {
    display: block;
    padding: 14px 24px;
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}

.nav-mobile li a:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

/* ================================================
   HERO
   ================================================ */
.hero {
    margin-top: var(--header-height);
    background: linear-gradient(135deg, #e8efff 0%, #f0f4ff 100%);
    background-image: url('../images/back1.png');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 50px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    font-weight: 600;
    margin-top: 12px;
}

.hero-features {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-feature img {
    width: 40px;
    height: 40px;
}

.hero-feature span {
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
    line-height: 1.4;
}

/* ================================================
   CALLBOX (Form Card)
   ================================================ */
.callbox {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 320px;
}

.callbox-center {
    margin: 0 auto;
}

.callbox-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.4;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form input[type="text"],
.form input[type="tel"],
.form input[type="email"] {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
    border: 1px solid transparent;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    transition: all var(--transition);
    outline: none;
}

.form input:focus {
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(77,124,255,0.1);
}

.form-submit {
    width: 100%;
    height: 44px;
    margin-top: 4px;
}

.form-response {
    font-size: var(--font-size-sm);
    color: #27ae60;
    text-align: center;
    min-height: 0;
}

.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 4px;
    cursor: pointer;
}

.form-consent input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.form-consent span {
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
    line-height: 1.4;
}

.form-consent a {
    text-decoration: underline;
    font-size: inherit;
}

/* ================================================
   ADVANTAGES
   ================================================ */
.advantages {
    background: var(--color-bg);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.advantage-card {
    text-align: center;
    padding: 24px 16px;
    border-radius: var(--radius-lg);
    background: var(--color-bg-alt);
    transition: all var(--transition);
}

.advantage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.advantage-card img {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
}

.advantage-card p {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.4;
}

/* ================================================
   PROMO BANNER
   ================================================ */
.promo-banner {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    text-align: center;
    padding: 50px 0;
}

.promo-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.promo-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-primary-light);
    margin-bottom: 24px;
}

.promo-banner .btn-primary {
    background: linear-gradient(135deg, var(--color-accent), #ffcd38);
    color: #1a1a2e;
}

/* ================================================
   SERVICES
   ================================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 12px;
    border-radius: var(--radius-lg);
    background: var(--color-bg-alt);
    transition: all var(--transition);
    cursor: default;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: white;
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(77,124,255,0.2);
}

.service-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.service-card p {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
}

/* ================================================
   CTA SECTIONS
   ================================================ */
.cta-section {
    background-size: cover;
    background-position: center;
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.88);
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-bg-1 {
    background-image: url('../images/back4.png');
}

.cta-bg-2 {
    background-image: url('../images/back8.png');
}

/* ================================================
   HOW WE WORK
   ================================================ */
.how-we-work {
    background: var(--color-bg-alt);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
}

.step-arrow {
    display: none;
}

.step-card {
    text-align: center;
    padding: 24px 16px;
    background: white;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.step-card img {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
}

.step-number {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.step-card p {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.4;
}

/* ================================================
   OUR WORKS
   ================================================ */
.works-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.work-card {
    text-align: center;
}

.work-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 12px;
}

.work-image img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform var(--transition);
}

.work-card:hover .work-image img {
    transform: scale(1.05);
}

.work-card p {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
}

/* ================================================
   REVIEWS
   ================================================ */
.reviews {
    background: var(--color-bg-alt);
}

.reviews-slider {
    /* Slick handles layout on desktop */
}

.review-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    margin: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.review-card img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 3px solid var(--color-bg-alt);
}

.review-card strong {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text);
}

.review-card p {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.6;
}

/* ================================================
   GALLERY
   ================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gallery-grid a {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.gallery-grid a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform var(--transition);
}

.gallery-grid a:hover img {
    transform: scale(1.05);
}

/* ================================================
   CONTACTS
   ================================================ */
.contacts-section {
    padding: 0;
}

.contacts-wrapper {
    display: flex;
    flex-direction: column;
}

.contacts-info {
    padding: 40px 20px;
    background: white;
}

.contacts-info .section-title {
    text-align: left;
    margin-bottom: 24px;
}

.contacts-info .section-title::after {
    margin: 12px 0 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.contact-item img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.contact-item a,
.contact-item span {
    font-size: var(--font-size-sm);
    color: var(--color-text);
    line-height: 1.5;
}

.contact-item a:hover {
    color: var(--color-primary);
}

.contacts-map {
    width: 100%;
    height: 300px;
}

.contacts-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
    padding: 24px 20px;
    text-align: center;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
}

.logo-footer {
    width: 50px;
    margin: 0 auto 8px;
}

.footer-link {
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
}

.footer-link:hover {
    color: var(--color-primary);
}

/* ================================================
   POPUPS
   ================================================ */
.popup {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.popup-body {
    position: relative;
    z-index: 1;
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    max-width: 360px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: popIn 0.3s ease;
}

.popup-body-wide {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-text-light);
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
    z-index: 2;
}

.popup-close:hover {
    color: var(--color-text);
}

.popup-body .callbox {
    box-shadow: none;
    padding: 0;
}

.politics-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 20px;
    padding-right: 30px;
}

.politics-text h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
    margin: 20px 0 8px;
}

.politics-text p {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 8px;
}

/* ================================================
   SLICK OVERRIDES
   ================================================ */
.slick-dots li button:before {
    font-size: 10px;
    color: var(--color-primary-light);
}

.slick-dots li.slick-active button:before {
    color: var(--color-primary);
}

.slick-prev:before,
.slick-next:before {
    color: var(--color-primary);
    font-size: 24px;
}

.slick-prev {
    left: -5px;
    z-index: 1;
}

.slick-next {
    right: -5px;
    z-index: 1;
}

/* ================================================
   RESPONSIVE — Tablet (768px+)
   ================================================ */
@media (min-width: 768px) {
    .section {
        padding: 80px 0;
    }

    .section-title {
        font-size: var(--font-size-3xl);
        margin-bottom: 50px;
    }

    /* Header */
    .mobile-controls {
        display: none;
    }

    .nav-desktop {
        display: block;
    }

    .header-right {
        display: flex;
    }

    .header-address {
        display: block;
        position: absolute;
        bottom: 6px;
        right: 20px;
    }

    /* Hero */
    .hero {
        min-height: 550px;
    }

    .hero-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 60px 20px;
    }

    .hero-text {
        flex: 1;
        max-width: 500px;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    /* Grids */
    .advantages-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .works-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    /* Contacts */
    .contacts-wrapper {
        flex-direction: row;
    }

    .contacts-info {
        width: 45%;
        padding: 50px 40px;
    }

    .contacts-map {
        width: 55%;
        height: auto;
        min-height: 360px;
    }

    /* Promo */
    .promo-title {
        font-size: var(--font-size-2xl);
    }
}

/* ================================================
   RESPONSIVE — Desktop (1024px+)
   ================================================ */
@media (min-width: 1024px) {
    .hero {
        min-height: 600px;
    }

    .hero-content {
        padding: 80px 20px;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 900px;
        margin: 0 auto;
    }

    .steps-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
    }

    .step-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: var(--font-size-2xl);
        color: var(--color-primary-light);
        font-weight: 300;
    }

    .steps-grid {
        grid-template-columns: repeat(11, 1fr);
    }

    .step-card {
        grid-column: span 1;
    }

    .gallery-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ================================================
   RESPONSIVE — Large Desktop (1200px+)
   ================================================ */
@media (min-width: 1200px) {
    .header-content {
        max-width: 1200px;
    }

    .header-address {
        position: static;
        margin-left: auto;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
