/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 5% 80px;
    position: relative;
    overflow: hidden;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;

    /* Шлях до вашого файлу. 
       Важливо: дві крапки (../) означають "вийти з папки css і зайти в images" */
    background-image: url('../images/photo-1431324155629-1a6deb1dec8d.avif');
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* ЗАТЕМНЕННЯ */
    /* Шар темно-синього кольору (майже чорного) поверх фото */
    background-color: rgba(5, 10, 20, 0.85); 
    
    /* Режим змішування: "множення" робить картинку темною і глибокою */
    background-blend-mode: multiply;
    
    /* Легке розмиття, щоб деталі фото не відволікали від тексту */
    filter: blur(3px);
    
    /* Трохи збільшуємо, щоб прибрати розмиті краї */
    transform: scale(1.02);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* --- ЛІВА ЧАСТИНА (Текст) --- */
.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 25px;
    text-transform: uppercase;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.highlight { color: var(--primary); }

/* Блок друкарської машинки */
.dynamic-fact-container {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 0 8px 8px 0;
    
    /* --- ФІКСАЦІЯ ВИСОТИ --- */
    /* Задаємо висоту, достатню для 3 рядків тексту, щоб блок не стрибав */
    height: 110px; 
    
    display: flex;
    align-items: center; /* Центруємо текст вертикально */
    backdrop-filter: blur(5px);
    overflow: hidden; /* Ховаємо все, що раптом вилізе */
}

.typing-text {
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    color: #e0f2f1;
    line-height: 1.4;
    font-weight: 600;
}

.fact-icon { margin-right: 15px; font-size: 1.4rem; }

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--primary);
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-desc {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 40px;
    max-width: 500px;
}

/* --- БЛОК ДОВІРИ (STATISTICS) --- */
.hero-trust {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 30px;
}

.trust-item {
    display: flex;
    flex-direction: column;
}

.trust-item strong {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
}

.trust-item span {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    line-height: 1.3;
    font-weight: 600;
}

/* --- ПРАВА ЧАСТИНА (GRID WITH BUTTONS) --- */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Дві колонки */
    gap: 15px;
}

.grid-item {
    background: rgba(20, 20, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 10px;
    transition: all 0.2s ease;
    
    /* Щоб кнопка завжди була внизу */
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    min-height: 140px; /* Мінімальна висота, щоб було рівно */
}

.grid-item:hover {
    background: rgba(30, 30, 30, 0.9);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.content-wrapper {
    margin-bottom: 15px; /* Відступ від тексту до кнопки */
}

.grid-header { 
    display: flex; align-items: center; gap: 10px; margin-bottom: 5px; 
}

.grid-header .icon { font-size: 1.2rem; }

.grid-header h3 { 
    font-size: 0.85rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: white; 
    margin: 0; 
    letter-spacing: 0.5px;
}

.grid-item p { 
    font-size: 0.75rem; 
    color: #bbb; 
    margin: 0; 
    line-height: 1.4;
}

/* КНОПКА "ДЕТАЛЬНІШЕ" */
.grid-btn {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    border: 1px solid rgba(0, 255, 136, 0.3);
    padding: 5px 10px;
    border-radius: 4px;
    align-self: flex-start; /* Притиснути вліво */
    transition: 0.3s;
    text-decoration: none;
}

.grid-btn:hover {
    background: var(--primary);
    color: black;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* --- СТИЛЬ ДЛЯ 9-го БЛОКУ (ПІДСУМОК) --- */
.summary-item {
    grid-column: span 2; /* Розтягнути на всю ширину */
    background: rgba(0, 255, 136, 0.05); /* Легкий зелений відтінок */
    border-color: rgba(0, 255, 136, 0.2);
    text-align: center;
    align-items: center; /* Центрувати все по горизонталі */
}

.summary-item .center-header {
    justify-content: center; /* Центрувати заголовок */
}

.summary-item p {
    max-width: 90%;
    margin-bottom: 10px;
    color: #ddd;
}

.full-width-btn {
    align-self: center; /* Кнопка по центру */
    padding: 8px 20px;
}