* {
    font-family: 'Montserrat', sans-serif;
    scroll-behavior: smooth;
}

/* Основной градиент (для совместимости) */
.green-gradient {
    background: linear-gradient(
        135deg,
        #0E5F6A 0%,
        #167A88 50%,
        #22A6B8 100%
    );
}

/* Светлый фон (для совместимости) */
.light-green-gradient {
    background: #f9fafb;
}

/* Градиентный текст (упрощенный) */
.text-gradient {
    color: #16a34a;
}

/* Навигация */
.nav-bar {
    transition: all 0.2s ease;
}

.nav-bar.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-link {
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #16a34a;
    transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #16a34a;
    font-weight: 600;
}

/* Мобильное меню */
.mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* Карточки */
.card-hover {
    transition: all 0.2s ease;
}

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

.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(34, 166, 184, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.feature-card:hover::after {
    opacity: 1;
}

/* Иконки услуг */
.service-icon {
    transition: transform 0.2s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.05);
}

/* Анимации появления */
.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-up-delay {
    animation: fadeInUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

.animate-fade-in-up-delay-2 {
    animation: fadeInUp 1s ease-out 0.6s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-down {
    animation: slideDown 0.4s ease-out;
}

/* Плавающие формы (убраны для минималистичного дизайна) */

/* Кнопки (упрощенные) */
.appointment-btn,
.ui-gradient-btn {
    transition: all 0.2s ease;
}

/* Логотип - адаптивный (увеличенный для мобильных) */
.logo {
    width: 80px;
    height: 80px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

@media (min-width: 640px) {
    .logo {
        width: 90px;
        height: 90px;
    }
}

@media (min-width: 768px) {
    .logo {
        width: 100px;
        height: 100px;
    }
}

@media (min-width: 1024px) {
    .logo {
        width: 110px;
        height: 110px;
    }
}

.logo:hover {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.2));
}

/* Cookie Consent (компактный вид) */
.cookie-consent {
    transition: transform 0.3s ease-out;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-consent button {
    position: relative;
    overflow: hidden;
}

.cookie-consent button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cookie-consent button:hover::before {
    width: 300px;
    height: 300px;
}

.cookie-consent button span {
    position: relative;
    z-index: 1;
}

/* Параллакс эффект для секций */
section {
    position: relative;
}

/* Улучшенные тени */
.shadow-3xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Плавное появление элементов при скролле */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Анимация пульсации для важных элементов */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse-animation {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Градиентная граница */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 1rem;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(135deg, #22A6B8, #167A88);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Улучшенная карусель */
#carousel img {
    transition: transform 0.7s ease-in-out;
}

#carousel:hover img {
    transform: scale(1.05);
}

/* Анимация для деталей услуг */
details[open] summary {
    margin-bottom: 1rem;
}

details summary::-webkit-details-marker {
    display: none;
}

/* Плавная прокрутка с отступом */
html {
    scroll-padding-top: 80px;
}

/* Карусель "О нас" - бесконечная лента */
#about-carousel {
    display: flex;
    will-change: transform;
    overflow: visible;
    width: max-content;
}

#about-carousel > div {
    flex-shrink: 0;
}

/* Контейнер карусели должен скрывать переполнение */
.relative.overflow-hidden {
    overflow: hidden !important;
    width: 100%;
}

/* Убираем лишние отступы у контейнера карусели */
#about .container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* Адаптация для мобильных */
@media (max-width: 640px) {
    #about-carousel > div {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Восстанавливаем отступы для контейнера секции "О нас" */
    #about .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Улучшенная адаптация для маленьких экранов */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
    }
    
    #about-carousel > div {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    /* Улучшенная читаемость на маленьких экранах */
    .service-card,
    .feature-card {
        font-size: 0.875rem;
    }
    
    /* Компактные кнопки */
    button, a {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    /* Логотип для очень маленьких экранов */
    .logo {
        width: 75px !important;
        height: 75px !important;
    }
}

