/**
 * Swetch Main Stylesheet
 * 
 * @package Swetch
 */

/* ============================================
   Base Styles (from styles.css)
   ============================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors — по логотипу SWETCH (белый на голубом #35A7DF) */
    --swetch-logo-blue: #35A7DF;           /* Основной голубой — фон логотипа */
    --swetch-logo-blue-dark: #2a8bc4;      /* Темнее для hover */
    --swetch-logo-blue-light: #5bbce8;     /* Светлее для акцентов */
    --swetch-logo-dark: #1a6b94;           /* Тёмно-голубой для текста/вторичных элементов */
    
    /* Primary brand colors */
    --swetch-primary: var(--swetch-logo-blue);
    --swetch-secondary: var(--swetch-logo-dark);
    --swetch-accent: var(--swetch-logo-blue);
    --swetch-dark: #1F1F21;
    --swetch-light: #FFFFFF;
    
    /* Legacy colors (для совместимости) */
    --primary-color: var(--swetch-logo-blue);
    --secondary-color: var(--swetch-logo-dark);
    --accent-color: var(--swetch-logo-blue);
    
    /* Text Colors */
    --text-color: #1F1F21;
    --text-light: #555;
    --text-dark: #1F1F21;
    
    /* Background Colors — GeneratePress minimal */
    --bg-light: #f9fafb;
    --bg-section: #f5f5f5;
    --bg-white: #FFFFFF;
    --bg-header: var(--swetch-logo-blue);
    
    /* UI Colors */
    --white: #FFFFFF;
    --border-color: rgba(53, 167, 223, 0.2);
    
    /* Shadows */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --shadow-logo: 0 2px 8px rgba(0, 0, 0, 0.15);
    /* Card style — GeneratePress-like minimal */
    --swetch-card-radius: 12px;
    --swetch-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --swetch-card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
    --swetch-text-secondary: #6b7280;
    --swetch-heading-neutral: #1f2937;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.5s ease;
    
    /* Logo Specifications - согласно brandbook */
    --logo-min-width: 75.6px;              /* 20mm при 96 DPI - минимальная ширина полного логотипа */
    --logo-symbol-min-width: 18.9px;       /* 5mm при 96 DPI - минимальная ширина символа */
    --logo-min-height: 60px;               /* Высота для веба */
    --logo-max-width: 200px;
    --logo-clear-space: 18.9px;             /* Минимальный отступ (размер ромба из brandbook) */
    
    /* Typography — Open Sans + Arial only */
    --swetch-font-primary: 'Open Sans', Arial, sans-serif;
    --swetch-font-headings: 'Open Sans', Arial, sans-serif;
    --swetch-font-fallback: Arial, sans-serif;
}

body {
    font-family: var(--swetch-font-primary);
    line-height: 1.5;
    color: var(--text-color);
    background-color: #f3f3f36b;
    font-size: 1rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--swetch-font-headings);
    color: var(--swetch-logo-blue);
    font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* .container — defined in swetch-bootstrap5.css (Bootstrap 5) */

/* Переход header → content: тонкая линия и мягкая тень */
.swetch-page-title {
    width: 100%;
    background: transparent;
    border-bottom: 1px solid rgba(53, 167, 223, 0.12);
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.04);
    padding: 0;
    min-height: 1px;
    position: relative;
}
/* Геометрический low-poly паттерн */
.swetch-page-title::before {
    content: none;
}
.swetch-page-title::after {
    content: none;
}
.swetch-page-title-inner {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.swetch-page-title-heading {
    font-family: var(--swetch-font-headings);
    font-size: 11px;
    font-weight: 600;
    color: #ffffff !important;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.swetch-page-title-subtitle {
    font-size: 1.1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}
.swetch-page-title-subtitle p {
    margin: 0;
}

/* Ограничение контента — Bootstrap 5 container */
.site-content,
.content-area,
.wp-block-group__inner-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12px;
    padding-right: 12px;
}

@media (min-width: 576px) {
    .site-content, .content-area, .wp-block-group__inner-container {
        max-width: 540px;
        padding-left: 16px;
        padding-right: 16px;
    }
}
@media (min-width: 768px) { .site-content, .content-area, .wp-block-group__inner-container { max-width: 720px; } }
@media (min-width: 992px) { .site-content, .content-area, .wp-block-group__inner-container { max-width: 960px; } }
@media (min-width: 1200px) { .site-content, .content-area, .wp-block-group__inner-container { max-width: 1140px; } }
@media (min-width: 1400px) { .site-content, .content-area, .wp-block-group__inner-container { max-width: 1320px; } }

