/* =========================================
   1. GLOBAL VARIABLES (GREEN THEME)
   ========================================= */
:root {
    --color-main: #064e3b;       
    --color-secondary: #059669;  
    --color-accent: #10b981;     
    --color-highlight: #34d399;  
    
    --color-white: #FFFFFF;
    --color-gray: #f8fafc;
    --color-text: #334155;
    
    --transition: all 0.3s ease;
}

/* =========================================
   2. БАЗОВИ СТИЛОВЕ И ТИПОГРАФИЯ
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ЖЕЛЯЗНО ПРАВИЛО: ЕДИН ШРИФТ ЗА АБСОЛЮТНО ВСИЧКО */
body, h1, h2, h3, h4, h5, h6, p, a, span, div, button, input, select, textarea, label {
    font-family: 'Roboto', sans-serif !important;
}

body { 
    font-family: 'Roboto', sans-serif; 
    color: var(--color-text); 
    line-height: 1.7; 
    background-color: var(--color-gray); 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    overflow-x: hidden; 
}

h1, h2, h3, h4 { 
    color: var(--color-main); 
    line-height: 1.3; 
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
.container { width: 100%; max-width: 1100px !important; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

main { 
    flex: 1; 
    position: relative; 
    z-index: 1; 
    padding-bottom: 80px; 
}

/* =========================================
   3. ГЛОБАЛНИ СЕКЦИИ (HERO & PAGE HEADER)
   ========================================= */
.home-hero, .page-header {
    background: linear-gradient(135deg, var(--color-main) 0%, #022c22 100%);
    color: white;
    padding: 160px 20px 140px; 
    text-align: center;
    position: relative;
    overflow: hidden;
}
.home-hero::after, .page-header::after {
    content: '';
    position: absolute;
    bottom: -60px; left: 0; width: 100%; height: 120px;
    background: var(--color-gray);
    transform: skewY(-2.5deg);
    z-index: 1;
}
.home-hero h1, .page-header h1 {
    color: white;
    position: relative;
    z-index: 2;
}
.home-hero p, .page-header p {
    position: relative;
    z-index: 2;
}

/* =========================================
   4. ГЛОБАЛНИ АНИМАЦИИ
   ========================================= */
.fade-up { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.fade-up.is-visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* =========================================
   5. HEADER & NAVIGATION
   ========================================= */
.site-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; box-shadow: 0 4px 20px rgba(6, 78, 59, 0.08); background-color: var(--color-white); }
.site-header *, .site-footer * { box-sizing: border-box; }

/* Top Bar */
.top-bar { background-color: var(--color-main); color: var(--color-white); font-size: 0.85rem; padding: 8px 0; border-bottom: 2px solid var(--color-accent); }
.top-bar .container { display: flex; justify-content: flex-end; gap: 20px; flex-wrap: wrap; }
.top-bar a:hover { color: var(--color-highlight); }

/* Main Header */
.main-header { height: 80px; display: flex; align-items: center; }
.header-flex { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; position: relative; }

.logo-area { display: flex; flex-direction: column; justify-content: center; }
.logo-area img { height: 42px; object-fit: contain; }
.tagline { font-size: 0.7rem; color: var(--color-secondary); margin-top: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; font-family: 'Segoe UI', sans-serif; }

/* Desktop Nav */
.main-nav > ul { display: flex; align-items: center; gap: 14px; margin: 0; padding: 0; }
.main-nav > ul > li { position: relative; height: 80px; display: flex; align-items: center; }
.main-nav a { color: var(--color-main); font-size: 0.88rem; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.main-nav > ul > li:hover > a { color: var(--color-secondary); }

/* Dropdown Arrow */
.arrow { display: inline-block; width: 6px; height: 6px; border-right: 2px solid var(--color-accent); border-bottom: 2px solid var(--color-accent); transform: rotate(45deg); margin-left: 6px; position: relative; top: -2px; transition: var(--transition); }
.has-dropdown:hover > a .arrow { transform: rotate(-135deg); top: 2px; border-color: var(--color-secondary); } 

/* Desktop Dropdown */
.dropdown { position: absolute; top: 80px; left: -15px; background-color: var(--color-white); min-width: 240px; box-shadow: 0 15px 35px rgba(6, 78, 59, 0.12); opacity: 0; visibility: hidden; transform: translateY(15px); transition: var(--transition); border-top: 3px solid var(--color-accent); border-radius: 0 0 12px 12px; flex-direction: column; display: flex; }
.has-dropdown:hover > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li { width: 100%; display: block; }
.dropdown a { display: block; padding: 12px 18px; font-size: 0.88rem; border-bottom: 1px solid #f1f5f9; font-weight: 500; }
.dropdown li:last-child a { border-bottom: none; border-radius: 0 0 12px 12px; }
.dropdown a:hover { background-color: #ecfdf5; color: var(--color-secondary); padding-left: 23px; }
.profile-dropdown .dropdown { left: auto; right: 0; min-width: 200px; }

/* Hamburger Button */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; background: transparent; border: none; padding: 5px; z-index: 1005; }
.hamburger .bar { width: 26px; height: 3px; background-color: var(--color-main); transition: 0.3s; border-radius: 3px; }
.hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); background-color: var(--color-accent); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background-color: var(--color-accent); }

/* =========================================
   6. ГЛОБАЛЕН ФУТЪР
   ========================================= */
.site-footer { 
    background-color: var(--color-main); 
    color: var(--color-white); 
    padding-top: 60px; 
    margin-top: auto; 
    border-top: 4px solid var(--color-accent); 
}

/* ПРОМЯНА ТУК: По-сбита решетка, ограничена максимална ширина и центриране */
.footer-grid { 
    display: grid; 
    /* Първата колона заема 1.5 пъти повече място, другите две по 1 част */
    grid-template-columns: 1.5fr 1fr 1fr; 
    gap: 50px; 
    padding-bottom: 40px; 
    max-width: 1000px; /* Ограничаваме ширината, за да не се разтеглят много */
    margin: 0 auto; /* Центрираме съдържанието */
}

.footer-col { display: flex; flex-direction: column; }
.footer-logo { max-width: 200px; margin-bottom: 15px; filter: brightness(0) invert(1); }
.footer-slogan { font-size: 0.9rem; opacity: 0.8; line-height: 1.6; margin-bottom: 20px; }
.footer-title { color: var(--color-highlight); font-size: 1.05rem; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600;}
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #d1fae5; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px;}
.footer-links a:hover { color: var(--color-highlight); transform: translateX(5px); }
.footer-bottom { background-color: #022c22; padding: 20px 0; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.8rem; color: #a7f3d0; }

/* =========================================
   7. RESPONSIVE DESIGN (МОБИЛНА ВЕРСИЯ)
   ========================================= */
@media (max-width: 1024px) {
    .top-bar { display: none; } 
    .hamburger { display: flex; }

    /* МОБИЛНА НАВИГАЦИЯ */
    .main-nav > ul { 
        position: fixed; 
        top: 80px; 
        left: 100%; 
        width: 100%; 
        height: calc(100vh - 80px); 
        flex-direction: column; 
        background-color: var(--color-white); 
        box-shadow: 0 10px 20px rgba(6, 78, 59, 0.1); 
        padding: 0; 
        display: block; 
        overflow-y: auto; 
        transition: left 0.4s ease; 
    }
    .main-nav > ul.active { left: 0; } 
    
    .main-nav > ul > li { height: auto; display: flex; width: 100%; border-bottom: 1px solid #f1f5f9; }
    .main-nav a { padding: 16px 25px; font-size: 1rem; width: 100%; justify-content: space-between; }
    
    /* МОБИЛНИ ПАДАЩИ МЕНЮТА */
    .dropdown { 
        position: static; 
        box-shadow: none; 
        opacity: 1; visibility: visible; transform: none; 
        display: none; 
        background-color: #ecfdf5; 
        border-radius: 0; border-top: none;
    }
    .has-dropdown.open > .dropdown { display: block; }
    .dropdown li { border-bottom: 1px solid #d1fae5; }
    .dropdown li:last-child { border-bottom: none; }
    .dropdown a { padding: 15px 25px 15px 40px; font-size: 0.95rem; color: var(--color-secondary); }
    .dropdown a:hover { padding-left: 40px; background-color: #d1fae5; }
}

@media (max-width: 768px) {
    /* Корекция на отстоянията за мобилния хедър (който е 80px) */
    .home-hero, .page-header {
        padding: 120px 20px 100px;
    }

    /* ЖЕЛЯЗНО ПРАВИЛО: Изключваме анимациите на мобилни телефони! */
    .fade-up { 
        opacity: 1 !important; 
        transform: none !important; 
        transition: none !important; 
        visibility: visible !important;
    }

    /* ПРОМЯНА ТУК: На таблети/големи телефони колоните стават 2 горе и 1 долу */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-grid .footer-col:first-child {
        grid-column: 1 / -1; /* Първата колона с логото заема цялата ширина */
        text-align: center;
    }
    .footer-logo { margin: 0 auto 15px auto; }
}

@media (max-width: 576px) {
    .header-flex { padding: 0 15px; }
    .logo-area img { height: 32px; }
    .tagline { font-size: 0.6rem; margin-top: 2px; }
    
    /* ПРОМЯНА ТУК: На малки телефони колоните са една под друга */
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .footer-links a { justify-content: center; }
    .footer-links a:hover { transform: translateY(-2px); }
}