:root {
    --primary: #0066ff;
    --primary-dark: #0044cc;
    --secondary: #00d2ff;
    --dark: #0f172a;
    --light: #f8fafc;
    --text: #334155;
    --white: #ffffff;
    --shadow: 0 10px 40px rgba(0, 102, 255, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; }
html { scroll-behavior: smooth; }
body { background: var(--light); color: var(--text); overflow-x: hidden; padding-bottom: 50px; }

/* Анімації появи */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeInUp 0.8s ease forwards; }

/* === HEADER === */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 5%;
    display: flex; justify-content: space-between; align-items: center;
    position: fixed; top: 0; width: 100%; z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.logo { font-size: 1.5rem; font-weight: 900; color: var(--dark); cursor: pointer; text-transform: uppercase; letter-spacing: 1px; }
.logo span { color: var(--primary); }
nav a { margin-left: 25px; text-decoration: none; color: var(--text); font-weight: 600; cursor: pointer; transition: 0.3s; position: relative; }
nav a:hover, nav a.active { color: var(--primary); }
nav a.active::after { content:''; position: absolute; width: 100%; height: 2px; background: var(--primary); bottom: -5px; left: 0; transition: 0.3s; }

/* === HERO з АНІМАЦІЄЮ ВОДИ === */
.hero-section {
    min-height: 85vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative; overflow: hidden;
    background: var(--dark);
    color: white; padding: 120px 20px 60px;
}

.hero-bg-water {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, #0f172a, #1e293b, #0044cc, #0f172a);
    background-size: 400% 400%;
    animation: flowingWater 15s ease infinite;
    opacity: 0.8;
}
.hero-bg-water::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(0, 210, 255, 0.2), transparent 70%);
    mix-blend-mode: overlay;
}

