/* 1. Глобальные стили и мягкая анимация появления */
:root {
    --bg-color: #f8f9fa;
    --text-color: #333;
    --header-bg: #2c3e50;
    --footer-bg: #2c3e50;
    --card-bg: white;
    --title-color: #2c3e50;
    --border-color: #eee;
    --feature-text: #7f8c8d;
    --feature-title: #34495e;
    --featured-bg: #ebf5fb;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
}

body.dark-mode {
    --bg-color: #121418;
    --text-color: #e2e8f0;
    --header-bg: #0f1216;
    --footer-bg: #0b0d10;
    --card-bg: #1a1f26;
    --title-color: #f8fafc;
    --border-color: #2a313a;
    --feature-text: #94a3b8;
    --feature-title: #f8fafc;
    --featured-bg: #121418;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --card-shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.6);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

/* 2. Шапка и навигация */
header {
    background-color: var(--header-bg);
    color: white;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto 15px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo-img {
    height: 60px;
    margin-right: 5px;
}

.lang-flags {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 8px;
}

.flag {
    font-size: 1.5rem;
    text-decoration: none;
    transition: transform 0.3s;
    display: inline-block;
}

.flag:hover {
    transform: scale(1.2);
}

.nav-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.nav-catalog-btn {
    background-color: #2980b9;
    color: white;
    padding: 0 18px;
    height: 34px;
    line-height: 34px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
    box-sizing: border-box;
    white-space: nowrap;
}

.nav-catalog-btn:hover {
    background-color: #2471a3;
    transform: translateY(-2px);
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    color: #3498db;
}

.lang-tabs {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 0 10px;
    height: 34px;
    border-radius: 20px;
    align-items: center;
    box-sizing: border-box;
}

.lang-tab {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    transition: all 0.3s;
}

.lang-tab:hover {
    color: white;
}

.lang-tab.active {
    background-color: #3498db;
    color: white;
}

.contact-text a {
    white-space: nowrap;
}

/* 3. Главный контейнер и карточки */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 40px 20px;
    gap: 30px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
    text-align: center;
    transition: all 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
}

.product-name,
.product-card h3 {
    color: var(--title-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.product-card p {
    color: var(--text-color);
    margin: 8px 0;
}

.product-usage {
    color: var(--feature-text);
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.9;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 37, 48, 0.95), rgba(44, 62, 80, 0.9)),
        radial-gradient(circle at right center, rgba(52, 152, 219, 0.15) 0%, transparent 40%);
    color: white;
    text-align: center;
    padding: 100px 20px 120px 20px;
    /* More bottom padding for the wave */
    animation: smoothFade 1s ease-in-out;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: var(--bg-color);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath d='M0,128L48,138.7C96,149,192,171,288,165.3C384,160,480,128,576,144C672,160,768,224,864,229.3C960,235,1056,181,1152,149.3C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath d='M0,128L48,138.7C96,149,192,171,288,165.3C384,160,480,128,576,144C672,160,768,224,864,229.3C960,235,1056,181,1152,149.3C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E");
    mask-size: cover;
    -webkit-mask-size: cover;
    z-index: 10;
}

@keyframes smoothFade {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: #ffffff;
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.6;
    color: #bdc3c7;
}

/* About Section */
.about-section {
    background-color: transparent;
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/factory_bg.png') center center / cover no-repeat;
    opacity: 0.08;
    z-index: 0;
}

.about-section>* {
    position: relative;
    z-index: 1;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color);
}