/* Дополнительная адаптация для средних мобильных экранов */
@media (min-width: 481px) and (max-width: 639px) {
    .logo {
        width: 85px !important;
        height: 85px !important;
    }
}

/* Дополнительные улучшения для мобильных */
@media (max-width: 640px) {
    /* Уменьшаем отступы */
    section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Компактные заголовки */
    h2 {
        font-size: 1.5rem;
    }
    
    /* Улучшенная карусель на мобильных */
    #about-carousel {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    #about-carousel > div {
        scroll-snap-align: start;
    }
}

/* Дополнительные улучшения для мобильного меню */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    overflow: hidden;
}

/* Детали услуг */
details summary {
    transition: all 0.2s ease;
    user-select: none;
}

details[open] summary {
    color: #16a34a;
}

/* Плавное появление секций */
section {
    opacity: 0;
    animation: fadeInSection 1s ease-out forwards;
}

section.visible {
    opacity: 1;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Упрощенные стили для карточек */

/* Модальные окна */
#call-modal, #callback-modal {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

#call-modal.show, #callback-modal.show {
    display: flex !important;
}

#call-modal-content, #callback-modal-content {
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#call-modal.show #call-modal-content,
#callback-modal.show #callback-modal-content {
    transform: scale(1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Плавающая кнопка звонка */
#floating-call-btn {
    animation: float 3s ease-in-out infinite;
}

#floating-call-btn button {
    position: relative;
    overflow: hidden;
}

#floating-call-btn button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

#floating-call-btn button:hover::before {
    width: 100px;
    height: 100px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Стили для форм */
input:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Анимация пульсации для плавающей кнопки */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
}

#floating-call-btn button.animate-pulse {
    animation: pulse 2s infinite, float 3s ease-in-out infinite;
}

/* Адаптация модальных окон для мобильных */
@media (max-width: 480px) {
    #call-modal-content, #callback-modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    #floating-call-btn {
        bottom: 1rem;
        right: 1rem;
    }
    
    #floating-call-btn button {
        width: 3rem;
        height: 3rem;
    }
    
    #floating-call-btn button i {
        font-size: 1rem;
    }
}

/* Улучшенные стили для кнопок в навигации */
.nav-buttons {
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .nav-buttons {
        gap: 1rem;
    }
}

/* Маска для номера телефона */
input[type="tel"] {
    font-family: monospace;
}
/* Компактная навигация */
.nav-bar {
    padding: 0.75rem 0;
}

.nav-bar .container {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Компактные ссылки навигации */
.nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0;
}

/* Компактные кнопки */
.nav-buttons button,
.nav-buttons a {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

@media (min-width: 640px) {
    .nav-buttons button,
    .nav-buttons a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
    .nav-buttons button,
    .nav-buttons a {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Адаптивные изображения в карусели */
#carousel img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
}

/* Мобильная адаптация карусели */
@media (max-width: 768px) {
    #carousel img {
        object-position: center center;
        transform: scale(1.1);
    }
    
    #home {
        min-height: 60vh;
    }
}

/* Планшетная адаптация */
@media (min-width: 769px) and (max-width: 1024px) {
    #carousel img {
        object-position: center center;
    }
    
    #home {
        min-height: 70vh;
    }
}

/* Десктопная адаптация */
@media (min-width: 1025px) {
    #carousel img {
        object-position: center center;
    }
    
    #home {
        min-height: 80vh;
    }
}

/* Улучшенная адаптация для очень маленьких экранов */
@media (max-width: 480px) {
    .nav-bar .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .logo {
        width: 75px !important;
        height: 75px !important;
    }
    
    /* Адаптация текста логотипа для маленьких экранов */
    .logo + div h1 {
        font-size: 1rem !important;
        line-height: 1.2;
    }
    
    .logo + div p {
        font-size: 0.7rem !important;
    }
    
    .nav-buttons {
        gap: 0.25rem;
    }
    
    .nav-buttons button,
    .nav-buttons a {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .nav-buttons span {
        display: none !important;
    }
    
    #carousel img {
        transform: scale(1.2);
    }
}