﻿/* ========================================
   HOME PAGE STYLES
   ======================================== */

/* Hero Section Wrapper с адаптивными отступами */
.hero-section-wrapper {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    /* height убрана - используется min-height из hero.css */
    overflow: hidden;
    /* background убран - используется background из hero.css для разных страниц */
    border-radius: 8px;
}

/* Hero Content Padding for Mobile */
.hero-section .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (max-width: 576px) {
    .hero-section .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Убираем скругление на мобильных */
    .hero-section {
        border-radius: 0 !important;
    }
    
    /* Ограничиваем wrapper на мобильных */
    .hero-section-wrapper {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 1rem;
    }
}

/* Отступы для Hero wrapper на разных экранах */
@media (min-width: 576px) {
    .hero-section-wrapper {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

@media (min-width: 768px) {
    .hero-section-wrapper {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (min-width: 992px) {
    .hero-section-wrapper {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

@media (min-width: 1200px) {
    .hero-section-wrapper {
        max-width: 1320px;
        padding-left: 5rem;
        padding-right: 5rem;
    }
}

@media (min-width: 1400px) {
    .hero-section-wrapper {
        max-width: 1400px;
        padding-left: 6rem;
        padding-right: 6rem;
    }
}

@media (min-width: 1600px) {
    .hero-section-wrapper {
        max-width: 1500px;
        padding-left: 7rem;
        padding-right: 7rem;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(13, 110, 253, 0.9) 0%, rgba(13, 110, 253, 0.5) 100%);
    z-index: 1;
}

/* Dynamic Hero Gradient Overlay - без анимации при загрузке */
.hero-gradient-overlay {
    /* Убрана анимация fadeInGradient для мгновенного отображения */
}

/* Service Cards */
.service-card-link {
    all: unset;
    cursor: pointer;
    display: block;
    height: 100%;
}

.service-card-wrapper {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .service-card-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(0, 188, 212, 0.05) 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

.service-card-link:hover .service-card-wrapper {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-4px);
}

    .service-card-link:hover .service-card-wrapper::before {
        opacity: 1;
    }

.service-icon {
    transition: transform 0.3s ease;
}

.service-card-link:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Gradient Background */
.gradient-primary-to-accent {
    background: linear-gradient(to right, #0d6efd 0%, #00bcd4 100%);
}

/* News Cards Section */
.news-section {
    margin-bottom: 3rem;
}

/* CTA Section */
.cta-section {
    border-radius: 1.5rem;
    padding: 3rem;
    background: linear-gradient(to right, #0d6efd 0%, #00bcd4 100%);
    color: white;
    margin-top: 3rem;
}

/* Smooth transitions */
a, button {
    transition: all 0.3s ease;
}

    /* Focus states for accessibility */
    a:focus, button:focus {
        outline: 2px solid rgba(13, 110, 253, 0.5);
        outline-offset: 2px;
    }

/* Important Messages Bar */
.important-message-bar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 0;
}

.important-message-card {
    border: none;
    border-left: 5px solid #0d6efd;
}

.important-message-icon {
    width: 48px;
    height: 48px;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d6efd;
    flex-shrink: 0;
}

/* Weather Widget */
.weather-widget {
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 400px;
}

.weather-icon {
    width: 48px;
    height: 48px;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #17a2b8;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

    .section-title h2 {
        font-size: 2.5rem;
        font-weight: bold;
        margin-bottom: 0.5rem;
    }

    .section-title p {
        color: #6c757d;
    }

/* Button Styles */
.btn-light-transparent {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

    .btn-light-transparent:hover {
        background-color: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.5);
    }

/* Main Content */
main {
    padding: 3rem 0;
}

/* Responsive adjustments */

/* Tablet 768px-1023px - специальные правила */
@media (min-width: 768px) and (max-width: 1023px) {
    .weather-widget {
        width: 100%;
        max-width: 320px;
        margin-top: 0;
    }

    /* Блок с заголовком - ОБЯЗАТЕЛЬНО ПОКАЗЫВАЕМ */
    .d-flex.align-items-center.gap-3.mb-3 {
        display: flex !important;
        visibility: visible !important;
        margin-bottom: 0.5rem !important;
    }

    /* Убираем иконку (первый div) */
    .d-flex.align-items-center.gap-3.mb-3 > div:first-child {
        display: none !important;
    }

    /* Второй div с заголовком - ОБЯЗАТЕЛЬНО ПОКАЗЫВАЕМ */
    .d-flex.align-items-center.gap-3.mb-3 > div:last-child {
        display: block !important;
        visibility: visible !important;
    }

    /* Заголовок "Добро пожаловать в Кудрово" для 768px-1023px */
    .display-4,
    h1.display-4 {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
        visibility: visible !important;
        color: white !important;
        opacity: 1 !important;
    }

    /* Убираем подзаголовок */
    .lead {
        display: none !important;
    }

    /* Кнопки вертикально друг под другом */
    .d-flex.flex-wrap.gap-3 {
        flex-direction: column !important;
        gap: 0.8rem !important;
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
        margin-top: 1rem !important;
    }

        .d-flex.flex-wrap.gap-3 .btn {
            width: auto;
        }

    /* Убираем дополнительную информацию погоды (Ощущается, Влажность, Восход, Закат) */
    .weather-column .card .row.g-2 {
        display: none !important;
    }
}

/* 1024px-1279px - без подзаголовка */
@media (min-width: 1024px) and (max-width: 1279px) {
    .weather-widget {
        width: 100%;
        max-width: 350px;
    }

    .display-4 {
        font-size: 2.2rem !important;
        line-height: 1.3 !important;
    }
}

@media (max-width: 992px) {
    .weather-widget {
        width: 100%;
        max-width: 400px;
        margin-top: 1.5rem;
    }

    .cta-section {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem !important;
    }

    .display-5 {
        font-size: 1.75rem !important;
    }

    .lead {
        font-size: 1rem !important;
    }

    .section-title {
        flex-direction: column;
        align-items: flex-start;
    }

        .section-title a {
            margin-top: 1rem;
        }

    .cta-section {
        padding: 2rem;
        margin-top: 2rem;
    }

        .cta-section h2 {
            font-size: 1.75rem !important;
        }

    .important-message-card {
        flex-direction: column !important;
    }

    .important-message-icon {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    .display-5 {
        font-size: 1.5rem !important;
    }

    .lead {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }

    .btn-lg {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }

    .gap-3 {
        gap: 0.75rem !important;
    }

    .cta-section {
        padding: 1.5rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .hero-section-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Убираем лишние отступы внутри Hero на мобильных */
    .hero-section .row {
        margin: 0 !important;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Advertisement Card */
.advertisement-card {
    border: 1px solid rgba(0, 188, 212, 0.3) !important;
    transition: all 0.3s ease;
}

    .advertisement-card:hover {
        border-color: rgba(0, 188, 212, 0.5) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
    }

/* Print Styles */
@media print {
    .hero-section,
    .important-message-bar,
    .cta-section,
    .advertisement-card,
    nav,
    footer {
        display: none;
    }
}
