/* =========================================
   1. FONTS & VARIABLES
   ========================================= */
@font-face {
    font-family: 'Mulish';
    src: url('../fonts/Mulish-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Mulish';
    src: url('../fonts/Mulish-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Mulish';
    src: url('../fonts/Mulish-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Mulish';
    src: url('../fonts/Mulish-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #212121;
    --text-color: #ffffff;
    --text-muted: #b0b0b0;
    --glass-bg: rgba(42, 42, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius-card: 12px;
    --radius-pill: 50px;
    --container-max-width: 1700px;
}

/* =========================================
   2. GLOBAL RESET & BASE STYLES
   ========================================= */
html {
    scrollbar-width: none;
}
html::-webkit-scrollbar {
    display: none;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
    -webkit-tap-highlight-color: transparent;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Скрытие скролла на главной (для JS-слайдера) */
body.home-page {
    overflow-y: scroll;
}
body.home-page::-webkit-scrollbar {
    display: none;
}

/* Блокировка скролла для JS (Desktop) */
@media (min-width: 1025px) {
    body.locked-scroll {
        overflow: hidden;
        height: 100vh;
        width: 100%;
    }
}

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 5%;
}

.logo img {
    height: 60px;
    display: block;
}

/* Burger Menu */
.burger-menu {
    width: 32px;
    height: 32px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s;
    z-index: 2000; /* Было меньше, ставим с запасом */
}

.burger-menu svg {
    position: absolute;
    width: 32px;
    height: 32px;
    transition: all 0.4s ease;
}

.burger-menu .icon-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.burger-menu .icon-burger {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.menu-is-open .burger-menu .icon-burger {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

body.menu-is-open .burger-menu .icon-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 90;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

body.menu-is-open { overflow: hidden; }
body.menu-is-open .menu-overlay { visibility: visible; opacity: 1; }
body.menu-is-open .menu-panel { transform: translateX(0); }

.menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: #2e2e2e;
    padding: 150px 40px 50px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-column {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

.menu-column a {
    color: #dcdcdc;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    transition: color 0.3s ease;
    display: block;
    position: relative;
    padding-bottom: 5px;
}

.menu-column a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: width 0.4s ease;
}

.menu-column a:hover { color: #ffffff; }
.menu-column a:hover::after { width: 100%; }

.menu-contact-email {
    margin-top: 30px;
    border-bottom: 1px solid rgba(220, 220, 220, 0.3);
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-contact-email a {
    text-decoration: none;
    font-size: 18px;
    color: #b0b0b0;
    transition: color 0.3s ease;
}
.menu-contact-email a:hover { color: #ffffff; }

/* =========================================
   4. SOCIAL LINKS (FAB - CAPSULE STYLE)
   ========================================= */
.social-links {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    padding: 0;
    border-radius: 40px;
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.social-links.active {
    background: rgba(42, 42, 42, 0.6);
    backdrop-filter: blur(15px);
    border-color: rgba(255, 255, 255, 0.15);
    padding: 20px 8px 8px 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.social-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    align-items: center;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.social-links.active .social-items {
    max-height: 250px;
    opacity: 1;
    margin-bottom: 0;
}

.social-items a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: transform 0.2s;
}

.social-items a:active { transform: scale(0.9); }
@media (min-width: 769px) {
    .social-items a:hover { transform: scale(1.15); }
}

.social-items a img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.mobile-social-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none; 
    position: relative;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
    transition: all 0.3s ease;
}

.social-links.active .mobile-social-toggle { filter: none; }

.mobile-social-toggle svg {
    position: absolute;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
}

.mobile-social-toggle .icon-close { opacity: 0; transform: rotate(-180deg) scale(0.5); }
.mobile-social-toggle .icon-msg { opacity: 1; transform: rotate(0) scale(1); }

.social-links.active .mobile-social-toggle .icon-msg { opacity: 0; transform: rotate(180deg) scale(0.5); }
.social-links.active .mobile-social-toggle .icon-close { opacity: 1; transform: rotate(0) scale(1); }

@media (max-width: 768px) {
    .social-links { bottom: 25px; left: 20px; }
    .mobile-social-toggle { width: 48px; height: 48px; }
    .mobile-social-toggle svg { width: 28px; height: 28px; }
}

/* =========================================
   5. SECTIONS & COMPONENTS
   ========================================= */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: flex-end; 
    justify-content: center;
    position: relative;
    padding: 0 20px 100px 20px;
    box-sizing: border-box;
    background-image: url('../img/heic222.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    color: #ffffff;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

/* --- CTA BUTTONS --- */
.cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    color: #ffffff;
    transition: all 0.3s ease;
}
.cta-button:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
}

/* --- PROJECTS SLIDER --- */
.projects-section {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background-image: url('../img/project-14.jpg');
    background-size: cover;
    background-position: center;
}

.projects-section .container {
    max-width: var(--container-max-width);
    width: 90%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.project-slider-area {
    max-width: var(--container-max-width);
    width: 90%;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

/* ИЗМЕНЕНИЕ 1: ОДИНАКОВЫЕ ОТСТУПЫ СО ВСЕХ СТОРОН */
.slider-wrapper {
    margin: 0;
    max-width: 100%;
    /* Было: 30px 80px. Стало: 40px со всех сторон */
    padding: 40px; 
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    box-sizing: border-box;
}

/* ИЗМЕНЕНИЕ 2: КАРТОЧКА ТЕПЕРЬ ТЯНЕТСЯ И ИМЕЕТ ДРУГИЕ ПРОПОРЦИИ */
.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
    transition: box-shadow 0.3s ease;
    
    /* Убрали height: 500px; */
    width: 100%; 
    height: auto; 
    
    /* Сделали карточки шире (было 2.5 / 4). 
       Теперь они занимают больше места, уменьшая визуальный "зазор" */
    aspect-ratio: 3 / 4; 
    
    transform: translateZ(0);
}
.project-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.4); }

.project-card img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.4s ease-in-out;
    border-radius: 12px;
}
.project-card:hover img { transform: scale(1.05); }

.project-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
}

.project-card-content {
    position: relative;
    z-index: 3;
    padding: 30px;
}
.project-card-content h3 { font-size: 1.8rem; font-weight: 700; margin: 0 0 5px 0; }
.project-card-content p { font-size: 1rem; font-weight: 300; margin: 0; color: #dcdcdc; }

/* Slider Controls */
.slider-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 40px;
    padding: 0 80px;
    box-sizing: border-box;
}

.splide-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.splide-arrow--custom {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease;
}
.splide-arrow--custom:hover { border-color: #ffffff; }
.splide-arrow--custom:disabled { opacity: 0.3; cursor: not-allowed; border-color: rgba(255,255,255,0.3); }
.splide-arrow--custom svg { fill: #ffffff; width: 20px; height: 20px; }

.splide-pagination-custom {
    display: flex; align-items: center; gap: 15px; font-weight: 500;
}
.splide-pagination-custom__track {
    width: 100px; height: 1px;
    background-color: rgba(255,255,255,0.3);
    position: relative;
}
.splide-pagination-custom__bar {
    position: absolute; top: 0; left: 0;
    height: 100%; width: 0;
    background-color: #ffffff;
    transition: width 0.4s ease;
}

/* View All Button */
.view-all-button {
    display: inline-flex; align-items: center; gap: 15px;
    padding: 15px 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    color: #ffffff; text-decoration: none; font-weight: 600;
    transition: background 0.3s ease;
}
.view-all-button:hover { background: rgba(255,255,255,0.2); }
.view-all-button__icon {
    width: 40px; height: 40px;
    border-radius: 50%; background: #4b5a52;
    display: flex; align-items: center; justify-content: center;
}
.view-all-button__icon svg { fill: #ffffff; width: 18px; height: 18px; }

/* --- ADVANTAGES SECTION --- */
.advantages-section {
    min-height: 100vh;
    padding: 60px 25px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    background-image: url('../img/project-11.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.advantages-section .container { position: relative; z-index: 2; }
.advantages-section .section-title { margin-bottom: 80px; }

.advantages-grid {
    display: flex; justify-content: center; align-items: flex-start;
    gap: 40px; flex-wrap: wrap;
}

.advantage-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    flex: 1;
    min-width: 280px; max-width: 380px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.advantage-card:hover { transform: translateY(-10px); border-color: rgba(255, 255, 255, 0.4); }

.advantage-icon { height: 50px; margin-bottom: 30px; }
.advantage-card h3 { font-size: 1.5rem; font-weight: 600; margin: 0 0 15px 0; }
.advantage-card p { font-size: 1rem; font-weight: 300; line-height: 1.7; color: #c0c0c0; margin: 0; }

/* --- CONTACT FORM SECTION --- */
.contact-form-section {
    min-height: 100vh;
    padding: 60px 25px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    background-image: url('../img/project-16.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.form-container { position: relative; z-index: 3; width: 100%; max-width: 700px; }
.contact-form { width: 100%; }

.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; color: #dcdcdc; }
.form-group input, .form-group textarea {
    width: 100%; padding: 15px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 25px;
    color: #ffffff;
    font-family: 'Mulish', sans-serif; font-size: 1rem;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: #ffffff; background-color: rgba(0, 0, 0, 0.3);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* Method Selector */
.contact-method-selector {
    position: relative; display: flex; gap: 5px; padding: 5px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
}
.active-method-pill {
    position: absolute; top: 5px; left: 0;
    height: calc(100% - 10px);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 25px;
    z-index: 0;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.contact-method-selector button {
    flex-grow: 1; height: 50px;
    background-color: transparent; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 1;
}
.contact-method-selector img { width: 28px; height: 28px; transition: filter 0.3s ease; }
.contact-method-selector button:not(.active) img { filter: grayscale(1) brightness(0.7); }

#form-status { text-align: center; margin-top: 20px; font-weight: 600; height: 20px; }
#form-status.success { color: #4CAF50; }
#form-status.error { color: #F44336; }

#copy-notification {
    position: fixed; bottom: 30px; left: 50%; transform: translate(-50%, 20px);
    background-color: rgba(42, 42, 42, 0.9);
    backdrop-filter: blur(10px); color: #dcdcdc;
    padding: 15px 25px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center; font-size: 14px;
    z-index: 9999;
    opacity: 0; visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}
#copy-notification.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* --- BACKGROUND OVERLAYS --- */
.projects-section::before,
.advantages-section::before,
.contact-form-section::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

/* =========================================
   6. RESPONSIVE (MEDIA QUERIES)
   ========================================= */
@media (max-width: 768px) {
    .menu-panel { max-width: 100%; width: 100%; padding: 120px 30px 70px 30px; }
    
    .hero-content h1 { font-size: 2.2rem !important; }
    .hero-content p { font-size: 1.1rem !important; max-width: 90%; line-height: 1.7; white-space: normal; }
    
    .section-title, 
    .projects-section .section-title, 
    .contact-form-section .section-title {
        font-size: 2.2rem !important;
        margin-bottom: 30px !important;
    }

    .projects-section .container { width: 100%; padding: 0 20px; margin-top: 25px; }
    .slider-wrapper { padding: 0; background-color: transparent; border: none; backdrop-filter: none; }
    .project-card { aspect-ratio: 4 / 7; height: auto; }
    .splide-controls { display: none; }
    
    .view-all-container { text-align: center; padding: 0 20px; }
    .view-all-button { padding: 15px 30px !important; font-size: 1rem !important; gap: 18px !important; }
    .view-all-button__icon { width: 48px !important; height: 48px !important; }
    .view-all-button__icon svg { width: 20px !important; height: 20px !important; }
    
    .advantages-section { padding: 80px 25px; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 1.8rem !important; }
    .hero-buttons { flex-direction: column; gap: 15px; }
    .cta-button { width: 100%; box-sizing: border-box; }
    
    .projects-section .container { margin-top: 20px; }
    .projects-section .section-title { font-size: 1.8rem !important; }
    
    .view-all-button {
        padding: 8px 15px !important;
        gap: 15px !important;
        justify-content: center;
        align-items: center;
    }
    .view-all-button__icon { width: 40px !important; height: 40px !important; flex-shrink: 0; }
    .view-all-button__icon svg { width: 18px !important; height: 18px !important; }
}