/* ============================================
   ДИЗАЙН-СИСТЕМА САЙТА САНТЕХНИКА
   ============================================ */

/* Цветовая палитра */
:root {
    --primary-color: #0a1835;      /* Темно-синий */
    --primary-color-hover: #0dab1b; 
    --white: #ffffff;               /* Белый */
    --text-dark: #333333;           /* Темный текст */
    --text-light: #666666;          /* Светлый текст */
    --border-color: #e0e0e0;        /* Цвет границ */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Тень */
}

/* Базовые стили */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 600;
}

/* Кнопки */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0d2040;
    border-color: #0d2040;
    color: var(--white);
}

/* Карточки */
.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

/* Навигация */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 24px 0;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 20px;
    transition: color 0.3s ease;
}

.nav-link:not(.nav-link-reviews):hover {
    color: var(--primary-color-hover) !important;
}

.navbar-nav .nav-link.active, .navbar-nav .nav-link.show{
    color: var(--primary-color-hover) !important;
}

.nav-link:focus, .nav-link:hover{
    color: var(--primary-color-hover) !important;
}

/* Формы */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px 15px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(10, 24, 53, 0.25);
}

/* Hero-секция */
.hero-section {
    background: linear-gradient(rgba(10, 24, 53, 0.8), rgba(10, 24, 53, 0.8)), url('../images/hero/hero-bg.jpg') center/cover no-repeat;
    min-height: 70vh;
    display: flex;
    align-items: center;
    color: white;
}

.hero-section h1,
.hero-section p,
.hero-section .lead {
    color: white !important;
}

/* Блок преимуществ */
.advantage-item {
    padding: 30px 20px;
}

.advantage-icon {
    margin-bottom: 20px;
}

/* Уменьшение отступов для преимуществ на мобильных */
@media (max-width: 767px) {
    .advantages-row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .advantages-row [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .advantage-item {
        padding: 15px 10px;
    }
    
    .advantage-icon {
        margin-bottom: 10px;
    }
    
    .advantage-item h5 {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    
    .advantage-item .text-muted {
        font-size: 0.8rem;
    }
    
    .advantage-item .advantage-icon > div {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
    }
}

/* Карточки услуг */
.service-card {
    height: 100%;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card-clickable {
    cursor: pointer;
}

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

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-price {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Форма */
.call-form-section {
    background: #f8f9fa;
    padding: 60px 0;
}

/* Отзывы */
.review-card {
    height: 100%;
}

/* Навигация */
.navbar-brand {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand {
    display: flex;
    align-items: center;
    max-width: 250px;
    overflow: hidden;
}

.navbar-logo {
    height: 42px;
    width: auto;
    max-width: 240px;
    max-height: 42px;
    object-fit: contain;
    display: block;
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Выделение кнопки "Отзывы" в навигации */
.nav-link-reviews {
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-image: linear-gradient(90deg, #1ccf23, #13ebe1, #52b514);
    background-size: 200% 100%;
    font-weight: 700;
    animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 200% 0%;
    }
    100% {
        background-position: 0% 0%;
    }
}

/* 
.nav-link-reviews:hover {
    color: #c02545 !important;
}

.nav-link-reviews.active {
    color: #e22f53 !important;
} */

/* Модальные окна */
.modal-content {
    border: none;
    border-radius: 8px;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* Кнопки outline */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Футер */
footer {
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-color);
}

footer a {
    color: var(--text-dark);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
}

/* Toast уведомления */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    max-width: 400px;
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.toast-success {
    background-color: #28a745;
    color: white;
}

.toast-notification.toast-error {
    background-color: #dc3545;
    color: white;
}

/* Отзывы - прижать дату к низу */
.review-card .card-body {
    min-height: 100%;
}

/* Галерея */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-item img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Контакты */
.social-links a {
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
}

/* Форма отзывов - звездный рейтинг */
.rating-input {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input .star-label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
}

/* Активные звезды (управляется JavaScript через класс active) */
.rating-input .star-label.active {
    color: #ffc107 !important;
}

/* При hover текущей звезды выделяем её */
.rating-input .star-label:hover {
    color: #ffc107;
}

/* Галерея */
.gallery-item img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Модальное окно галереи */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.9);
}

.gallery-modal-dialog {
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
}

.gallery-modal-content {
    pointer-events: none;
}

.gallery-modal-content .btn-close {
    pointer-events: auto;
}

.gallery-modal-dialog .modal-body {
    min-height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px 20px 20px;
    pointer-events: none;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    pointer-events: auto;
}

/* Текст о нас */
.about-content {
    line-height: 1.8;
}

.about-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-content ul {
    list-style-type: none;
    padding-left: 0;
}

.about-content li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.about-content li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Плавающая кнопка с телефоном */
.floating-phone-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    animation: floatAnimation 3s ease-in-out infinite;
}

.floating-phone-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white !important;
    padding: 15px 20px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(10, 24, 53, 0.4);
    transition: all 0.3s ease;
    font-weight: 600;
}

.floating-phone-link:hover {
    background-color: #0d2040;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(10, 24, 53, 0.6);
    color: white !important;
}

.floating-phone-text {
    font-size: 1rem;
}

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

/* Номер телефона в hero */
.hero-phone {
    opacity: 0.95;
}

.hero-phone a {
    transition: opacity 0.3s ease;
}

.hero-phone a:hover {
    opacity: 1;
}

/* Светлая кнопка в hero */
.hero-section .btn-light {
    background-color: white;
    color: var(--primary-color);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-section .btn-light:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.3);
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        padding: 40px 0;
    }

    .footer-content-row{
        padding: 0 10%;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .advantage-item {
        margin-bottom: 20px;
    }
    
    .call-form-section {
        padding: 40px 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .toast-notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .floating-phone-btn {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-phone-text {
        display: none;
    }
    
    .gallery-modal-dialog {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .gallery-modal-dialog .modal-body {
        padding: 50px 10px 10px 10px;
    }
    
    .gallery-modal-image {
        max-height: calc(95vh - 60px);
    }
    
    .navbar-brand {
        max-width: 180px;
    }
    
    .navbar-logo {
        height: 35px;
        max-width: 150px;
        max-height: 35px;
    }

    .floating-phone-link {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
    }
    
    .floating-phone-link svg {
        margin-right: 0;
    }
    
    /* Светлая кнопка в hero для мобильных */
    .hero-section .btn-light {
        font-size: 1rem;
        padding: 10px 20px;
    }
}

/* Светлая кнопка в hero */
.hero-section .btn-light {
    background-color: white;
    color: var(--primary-color);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-section .btn-light:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.3);
}

/* Перенос длинных строк в контенте страниц */
.page-content-wrapper {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.page-content-wrapper * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.page-content-wrapper p,
.page-content-wrapper li,
.page-content-wrapper td,
.page-content-wrapper th {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.page-content-wrapper pre,
.page-content-wrapper code {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

