/* ===== Цветовая схема и общие настройки ===== */
:root {
    --primary-red: #e41e26;
    --primary-blue: #2c5aa0;
    --bg-beige: #e8dcc8;
    --nav-burgundy: #8b5a5f;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #ddd;
}

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

body {
    font-family: 'Open Sans', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;

    background-image: url('/assets/images/bg.png');
    background-repeat: repeat;      /* повтор по всей странице */
    background-position: top left;  /* стартовая точка */
    background-size: auto;          /* без растягивания */
    background-attachment: scroll;  /* обычная прокрутка */
}


/* ===== Header ===== */
.main-header {
    background-color: var(--bg-beige);
    border-bottom: 1px solid var(--border-color);
}

.header-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
}

.logo a {
    text-decoration: none;
    display: inline-block;
}

.logo svg {
    max-width: 100%;
    height: auto;
}

/* ===== Navigation ===== */
.main-nav {
    background-color: var(--nav-burgundy);
    padding: 0;
}

.main-nav .navbar-nav {
    width: 100%;
}

.main-nav .nav-link {
    color: #fff !important;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    background-color: rgba(0, 0, 0, 0.2);
}

.main-nav .nav-item:last-child .nav-link {
    border-right: none;
}

/* ===== Main Content ===== */
.main-content {
    min-height: calc(100vh - 300px);
    padding: 2rem 0;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, rgba(44, 90, 160, 0.05) 0%, rgba(228, 30, 38, 0.05) 100%);
    padding: 3rem 0;
    margin-bottom: 2rem;
}

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

.hero-subtitle {
    color: var(--text-dark);
    font-size: 1.1rem;
}

/* ===== Content Sections ===== */
.content-section {
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-red);
}

/* ===== History Cards - One Row (4 Columns) ===== */
.history-card {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-blue);
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.image-container {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.image-placeholder {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.card-text {
    flex: 1;
    display: flex;
    align-items: flex-start;
}

.card-text p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ===== Contact Form ===== */
.contact-form {
    background-color: #fff;
    padding: 2rem;
    border-radius: 4px;
}

.contact-form .form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.contact-form .form-control,
.contact-form .form-select {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 4px;
}

.contact-form .form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.btn-primary-custom {
    background-color: var(--nav-burgundy);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: #6d4548;
}

/* ===== Contact Info Boxes ===== */
.contact-info-box {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.contact-info-box h5 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-info-box p {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-info-box strong {
    color: var(--text-dark);
}

/* ===== Service Cards ===== */
.service-card {
    background-color: #fff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.service-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.service-card h4 {
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.btn-service {
    background-color: var(--primary-blue);
    color: #fff;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.btn-service:hover {
    background-color: #234a80;
    color: #fff;
}

/* ===== Images ===== */
.content-image {
    max-width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-badge {
    max-width: 200px;
    max-height: 120px;
    height: auto;
}

/* ===== Footer ===== */
.main-footer {
    background-color: var(--nav-burgundy);
    color: #fff;
    margin-top: 3rem;
}

.main-footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* ===== Loading Spinner ===== */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.spinner-border {
    color: var(--primary-blue);
}

/* ===== Responsive Design ===== */
@media (max-width: 991px) {
    .history-card {
        min-height: 450px;
    }

    .image-container {
        height: 180px;
    }

    .card-text p {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .main-nav .nav-link {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .content-section {
        padding: 1.5rem;
    }
    
    .service-card {
        margin-bottom: 1rem;
    }

    .history-card {
        min-height: 400px;
        margin-bottom: 1rem;
    }

    .image-container {
        height: 160px;
    }
}

@media (max-width: 576px) {
    .logo svg {
        width: 200px;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .hero-section {
        padding: 2rem 0;
    }

    .history-card {
        min-height: 350px;
    }

    .image-container {
        height: 150px;
    }

    .card-text p {
        font-size: 0.85rem;
    }
}

/* ===================================
   CUSTOM MOBILE MENU BUTTON STYLES
   =================================== */

/* Улучшенная кнопка мобильного меню */
.navbar-toggler.custom-menu-btn {
    border: 2px solid #ffffff;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar-toggler.custom-menu-btn:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.navbar-toggler.custom-menu-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

/* Иконка меню (3 полоски) */
.menu-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
}

.menu-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--nav-burgundy);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Анимация при клике */
.navbar-toggler.custom-menu-btn.active .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggler.custom-menu-btn.active .menu-icon span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler.custom-menu-btn.active .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Текст "IZVĒLNE" */
.menu-text {
    font-weight: 700;
    font-size: 16px;
    color: var(--nav-burgundy);
    letter-spacing: 0.5px;
}

/* Скрываем на десктопе */
@media (min-width: 992px) {
    .navbar-toggler.custom-menu-btn {
        display: none;
    }
}

/* Позиционирование на мобильных */
@media (max-width: 991px) {
    .navbar-toggler.custom-menu-btn {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1050;
        transition: all 0.3s ease;
    }
    
    .main-nav .container {
        position: relative;
    }
    
    /* Скрываем кнопку когда меню открыто (через класс active) */
    .navbar-toggler.custom-menu-btn.active {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-50%) scale(0.8);
    }
    
    /* Добавляем отступ для меню чтобы не перекрывало кнопку */
    .navbar-collapse {
        margin-top: 10px;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== Cookie Notice ===== */
.cookie-notice {
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
}

.cookie-notice.show {
    display: block;
}

.cookie-notice p {
    margin: 0 0 0.5rem 0;
}

.cookie-notice .btn {
    margin-right: 0.5rem;
}

/* ===== Utility Classes ===== */
.text-primary-custom {
    color: var(--primary-blue);
}

.text-red-custom {
    color: var(--primary-red);
}

.bg-light-custom {
    background-color: #f9f9f9;
}

.border-left-primary {
    border-left: 4px solid var(--primary-blue);
}

.border-left-red {
    border-left: 4px solid var(--primary-red);
}

.service-img {
    height: 180px;
    object-fit: cover;
    width: 100%;
    border-radius: 8px;
}

.service-image-wrapper {
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 6px;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== Interactive Services Styles ===== */

/* Enhanced service card for interactive functionality */
.service-card[data-service] {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.service-card[data-service]:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-blue);
}

.service-card.active {
    border-color: var(--primary-red);
    box-shadow: 0 4px 12px rgba(228, 30, 38, 0.2);
}

/* Service card indicator */
.service-card-indicator {
    text-align: center;
    color: var(--primary-red);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .service-card-indicator,
.service-card.active .service-card-indicator {
    opacity: 1;
}

/* Detail section */
.detail-section {
    background-color: #fff;
    padding: 3rem 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--primary-red);
    display: none;
    animation: slideDown 0.4s ease-out;
}

.detail-section.active {
    display: block;
}

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

.detail-section h3 {
    color: var(--primary-red);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.detail-section p {
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.detail-section strong {
    color: var(--primary-blue);
}

/* Close button */
.close-detail {
    background-color: var(--nav-burgundy);
    color: #fff;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.close-detail:hover {
    background-color: #6d4548;
}

/* Responsive adjustments for interactive services */
@media (max-width: 768px) {
    .detail-section {
        padding: 2rem 1.5rem;
    }

    .detail-section h3 {
        font-size: 1.5rem;
    }

    .detail-section p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .service-card-indicator {
        font-size: 0.8rem;
    }

    .detail-section {
        padding: 1.5rem 1rem;
    }
}