/* ==========================================================================
   ДИАГНОСТИКА & РЕМОНТ | Глобална Дизайн Система (Beta Logistics Style)
   Палитра: Дълбоко синьо (#0a192f), Акцентно синьо (#0077ff), Светъл фон (#f8fafc)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@600;700;800;900&display=swap');

:root {
    /* Основна цветова палитра */
    --primary-color: #0a192f;
    --primary-light: #1e293b;
    --accent-color: #0077ff;
    --accent-hover: #0056b3;
    
    /* Градиенти */
    --color-gradient-primary: linear-gradient(135deg, #0a192f 0%, #0077ff 100%);
    --color-gradient-text: linear-gradient(135deg, #0077ff 0%, #38bdf8 100%);
    
    /* Светла тема и фон */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Граници и сенки */
    --border-color: #e2e8f0;
    --shadow-soft: 0 10px 25px rgba(10, 25, 47, 0.05);
    --shadow-hover: 0 16px 32px rgba(0, 119, 255, 0.12);
    
    /* Типография */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* 1. Нулиране и базови стилове */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 2. Типография */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 800;
    line-height: 1.25;
}

h1 { font-size: 3.2rem; letter-spacing: -1.2px; }
h2 { font-size: 2.2rem; letter-spacing: -0.5px; }
h3 { font-size: 1.25rem; letter-spacing: -0.3px; }

p { color: var(--text-muted); margin-bottom: 1rem; }
strong { color: var(--text-main); font-weight: 700; }

/* 3. Стабилен Фиксиран Хедър */
.site-header {
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    height: 85px;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text-block {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.logo-title span { color: var(--accent-color); }

.logo-subtitle {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 28px;
}

.main-menu a {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-decoration: none;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s ease;
}

.main-menu a:hover,
.main-menu a.active {
    color: var(--accent-color);
}

.main-menu a.nav-btn-highlight {
    background-color: var(--primary-color);
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.main-menu a.nav-btn-highlight:hover {
    background-color: var(--accent-color);
}

/* 4. Hero Секция */
main { margin-top: 85px; }

.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0f2b48 100%);
    padding: 110px 0 90px;
    color: #ffffff;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 119, 255, 0.15);
    border: 1px solid rgba(0, 119, 255, 0.3);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #38bdf8;
    margin-bottom: 20px;
}

.hero-title {
    color: #ffffff;
    font-size: 3.2rem;
    margin-bottom: 20px;
}

.highlight-accent {
    color: #38bdf8;
    display: block;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #94a3b8;
    max-width: 780px;
    margin: 0 auto 35px;
    font-weight: 400;
}

.pills-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 35px;
}

.tech-pill {
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
    color: #e2e8f0;
    font-weight: 600;
}

/* 5. Бутони */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
}

/* 6. Информационна лента (Stats) */
.stats-bar {
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    border-radius: 8px;
    margin-top: -35px;
    position: relative;
    z-index: 10;
    border: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat-item {
    padding: 24px 20px;
    border-right: 1px solid var(--border-color);
}

.stat-item:last-child { border-right: none; }

.stat-title {
    display: block;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* 7. Секции и Карти */
.section { padding: 90px 0; }
.section-alt { background-color: #ffffff; }

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-tag {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-color);
    letter-spacing: 1.2px;
}

.header-divider {
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 14px auto 0;
    border-radius: 2px;
}

.content-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 25px;
}

.card-tech {
    position: relative;
    background: var(--bg-white);
    padding: 35px 28px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-tech:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-badge {
    display: inline-block;
    background: rgba(0, 119, 255, 0.08);
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 12px;
    align-self: flex-start;
}

.styled-list {
    list-style: none;
    margin: 15px 0 20px;
}

.styled-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 0.88rem;
    color: var(--primary-color);
    font-weight: 600;
}

.styled-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* 8. Процес на работа */
.process-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 35px;
}

