/* ============================================
   ФАЙЛ: style.css
   СТРОЙ ДОМ В КАРЕЛИИ - Лендинг строительной компании
   ============================================ */

/* ========== 1. ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ ========== */
:root {
    --primary: #F9AA33;
    --primary-dark: #e08e1a;
    --secondary: #344955;
    --secondary-dark: #232F3A;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
}

/* ========== 2. БАЗОВЫЕ СБРОСЫ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo {
    font-family: 'Playfair Display', serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шире контейнер шапки */
.header .container {
    max-width: 1400px;
}

/* ========== 3. КНОПКИ (НАЧАЛО) ========== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--secondary);
    box-shadow: 0 4px 10px rgba(249, 170, 51, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(249, 170, 51, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}
/* ========== КНОПКИ (КОНЕЦ) ========== */

/* ========== 4. ШАПКА / HEADER (НАЧАЛО) ========== */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Логотип с центровкой слова "в Карелии" */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 28px;
    color: var(--primary);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text span {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary);
}

.logo-text small {
    font-size: 12px;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

.header-contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}

.phone-link {
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
    white-space: nowrap;
}

.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background: var(--secondary);
    transition: 0.3s;
}
/* ========== ШАПКА / HEADER (КОНЕЦ) ========== */

/* ========== 5. HERO БЛОК (ПЕРВЫЙ ЭКРАН) (НАЧАЛО) ========== */
.hero {
    position: relative;
    background: url('images/fon1.jpg') center/cover no-repeat;
    padding: 100px 0;
    color: white;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    max-width: 55%;
}

.hero-text h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.accent {
    color: var(--primary);
}

.hero-benefits {
    list-style: none;
    margin-top: 20px;
}

.hero-benefits li {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.hero-benefits i {
    color: var(--primary);
    margin-right: 10px;
}

/* ФОРМА В HERO БЛОКЕ */
.hero-form {
    background: white;
    color: var(--dark);
    padding: 30px;
    border-radius: 20px;
    width: 38%;
    max-width: 400px;
    min-width: 280px;
    box-shadow: 0 20px 35px rgba(0,0,0,0.2);
    margin-top: -5%;
    margin-right: 0;
    margin-left: auto;
}

.hero-form h3 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.4rem;
}

.hero-form input, 
.hero-form button {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.hero-form small {
    display: block;
    text-align: center;
    font-size: 11px;
    color: #777;
    margin-top: 10px;
}
/* ========== HERO БЛОК (КОНЕЦ) ========== */

/* ========== 6. КАТАЛОГ / ПРОЕКТЫ (НАЧАЛО) ========== */
.catalog {
    padding: 80px 0;
    background: var(--light);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--secondary);
}

.catalog-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* КАРТОЧКА ТОВАРА */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-details {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
    color: var(--gray);
}

.price-total {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.3rem;
    margin: 12px 0;
}
/* ========== КАТАЛОГ (КОНЕЦ) ========== */

/* ========== 7. ПОРТФОЛИО (НАЧАЛО) ========== */
.portfolio {
    padding: 80px 0;
    background: white;
}

.portfolio-swiper {
    padding: 20px 0;
}

.portfolio-swiper .swiper-slide img {
    border-radius: 20px;
}
/* ========== ПОРТФОЛИО (КОНЕЦ) ========== */

/* ========== 8. О КОМПАНИИ (НАЧАЛО) ========== */
.about {
    padding: 80px 0;
    background: var(--light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-content h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--secondary);
}

.stats {
    display: flex;
    gap: 30px;
    margin: 30px 0;
}