.competence-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.competence-item {
    background: var(--card-bg);
    padding: 20px 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.competence-item strong {
    display: block;
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 5px;
}

/* Base Sections */
.section {
    padding: 40px 20px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* Ensure inner structures keep 1200px and centering */
.section-title,
.about-content,
.features-grid,
.featured-products-grid {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--title-color);
    margin-bottom: 40px;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 4px;
    background-color: #3498db;
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--card-bg);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Contact Block CTA */
.contact-cta {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 50px 20px;
    border-radius: 15px;
    text-align: center;
    margin: 40px 20px;
}

.btn-large {
    font-size: 1.2rem;
    padding: 15px 40px;
    background-color: #1a6f8f;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
    color: white;
}

/* 4. Стили картинок */
.bag-shape {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: block;
    margin-bottom: 15px;
}

/* 5. Кнопки и ссылки */
.btn-link,
.buy-btn {
    display: inline-block;
    background-color: #2980b9;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: auto;
    align-self: center;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-link:hover,
.buy-btn:hover {
    background-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.buy-btn:active {
    transform: translateY(0);
}

/* Modal Window Base */
.modal {
    display: flex; /* Using flex for centering, initially hidden via visibility/opacity */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    align-items: flex-start; /* For margin: 10% auto behavior */
    justify-content: center;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    color: var(--text-color);
    margin: 80px auto;
    padding: 35px;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Animation initial state */
    transform: translateY(-30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    opacity: 0;
}

.dark-theme .modal-content {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.light-theme .modal-content {
    background: #ffffff;
    color: #2c3e50;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #95a5a6;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #e74c3c;
}

.modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.9;
}

.modal-title {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--text-color);
}

.dark-theme .modal-content label,
.dark-theme .modal-title {
    color: #ecf0f1;
}

.light-theme .modal-content label,
.light-theme .modal-title {
    color: #2c3e50;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.light-theme .modal-content input,
.light-theme .modal-content textarea {
    background: #fff;
    border: 1px solid #bdc3c7;
    color: #2c3e50;
}

.modal-content input:focus,
.modal-content textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

/* --- CHEMICAL PRELOADER --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #121212; /* Match main dark theme */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    position: relative;
    width: 120px;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flask-svg {
    width: 100px;
    height: 120px;
    filter: drop-shadow(0 0 15px rgba(52, 152, 219, 0.4));
}

.flask-liquid {
    fill: #3498db; /* Neon Blue */
    transition: height 0.3s ease;
    filter: blur(0.5px);
}

.bubble {
    position: absolute;
    bottom: 40px;
    background: rgba(52, 152, 219, 0.8);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: bubble-up 2s infinite ease-in;
}

.bubble:nth-child(2) { left: 40%; animation-delay: 0.5s; width: 4px; height: 4px; }
.bubble:nth-child(3) { left: 60%; animation-delay: 1.2s; width: 5px; height: 5px; }

@keyframes bubble-up {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(-80px) scale(1.5); opacity: 0; }
}

.loader-text {
    margin-top: 20px;
    color: #3498db;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: bold;
    animation: pulse-text 1.5s infinite ease-in-out;
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}



/* 6. Страница товара (детали) */
.product-detail {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 20px 60px;
    box-sizing: border-box;
}

.detail-container {
    display: flex;
    gap: 50px;
    padding: 40px 50px;
    background: var(--card-bg);
    margin: 40px auto;
    max-width: 1250px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    align-items: flex-start;
}

.large-img {
    width: 380px;
    min-width: 280px;
    height: auto;
    border-radius: 15px;
    flex-shrink: 0;
}

.info {
    flex: 1;
    min-width: 0;
}

.info h2 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--title-color);
}

.info>p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 20px;
}

/* 7. Таблицы характеристик */
.info table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0 25px;
}

.info table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.97rem;
}

.info table td:first-child {
    font-weight: 600;
    color: #7f8c8d;
    width: 35%;
    white-space: nowrap;
}

/* Extra info blocks below the table */
.product-extra-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 28px;
    margin-bottom: 28px;
}

.extra-info-block {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
}

.extra-info-block h4 {
    margin: 0 0 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3498db;
    font-weight: 700;
}

.extra-info-block p {
    margin: 0;
    font-size: 0.97rem;
    color: var(--text-color);
    line-height: 1.5;
}

@media (max-width: 850px) {
    .detail-container {
        flex-direction: column;
        padding: 25px;
        gap: 25px;
    }

    .large-img {
        width: 100%;
        min-width: unset;
    }
}

/* 8. Подвал сайта (Footer) */
footer {
    background-color: var(--footer-bg);
    color: #bdc3c7;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    line-height: 1.6;
}

footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #3498db;
}

/* Dark Mode Toggle */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: '☀️';
    font-size: 14px;
    position: absolute;
    height: 26px;
    width: 26px;
    left: 4px;
    transition: .4s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

input:checked+.slider {
    background-color: #3498db;
}

input:checked+.slider:before {
    transform: translateX(26px);
    content: '🌙';
    background-color: #2c3e50;
}

/* --- Catalog Layout (Sidebar + Grid) --- */
.catalog-container {
    max-width: 1250px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.catalog-classic-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    align-items: flex-start;
    flex-wrap: nowrap;
    /* Prevent sidebar from wrapping to top on desktop */
}

.catalog-sidebar {
    width: 250px;
    flex-shrink: 0;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 5px;
    transition: all 0.2s;
    font-weight: 500;
    background-color: #f0f3f5;
    border: 1px solid #d5dbdf;
    color: #2c3e50;
}

