/* ===================================
   УНИВЕРСАЛЬНЫЙ CSS ДЛЯ ВСЕГО САЙТА
   remont-vidnoe.ru
   =================================== */

/* ПЕРЕМЕННЫЕ */
:root {
    --primary: #4A90E2;
    --primary-dark: #3A7BC8;
    --primary-light: #EBF4FF;
    --secondary: #5CB85C;
    --accent: #FFA726;
    --dark: #2C3E50;
    --gray: #7F8C8D;
    --light-gray: #F7F9FB;
    --white: #ffffff;
    --shadow: 0 8px 25px rgba(74,144,226,0.12);
    --radius: 14px;
    --whatsapp: #25D366;
    --telegram: #2CA5E0;
}

/* БАЗОВЫЕ СТИЛИ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

/* КОНТЕЙНЕР */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* SVG ИКОНКИ */
.icon-whatsapp, 
.icon-telegram {
    width: 16px;
    height: 16px;
    fill: currentColor;
    vertical-align: middle;
}

.fab .icon-whatsapp,
.fab .icon-telegram {
    width: 26px;
    height: 26px;
}

/* ШАПКА САЙТА */
.header {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 15px;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    flex-shrink: 0;
}

.logo-text {
    display: inline;
}

/* КОНТАКТЫ В ШАПКЕ */
.header-contacts {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.phone-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 1;
    min-width: 0;
}

.header-phone {
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
    white-space: nowrap;
}

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

.phone-icon {
    display: none;
}

/* КНОПКИ МЕССЕНДЖЕРОВ */
.messenger-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.messenger-btn {
    padding: 8px 14px;
    border-radius: 20px;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    white-space: nowrap;
}

.messenger-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.whatsapp-btn {
    background: var(--whatsapp);
}

.telegram-btn {
    background: var(--telegram);
}

.messenger-text {
    display: inline;
}

/* HERO СЕКЦИЯ */
.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(255,255,255,0.5) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74,144,226,0.05) 0%, transparent 70%);
    animation: pulse 5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.5; 
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.3; 
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* ЗАГОЛОВКИ */
h1 {
    font-size: clamp(26px, 5vw, 42px);
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--dark);
}

h2 {
    font-size: clamp(24px, 4vw, 32px);
    margin-bottom: 15px;
    color: var(--dark);
    font-weight: 700;
}

h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark);
}

/* ТЕКСТОВЫЕ СТИЛИ */
.hero-text {
    font-size: clamp(16px, 2.5vw, 19px);
    opacity: 0.85;
    margin-bottom: 30px;
    line-height: 1.6;
    color: var(--gray);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: clamp(28px, 4vw, 36px);
    margin-bottom: 12px;
    color: var(--dark);
    font-weight: 700;
}

.section-subtitle {
    color: var(--gray);
    font-size: 16px;
}

/* HERO FEATURES */
.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 35px;
    justify-content: center;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    color: var(--dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.hero-feature span {
    color: var(--secondary);
}

/* КНОПКИ */
.cta-btn {
    display: inline-block;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 17px;
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(74,144,226,0.35);
    transition: all 0.3s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(74,144,226,0.45);
}

/* СЕКЦИЯ УСЛУГ */
.services {
    padding: 70px 0;
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #E8EEF5;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: translateY(-3px);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.service-card:hover::before {
    transform: translateY(0);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 24px;
}

.service-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark);
}

.service-card p {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 15px;
    line-height: 1.5;
}

.service-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.service-link:hover {
    gap: 10px;
}

/* СЕКЦИЯ РАЙОНОВ */
.districts {
    padding: 70px 0;
    background: var(--light-gray);
}

.districts-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    flex: 0 1 auto;
    min-width: 140px;
    text-align: center;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.05);
}

.tab-btn:hover:not(.active) {
    background: var(--primary-light);
}

.districts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.district-card {
    background: var(--white);
    padding: 18px;
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid #E8EEF5;
}

.district-card:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74,144,226,0.25);
    border-color: var(--primary);
}

.district-card a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    display: block;
    font-size: 15px;
}

/* СЕКЦИЯ ПРЕИМУЩЕСТВ */
.advantages {
    padding: 70px 0;
    background: var(--white);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.advantage {
    text-align: center;
    padding: 20px;
}

.advantage-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    position: relative;
}

.advantage-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    opacity: 0.2;
    transform: scale(1.2);
}

.advantage h3 {
    font-size: 19px;
    margin-bottom: 10px;
    color: var(--dark);
}

.advantage p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.5;
}

/* ПОДВАЛ */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 45px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-col a {
    color: #B8C5D6;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s;
    font-size: 14px;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid #3A4A5C;
    text-align: center;
    font-size: 14px;
    color: #8B9AAD;
}

/* ПЛАВАЮЩИЕ КНОПКИ */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    text-decoration: none;
    font-size: 26px;
    transition: all 0.3s;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.fab:active {
    transform: scale(0.95);
}

