/*
Theme Name: Hadzhiiliev Law
Theme URI: https://hadzhiiliev.com/
Author: Hristo Hadzhiiliev
Description: Custom theme for the law office website of adv. Hristo Hadzhiiliev. Bilingual (BG/EN) one-page layout with hero carousel, expertise grid, articles, contact section and privacy policy page.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: All rights reserved
Text Domain: hadzhiiliev-law
*/

/* ===== Base & Home page ===== */
        /* Базови променливи за цветове и типография */
        :root {
            --primary-color: #0f2942;
            --accent-color: #d4af37;
            --bg-light: #ffffff;
            --text-main: #333333;
            --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            
            /* Цветове за грида */
            --grid-auto: #2A4D50;
            --grid-aviation: #85C1AE;
            --grid-bank: #0C4A34;
            --grid-comp: #429C71;
            --grid-corp: #C84C3D;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: var(--font-main);
            color: var(--text-main);
            line-height: 1.6;
        }

        a {
            text-decoration: none;
            color: inherit;
        }

        /* Hero Секция */
        .hero {
            background-color: #ffffff;
            min-height: 55vh;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 4rem 5%;
            color: var(--text-main);
            gap: 3rem;
        }

        .hero-content {
            flex: 1;
            max-width: 600px;
        }

        .hero h1 {
            font-size: 2.4rem; 
            margin-bottom: 1.2rem;
            font-weight: 300;
            line-height: 1.2;
            color: var(--primary-color);
        }

        .hero p {
            font-size: 1.1rem;
            margin-bottom: 2.5rem;
            opacity: 0.85;
            line-height: 1.8;
            color: var(--text-main);
        }

        .btn {
            background-color: var(--accent-color);
            color: var(--primary-color);
            padding: 12px 30px;
            font-weight: bold;
            border-radius: 3px;
            text-transform: uppercase;
            letter-spacing: 1px;
            transition: background 0.3s, transform 0.2s;
            display: inline-block;
        }

        .btn:hover {
            background-color: #f3c63f;
            transform: translateY(-2px);
        }

        .hero-image {
            flex: 1;
            display: flex;
            justify-content: flex-end;
            align-items: center;
        }

        .hero-carousel {
            position: relative;
            height: 450px;
            aspect-ratio: 3 / 4;
            max-width: 100%;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 15px 30px rgba(0,0,0,0.3);
            border: 3px solid rgba(255, 255, 255, 0.1);
        }

        .hero-slide {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0;
            transition: opacity 1s ease-in-out;
        }

        .hero-slide.active { opacity: 1; }

        .hero-dots {
            position: absolute;
            bottom: 12px;
            left: 0;
            right: 0;
            display: flex;
            justify-content: center;
            gap: 8px;
        }

        .hero-dots button {
            width: 10px;
            height: 10px;
            padding: 0;
            border-radius: 50%;
            border: none;
            background: rgba(255,255,255,0.55);
            cursor: pointer;
            transition: background 0.3s, transform 0.3s;
        }

        .hero-dots button.active {
            background: var(--accent-color);
            transform: scale(1.25);
        }

        /* --- СЕКЦИЯ: НАШИЯТ ОПИТ --- */
        .expertise-section {
            padding: 5rem 5%;
            background-color: #ffffff;
        }

        .expertise-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            grid-auto-rows: 280px;
            gap: 15px;
            max-width: 1400px;
            margin: 0 auto;
        }

        .grid-title-container {
            padding: 1rem 0;
        }

        .grid-title-container h2 {
            font-size: 2.5rem;
            color: var(--grid-auto);
            font-weight: 400;
            line-height: 1.2;
        }

        .grid-box {
            border-radius: 15px;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            color: white;
            transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
            position: relative;
            overflow: hidden;
            z-index: 1;
        }

        .grid-box h3 {
            font-size: 1.6rem;
            font-weight: 400;
            line-height: 1.2;
            margin: 0;
        }

        .box-footer {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
        }

        .box-icon {
            font-size: 2.2rem;
            opacity: 0.9;
        }

        .box-link {
            font-size: 0.9rem;
            text-decoration: underline;
            text-underline-offset: 5px;
            font-weight: 500;
        }

        .box-automotive { background-color: var(--grid-auto); }
        .box-aviation { background-color: var(--grid-aviation); color: #1a3329; }
        .box-banking { background-color: var(--grid-bank); }
        .box-competition { background-color: var(--grid-comp); }
        .box-corporate { background-color: var(--grid-corp); grid-column: span 2; }

        .box-image {
            background-color: #E87661;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .box-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        @media (hover: hover) and (pointer: fine) {
            .grid-box:hover {
                transform: translateY(-5px);
                filter: brightness(1.05);
                z-index: 2;
            }
            .box-automotive:hover { box-shadow: 0 10px 30px rgba(42, 77, 80, 0.5); }
            .box-aviation:hover   { box-shadow: 0 10px 30px rgba(133, 193, 174, 0.6); }
            .box-banking:hover    { box-shadow: 0 10px 30px rgba(12, 74, 52, 0.5); }
            .box-competition:hover{ box-shadow: 0 10px 30px rgba(66, 156, 113, 0.5); }
            .box-corporate:hover  { box-shadow: 0 10px 30px rgba(200, 76, 61, 0.5); }
            .box-image:hover      { box-shadow: 0 10px 30px rgba(232, 118, 97, 0.5); }
        }

        /* --- РЕСПОНСИВЕН ДИЗАЙН --- */
        @media (max-width: 992px) {
            .hero {
                flex-direction: column;
                text-align: center;
                padding: 3rem 20px;
                gap: 2rem;
            }
            .hero-content {
                text-align: center;
            }
            .hero h1 {
                font-size: 2rem;
            }
            .hero p {
                font-size: 1rem;
            }
            .hero-image {
                justify-content: center;
            }
            .hero-carousel {
                height: 350px;
            }
        }

        @media (max-width: 1024px) and (min-width: 993px) {
            .expertise-grid { grid-template-columns: repeat(2, 1fr); }
            .box-corporate { grid-column: span 2; }
        }

        @media (max-width: 768px) {
            .expertise-grid { grid-template-columns: repeat(2, 1fr); }
            .box-corporate { grid-column: span 2; }
        }

        @media (max-width: 600px) {
            .expertise-grid { grid-template-columns: 1fr; }
            .box-corporate { grid-column: span 1; }
        }

        /* Последни статии */
        .section-title {
            text-align: center;
            font-size: 2rem;
            color: var(--primary-color);
            margin-bottom: 3rem;
            text-transform: uppercase;
        }

        .section-title::after {
            content: '';
            display: block;
            width: 60px;
            height: 3px;
            background: var(--accent-color);
            margin: 15px auto 0;
        }

        .news {
            padding: 5rem 5%;
        }

        .news-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
        }

        .article-card {
            display: flex;
            flex-direction: column;
            border: 1px solid #eee;
            border-radius: 8px;
            overflow: hidden;
            background: white;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        }

        .article-card img {
            width: 100%;
            height: 200px;
            object-fit: cover;
        }

        .article-content {
            padding: 1.5rem;
        }

        .article-date {
            font-size: 0.8rem;
            color: var(--accent-color);
            margin-bottom: 0.5rem;
            display: block;
            font-weight: bold;
        }

        .article-title {
            font-size: 1.2rem;
            margin-bottom: 1rem;
            color: var(--primary-color);
        }

        /* --- СЕКЦИЯ: КОНТАКТИ --- */
        .contact-section {
            padding: 5rem 5%;
            background-color: #f9f9f9;
        }

        .contact-container {
            max-width: 600px;
            margin: 0 auto;
            background: #ffffff;
            padding: 2.5rem;
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
            border-top: 4px solid var(--accent-color);
        }

        .contact-address {
            margin-bottom: 2rem;
        }

        .contact-address h3 {
            font-size: 1rem;
            color: var(--primary-color);
            margin-bottom: 0.5rem;
        }

        .contact-address address {
            font-style: normal;
            line-height: 1.6;
            margin-bottom: 1rem;
        }

        .contact-email {
            margin-bottom: 1rem;
            line-height: 1.6;
        }

        .contact-email strong {
            color: var(--primary-color);
        }

        .contact-email a {
            color: var(--primary-color);
            font-weight: 600;
            text-decoration: none;
            border-bottom: 2px solid var(--accent-color);
        }

        .contact-email a:hover { color: var(--accent-color); }

        .map-wrapper {
            border-radius: 6px;
            overflow: hidden;
            border: 1px solid #e1e1e1;
            margin-bottom: 0.8rem;
        }

        .map-wrapper iframe {
            display: block;
            width: 100%;
            height: 260px;
            border: 0;
        }

        .map-link {
            color: var(--primary-color);
            font-weight: 600;
            font-size: 0.95rem;
            text-decoration: none;
            border-bottom: 2px solid var(--accent-color);
        }

        .map-link:hover { color: var(--accent-color); }

        .contact-form {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .form-group label {
            font-weight: 600;
            color: var(--primary-color);
            font-size: 0.95rem;
        }

        .form-group input,
        .form-group textarea {
            padding: 1rem;
            border: 1px solid #e1e1e1;
            border-radius: 4px;
            font-family: var(--font-main);
            font-size: 1rem;
            transition: border-color 0.3s;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--accent-color);
        }

        .contact-form .btn {
            border: none;
            cursor: pointer;
            font-size: 1rem;
            margin-top: 1rem;
        }

    
