/* Базови нулиращи стилове и шрифт */
body {
    font-family: 'Open Sans', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4; 
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    font-weight: 700;
    margin-top: 0;
}

a {
    text-decoration: none;
    color: #000;
}

/* ======================================= */
/* 1. СТИЛ НА HEADER (Лого, Търсачка, Меню) */
/* ======================================= */
.main-header {
    background-color: #fff;
    border-bottom: 2px solid #e0e0e0;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible;
}

.header-content {
    display: flex;
    justify-content: space-between; 
    align-items: center;
}

/* Бутон с лого */
.logo-button {
    display: flex;
    align-items: center;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    transition: opacity 0.3s;
    height: 40px;
}

.logo-button:hover {
    opacity: 0.8;
}

.logo-button img {
    height: 40px;
    width: auto;
    display: block;
}

/* Търсачка и Меню */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Търсачка */
.search-box {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    flex-grow: 1; 
    max-width: 300px;
}

.search-box input {
    border: none;
    padding: 8px 10px;
    font-size: 14px;
    outline: none;
    flex-grow: 1;
}

.search-box button {
    background-color: #e6e6e6;
    border: none;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 16px;
}

/* Бутон за меню */
.menu-container {
    position: relative;
}

.menu-toggle {
    background-color: #333;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.menu-toggle:hover {
    background-color: #555;
}

/* Падащо меню */
.dropdown-menu {
    display: none; 
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-top: 3px solid #008000; 
    z-index: 100;
}

.dropdown-menu a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    transition: background-color 0.3s;
}

.dropdown-menu a:hover {
    background-color: #f1f1f1;
    color: #008000;
}

/* Клас за показване на менюто (използва се в app.js) */
.dropdown-menu.active {
    display: block;
}

/* ======================================= */
/* 2. СТИЛ НА ВИЗУАЛНИТЕ БЛОКОВЕ (Cards)  */
/* ======================================= */
.main-visual-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 30px 0;
}

.visual-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    display: block;
    min-height: 200px;
}

.visual-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.visual-card:hover .card-image {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); 
    color: white;
    padding: 20px;
}

.card-overlay h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.card-overlay p {
    font-size: 14px;
    margin: 0;
}

/* Специфичен стил за блока "Новини" (ЗЕЛЕН акцент) */
.news-card {
    grid-column: span 1; 
    min-height: 350px;
}
.news-card .card-overlay {
    background: linear-gradient(transparent, rgba(0, 128, 0, 0.8));
}

/* Специфичен стил за блока "Актуална тема: Цената на сметта!" */
.smet-card {
    grid-column: span 1;
    min-height: 400px;
}
.smet-card .card-overlay h2 {
    font-size: 28px;
}

/* ======================================= */
/* 3. FOOTER */
/* ======================================= */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    font-size: 14px;
}

/* ======================================= */
/* 4. RESPONSIVE (за мобилни устройства) */
/* ======================================= */
@media (max-width: 768px) {
    .header-content {
        justify-content: space-between;
    }
    
    .logo-button {
        padding: 8px 12px;
        height: auto;
    }
    
    .logo-button img {
        height: 40px;
        max-width: 80px;
        object-fit: contain;
    }
    
    .header-controls {
        gap: 10px;
    }

    .search-box {
        max-width: 150px;
    }

    .search-box input {
        width: 100%;
        padding: 6px 8px;
        font-size: 13px;
    }
    
    .menu-toggle {
        padding: 8px 12px;
        font-size: 13px;
    }

    .main-visual-cards {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
        gap: 15px;
    }

    .news-card {
        grid-column: span 1;
        min-height: 250px;
    }
    
    .smet-card {
        grid-column: span 1;
        min-height: 250px;
    }
    
    .smet-card .card-overlay h2 {
        font-size: 20px;
    }

    .card-overlay h2 {
        font-size: 20px;
    }
}
