/* Custom styles for Эксперт Потолков */

/*
 * Цветовая палитра проекта:
 *
 * brand-orange: #ff6a00 - Основной акцентный цвет (заголовки, кнопки, ссылки)
 * brand-blue: #1c3250   - Заголовки и основные элементы
 * brand-text: #3f3f3f   - Основной цвет текста
 *
 * Использование:
 * - text-brand-orange / bg-brand-orange / border-brand-orange
 * - text-brand-blue / bg-brand-blue / border-brand-blue
 * - text-brand-text / bg-brand-text / border-brand-text
 */

/* Специфические стили для проекта */

/* Кастомные анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Smooth transitions для всех интерактивных элементов */
a, button {
    transition: all 0.3s ease;
}

/* Цветовые утилиты для быстрого доступа */
.text-accent {
    color: #ff6a00;
}

.bg-accent {
    background-color: #ff6a00;
}

.border-accent {
    border-color: #ff6a00;
}

.hover-accent:hover {
    color: #ff6a00;
}

/* Анимация гамбургер меню */
.hamburger {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: #1c3250;
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

/* Анимация при открытии меню */
#mobileMenuBtn.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#mobileMenuBtn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

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

/* Прокрутка текста на маленьких экранах */
@media (max-width: 640px) {
    .animate-scroll-text {
        display: inline-block;
        animation: scroll-text 10s linear infinite;
    }

    @keyframes scroll-text {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
}

/* Выделение текста мазком кисти */
.brush-highlight {
    position: relative;
    display: inline-block;
    color: #1c3250;
}

/* Кастомный скроллбар для textarea */
#message {
    scrollbar-width: thin;
    scrollbar-color: rgba(240, 182, 39, 0.5) rgba(240, 182, 39, 0.1);
}

#message::-webkit-scrollbar {
    width: 8px;
}

#message::-webkit-scrollbar-track {
    background: rgba(240, 182, 39, 0.1);
    border-radius: 4px;
}

#message::-webkit-scrollbar-thumb {
    background: rgba(240, 182, 39, 0.5);
    border-radius: 4px;
}

#message::-webkit-scrollbar-thumb:hover {
    background: rgba(240, 182, 39, 0.7);
}

/* Универсальная карусель */
.carousel-container {
    width: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.carousel-container.scrollbar-hide {
    scrollbar-width: none;
}

.carousel-container.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.carousel-dot.active {
    background-color: #f0b627;
    width: 24px;
}

/* Фон секции контактов */
body {
    overflow-x: hidden;
}

/* Workflow items с цифрами */
.workflow-item {
    position: relative;
}

.workflow-item::before {
    content: attr(data-number);
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-size: 5rem;
    font-weight: bold;
    color: rgba(28, 50, 80, 0.15);
    z-index: 0;
    pointer-events: none;
    line-height: 1;
}

.workflow-item:nth-child(1)::before {
    content: '1';
}

.workflow-item:nth-child(2)::before {
    content: '2';
}

.workflow-item:nth-child(3)::before {
    content: '3';
}

.workflow-item span {
    position: relative;
    z-index: 1;
}

@media (max-width: 767px) {
    .workflow-item::before {
        font-size: 3rem;
        left: 10px;
    }
}

.contacts-section-bg {
    position: relative;
}

.contacts-section-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/contact-form-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: -1;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 100%);
}

/* Кастомный чекбокс */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(28, 50, 80, 0.3);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.custom-checkbox:hover {
    border-color: rgba(28, 50, 80, 0.5);
    background-color: rgba(255, 255, 255, 0.4);
}

.custom-checkbox:checked {
    background-color: #1c3250;
    border-color: #1c3250;
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(28, 50, 80, 0.2);
}

/* ============================================
   СИСТЕМА УПРАВЛЕНИЯ ШИРИНОЙ СЕКЦИЙ
   ============================================ */

/*
 * Базовый контейнер секции - стандартная ширина
 * Использование: <section class="section-container">
 * Максимальная ширина: 1536px (2xl)
 */
.section-container {
    max-width: 1536px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 1024px) {
    .section-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/*
 * Узкая секция (для контактов, форм и т.д.)
 * Использование: <section class="section-container section-narrow">
 * Максимальная ширина: 1280px (xl)
 */
.section-narrow {
    max-width: 1280px;
}

/*
 * Полная ширина от края до края
 * Использование: <section class="section-full">
 * Без отступов и ограничений по ширине
 */
.section-full {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

/* Стилизация стандартного select */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff6a00'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select:hover {
    border-color: #ff6a00;
}

select optgroup {
    font-weight: 700;
    color: #1c3250;
    background: #f3f4f6;
}

select option {
    padding: 0.75rem;
    color: #3f3f3f;
}

/* ===================================
 * Плавные переходы между секциями
 * =================================== */

/* Градиент сверху: от белого к текущему фону */
.gradient-top-from-white::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, white, transparent);
    pointer-events: none;
    z-index: 1;
}

/* Градиент сверху: от серого к текущему фону */
.gradient-top-from-gray::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, #f9fafb, transparent);
    pointer-events: none;
    z-index: 1;
}

/* Градиент снизу: от текущего фона к белому */
.gradient-bottom-to-white::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
    z-index: 1;
}

/* Градиент снизу: от текущего фона к серому */
.gradient-bottom-to-gray::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, #f9fafb);
    pointer-events: none;
    z-index: 1;
}
