/* ==========================================
   1. ОБЩИ НАСТРОЙКИ И НУЛИРАНЕ
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================
   2. ШАПКА (HEADER) И НАВИГАЦИЯ
   ========================================== */
header {
    background: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
}

nav {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
}

nav a:hover {
    text-decoration: underline;
}

/* ==========================================
   3. HERO СЕКЦИЯ
   ========================================== */
.hero-with-bg {
    /* Коригиран път спрямо главната папка на сайта */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/hero-bg.jpg');
    background-size: cover;          
    background-position: center;     
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero-with-bg h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-with-bg p {
    font-size: 1.2rem;
}

/* ==========================================
   СВОБОДНО РЕЕЩИ СЕ И КЛИКАЕМИ БАЛОНИ
   ========================================== */
.global-balloons-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* Контейнерът пропуска кликовете... */
    z-index: 999;
    overflow: hidden;
}

.floating-balloon {
    /* ... твоите стари стилове тук ... */
    
    /* Добави само тези редове в съществуващия клас: */
    padding: 0 6px;
    text-align: center;
    word-break: break-word;
    line-height: 1.1;
}

.floating-balloon {
    /* ... другите ти стилове ... */
    
    /* Забранява пренасянето по букви */
    word-break: normal; 
    overflow-wrap: break-word; /* Пренася само цели думи на нов ред, ако няма място */
    hyphens: auto;             /* Слага тирета (ако е на български, браузърът може да не го хване перфектно, но пази думите цели) */
}

.floating-balloon {
    position: absolute;
    width: 75px;
    height: 90px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    box-shadow: inset -8px -8px 0 rgba(0, 0, 0, 0.15);
    pointer-events: auto; /* ...но самите балони ХВАНАТ кликането! */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.floating-balloon::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 50%;
    width: 2px;
    height: 14px;
    background: #888;
}

/* Ефект при мишка върху летящ балон */
.floating-balloon:hover {
    transform: scale(1.2) rotate(5deg);
    filter: brightness(1.1);
    cursor: pointer;
}

/* Разположение и анимации */
.fb-1 {
    left: 15%;
    bottom: -120px;
    background-color: #ff6b6b;
    animation: screenFloat1 14s ease-in-out infinite;
}

.fb-2 {
    left: 48%;
    bottom: -120px;
    background-color: #48dbfb;
    animation: screenFloat2 17s ease-in-out infinite;
    animation-delay: 3s;
}

.fb-3 {
    left: 82%;
    bottom: -120px;
    background-color: #1dd1a1;
    animation: screenFloat3 12s ease-in-out infinite;
    animation-delay: 6s;
}

/* Настройки и закъснение за 4-ти балон (лилав) */
.fb-4 {
    left: 30%;
    bottom: -120px;
    background-color: #9b59b6;
    animation: screenFloat1 13s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* Настройки и закъснение за 5-ти балон (оранжев) */
.fb-5 {
    left: 65%;
    bottom: -120px;
    background-color: #e67e22;
    animation: screenFloat2 16s ease-in-out infinite;
    animation-delay: 4.5s;
}

@keyframes screenFloat1 {
    0%   { transform: translateY(0) translateX(0); opacity: 0.85; }
    50%  { transform: translateY(-600px) translateX(40px); opacity: 0.95; }
    100% { transform: translateY(-1200px) translateX(-30px); opacity: 0; }
}

@keyframes screenFloat2 {
    0%   { transform: translateY(0) translateX(0); opacity: 0.85; }
    50%  { transform: translateY(-700px) translateX(-50px); opacity: 0.95; }
    100% { transform: translateY(-1200px) translateX(35px); opacity: 0; }
}

@keyframes screenFloat3 {
    0%   { transform: translateY(0) translateX(0); opacity: 0.85; }
    50%  { transform: translateY(-650px) translateX(30px); opacity: 0.95; }
    100% { transform: translateY(-1200px) translateX(-40px); opacity: 0; }
}

@media (max-width: 768px) {
    /* Леко смаляваме балоните на телефон, за да не закриват съдържанието */
    .floating-balloon {
        width: 55px;
        height: 68px;
        font-size: 0.7rem;
    }

    /* Преместваме ги така, че да стоят навътре в екрана и да не се режат отстрани */
    .fb-1 { left: 8%; }
    .fb-2 { left: 32%; }
    .fb-3 { left: 56%; }
    .fb-4 { left: 78%; }
    .fb-5 { left: 45%; }
    /* Ако имаш и fb-5, можеш да го позиционираш например на 45% */
}

/* ==========================================
   5. ОСНОВНО СЪДЪРЖАНИЕ И СНИМКИ
   ========================================== */
.main-content {
    padding: 40px 20px;
    text-align: center;
    background: #fff;
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.content-image {
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.weather-frame-wrapper iframe {
    width: 100%;
    height: 520px; /* Увеличаваме височината, за да се побере целият виджет */
    border: none;
    display: block;
    overflow: hidden; /* Скрива излишните скрол барове */
}

/* ==========================================
   6. ФУТЪР
   ========================================== */
footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 20px;
}

/* ==========================================
   7. МЕДИЯ КУРИЕРИ
   ========================================== */
@media (max-width: 768px) {
    .hero-with-bg h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    nav {
        flex-direction: column;
        gap: 10px;
    }

    .balloons-container {
        flex-direction: column;
        height: auto;
        gap: 20px;
    }
}

.like-widget-container {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    padding: 10px 18px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin: 20px 0;
    font-family: inherit;
}

.like-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.like-btn:hover:not(:disabled) {
    background: #ff5252;
    transform: scale(1.05);
}

.like-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.likes-count {
    font-size: 0.95rem;
    color: #333;
}

.like-message {
    font-size: 0.85rem;
    color: #27ae60;
    font-style: italic;
}