/* Для WP Bakery контента */
.vc_row:not(.vc_row-o-full-width) {
    max-width: 100%;
}

/* Обеспечиваем, что контент не растягивается на всю ширину */
main,
#main,
.content,
.site-main {
    max-width: 100%;
}

/* Header — голубой фон как в логотипе */
.header {
    background-color: #ffffff;
    box-shadow: 0 6px 20px rgba(16, 24, 40, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    border-bottom: none;
    min-height: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header.swetch-header {
    background-color: #ffffff;
    backdrop-filter: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header .container {
    display: flex;
    align-items: center;
    height: 100%;
    flex: 1;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.header-content .logo,
.header-content .swetch-logo-wrapper {
    order: 0;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    order: 3;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #1F1F21;
    flex-shrink: 0;
}

.logo img,
.swetch-logo-main {
    height: var(--logo-min-height);
    width: auto;
    max-width: var(--logo-max-width);
    display: block;
    transition: var(--transition);
    object-fit: contain;
}

/* Logo wrapper */
.swetch-logo-wrapper {
    padding: 0 calc(var(--logo-clear-space) * 1.5);
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.swetch-logo-wrapper:hover {
    opacity: 0.95;
}

.swetch-logo-wrapper .logo-link {
    display: inline-block;
    line-height: 0;
}

/* Logo image */
.swetch-logo-main {
    filter: none;
}

.swetch-logo-main:hover {
    transform: scale(1.02);
}

.logo-text {
    display: none;
}

/* Navigation Menu */
.header-content .nav {
    order: 1;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center; /* Центрирование по вертикали */
}

.nav-link,
.header .nav-menu a,
.header .nav a {
    text-decoration: none;
    color: #1F1F21 !important;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    font-size: 1rem;
    text-transform: uppercase !important;
    letter-spacing: 0.06em;
}

.nav-link:hover,
.header .nav-menu a:hover,
.header .nav a:hover {
    color: #35A7DF !important;
    opacity: 1;
}

/* Active menu underline */
.header .nav-menu .current-menu-item > a,
.header .nav-menu .current_page_item > a,
.header .nav-menu .current-menu-ancestor > a,
.header .nav-menu .current_page_ancestor > a {
    position: relative;
    color: #1F1F21 !important;
}

.header .nav-menu .current-menu-item > a::after,
.header .nav-menu .current_page_item > a::after,
.header .nav-menu .current-menu-ancestor > a::after,
.header .nav-menu .current_page_ancestor > a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    background: #35A7DF;
    border-radius: 2px;
}

.nav-link::after {
    display: none;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}

.header-social-wrap {
    flex-shrink: 0;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.header-social-wrap a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #35A7DF;
    text-decoration: none !important;
    border-radius: 50%;
    border: 1px solid rgba(53, 167, 223, 0.8);
    color: var(--white) !important;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.header-social-wrap a:hover {
    background: #2a8bc4;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(53, 167, 223, 0.4);
    border-color: #35A7DF;
}

/* Fixed position — когда header из block theme */
.header-social-fixed {
    position: fixed !important;
    top: 40px;
    right: 140px;
    z-index: 1001;
    margin: 0 !important;
}

@media (max-width: 991.98px) {
    .header-social-fixed {
        right: 100px;
        top: 35px;
    }
}

@media (max-width: 767.98px) {
    .header-social-fixed {
        right: 70px;
        top: 28px;
    }
}

.header-social-icons {
    display: flex !important;
    gap: 0.75rem;
    align-items: center;
}

.header-social-icons a {
    color: #1F1F21;
    font-size: 1.15rem;
    opacity: 0.85;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.header-social-icons a:hover {
    color: #35A7DF;
    opacity: 1;
}

.social-icons a {
    color: var(--white);
    font-size: 1.2rem;
    text-decoration: none !important;
    transition: var(--transition);
    opacity: 0.9;
}

.social-icons a:hover {
    color: var(--white);
    opacity: 1;
    transform: translateY(-2px);
}

.language-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.header-right-group .language-selector {
    margin-left: 0;
}

.lang-btn,
.lang-toggle {
    padding: 0;
    border: none !important;
    background: transparent !important;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 0;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    box-shadow: none !important;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.lang-btn .flag-icon,
.lang-toggle .flag-icon {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 1;
    display: block;
    transition: transform 0.3s ease;
}

.lang-btn:hover {
    background: transparent !important;
    transform: none;
    box-shadow: none !important;
}

.lang-btn:hover .flag-icon {
    transform: scale(1.1);
}

.lang-btn.active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none;
}

/* Language dropdown */
.language-selector {
    position: relative;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    display: none;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid #e3e8ef;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
    border-radius: 10px;
    padding: 8px 10px;
    z-index: 1200;
}

.lang-dropdown.open {
    display: flex;
}

.lang-btn:focus,
.lang-btn:focus-visible {
    outline: none;
    box-shadow: none !important;
}

.lang-btn.active .flag-icon {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.lang-btn.active::after {
    display: none; /* Убираем точку снизу */
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1F1F21;
    order: 5;
}

@media (min-width: 1200px) {
    .menu-toggle {
        display: none !important;
    }
}

@media (max-width: 1199.98px) {
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* Hero Section — голубой градиент как в логотипе */
.hero {
    background: linear-gradient(135deg, var(--swetch-logo-blue) 0%, var(--swetch-logo-dark) 100%);
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

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

.hero-title {
    font-family: var(--swetch-font-headings);
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 5rem 0;
}

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

.section-title {
    font-family: var(--swetch-font-headings);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--swetch-logo-blue);
    position: relative;
    padding-bottom: 1rem;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--swetch-logo-blue);
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.text-content {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Facts Section */
.facts-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.facts-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.facts-list {
    list-style: none;
    padding-left: 0;
}

.facts-list li {
    padding: 1rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

.facts-list li:last-child {
    border-bottom: none;
}

.facts-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--swetch-logo-blue);
    font-weight: bold;
    font-size: 1.2rem;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.fact-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--swetch-logo-blue), var(--swetch-logo-dark));
    border-radius: 8px;
    color: var(--white);
}

.fact-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.fact-label {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Values Section */
.values-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.value-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border-top: 4px solid var(--swetch-logo-blue);
}

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

.value-icon {
    font-size: 3.5rem;
    color: var(--swetch-logo-blue);
    margin-bottom: 1.5rem;
}

.value-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.value-text {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
}

/* Provide Section */
.provide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.provide-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border-left: 4px solid var(--secondary-color);
}

.provide-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-left-color: var(--swetch-logo-blue);
}

.provide-icon {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.provide-card:hover .provide-icon {
    color: var(--swetch-logo-blue);
}

.provide-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.provide-text {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

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

.service-icon {
    font-size: 3rem;
    color: var(--swetch-logo-blue);
    margin-bottom: 1.5rem;
}

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

.service-text {
    color: var(--text-light);
    line-height: 1.8;
}

/* Projects */
.projects-container {
    margin-top: 3rem;
}

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

.project-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

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

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--swetch-logo-blue), var(--swetch-logo-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
}

.project-info {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.project-type {
    color: var(--swetch-logo-blue);
    font-weight: 500;
    margin-bottom: 1rem;
    display: block;
}

.project-description {
    color: var(--text-light);
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background-color: #f5f7fb;
    color: #1F1F21;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(16, 24, 40, 0.08);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(16, 24, 40, 0.12);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-weight: 500;
    color: var(--text-color);
}

/* Contacts */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.contact-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 1.5rem;
    background-color: #e8a838;
}

.contact-card h3 {
    font-family: var(--swetch-font-headings, 'Open Sans', Arial, sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F1F21;
    margin: 0 0 0.35rem 0;
}

.contact-card p {
    font-size: 0.95rem;
    color: #555;
    margin: 0 0 0.5rem 0;
}

.contact-card a {
    color: var(--swetch-logo-blue, #35A7DF);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.contact-item {
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
}

.contact-item strong {
    display: block;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.contact-item p {
    margin: 0.5rem 0;
}

.contact-item a {
    color: var(--swetch-logo-blue);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    text-decoration: underline;
    color: var(--swetch-logo-dark);
}

/* Footer — голубой градиент в стиле логотипа */
.footer {
    background: linear-gradient(135deg, var(--swetch-logo-dark) 0%, var(--swetch-logo-blue) 100%);
    color: rgba(255, 255, 255, 0.95);
    padding: 4rem 0 2rem;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

/* Footer content — Bootstrap 5.3 row + col */
.footer-content.footer-four-cols.row {
    margin-bottom: 2rem;
}

.footer-four-cols.row {
    align-items: start;
}

/* Отступы между колонками footer */
.swetch-footer .footer-four-cols {
    --bs-gutter-x: 2.5rem;
    --bs-gutter-y: 2rem;
}

@media (min-width: 992px) {
    .swetch-footer .footer-four-cols {
        --bs-gutter-x: 3rem;
    }
}

.footer-col .footer-widget {
    margin-bottom: 1.25rem;
}

.footer-col .footer-widget:last-child {
    margin-bottom: 0;
}

.footer-col .footer-widget-title {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.footer-col-1 .footer-widget,
.footer-col-2 .footer-widget,
.footer-col-3 .footer-widget,
.footer-col-4 .footer-widget {
    text-align: left;
}

/* Navigation Menu widget in column 2 */
.footer-col-2 .menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col-2 .menu li {
    margin-bottom: 0.5rem;
}

.footer-col-2 .menu a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col-2 .menu a:hover {
    color: #fff;
}

.footer-col .footer-widget p {
    margin: 0.4rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-col .footer-widget a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col .footer-widget a:hover {
    color: #fff;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo-img {
    max-width: 160px;
    height: auto;
    display: block;
}

/* Footer links inside col1 */
.footer-links-inline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Social icons inside col4 — из Customizer (swetch_linkedin, swetch_facebook) */
.footer-social-inline {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.footer-social-inline .footer-social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.footer-social-inline .footer-social-icons a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none !important;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social-inline .footer-social-icons a:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.footer-phone {
    text-align: left;
}

.footer-email {
    text-align: left;
}

.footer-addresses {
    text-align: left;
}

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

.footer-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 0;
    font-size: 0.95rem;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-nav a:not(:last-child)::after {
    content: '|';
    margin: 0 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

.footer-nav a:hover {
    color: var(--white);
    opacity: 1;
    transform: translateX(3px);
}

/* Footer Links Section - по центру */
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    flex-wrap: wrap;
}

.footer-link-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    position: relative;
    text-decoration: none;
}

.footer-link-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition);
}

.footer-link-btn:hover {
    color: var(--white);
}

.footer-link-btn:hover::after {
    width: 100%;
    background-color: var(--white);
}

/* Contact Section - общие стили */
.footer-phone,
.footer-email,
.footer-addresses {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.footer-phone strong,
.footer-email strong,
.footer-addresses strong {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--white);
    text-transform: none;
    letter-spacing: 0.5px;
    font-weight: 600;
    opacity: 0.9;
}

.footer-phone p,
.footer-email p {
    margin: 0.4rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-phone a,
.footer-email a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-phone a:hover,
.footer-email a:hover {
    color: var(--white);
    opacity: 1;
    transform: translateX(3px);
}

.footer-addresses {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-addresses p {
    margin: 0.4rem 0;
    color: rgba(255, 255, 255, 0.75);
}

/* Social Media Section - по центру */
.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.footer-social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.footer-social a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none !important;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Footer Bottom */
.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--swetch-logo-blue);
}

.modal-body {
    margin-top: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--swetch-logo-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--swetch-logo-dark);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(53, 167, 223, 0.4);
}

/* Responsive Design — mobile menu от 1200px и ниже */
@media (max-width: 1199.98px) {
    .header {
        position: relative;
        height: auto;
        min-height: 100px;
        padding: 10px 0;
        align-items: stretch;
    }

    .header .container,
    .header-content {
        position: relative;
        height: auto;
    }

    .header.swetch-header {
        background: #ffffff !important;
        background-color: #ffffff !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    }

    /* Только навигация в dropdown, иконки и флаги остаются в хедере */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: center;
        background-color: #ffffff;
        padding: 1.5rem;
        box-shadow: 0 12px 24px rgba(16, 24, 40, 0.12);
        z-index: 1000;
        gap: 0.5rem;
    }

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

    .nav-menu .nav-link,
    .nav-menu a {
        color: #1F1F21 !important;
    }
}

/* Small mobile (< 768px) — доп. отступы и размеры */
@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
    
    @media (max-width: 575.98px) {
        .container {
            padding-left: 12px;
            padding-right: 12px;
        }
    }

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

    .services-grid,
    .projects-grid,
    .contacts-grid,
    .values-grid,
    .provide-grid,
    .facts-grid,
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-four-cols {
        text-align: center !important;
    }
    
    .footer-col-1 .footer-widget,
    .footer-col-2 .footer-widget,
    .footer-col-3 .footer-widget,
    .footer-col-4 .footer-widget {
        text-align: center !important;
    }
    
    .footer-col-2 .menu {
        align-items: center;
    }
    
    .footer-col-2 .menu li {
        text-align: center;
    }
    
    .footer-nav-links {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .footer-nav a:not(:last-child)::after {
        display: none;
    }
    
    .footer-links-inline {
        align-items: center;
    }
    
    .footer-social-inline .footer-social-icons {
        justify-content: center;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .swetch-logo-wrapper {
        padding: calc(var(--logo-clear-space) * 0.5) calc(var(--logo-clear-space) * 0.75);
        min-height: auto;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* Tablet (768px – 1199px) — сетки и общие стили */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .header .container,
    .header-content {
        height: auto;
    }

    .header-content {
        flex-wrap: wrap;
        row-gap: 0.75rem;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
        margin-left: auto;
        margin-right: auto;
    }

    .swetch-wpbakery-template .container {
        text-align: center;
    }

    .swetch-wpbakery-template .vc_row,
    .swetch-wpbakery-template .vc_column_container,
    .swetch-wpbakery-template .vc_column-inner {
        text-align: center !important;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

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

    .services-grid,
    .projects-grid,
    .contacts-grid,
    .values-grid,
    .provide-grid,
    .facts-grid,
    .contact-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .footer-nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-content {
        gap: 0.75rem;
    }

    .swetch-logo-wrapper {
        padding: calc(var(--logo-clear-space) * 0.6) calc(var(--logo-clear-space) * 1);
        min-height: auto;
    }

    .back-to-top {
        bottom: 24px;
        right: 24px;
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
}

/* ============================================
   WordPress Specific Overrides
   ============================================ */

.swetch-wpbakery-template {
    width: 100%;
    overflow-x: hidden;
}

/* Fix for WP Bakery rows */
.vc_row {
    position: relative;
}

/* Ensure full width rows work correctly */
.vc_row-o-content-width > .vc_row {
    max-width: 1200px;
    margin: 0 auto;
}

.vc_row-o-full-width > .vc_row {
    max-width: 100%;
    padding: 0;
}

/* Custom styles for Swetch logo in WP Bakery - согласно brandbook */
.swetch-logo {
    height: var(--logo-min-height);
    width: auto;
    max-width: var(--logo-max-width);
    display: block;
    object-fit: contain;
}

/* Обертка логотипа (дублирование для WP Bakery) */
.swetch-logo-wrapper {
    padding: var(--logo-clear-space) calc(var(--logo-clear-space) * 1.5);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    min-height: calc(var(--logo-min-height) + var(--logo-clear-space) * 2);
    min-width: calc(var(--logo-min-width) + var(--logo-clear-space) * 2);
}

.swetch-logo-wrapper:hover {
    opacity: 0.95;
}

.swetch-logo-wrapper .logo-link {
    display: inline-block;
    line-height: 0;
}

/* Логотип согласно brandbook - правильные размеры и тени (дублирующиеся стили) */
.swetch-logo-main {
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    height: var(--logo-min-height);
    width: auto;
    max-width: var(--logo-max-width);
    object-fit: contain;
}

.swetch-logo-main:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Ensure logo is visible on all backgrounds - согласно brandbook */
#logo-img {
    max-height: var(--logo-min-height);
    height: auto;
    width: auto;
    max-width: var(--logo-max-width);
    object-fit: contain;
}

/* Language switcher styles with flags */
.swetch-language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    align-self: center; /* Центрирование флагов по вертикали в header */
}

.swetch-language-switcher button {
    padding: 0;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px; /* Закругленные углы */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.swetch-language-switcher button .flag-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: block;
    transition: transform 0.3s ease;
}

.swetch-language-switcher button:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.swetch-language-switcher button:hover .flag-icon {
    transform: scale(1.1);
}

.swetch-language-switcher button.active {
    background-color: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.swetch-language-switcher button.active .flag-icon {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.swetch-language-switcher button.active::after {
    display: none; /* Убираем точку снизу */
}

/* Back to top button for WordPress */
.swetch-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--swetch-logo-blue);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swetch-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.swetch-back-to-top:hover {
    background-color: var(--swetch-logo-dark);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(53, 167, 223, 0.4);
}

/* Fix admin bar spacing */
body.admin-bar .swetch-back-to-top {
    bottom: 70px;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .swetch-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    body.admin-bar .swetch-back-to-top {
        bottom: 60px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .swetch-back-to-top {
        bottom: 24px;
        right: 24px;
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    body.admin-bar .swetch-back-to-top {
        bottom: 64px;
    }
}