.category-item:hover {
    background-color: #dce8f0;
    border-color: #2980b9;
    color: #1a5276;
}

.category-item.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.catalog-main {
    flex-grow: 1;
    min-width: 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: stretch;
}

.products-grid .product-card {
    width: auto;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Search Bar */
.search-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 35px;
    justify-content: center;
    width: 100%;
}

.catalog-search-input {
    width: 100%;
    max-width: 350px;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.catalog-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 8px;
    padding: 5px 0;
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    z-index: 100;
    text-align: left;
    box-sizing: border-box;
}

.search-suggestion-item {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-color);
    transition: background-color 0.2s, color 0.2s;
    font-weight: 500;
}

.search-suggestion-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.search-suggestion-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Dark Mode Overrides for Catalog */
html.dark-mode .sidebar-title {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

html.dark-mode .category-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

html.dark-mode .category-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 1100px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .catalog-classic-layout {
        flex-direction: column;
    }

    .catalog-sidebar {
        width: 100%;
        margin-bottom: 30px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .search-wrapper {
        flex-direction: column;
    }
}

:root {
    --primary-color: #3498db;
}

body.dark-mode {
    --primary-color: #2980b9;
}

/* Homepage Featured Grid */
.featured-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 10px;
}

@media (max-width: 1000px) {
    .featured-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .featured-products-grid {
        grid-template-columns: 1fr;
    }
}

/* Scroll Reveal and Widget */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.floating-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    text-decoration: none;
    z-index: 1000;
}

.floating-widget::before {
    content: '💬';
}

/* --- Секция с картой --- */
.location-section {
    background-color: var(--bg-color);
    /* Matches alternating full-width design */
}

.location-section .section-title {
    text-align: center;
    margin-bottom: 30px;
    /* Отступ между заголовком и картой */
}

.map-wrapper {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    height: 600px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transform: translateZ(0);
    /* Убирает баги с радиусом в Safari/Chrome */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-wrapper:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px) translateZ(0);
    /* Элегантный эффект всплытия */
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    transition: filter 0.4s ease;
}

body.dark-mode .map-wrapper {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .map-wrapper:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

body.dark-mode .map-wrapper iframe {
    /* Делает карту тёмной, чтобы не слепила ночью напрямую под тему */
    filter: invert(90%) hue-rotate(180deg) brightness(85%) contrast(85%);
}

/* Адаптивность для телефонов и планшетов */
@media (max-width: 768px) {
    .map-wrapper {
        height: 450px;
        /* На телефонах делаем карту чуть ниже, чтобы было удобно листать дальше */
        border-radius: 15px;
        /* Углы чуть острее на маленьких экранах */
    }
}

/* Сетка для 4 столбцов с заполнением сверху вниз */
/* --- Сетка --- */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, auto);
    grid-auto-flow: column;
    gap: 16px;
    /* Чуть больше воздуха между элементами */
}

/* --- Строгий корпоративный дизайн карточек --- */
.partner-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: linear-gradient(145deg, #141414, #1a1a1a);
    /* Очень легкий градиент для объема */
    border: 1px solid rgba(255, 255, 255, 0.04);
    /* Едва заметная рамка */
    border-left: 3px solid #0056b3;
    /* Строгий синий акцент слева */
    border-radius: 4px;
    /* Менее скругленные, более "серьезные" углы */
    color: #a1a1aa;
    /* Приглушенный светло-серый текст вместо бьющего по глазам белого */
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    /* Небольшая разрядка букв для читаемости */
    cursor: pointer;
    transition: all 0.3s ease;
    /* Плавная анимация всех свойств */
}

/* --- Стилизация иконок --- */
.partner-badge i {
    font-size: 16px;
    color: #52525b;
    /* Темно-серые иконки в спокойном состоянии */
    width: 24px;
    text-align: center;
    transition: color 0.3s ease;
}

/* --- Элегантный hover-эффект (при наведении) --- */
.partner-badge:hover {
    background: #1e1e1e;
    /* Чуть светлее фон */
    border-color: rgba(255, 255, 255, 0.1);
    border-left-color: #38bdf8;
    /* Акцент становится ярко-голубым */
    color: #ffffff;
    /* Текст загорается белым */
    transform: translateX(4px);
    /* Плавно сдвигается вправо, а не прыгает вверх */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    /* Глубокая тень */
}

.partner-badge:hover i {
    color: #38bdf8;
    /* Иконка загорается в цвет акцента */
}