@keyframes flowingWater {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content { position: relative; z-index: 2; max-width: 800px; width: 100%; }
.hero-content h1 { font-size: 3.5rem; font-weight: 900; line-height: 1.2; margin-bottom: 20px; text-transform: uppercase; }
.hero-content p { font-size: 1.2rem; margin-bottom: 40px; color: #cbd5e1; }
.hero-actions { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn-primary, .btn-fill { background: var(--primary); color: white; border: none; padding: 15px 40px; border-radius: 50px; font-weight: 700; cursor: pointer; font-size: 1rem; transition: 0.3s; box-shadow: 0 0 20px rgba(0, 102, 255, 0.5); }
.btn-primary:hover, .btn-fill:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(0, 102, 255, 0.7); background: var(--primary-dark); }
.btn-secondary, .btn-outline { background: transparent; border: 2px solid white; color: white; padding: 15px 40px; border-radius: 50px; font-weight: 700; cursor: pointer; font-size: 1rem; transition: 0.3s; }
.btn-secondary:hover { background: white; color: var(--dark); }
.btn-outline { border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

/* === SECTIONS === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-header { text-align: center; margin: 80px 0 50px; }
.section-header h2 { font-size: 2.5rem; font-weight: 800; color: var(--dark); margin-bottom: 10px; }
.text-blue { color: var(--primary); }
.text-neon { color: var(--secondary); }
.text-white { color: white !important; }

/* === CATALOG GRID === */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.product-card { background: white; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); transition: 0.3s; position: relative; border: 1px solid #e2e8f0; }
.product-card:hover { transform: translateY(-10px); }
.card-media { height: 280px; background: #f1f5f9; position: relative; overflow: hidden; }
.card-media img, .card-media iframe { width: 100%; height: 100%; object-fit: cover; }
.card-badge { position: absolute; top: 15px; left: 15px; background: var(--secondary); color: var(--dark); padding: 5px 10px; border-radius: 5px; font-weight: bold; font-size: 0.8rem; }
.card-info { padding: 25px; }
.card-info h3 { font-size: 1.3rem; margin-bottom: 5px; color: var(--dark); }
.price { color: var(--primary); font-weight: 800; font-size: 1.2rem; margin-bottom: 15px; }
.desc { font-size: 0.9rem; color: #64748b; margin-bottom: 20px; line-height: 1.5; }
.card-buttons { display: flex; gap: 10px; }
.card-buttons button { flex: 1; border-radius: 10px; }

/* === ADVANTAGES === */
.advantages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.advantage-card { background: white; padding: 30px; border-radius: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border: 1px solid #f1f5f9; transition: 0.3s; }
.advantage-card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: 0 15px 30px rgba(0, 102, 255, 0.1); }
.advantage-card .icon-box { width: 60px; height: 60px; background: rgba(0, 102, 255, 0.1); border-radius: 15px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.advantage-card .icon-box i { font-size: 1.8rem; color: var(--primary); }
.advantage-card h4 { font-size: 1.3rem; margin-bottom: 15px; color: var(--dark); }
.advantage-card ul { list-style: none; padding: 0; }
.advantage-card li { position: relative; padding-left: 25px; margin-bottom: 10px; color: #64748b; font-size: 0.95rem; line-height: 1.4; }
.advantage-card li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--secondary); font-weight: bold; }

/* === CRM === */
.crm-section { background: var(--dark); padding: 80px 20px; margin-top: 80px; }
.crm-section h2 { color: white; margin-bottom: 5px; }
.crm-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 50px; }
.crm-card { background: rgba(255,255,255,0.05); padding: 30px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.1); transition: 0.3s; }
.crm-card:hover { background: rgba(255,255,255,0.1); transform: translateY(-5px); }
.crm-card i { font-size: 2.5rem; color: var(--secondary); margin-bottom: 20px; display: block; }
.crm-card h4 { color: white; margin-bottom: 10px; font-size: 1.2rem; }
.crm-card p { color: #94a3b8; font-size: 0.95rem; line-height: 1.5; }

/* === REVIEWS & ABOUT === */
.reviews-container { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.review-item { display: none; background: white; padding: 40px; border-radius: 20px; box-shadow: var(--shadow); max-width: 700px; width: 100%; text-align: center; border: 1px solid #e2e8f0; }
.review-item.active { display: block; animation: fadeInUp 0.5s; }
.stars { color: #fbbf24; font-size: 1.5rem; margin-bottom: 15px; }
.review-item p { font-size: 1.2rem; font-style: italic; color: #475569; margin-bottom: 20px; line-height: 1.6; }
.review-item h5 { color: var(--primary); font-weight: 700; }

.hero-small { background: var(--dark); color: white; text-align: center; padding: 120px 20px 60px; }
.hero-small h1 { font-size: 2.5rem; }
.text-content { max-width: 800px; margin: 50px auto; }
.about-block { margin-bottom: 40px; }
.about-block h3 { color: var(--dark); font-size: 1.5rem; margin-bottom: 15px; }
.about-stats { display: flex; justify-content: space-around; margin: 40px 0; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; padding: 20px 0; flex-wrap: wrap; gap: 20px; }
.stat span { display: block; font-size: 2.5rem; font-weight: 800; color: var(--primary); }

/* === CONTACT PAGE === */
.contact-grid-page { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 50px; }
.contact-card-page { background: white; padding: 40px; border-radius: 20px; box-shadow: var(--shadow); text-align: center; border: 1px solid #f1f5f9; display: flex; flex-direction: column; align-items: center; justify-content: center;}
.contact-card-page > i { font-size: 2.5rem; color: var(--primary); margin-bottom: 20px; }
.contact-telegram .telegram-btn { margin-top: 25px; }

/* СТИЛІ ДЛЯ ІКОНОК В КОНТАКТАХ */
.contact-icons-row {
    display: flex; gap: 25px;
    justify-content: center;
    margin: 15px 0 20px;
}
.contact-icons-row a {
    color: var(--primary);
    font-size: 2.5rem; /* Трохи збільшив іконки */
    transition: 0.3s;
    text-decoration: none;
}
.contact-icons-row a:hover {
    transform: scale(1.1);
    color: var(--primary-dark);
}
.phone-large {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
}

footer { text-align: center; padding: 40px; color: #94a3b8; font-size: 0.9rem; margin-top: auto; }

/* === MODAL === */
.modal-wrap { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.8); z-index: 2000; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-window { background: white; width: 90%; max-width: 500px; padding: 40px; border-radius: 20px; position: relative; margin: 20px; max-height: 90vh; overflow-y: auto;}
.close { position: absolute; top: 15px; right: 20px; font-size: 2rem; cursor: pointer; }
.full { width: 100%; margin-top: 20px; }
#modal-video-container { margin-bottom: 20px; border-radius: 10px; overflow: hidden; }
#modal-video-container iframe { width: 100%; height: 250px; border: none; }

/* === ADMIN STYLES === */
.admin-header { background: var(--dark); color: white; padding: 15px 5%; display: flex; justify-content: space-between; align-items: center; position: fixed; width: 100%; top: 0; z-index: 2000; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.admin-card { background: white; padding: 20px; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
.admin-input { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ddd; border-radius: 5px; }
.admin-item-row { display: flex; gap: 10px; border-bottom: 1px solid #eee; padding: 10px 0; align-items: center; }
.mini-input { width: 100%; padding: 5px; margin-bottom: 5px; border: 1px solid #eee; }
.btn-danger-link { color: red; background: none; border: none; cursor: pointer; text-decoration: underline; }

/* Сторінки */
.page-section { display: none; padding-top: 80px; } 
.page-section.active { display: block; }

.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 40px; width: auto; object-fit: contain; }

@media (max-width: 1024px) {
    .hero-content h1 { font-size: 2.5rem; }
    .products-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

@media (max-width: 768px) {
    header { flex-direction: column; padding: 10px; position: sticky; background: white; }
    nav { margin-top: 10px; display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; }
    nav a { margin-left: 0; font-size: 0.9rem; }
    nav a.active::after { bottom: -2px; }
    
    /* ВИПРАВЛЕННЯ: Прибираємо пробіл зверху на телефонах */
    .page-section { padding-top: 0; } 
    .hero-section { padding-top: 50px; padding-bottom: 40px; min-height: auto; }
    
    .hero-content h1 { font-size: 2rem; line-height: 1.2; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions button { width: 100%; }
    .section-header { margin: 50px 0 30px; }
    .section-header h2 { font-size: 1.8rem; }
    .admin-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 400px) {
    .logo { font-size: 1.2rem; }
    nav a { font-size: 0.8rem; }
    .hero-content h1 { font-size: 1.8rem; }
    .products-grid { grid-template-columns: 1fr; }
    .card-media { height: 240px; }
    .container { padding: 0 15px; }
    .crm-section { padding: 50px 15px; }
    .card-buttons { flex-direction: column; }
    .advantages-grid { grid-template-columns: 1fr; }
}