.fab-whatsapp {
    background: var(--whatsapp);
}

.fab-main {
    background: linear-gradient(135deg, #FF6B00, #FF8E00);
    animation: pulse-fab 2s infinite;
}

@keyframes pulse-fab {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(255,107,0,0.5);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 6px 25px rgba(255,107,0,0.8);
        transform: scale(1.05);
    }
}

/* АДАПТИВ ПОД ВЫСОТУ ЭКРАНА */
@media (max-height: 700px) {
    .fab-container {
        bottom: 20px;
    }
    
    .fab {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
    
    .fab .icon-whatsapp,
    .fab .icon-telegram {
        width: 24px;
        height: 24px;
    }
}

@media (max-height: 600px) {
    .fab-container {
        bottom: 15px;
        gap: 12px;
    }
    
    .fab {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .fab .icon-whatsapp,
    .fab .icon-telegram {
        width: 22px;
        height: 22px;
    }
}

@media (min-height: 800px) {
    .fab-container {
        bottom: 40px;
        gap: 15px;
    }
}

@media (min-height: 900px) {
    .fab-container {
        bottom: 50px;
    }
}

/* ДЕСКТОП */
@media (min-width: 1025px) {
    .logo {
        font-size: 20px;
    }
    
    .header-phone {
        font-size: 15px;
    }
    
    .messenger-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .hero {
        padding: 100px 0;
    }
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
    
    .districts-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .advantages-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ПЛАНШЕТЫ */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 0 20px;
    }
    
    .header {
        padding: 10px 0;
    }
    
    .header-inner {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .logo {
        font-size: 16px;
        flex: 0 0 100%;
        justify-content: center;
        margin-bottom: 8px;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .header-contacts {
        flex: 0 0 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .phone-group {
        display: flex;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .header-phone {
        font-size: 13px;
        padding: 6px 10px;
        background: var(--primary-light);
        border-radius: 16px;
        white-space: nowrap;
    }
    
    .messenger-buttons {
        display: flex;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .messenger-btn {
        padding: 6px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .districts-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* МОБИЛЬНЫЕ */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 8px 0;
    }
    
    .header-inner {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .logo {
        font-size: 14px;
        flex: 0 0 100%;
        justify-content: center;
        margin-bottom: 6px;
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .header-contacts {
        flex: 0 0 100%;
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: center;
    }
    
    .phone-group {
        display: flex;
        flex-direction: row;
        gap: 6px;
        justify-content: center;
    }
    
    .header-phone {
        font-size: 11px;
        padding: 5px 8px;
        background: var(--primary-light);
        border-radius: 14px;
        text-align: center;
        white-space: nowrap;
        color: var(--dark);
        font-weight: 500;
    }
    
    .messenger-buttons {
        display: flex;
        gap: 6px;
        justify-content: center;
    }
    
    .messenger-btn {
        padding: 5px 10px;
        font-size: 11px;
        text-align: center;
        justify-content: center;
        border-radius: 14px;
        white-space: nowrap;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Адаптивные табы для мобильных */
    .districts-tabs {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-bottom: 25px;
        padding: 0 10px;
    }
    
    .tab-btn {
        padding: 10px 20px;
        font-size: 13px;
        flex: 1;
        min-width: 120px;
        max-width: 180px;
    }
    
    .tab-btn.active {
        transform: none;
    }
    
    .districts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 5px;
    }
    
    .district-card {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .district-card a {
        font-size: 13px;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .fab-container {
        bottom: 20px;
        right: 15px;
        gap: 12px;
    }
    
    .fab {
        width: 56px;
        height: 56px;
        font-size: 24px;
        box-shadow: 0 3px 12px rgba(0,0,0,0.3);
    }
}

/* МАЛЕНЬКИЕ МОБИЛЬНЫЕ */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .logo-text {
        font-size: 13px;
    }
    
    .header-phone {
        font-size: 10px;
        padding: 4px 6px;
    }
    
    .messenger-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .messenger-text {
        display: none;
    }
    
    .icon-whatsapp,
    .icon-telegram {
        width: 14px;
        height: 14px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .fab-container {
        bottom: 15px;
        right: 12px;
    }
    
    .fab {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }
}

/* ОЧЕНЬ МАЛЕНЬКИЕ МОБИЛЬНЫЕ */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .header {
        padding: 6px 0;
    }
    
    .logo-icon {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
    
    .logo-text {
        font-size: 12px;
    }
    
    .header-phone {
        font-size: 9px;
        padding: 3px 5px;
        border-radius: 10px;
    }
    
    .messenger-btn {
        padding: 3px 6px;
        font-size: 9px;
        border-radius: 10px;
    }
    
    .icon-whatsapp,
    .icon-telegram {
        width: 12px;
        height: 12px;
    }
}