.stat-item {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-item span {
    display: block;
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: normal;
}

.about-logos {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.about-logos img {
    max-width: 150px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: 0.3s;
}

.about-logos img:hover {
    filter: grayscale(0);
    opacity: 1;
}
/* ========== О КОМПАНИИ (КОНЕЦ) ========== */

/* ========== 9. КОММЕРЧЕСКОЕ ПРЕДЛОЖЕНИЕ / CPO (НАЧАЛО) ========== */
.cpo {
    padding: 80px 0;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/fon1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
}

.cpo-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    background: rgba(0,0,0,0.5);
    padding: 50px;
    border-radius: 30px;
    backdrop-filter: blur(2px);
}

.cpo-text {
    flex: 1;
}

.cpo-text h2 {
    font-size: 2rem;
    margin-bottom: 25px;
}

.cpo-text ul {
    list-style: none;
}

.cpo-text li {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.cpo-form {
    flex: 1;
}

.cpo-form input, 
.cpo-form textarea, 
.cpo-form button {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
}

.cpo-form textarea {
    resize: vertical;
    min-height: 80px;
}

.file-label {
    display: block;
    background: rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 15px;
    transition: 0.3s;
}

.file-label:hover {
    background: rgba(255,255,255,0.3);
}
/* ========== CPO (КОНЕЦ) ========== */

/* ========== 10. ОТЗЫВЫ (НАЧАЛО) ========== */
.reviews {
    padding: 80px 0;
    background: var(--light);
}

.reviews-swiper {
    padding: 20px 0;
}

.swiper-slide {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.review-text {
    font-style: italic;
    margin: 15px 0;
    line-height: 1.5;
}

.review-author {
    font-weight: bold;
    margin-top: 10px;
}

.star-rating {
    color: #FFD700;
    margin: 10px 0;
    font-size: 1.2rem;
}

.star-rating input {
    display: none;
}

.star-rating i {
    cursor: pointer;
}
/* ========== ОТЗЫВЫ (КОНЕЦ) ========== */

/* ========== 11. ФУТЕР / ПОДВАЛ (НАЧАЛО) ========== */
.footer {
    background: var(--secondary);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin: 10px 0;
    transition: 0.3s;
}

.footer-col a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    font-size: 24px;
    display: inline-block;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #3e5a66;
    padding-top: 20px;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary);
    text-decoration: none;
}
/* ========== ФУТЕР (КОНЕЦ) ========== */

/* ========== 12. ПЛАВАЮЩИЕ КНОПКИ КОНТАКТОВ ========== */
.floating-contacts {
    position: fixed;
    bottom: 30px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.floating-contacts a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: 0.2s;
    text-decoration: none;
}

.floating-contacts a:hover {
    transform: translateY(-5px);
}

.float-phone {
    background: #34b7f1;
}

.float-tg {
    background: #0088cc;
}

.float-wa {
    background: #25D366;
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(52, 185, 241, 0.7);}
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(52, 185, 241, 0);}
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(52, 185, 241, 0);}
}
/* ========== ПЛАВАЮЩИЕ КНОПКИ (КОНЕЦ) ========== */

/* ========== 13. МОДАЛЬНЫЕ ОКНА ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 800px;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    transition: 0.3s;
}

.close:hover {
    color: var(--primary);
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.modal-content textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-content input[type="file"] {
    padding: 10px 0;
}

.modal-content .btn {
    width: 100%;
}
/* ========== МОДАЛЬНЫЕ ОКНА (КОНЕЦ) ========== */

/* ========== 14. ГАЛЕРЕЯ В МОДАЛЬНОМ ОКНЕ ========== */
.gallery-container {
    width: 100%;
}

.gallery-main {
    margin: 20px 0;
    text-align: center;
    position: relative;
}

.gallery-main img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    object-fit: contain;
    background: #f5f5f5;
}

.gallery-main-caption {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    text-align: center;
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 0 0 12px 12px;
}

.gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.thumbnail {
    position: relative;
    width: 80px;
    height: 80px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--primary);
    color: var(--secondary);
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: bold;
}