/* ===== Header ===== */
        /* Навигация - Адаптирана към светлите лого изображения */
        header {
            background-color: var(--bg-light);
            color: var(--primary-color);
            padding: 0.5rem 5%; 
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 15px rgba(0,0,0,0.08);
            border-bottom: 2px solid var(--accent-color);
        }

        .logo {
            display: flex;
            align-items: center;
            text-decoration: none;
            height: 65px; 
            transition: opacity 0.3s ease;
        }

        .logo img {
            height: 100%;
            width: auto;
            mix-blend-mode: darken; 
        }

        .logo:hover {
            opacity: 0.85;
        }

        /* Управление на езиците за логото */
        html[lang="bg"] .logo-en { display: none; }
        html[lang="bg"] .logo-bg { display: block; }
        
        html[lang="en"] .logo-bg { display: none; }
        html[lang="en"] .logo-en { display: block; }

        /* Превключвател за език */
        .lang-switcher {
            display: flex;
            gap: 10px;
            font-size: 0.9rem;
            font-weight: 600;
            align-items: center;
        }

        .lang-switcher a {
            cursor: pointer;
            color: var(--primary-color);
            transition: color 0.3s;
        }

        .lang-switcher a:hover,
        .lang-switcher a.active {
            color: var(--accent-color);
        }
        
        .lang-switcher span {
            color: #ccc;
        }

        nav ul {
            list-style: none;
            display: flex;
            gap: 2rem;
            align-items: center;
        }

        nav ul li a {
            font-size: 0.85rem;
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 1px;
            color: var(--primary-color);
            transition: color 0.3s;
        }

        nav ul li a:hover {
            color: var(--accent-color);
        }

        @media (max-width: 992px) {
            header {
                flex-direction: column;
                gap: 15px;
                padding: 1rem;
            }
            .logo {
                height: 55px;
            }
            nav ul {
                gap: 1.2rem;
                flex-wrap: wrap;
                justify-content: center;
            }
        }