.process-step {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px 20px;
    position: relative;
}

.process-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: rgba(0, 119, 255, 0.25);
    position: absolute;
    top: 15px;
    right: 15px;
}

.process-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.process-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 9. Снимков блок: Хидроинжектиране & Процес */
.photo-process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
    margin-top: 35px;
}

.photo-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-4px);
}

.photo-frame {
    height: 200px;
    background-color: #0f2b48;
    background-size: cover;
    background-position: center;
    position: relative;
}

.photo-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(10, 25, 47, 0.85);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.photo-body {
    padding: 20px;
}

.photo-body h4 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.photo-body p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* ==========================================================================
   10. БЛОГ СЕКЦИЯ & КАРТИ (Напълно ревизирани и оптимизирани)
   ========================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 35px;
    align-items: stretch;
}

.blog-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden; /* Важно: изрязва снимката по ъглите */
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Контейнер за снимка в картичката */
.blog-card-image {
    width: 100%;
    height: 210px;
    overflow: hidden;
    background-color: #0f2b48;
    flex-shrink: 0;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Зазапазва пропорциите без изкривяване */
    display: block;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.06); /* Плавна zoom анимация при hover */
}

/* Текстов блок в картичката */
.blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-date {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.blog-title {
    font-size: 1.15rem;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.35;
}

.blog-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-title a:hover {
    color: var(--accent-color);
}

.blog-card-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; /* Запълва пространството и подравнява бутона най-долу */
}

/* ==========================================================================
   11. ЕДИНИЧНА СТАТИЯ (Страница на статията в blog.php)
   ========================================================================== */
.single-article-wrapper {
    max-width: 850px;
    margin: 0 auto;
}

.single-article-hero {
    padding: 80px 0 50px;
    text-align: center;
}

.single-article-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 35px;
    box-shadow: var(--shadow-soft);
}

.single-article-content {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-main);
    box-shadow: var(--shadow-soft);
}

.back-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.back-link:hover {
    transform: translateX(-4px);
}

/* 12. CTA Banner & Контакти */
.cta-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0f2b48 100%);
    color: #ffffff;
    border-radius: 8px;
    padding: 50px 40px;
    text-align: center;
    margin-top: 60px;
}

.cta-banner h2 {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 12px;
}

.cta-banner p {
    color: #94a3b8;
    max-width: 650px;
    margin: 0 auto 25px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-info-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 35px;
    box-shadow: var(--shadow-soft);
}

.contact-item {
    margin-bottom: 20px;
}

.contact-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.contact-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
}

.contact-val a {
    color: var(--accent-color);
    text-decoration: none;
}

.contact-form-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 35px;
    box-shadow: var(--shadow-soft);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--primary-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 110px;
}

/* 13. Футър */
.site-footer {
    background-color: var(--primary-color);
    color: #94a3b8;
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid #1e293b;
}

.footer-brand h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.facebook-link {
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.facebook-link:hover {
    background-color: rgba(24, 119, 242, 0.2);
    border-color: #1877f2;
    transform: translateY(-2px);
}

.footer-bottom {
    padding: 22px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

/* 14. Мобилна версичност */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
}

.hamburger-bar {
    width: 25px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

@media (max-width: 992px) {
    .mobile-menu-btn { display: flex; }
    .nav-wrapper {
        display: none;
        position: absolute;
        top: 85px;
        left: 0;
        width: 100%;
        background: #ffffff;
        box-shadow: var(--shadow-soft);
        border-bottom: 1px solid var(--border-color);
    }
    .nav-wrapper.is-open { display: block; }
    .main-menu { flex-direction: column; padding: 25px; gap: 18px; }
    .hero-title { font-size: 2.2rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item { border-bottom: 1px solid var(--border-color); }
    .process-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 30px; }
    .single-article-content { padding: 25px; }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; }
    .blog-grid { grid-template-columns: 1fr; }
}