/* --- Адаптивность --- */
@media (max-width: 1200px) {
    .partners-grid {
        gap: 12px;
    }

    .partner-badge {
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(9, auto);
    }
}

@media (max-width: 576px) {
    .partners-grid {
        grid-template-columns: 1fr;
        grid-auto-flow: row;
        grid-template-rows: auto;
    }

    .partner-badge {
        border-left-width: 4px;
        /* На мобильных акцент можно сделать чуть толще */
    }
}

/* --- Декоративные фоновые элементы по бокам (Ambient Glows) --- */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.8s ease, filter 0.8s ease;
}

/* Светлая тема - легкое сияние */
body::before {
    top: -10vw;
    left: -10vw;
    width: 60vw;
    max-width: 800px;
    height: 60vw;
    max-height: 800px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.45) 0%, transparent 70%);
    opacity: 0.15;
    animation: driftBlob 20s infinite alternate ease-in-out;
}

body::after {
    bottom: -10vw;
    right: -10vw;
    width: 65vw;
    max-width: 900px;
    height: 65vw;
    max-height: 900px;
    background: radial-gradient(circle, rgba(46, 204, 113, 0.35) 0%, transparent 70%);
    opacity: 0.12;
    animation: driftBlob 25s infinite alternate-reverse ease-in-out;
    animation-delay: -5s;
}

@keyframes driftBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, -80px) scale(1.15);
    }
}

/* Темная тема - яркое акцентное свечение (неон) */
body.dark-mode::before {
    background: radial-gradient(circle, rgba(41, 128, 185, 0.8) 0%, transparent 70%);
    opacity: 0.35;
    filter: blur(160px);
}

body.dark-mode::after {
    background: radial-gradient(circle, rgba(142, 68, 173, 0.6) 0%, transparent 70%);
    opacity: 0.25;
    filter: blur(180px);
}

/* --- Partners Carousel --- */
.partners-section {
    padding: 60px 20px;
    background-color: transparent;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 50px;
}

.carousel-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 2.5rem;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: color 0.3s, transform 0.2s;
}