/* ===== Footer ===== */
    .site-footer {
        background-color: #ffffff;
        color: var(--text-main, #333333);
        border-top: 2px solid var(--accent-color, #d4af37);
        font-size: 0.95rem;
    }

    .site-footer .footer-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 3rem 5% 2rem;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
        text-align: left;
    }

    .site-footer h4 {
        color: var(--primary-color, #0f2942);
        font-size: 1.05rem;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--accent-color, #d4af37);
        display: inline-block;
    }

    .site-footer address {
        font-style: normal;
        line-height: 1.7;
        margin-bottom: 0.6rem;
    }

    .site-footer ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .site-footer li { margin-bottom: 0.6rem; }

    .site-footer a {
        color: var(--primary-color, #0f2942);
        text-decoration: none;
        transition: color 0.3s;
    }

    .site-footer a:hover { color: var(--accent-color, #d4af37); }

    .site-footer .footer-bottom {
        border-top: 1px solid #e1e1e1;
        text-align: center;
        padding: 1.2rem 5%;
        font-size: 0.85rem;
    }

    @media (max-width: 768px) {
        .site-footer .footer-inner {
            grid-template-columns: 1fr;
            gap: 2rem;
        }
    }

/* ===== Privacy / content pages ===== */
        /* Страница: Политика за поверителност */
        .policy-page {
            background-color: #f7f8fa;
            padding: 3rem 5% 4rem;
        }

        .policy-container {
            max-width: 900px;
            margin: 0 auto;
            background: #ffffff;
            padding: 3rem;
            border-radius: 8px;
            box-shadow: 0 5px 25px rgba(0,0,0,0.06);
        }

        .policy-container h1 {
            font-size: 2rem;
            color: var(--primary-color);
            text-transform: uppercase;
            text-align: center;
            margin-bottom: 2rem;
        }

        .policy-container h1::after {
            content: '';
            display: block;
            width: 60px;
            height: 3px;
            background: var(--accent-color);
            margin: 15px auto 0;
        }

        .policy-container h2 {
            font-size: 1.4rem;
            color: var(--primary-color);
            margin: 2.5rem 0 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid var(--accent-color);
        }

        .policy-container h3 {
            font-size: 1.05rem;
            color: var(--primary-color);
            margin: 1.5rem 0 0.5rem;
        }

        .policy-container p {
            margin-bottom: 1rem;
            text-align: justify;
        }

        .policy-container ul {
            margin: 0 0 1rem 1.5rem;
        }

        .policy-container li {
            margin-bottom: 0.5rem;
        }

        .policy-container a {
            color: var(--primary-color);
            text-decoration: underline;
            text-decoration-color: var(--accent-color);
            text-underline-offset: 3px;
            word-break: break-word;
        }

        .policy-container a:hover { color: var(--accent-color); }

        .policy-container address.controller {
            font-style: normal;
            background: #f7f8fa;
            border-left: 4px solid var(--accent-color);
            padding: 1rem 1.2rem;
            margin-bottom: 1rem;
            line-height: 1.8;
        }

        @media (max-width: 600px) {
            .policy-page { padding: 1.5rem 3% 3rem; }
            .policy-container { padding: 1.5rem 1.2rem; }
            .policy-container p { text-align: left; }
        }
    
        /* ---------- WordPress specific ---------- */
        body.admin-bar header { top: 32px; }
        @media (max-width: 782px) { body.admin-bar header { top: 46px; } }
        @media (max-width: 600px) { body.admin-bar header { top: 0; } }
        html { scroll-behavior: smooth; }
        header[id], section[id] { scroll-margin-top: 90px; }
        .screen-reader-text {
            border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
            height: 1px; margin: -1px; overflow: hidden; padding: 0;
            position: absolute; width: 1px; word-wrap: normal !important;
        }