.product-info-modal {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.loading-spinner {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: var(--gray);
}
/* ========== МОДАЛЬНОЕ ОКНО АКЦИИ ========== */
.promo-modal .modal-content {
    max-width: 480px;
    text-align: center;
    border-radius: 30px;
    background: linear-gradient(135deg, #fff 0%, #fff8f0 100%);
    border: 2px solid var(--primary);
    padding: 40px 30px;
}

.promo-icon {
    font-size: 60px;
    color: var(--primary);
    margin-bottom: 15px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.promo-modal h2 {
    font-size: 28px;
    color: var(--secondary);
    margin-bottom: 10px;
}

.promo-date {
    font-size: 18px;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 20px;
}

.promo-price {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: baseline;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.old-price {
    font-size: 20px;
    color: var(--gray);
    text-decoration: line-through;
}

.new-price {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
    background: var(--secondary);
    padding: 5px 15px;
    border-radius: 40px;
    display: inline-block;
}

.promo-text {
    font-size: 18px;
    margin-bottom: 30px;
    color: var(--dark);
}

.promo-btn {
    background: var(--primary);
    color: var(--secondary);
    font-size: 18px;
    padding: 12px 30px;
    margin-right: 10px;
}

.promo-close-btn {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    font-size: 16px;
    padding: 12px 30px;
}

.promo-close-btn:hover {
    background: var(--secondary);
    color: white;
}

@media (max-width: 480px) {
    .promo-modal .modal-content {
        padding: 25px 20px;
    }
    .promo-modal h2 {
        font-size: 22px;
    }
    .new-price {
        font-size: 26px;
    }
    .promo-btn, .promo-close-btn {
        width: 100%;
        margin: 5px 0;
    }
}
/* ========== КОНЕЦ СТИЛИ АКЦИИ ========== */
/* ========== ГАЛЕРЕЯ (КОНЕЦ) ========== */

/* ========== 15. АДАПТИВНОСТЬ / МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 1100px) {
    .hero-form {
        width: 42%;
        margin-top: -3%;
        padding: 25px;
    }
    .hero-text h1 {
        font-size: 2.2rem;
    }
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-text {
        max-width: 100%;
        text-align: center;
    }
    .hero-benefits {
        text-align: left;
        display: inline-block;
        margin: 0 auto;
    }
    .hero-form {
        width: 90%;
        max-width: 450px;
        margin: 20px auto 0;
        margin-top: 0;
    }
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .stats {
        justify-content: center;
    }
    .nav-menu {
        display: none;
    }
    .burger-menu {
        display: flex;
    }
    .header-contacts {
        display: none;
    }
    .nav-menu.active {
        display: block;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .nav-menu.active ul {
        flex-direction: column;
        gap: 15px;
    }
    .cpo-wrapper {
        flex-direction: column;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 0;
        min-height: auto;
    }
    .hero-text h1 {
        font-size: 1.8rem;
    }
    .hero-form {
        width: 95%;
        padding: 20px;
    }
    .hero-form h3 {
        font-size: 1.2rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .catalog {
        padding: 50px 0;
    }
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .product-card img {
        height: 200px;
    }
    .portfolio {
        padding: 50px 0;
    }
    .portfolio-swiper .swiper-slide img {
        height: 250px;
    }
    .about {
        padding: 50px 0;
    }
    .about-content h2 {
        font-size: 1.6rem;
    }
    .stats {
        flex-direction: column;
        gap: 15px;
    }
    .cpo {
        padding: 50px 0;
    }
    .cpo-wrapper {
        padding: 20px;
    }
    .cpo-text h2 {
        font-size: 1.5rem;
    }
    .reviews {
        padding: 50px 0;
    }
    .swiper-slide {
        padding: 20px;
    }
    .footer {
        padding: 40px 0 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    .social-links {
        justify-content: center;
    }
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    .modal-large {
        width: 95%;
    }
    .floating-contacts {
        bottom: 15px;
        right: 15px;
        gap: 10px;
    }
    .floating-contacts a {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    .gallery-main img {
        max-height: 300px;
    }
    .gallery-main-caption {
        font-size: 10px;
        padding: 3px 8px;
    }
    .thumbnail-badge {
        font-size: 7px;
        padding: 1px 3px;
    }
    .price-total {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.5rem;
    }
    .hero-benefits li {
        font-size: 0.9rem;
    }
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    .product-title {
        font-size: 1.1rem;
    }
    .price-total {
        font-size: 1rem;
    }
}

/* ========== 16. ДОПОЛНИТЕЛЬНЫЕ УТИЛИТЫ ========== */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 30px;
}

img {
    max-width: 100%;
    height: auto;
}

/* Стили для скролла */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
/* Скелетон для загрузки карточек */
.product-card {
    background: var(--light);
}

.product-card img {
    background: #ddd;
    position: relative;
}

.product-card img:not([src]) {
    background: linear-gradient(90deg, #ddd 25%, #eee 50%, #ddd 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}