/* --- GLOBAL VARIABLES & RESET --- */
:root {
    --primary-color: #fdb913; /* Yellow */
    --secondary-color: #003366; /* Dark Blue */
    --text-color: #333;
    --light-bg: #f8f9fa; /* Чуть светлее для контраста */
    --white: #ffffff;
    --font-main: 'Montserrat', sans-serif;
    --font-arm: 'Noto Sans Armenian', sans-serif;
    
    /* Fallback if PHP variable fails */
    --gallery-cols: 3; 
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    background-color: #fff;
    -webkit-font-smoothing: antialiased; /* Сглаживание шрифтов */
}

/* Армянский шрифт */
html[lang="hy"] body {
    font-family: var(--font-arm);
}

/* --- LAYOUT UTILS --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0; /* Больше воздуха между секциями */
}

.bg-light {
    background: var(--light-bg);
}

/* --- TYPOGRAPHY (TITLES & SUBTITLES) --- */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 15px;
}

/* Желтая полоска под заголовком */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* --- NAVIGATION --- */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 5px;
    align-items: center;
}

.lang-switcher a {
    text-decoration: none;
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.3s;
}

.lang-switcher a:hover,
.lang-switcher a.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary-color);
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 51, 102, 0.5));
    z-index: -1;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    font-weight: 400;
    opacity: 0.9;
}

/* --- FEATURES (WHY US) --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    text-align: center;
}

.feature-card {
    padding: 40px 30px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: transparent;
}

.feature-card i {
    font-size: 45px;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.feature-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

/* --- GALLERY (SIMPLE GRID - SAFARI FRIENDLY) --- */
.gallery-grid {
    display: grid;
    /* Используем переменную из админки для кол-ва колонок */
    grid-template-columns: repeat(var(--gallery-cols), 1fr); 
    gap: 20px;
    width: 100%;
}

.gallery-item {
    position: relative;
    /* ВАЖНО: Фиксированная высота делает их одинаковыми прямоугольниками */
    height: 260px; 
    border-radius: 12px;
    overflow: hidden; /* Обрезает все, что вылезает */
    cursor: zoom-in;
    background: #eee; /* Цвет фона, пока грузится картинка */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    /* ВАЖНО: Это свойство обрезает фото по центру, не искажая пропорции */
    object-fit: cover; 
    object-position: center;
    transition: transform 0.5s ease;
}

/* Эффект наведения: легкий зум картинки внутри рамки */
.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* Lightbox Modal (Без изменений) */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
    padding: 20px;
}

.lightbox-content {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    transform: scale(0.9);
    animation: zoomIn 0.3s forwards;
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
    z-index: 10000;
}

.close-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

@keyframes fadeIn { to { opacity: 1; } }
@keyframes zoomIn { to { transform: scale(1); } }

/* --- MOBILE RESPONSIVE FIX --- */
@media (max-width: 768px) {
    .gallery-grid {
        /* На мобильном всегда 1 колонка, игнорируя админку */
        grid-template-columns: 1fr !important; 
    }
    .gallery-item {
        height: 220px; /* Чуть меньше высота на телефоне */
    }
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
    padding: 20px;
}

.lightbox-content {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    transform: scale(0.9);
    animation: zoomIn 0.3s forwards;
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
}

.close-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

@keyframes fadeIn { to { opacity: 1; } }
@keyframes zoomIn { to { transform: scale(1); } }

/* --- LOCATIONS --- */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.location-card {
    background: var(--white);
    padding: 50px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    transition: 0.3s;
}

.location-card:hover {
    transform: translateY(-5px);
}

.location-card .loc-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 30px;
    box-shadow: 0 5px 15px rgba(0,51,102,0.3);
}

.location-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
}

.location-card p {
    color: #666;
    font-size: 0.95rem;
}

/* --- BRANDS --- */
.brands-section {
    background: #fff;
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.brands-text {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.brands-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.brand-img {
    height: 60px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: 0.4s;
}

.brand-img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* --- СТИЛИ ДЛЯ ЛОГО ABC --- */

/* Главный контейнер (строит элементы сверху вниз) */
.abc-logo-text {
    display: flex;
    flex-direction: column; /* Вертикальная колонка */
    align-items: center;    /* Центрируем по центру */
    justify-content: center;
    opacity: 0.8;
    transition: 0.3s;
    cursor: default;
    /* Убираем лишние фильтры, так как это текст, а не картинка */
    filter: none !important; 
}

.abc-logo-text:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Блок для букв a b c (стоят в ряд) */
.abc-letters {
    display: flex;
    gap: 0px; /* Буквы стоят плотно */
    line-height: 1; /* Убираем отступы сверху/снизу у текста */
}

/* Общий стиль для a, b, c */
.abc-logo-text .a, 
.abc-logo-text .b, 
.abc-logo-text .c {
    font-weight: 400;   /* Жирный шрифт */
    font-size: 30px;    /* Размер букв */
    display: flex;
    align-items: center;
    /* Если нужно всегда строчные (маленькие), раскомментируйте: */
    /* text-transform: lowercase; */
}

/* Цвета букв */
.abc-logo-text .a { color: #bc375a; }
.abc-logo-text .b { color: #366bac; }
.abc-logo-text .c { color: #458b4b; }

/* Нижнее слово EXCHANGE */
.exchange-text {
    color: #000000;            /* Черный цвет */
    text-transform: uppercase; /* Делает все буквы ЗАГЛАВНЫМИ */
    font-size: 20px;           /* Размер поменьше */
    font-weight: 500;          /* Жирный */
    letter-spacing: 2px;
    margin-top: 2px;           /* Небольшой отступ от букв abc */
    margin-left: 5px;          /* Компенсация letter-spacing для визуального центра */
}

/* --- FOOTER --- */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo {
    max-width: 160px;
    margin-bottom: 25px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-item i {
    color: var(--primary-color);
    width: 25px;
    margin-top: 5px;
    font-size: 1.1rem;
}

.contact-item a, .contact-item span {
    color: #ddd;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: 0.3s;
}

.contact-item a:hover {
    color: var(--white);
}

.email-btn {
    border-bottom: 1px solid rgba(253, 185, 19, 0.5);
    padding-bottom: 2px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    font-size: 0.85rem;
    color: #aaa;
}

/* --- COOKIE BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transition: bottom 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 2000;
    border-top: 3px solid var(--primary-color);
}

.cookie-banner.show {
    bottom: 0;
}

.btn-sm {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.btn-sm:hover {
    background: #004080;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        margin-bottom: 40px;
        font-size: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 15px;
        border-bottom: 1px solid #f4f4f4;
        width: 100%;
        text-align: center;
    }

    .lang-switcher {
        margin-right: 15px;
    }

    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }

    /* Mobile Gallery */
    .masonry-grid {
        column-count: 1 !important;
    }
    
    .masonry-item:hover {
        transform: none;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .brands-logos {
        gap: 30px;
        flex-direction: column;
    }
    
    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }
}