.carousel-btn:hover {
    color: #3498db;
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

.carousel-track-wrapper {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-item {
    flex: 0 0 calc(100% / 5);
    padding: 0 15px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.partner-circle {
    width: 160px;
    height: 160px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    /* Reduced padding to make logo larger */
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.partner-circle:hover {
    transform: translateY(-8px);
}

.partner-circle img {
    width: 85%;
    /* Increased from 60% */
    height: 85%;
    /* Increased from 60% */
    object-fit: contain;
}

.text-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a1f26;
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

@media (max-width: 1024px) {
    .carousel-item {
        flex: 0 0 calc(100% / 4);
    }

    .partner-circle {
        width: 140px;
        height: 140px;
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        flex: 0 0 calc(100% / 3);
    }

    .partner-circle {
        width: 130px;
        height: 130px;
        padding: 10px;
    }

    .carousel-container {
        padding: 0 35px;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        flex: 0 0 calc(100% / 2);
    }

    .partner-circle {
        width: 110px;
        height: 110px;
        padding: 8px;
    }

    .carousel-btn {
        font-size: 1.8rem;
    }

    .carousel-container {
        padding: 0 25px;
    }
}

/* --- 📱 СУПЕР МОБИЛЬНЫЙ HEADER (App-Design, Glassmorphism) --- */
@media (max-width: 992px) {

    /* Блокируем горизонтальный скролл (шторка уезжала за дисплей) */
    body {
        overflow-x: hidden !important;
        width: 100vw !important;
    }

    * {
        box-sizing: border-box !important;
    }

    /* 1. Делаем ТОЛЬКО nav фиксированным, а не header, чтобы заголовки (h1) не липли кверху */
    nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        z-index: 1000;
        background: rgba(30, 41, 59, 0.85) !important;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        padding: 12px 20px !important;
        transition: all 0.3s ease;
        justify-content: space-between !important;
        margin: 0 !important;
        gap: 0 !important;
    }

    /* Компенсируем высоту улетевшего nav, чтобы контент не заезжал под него */
    header {
        position: static !important;
        padding-top: 70px !important;
        padding-bottom: 0 !important;
        background: var(--bg-color) !important;
        box-shadow: none !important;
        color: var(--title-color) !important;
    }

    header h1 {
        color: var(--title-color) !important;
    }

    /* Убираем отступ у main (раньше он был, теперь он на header) */
    main {
        padding-top: 0 !important;
    }

    /* 2. Логотип и расположение Гамбургера внутри nav-left */
    .nav-left {
        gap: 0 !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        display: flex !important;
    }

    .logo-img {
        height: 44px !important;
    }

    .logo {
        font-size: 1.25rem !important;
        z-index: 1001;
    }

    /* Скрываем десктопные элементы в шапке (они теперь в Drawer из JS) */
    nav .nav-links,
    nav .nav-right {
        display: none !important;
    }

    /* 3. Гамбургер Кнопка */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        width: 48px;
        height: 48px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 14px;
        cursor: pointer;
        z-index: 1001;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .hamburger span {
        width: 22px;
        height: 2px;
        background: #fff;
        border-radius: 4px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
    }

    .hamburger.active {
        background: rgba(52, 152, 219, 0.15);
        border-color: rgba(52, 152, 219, 0.3);
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* 4. Полноэкранное меню (Drawer) */
    .mobile-drawer {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100%;
        height: 100dvh;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
        z-index: 1000;
        display: flex;
        flex-direction: column;
        padding: 50px 25px 25px;
        box-sizing: border-box;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        color: white;
    }

    .mobile-drawer.open {
        right: 0;
    }

    /* Затемнение фона (Overlay) */
    .drawer-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
    }

    .drawer-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Стилизация ссылок внутри Drawer */
    .mobile-drawer .mobile-links {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }

    .mobile-drawer .nav-link {
        font-size: 1.6rem !important;
        font-weight: 700 !important;
        color: #f8fafc !important;
        text-transform: uppercase;
        letter-spacing: 1px;
        display: block;
        transition: all 0.3s;
        text-decoration: none;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .mobile-drawer .nav-link:hover {
        color: #38bdf8 !important;
        transform: translateX(10px);
    }

    .mobile-drawer .mobile-catalog-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: auto !important;
        line-height: normal !important;
        text-align: center;
        padding: 16px;
        font-size: 1.2rem;
        font-weight: 600;
        border-radius: 15px;
        background: linear-gradient(135deg, #38bdf8, #2563eb);
        color: white;
        text-decoration: none;
        margin-bottom: 16px;
        box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
        transition: all 0.3s ease;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-drawer .mobile-catalog-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 30px rgba(37, 99, 235, 0.4);
    }

    /* Переключатель языка и темы в Drawer */
    .mobile-drawer .controls-group {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 14px 15px;
        border-radius: 16px;
        margin-bottom: 16px;
        flex-wrap: nowrap;
        gap: 8px;
        overflow: visible;
    }

    .mobile-drawer .lang-tabs {
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-shrink: 0;
    }

    .mobile-drawer .lang-tabs span {
        display: none !important; /* Скрываем слово "Язык/Language", чтобы кнопка темы не съезжала на английском */
    }

    .mobile-drawer .theme-switch-wrapper {
        flex-shrink: 0;
    }

    /* Контакты в Drawer */
    .mobile-drawer .mobile-contacts {
        margin-top: 10px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .mobile-drawer .contact-text {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start !important;
    }

    .mobile-drawer .contact-text a {
        font-size: 1.1rem !important;
        display: flex;
        align-items: center;
        gap: 10px;
        color: #e2e8f0 !important;
        text-decoration: none !important;
    }

    .mobile-drawer .contact-text a:hover {
        color: #38bdf8 !important;
    }

    .mobile-drawer .contact-text a::before {
        content: '📞';
        font-size: 1.2rem;
    }

    .mobile-drawer .contact-text a[href^="mailto"]::before {
        content: '✉️';
        font-size: 1.2rem;
    }

    .mobile-drawer .social-buttons {
        display: flex;
        gap: 15px;
        margin-top: 10px;
    }

    .mobile-drawer .social-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.4rem !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
    }

    /* Футер Drawer — адреса офисов и брендинг */
    .mobile-drawer .drawer-footer {
        margin-top: auto;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .drawer-offices {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .drawer-offices-title {
        font-size: 0.85rem;
        font-weight: 700;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .drawer-offices-title i {
        color: #38bdf8;
        font-size: 0.9rem;
    }

    .drawer-office-item {
        font-size: 0.9rem;
        color: #cbd5e1;
        display: flex;
        align-items: center;
        gap: 8px;
        padding-left: 4px;
    }

    .drawer-office-item i {
        color: rgba(255, 255, 255, 0.25);
        font-size: 0.75rem;
    }

    .drawer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 16px 0 8px;
    }

    .drawer-brand-name {
        font-size: 1.1rem;
        font-weight: 800;
        letter-spacing: 2px;
        background: linear-gradient(135deg, #38bdf8, #818cf8, #a78bfa);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .drawer-copyright {
        font-size: 0.7rem;
        color: #475569;
        letter-spacing: 0.5px;
    }
}

/* --- ГЛОБАЛЬНАЯ АДАПТИВНАЯ ТИПОГРАФИКА И РАЗМЕРЫ ЭЛЕМЕНТОВ --- */

/* Планшеты и ниже (до 992px) */
@media (max-width: 992px) {
    .hero {
        padding: 80px 20px 60px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

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

    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    .feature-icon {
        font-size: 2.2rem;
    }

    .competence-item strong {
        font-size: 1.7rem;
    }

    .btn-large {
        padding: 12px 30px;
        font-size: 1.1rem;
    }

    header h1 {
        font-size: 1.8rem;
        margin: 10px 0;
    }

    .info h2 {
        font-size: 1.6rem;
    }

    .products-grid {
        gap: 15px;
    }
}

/* Большие телефоны (до 768px) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .hero {
        padding: 70px 15px 50px;
    }

    .hero h2 {
        font-size: 1.7rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .competence-item {
        padding: 12px 15px;
    }

    .competence-item strong {
        font-size: 1.4rem;
    }

    .product-card {
        padding: 18px;
    }

    .product-card h3 {
        font-size: 1.1rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .info table td {
        font-size: 0.92rem;
        padding: 10px;
    }
}

/* Обычные телефоны (до 576px) */
@media (max-width: 576px) {
    html {
        font-size: 14px;
    }

    .hero {
        padding: 60px 15px 40px;
    }

    .hero h2 {
        font-size: 1.45rem;
        margin-bottom: 12px;
    }

    .hero p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .section-title {
        font-size: 1.35rem;
        margin-bottom: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .feature-icon {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .feature-card {
        padding: 20px 15px;
    }

    .competence-grid {
        gap: 12px;
    }

    .competence-item {
        flex: 1 1 100%;
        text-align: center;
    }

    .competence-item strong {
        font-size: 1.4rem;
    }

    .bag-shape {
        height: 160px;
    }

    .detail-container {
        padding: 20px 15px;
        gap: 20px;
    }

    .info h2 {
        font-size: 1.35rem;
    }

    .btn-link,
    .buy-btn {
        padding: 10px 18px;
        font-size: 0.95rem;
    }

    header h1 {
        font-size: 1.5rem;
        padding: 0 10px;
    }

    .footer-content {
        padding: 20px 15px;
    }

    .footer-content p {
        font-size: 0.85rem;
    }
}

/* Совсем мелкие экраны (до 480px) */
@media (max-width: 480px) {
    .logo {
        font-size: 1.1rem !important;
    }

    .hero h2 {
        font-size: 1.45rem;
    }

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

    header h1 {
        font-size: 1.35rem;
    }

    .map-wrapper {
        height: 350px;
        border-radius: 10px;
    }

    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }

    .action-buttons .btn-link,
    .action-buttons .buy-btn {
        margin-left: 0 !important;
        width: 100%;
        text-align: center;
        justify-content: center;
        margin-top: 0 !important;
    }

    .bag-shape {
        height: 140px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   COOKIE CONSENT BANNER  v2
   ═══════════════════════════════════════════════════════════════════════ */

@keyframes ck-in  { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes ck-out { from { transform: translateY(0);    opacity: 1; } to { transform: translateY(100%); opacity: 0; } }
@keyframes ck-pulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50%       { transform: scale(1.15) rotate(-10deg); }
}

#ck-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 99999;
    transform: translateY(100%);
    opacity: 0;
    will-change: transform, opacity;
}
#ck-banner.ck-show { animation: ck-in  0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
#ck-banner.ck-hide { animation: ck-out 0.4s  cubic-bezier(0.55, 0, 1, 0.45) forwards; pointer-events: none; }

.ck-card {
    background: #0A1628;
    border-top: 1px solid rgba(52, 152, 219, 0.22);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.55), 0 -2px 8px rgba(0, 0, 0, 0.3);
    max-width: 960px;
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}

/* ── Collapsed bar ── */
.ck-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    flex-wrap: wrap;
}
.ck-bar-icon {
    font-size: 24px;
    flex-shrink: 0;
    animation: ck-pulse 3.5s ease-in-out infinite;
}
.ck-bar-text {
    flex: 1;
    min-width: 180px;
    font-size: 0.875rem;
    color: #c8d8ea;
    line-height: 1.5;
}
.ck-bar-text strong { color: #fff; }
.ck-bar-actions { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }

/* ── Buttons ── */
.ck-btn {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.83rem;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 9px;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.ck-btn:hover  { transform: translateY(-2px); }
.ck-btn:active { transform: translateY(0); }

.ck-btn-outline {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.35);
}
.ck-btn-outline:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.6);
}
.ck-btn-green {
    background: linear-gradient(135deg, #28A745, #22c55e);
    color: #fff;
    box-shadow: 0 3px 12px rgba(40, 167, 69, 0.4);
}
.ck-btn-green:hover {
    box-shadow: 0 5px 18px rgba(40, 167, 69, 0.55);
    filter: brightness(1.07);
}

/* ── Expanded panel ── */
.ck-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}
.ck-panel.ck-panel-open { max-height: 600px; opacity: 1; }

.ck-panel-inner {
    padding: 0 24px 20px;
    border-top: 1px solid rgba(52, 152, 219, 0.12);
}
.ck-panel-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    padding: 14px 0 12px;
}

/* ── Cookie rows ── */
.ck-rows { display: flex; flex-direction: column; gap: 2px; }
.ck-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 14px;
    transition: background 0.2s;
}
.ck-row:hover { background: rgba(255, 255, 255, 0.05); }
.ck-row-header { display: flex; align-items: center; gap: 12px; }

/* ── Toggle switch ── */
.ck-toggle-wrap { position: relative; flex-shrink: 0; }
.ck-toggle-wrap input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.ck-toggle {
    display: block;
    width: 40px; height: 22px;
    background: rgba(100, 116, 139, 0.4);
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.25s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.ck-toggle::after {
    content: '';
    position: absolute;
    left: 3px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.ck-toggle-wrap input:checked + .ck-toggle { background: linear-gradient(135deg, #28A745, #22c55e); border-color: transparent; }
.ck-toggle-wrap input:checked + .ck-toggle::after { left: calc(100% - 19px); box-shadow: 0 1px 6px rgba(40, 167, 69, 0.4); }
.ck-toggle-wrap input:disabled + .ck-toggle { cursor: not-allowed; background: linear-gradient(135deg, #28A745, #22c55e); border-color: transparent; opacity: 0.6; }
.ck-toggle-wrap input:disabled + .ck-toggle::after { left: calc(100% - 19px); }

.ck-row-label { flex: 1; min-width: 0; }
.ck-row-label strong { display: block; font-size: 0.875rem; color: #e2e8f0; font-weight: 600; margin-bottom: 2px; }
.ck-row-label span  { font-size: 0.78rem; color: #64748b; }

.ck-more-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.75rem;
    color: #3498db;
    cursor: pointer;
    padding: 0;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    transition: color 0.15s;
    flex-shrink: 0;
}
.ck-more-btn:hover { color: #5dade2; }

/* ── Inline detail box ── */
.ck-detail {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
    font-size: 0.78rem;
    color: #7f97b0;
    line-height: 1.6;
    padding: 0 0 0 52px;
    background: rgba(52, 152, 219, 0.04);
    border-radius: 0 0 8px 8px;
    margin-top: 0;
}
.ck-detail.ck-detail-open {
    max-height: 120px;
    opacity: 1;
    padding: 8px 14px 10px 52px;
    margin-top: 8px;
}

/* ── Panel footer ── */
.ck-panel-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 16px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .ck-card    { border-radius: 16px 16px 0 0; }
    .ck-bar     { padding: 14px 16px; gap: 10px; }
    .ck-bar-actions  { width: 100%; justify-content: flex-end; }
    .ck-panel-inner  { padding: 0 16px 18px; }
    .ck-panel-footer { justify-content: stretch; }
    .ck-panel-footer .ck-btn { flex: 1; text-align: center; }
    .ck-detail, .ck-detail.ck-detail-open { padding-left: 36px; }
}
@media (max-width: 380px) {
    .ck-panel-footer { flex-direction: column-reverse; }
}

/* =============================================
   MISSION & VALUES SECTION
   ============================================= */
.mission-section {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--featured-bg) 100%);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.mission-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.mission-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    border-radius: 20px 20px 0 0;
}

.mission-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.mission-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mission-card:hover .mission-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(52, 152, 219, 0.5);
}

.mission-card h3 {
    font-size: 1.3rem;
    color: var(--title-color);
    margin: 0 0 15px;
    font-weight: 700;
}

.mission-card p {
    color: var(--feature-text);
    line-height: 1.75;
    font-size: 0.97rem;
    margin: 0;
}

/* =============================================
   HISTORY TIMELINE SECTION
   ============================================= */
.history-section {
    background: linear-gradient(180deg, var(--featured-bg) 0%, var(--bg-color) 50%, var(--featured-bg) 100%);
    overflow: hidden;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 0 20px;
}

/* Vertical center line */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #3498db, #2c3e50);
    transform: translateX(-50%);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 50px;
    box-sizing: border-box;
}

.timeline-item.left {
    left: 0;
    text-align: right;
    padding-right: 40px;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
    padding-left: 40px;
}

/* Circle dot on the line */
.timeline-item::after {
    content: '';
    position: absolute;
    top: 25px;
    width: 18px;
    height: 18px;
    background: #3498db;
    border: 3px solid var(--bg-color);
    border-radius: 50%;
    box-shadow: 0 0 0 3px #3498db;
    z-index: 1;
    transition: transform 0.3s ease;
}

/* left item: dot sits exactly at its right edge */
.timeline-item.left::after {
    right: 0;
    transform: translateX(50%);
}

/* right item: dot sits exactly at its left edge */
.timeline-item.right::after {
    left: 0;
    transform: translateX(-50%);
}

.timeline-item:hover::after {
    transform: translateX(50%) scale(1.4);
    background: #2980b9;
}

.timeline-item.right:hover::after {
    transform: translateX(-50%) scale(1.4);
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px 28px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

/* Arrow pointing toward center line */
.timeline-item.left .timeline-content::after {
    content: '';
    position: absolute;
    top: 22px;
    right: -12px;
    border-width: 10px 0 10px 12px;
    border-style: solid;
    border-color: transparent transparent transparent var(--card-bg);
}

.timeline-item.right .timeline-content::after {
    content: '';
    position: absolute;
    top: 22px;
    left: -12px;
    border-width: 10px 12px 10px 0;
    border-style: solid;
    border-color: transparent var(--card-bg) transparent transparent;
}

.timeline-year {
    display: inline-block;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.timeline-content h3 {
    font-size: 1.1rem;
    color: var(--title-color);
    margin: 0 0 10px;
    font-weight: 700;
}

.timeline-content p {
    color: var(--feature-text);
    font-size: 0.93rem;
    line-height: 1.65;
    margin: 0;
}

/* ---- Responsive: collapse to single column on mobile ---- */
@media (max-width: 720px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item,
    .timeline-item.left,
    .timeline-item.right {
        width: 100%;
        left: 0;
        text-align: left;
        padding-left: 55px;
        padding-right: 0;
    }

    .timeline-item::after,
    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 12px;
        right: auto;
        transform: none;
    }

    .timeline-item:hover::after,
    .timeline-item.right:hover::after {
        transform: scale(1.4);
    }

    .timeline-item.left .timeline-content::after,
    .timeline-item.right .timeline-content::after {
        display: none;
    }
}

/* =============================================
   WECHAT MODAL STYLES
   ============================================= */
.wechat-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wechat-modal.active {
    opacity: 1;
}

.wechat-modal-content {
    background-color: var(--card-bg, #fff);
    padding: 35px 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    position: relative;
    text-align: center;
    color: var(--text-color, #333);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
}

.wechat-modal.active .wechat-modal-content {
    transform: scale(1);
}

.wechat-close-modal {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.wechat-close-modal:hover {
    color: var(--title-color, #333);
}

.wechat-modal-header {
    font-size: 1.4rem;
    font-weight: bold;
    color: #07C160;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wechat-qr-container {
    background: rgba(7, 193, 96, 0.05);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(7, 193, 96, 0.15);
}

.wechat-qr-image {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    pointer-events: auto; /* for long press on mobile */
    -webkit-touch-callout: default; /* allow saving image on iOS */
}

.wechat-scan-text {
    font-size: 0.95rem;
    color: var(--feature-text, #666);
    margin: 0;
    line-height: 1.4;
}

.wechat-scan-text small {
    font-size: 0.8rem;
    opacity: 0.8;
}

.wechat-id-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--bg-color);
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px dashed #07C160;
}

.wechat-id-label {
    font-weight: 600;
    color: var(--title-color, #555);
}

.wechat-id-value {
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--title-color, #333);
    letter-spacing: 0.5px;
    user-select: all;
}

.wechat-copy-btn {
    background: #07C160;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wechat-copy-btn:hover {
    background: #06ad56;
}

.wechat-copy-btn:active {
    transform: scale(0.95);
}