/* === ЗАГАЛЬНІ НАЛАШТУВАННЯ ТА ЗМІННІ === */
:root {
    --bg-dark: #0f0f11;
    --bg-surface: #1a1a1c;
    --text-main: #f8fafc;
    --text-muted: #a1a1aa;
    --accent: #b59a72;
    --accent-hover: #c9ad84;
    --border-color: rgba(255, 255, 255, 0.05);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

.container-custom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 120px 0;
}

h1, h2, h3, h4 {
    letter-spacing: -0.5px;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 60px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.accent-text {
    color: var(--accent);
}

/* === АНІМАЦІЇ ПОЯВИ (SCROLL REVEAL) === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* === HEADER (GLASSMORPHISM) === */
.header {
    background-color: rgba(15, 15, 17, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: all 0.4s ease;
}

.header.scrolled {
    padding: 5px 0;
    background-color: rgba(15, 15, 17, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.3s ease;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-main);
}

.nav a {
    margin-left: 40px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

.nav a:hover {
    color: var(--accent);
}

/* === MOBILE MENU === */
.menu-icon {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    width: 30px;
    z-index: 101;
}

.bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    transition: 0.3s;
}

/* === HERO SECTION === */
.hero-bg {
    min-height: 100vh;
    background-image: url('were.webp'); /* Переконайтесь, що фон якісний */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding-top: 80px; /* offset for header */
}

/* ОСЬ ТУТ ЗРОБИЛИ ФОН ЯСКРАВІШИМ */
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Зменшено непрозорість з 0.7-0.9 до 0.2-0.7 для більшої яскравості */
    background: linear-gradient(180deg, rgba(15,15,17,0.2) 0%, rgba(15,15,17,0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 72px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5); /* Додано тінь для тексту, щоб він читався на яскравому фоні */
}

.hero-content p {
    font-size: 20px;
    color: #e2e8f0; /* Трохи світліший текст для кращого контрасту */
    max-width: 700px;
    margin: 0 auto 50px;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn, .hero-btn-tel {
    display: inline-block;
    padding: 16px 40px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.4s ease;
}

.hero-btn {
    background-color: var(--accent);
    color: #000;
}

.hero-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(181, 154, 114, 0.2);
}

.hero-btn-tel {
    background-color: rgba(15,15,17,0.5); /* Зробили кнопку-телефон трохи читабельнішою на світлому фоні */
    backdrop-filter: blur(5px);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.hero-btn-tel:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: rgba(15,15,17,0.8);
}

/* === SERVICES === */
.services {
    background-color: var(--bg-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--bg-surface);
    padding: 50px 40px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 0;
    background-color: var(--accent);
    transition: height 0.5s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(181, 154, 114, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.service-card:hover::before {
    height: 100%;
}

.card-icon {
    font-size: 48px;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-main);
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

/* === PORTFOLIO === */
.portfolio {
    background-color: var(--bg-surface);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    height: 450px;
    display: block;
    border-radius: 4px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.portfolio-overlay span {
    color: var(--text-main);
    font-size: 24px;
    font-weight: 600;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* === ABOUT === */
.about {
    background-color: var(--bg-dark);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 4px;
}

.about-image::after {
    content: '';
    position: absolute;
    top: -20px; left: -20px;
    width: 100%; height: 100%;
    border: 1px solid var(--accent);
    z-index: -1;
}

.about-text h3 {
    font-size: 40px;
    margin-bottom: 30px;
    line-height: 1.2;
}

.about-text p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 25px;
}

.about-stats {
    display: flex;
    gap: 60px;
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.stat-num {
    display: block;
    font-size: 56px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-desc {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* === REVIEWS === */
.reviews {
    background-color: var(--bg-surface);
    overflow: hidden;
}

.reviews-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.slider-controls {
    display: flex;
    gap: 15px;
}

.slider-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.reviews-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 20px;
}

.reviews-slider::-webkit-scrollbar { display: none; }

.review-card {
    min-width: 400px;
    background-color: var(--bg-dark);
    padding: 40px;
    border: 1px solid var(--border-color);
    scroll-snap-align: start;
    transition: transform 0.3s;
}

.review-card:hover {
    border-color: rgba(181, 154, 114, 0.2);
}

.review-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.stars {
    color: var(--accent);
    font-size: 18px;
    letter-spacing: 2px;
}

.review-date {
    font-size: 13px;
    color: #666;
}

.review-body {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-style: italic;
}

.review-author h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: var(--text-main);
}

.review-author p {
    margin: 0;
    font-size: 14px;
    color: var(--accent);
}

/* === CONTACT === */
.contact {
    background-image: linear-gradient(rgba(15,15,17,0.9), rgba(15,15,17,0.9)), url('were.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    padding: 150px 20px;
}

.contact h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.contact p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.contact-btn {
    display: inline-block;
    padding: 18px 50px;
    background: var(--accent);
    color: #000;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.contact-btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(181, 154, 114, 0.3);
}

/* === FOOTER === */
.footer {
    background-color: #0a0a0a;
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.footer-description p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.footer-section h4 {
    color: var(--text-main);
    margin-bottom: 25px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a, .footer-section p {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent);
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons img {
    width: 24px;
    filter: invert(0.6);
    transition: all 0.3s;
}

.social-icons a:hover img {
    filter: invert(1) sepia(100%) saturate(300%) hue-rotate(30deg);
    transform: translateY(-3px);
}

.copyright {
    margin-top: 50px;
    font-size: 12px;
    color: #444;
    grid-column: 1 / -1;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* === LIGHTBOX === */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--accent);
}

/* === PRELOADER === */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner {
    text-align: center;
}

.preloader-logo {
    width: 250px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    filter: brightness(0) invert(1);
}

.progress-bar {
    width: 280px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    overflow: hidden;
    margin: 0 auto;
}

.progress {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.3s ease;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ========================================= */
/* === ІДЕАЛЬНА АДАПТИВНІСТЬ (MEDIA QUERIES) === */
/* ========================================= */

/* Планшети (до 992px) */
@media (max-width: 992px) {
    .section-title { font-size: 36px; margin-bottom: 40px; }
    .hero-content h1 { font-size: 56px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .portfolio-grid { gap: 20px; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .about-image img { height: 450px; }
    .about-stats { justify-content: center; }
    .footer-container { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* Смартфони та планшети портретної орієнтації (до 768px) */
@media (max-width: 768px) {
    /* Вимикаємо fixed фон для мобільних (щоб не лагало і не "пливло" на iOS/Android) */
    .hero-bg, .contact {
        background-attachment: scroll !important;
    }

    .section-padding { padding: 80px 0; }
    .header-container { padding: 15px 20px; }
    
    /* Професійне Бургер-меню (Slide-in на весь екран) */
    .menu-icon { display: flex; z-index: 102; position: relative; }
    .nav {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%; /* Ховаємо за правий край екрану */
        width: 100vw;
        height: 100vh;
        background: rgba(15, 15, 17, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1); /* Плавна анімація */
        z-index: 100;
        margin: 0;
    }
    .nav a { margin: 15px 0; font-size: 22px; }
    
    #menu-toggle:checked ~ .nav { right: 0; }
    
    /* Анімація самої іконки бургера */
    #menu-toggle:checked ~ .menu-icon .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); background-color: var(--accent); }
    #menu-toggle:checked ~ .menu-icon .bar:nth-child(2) { opacity: 0; }
    #menu-toggle:checked ~ .menu-icon .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background-color: var(--accent); }

    /* Головний екран */
    .hero-content { padding-top: 50px; }
    .hero-content h1 { font-size: 44px; margin-bottom: 15px; }
    .hero-content p { font-size: 18px; margin-bottom: 30px; }
    
    /* Сітки */
    .services-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .portfolio-item { height: 320px; }
    
    /* Відгуки */
    .reviews-header-row { flex-direction: column; align-items: flex-start; gap: 20px; }
    .slider-controls { align-self: flex-end; }
    .review-card { min-width: 80vw; padding: 30px; }
    
    /* Футер */
    .footer-container { grid-template-columns: 1fr; text-align: left; gap: 30px; }
    .logo-section { margin-bottom: 10px; }
}

/* Маленькі смартфони (до 480px) - Фінальна шліфовка */
@media (max-width: 480px) {
    .section-padding { padding: 60px 0; }
    .section-title { font-size: 28px; margin-bottom: 30px; }
    
    .hero-content h1 { font-size: 36px; }
    .hero-content p { font-size: 16px; }
    
    /* Кнопки на всю ширину для зручного натискання пальцем */
    .hero-buttons { flex-direction: column; gap: 15px; width: 100%; }
    .hero-btn, .hero-btn-tel { width: 100%; text-align: center; box-sizing: border-box; padding: 16px 20px; }
    .contact-btn { width: 100%; box-sizing: border-box; }
    
    .service-card { padding: 30px 20px; }
    .service-card h3 { font-size: 20px; }
    
    .about-image img { height: 250px; }
    .about-text h3 { font-size: 26px; }
    .about-stats { flex-direction: column; gap: 20px; align-items: flex-start; }
    
    /* Слайдер та лайтбокс */
    .review-card { min-width: 85vw; padding: 25px 20px; }
    .slider-arrow { width: 45px; height: 45px; font-size: 18px; }
    
    .contact { padding: 100px 20px; }
    .contact h2 { font-size: 30px; }
    
    .lightbox-close { top: 15px; right: 20px; font-size: 40px; }
}