/* public/css/style.css  */

:root {
    --dark: #0f1217;          /* очень темный, почти черный */
    --dark-rgb: 15, 18, 23;   
    --primary: #8b1e1e;        /* глубокий бордовый */
    --primary-dark: #6d1717;   /* еще темнее для hover */
    --accent: #f39c12;         /* яркий оранжевый (контраст) */
    --accent-dark: #d68910;    /* темнее для hover */
    --light: #f8f9fa;          
    --text-light: #ffffff;     
    --text-dark: #0f1217;      
    --overlay: rgba(0, 0, 0, 0.3);
    --border-light: rgba(230, 57, 70, 0.3);
}

/* Сброс отступов */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Общие стили */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Полупрозрачный слой */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay);
    z-index: -1;
}

/* ===== ХЕДЕР ===== */
header {
    background: rgba(var(--dark-rgb), 0.95);
    color: var(--text-light);
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

/* Логотип */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

.logo img {
    height: 100%;
    width: auto;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.logo:hover img {
    transform: scale(1.02);
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    border-left: 2px solid var(--primary);
    padding-left: 15px;
}

.logo-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Навигация */
.nav {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 100%;
}

.nav a {
    color: var(--text-light);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
    font-size: 1.1rem;
    white-space: nowrap;
}

.nav a:hover {
    background: var(--primary);
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
main {
    flex: 1;
    width: 100%;
    margin: 0;  
    padding: 0; 
}

.content {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
}

h1 {
    color: var(--dark);
    margin-bottom: 20px;
    font-size: 2.5rem;
    border-left: 5px solid var(--accent);
    padding-left: 15px;
}

p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* Кнопки */
.button {
    background: var(--primary);
    color: var(--text-light);
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.button:hover {
    background: var(--primary-dark);
}

.button-primary {
    background: var(--primary);
}

.button-primary:hover {
    background: var(--primary-dark);
}

/* ===== ФУТЕР ===== */
footer {
    background: rgba(var(--dark-rgb), 0.95);
    color: var(--text-light);
    padding: 30px 0 20px;
    margin-top: auto;
    backdrop-filter: blur(5px);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--primary);
}

.footer-section p, .footer-section a {
    color: var(--text-light);
    text-decoration: none;
    line-height: 1.8;
    opacity: 0.9;
}

.footer-section a:hover {
    color: var(--primary);
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
    border-top: 2px solid var(--primary);
    background: rgba(0, 0, 0, 0.3); /* затемнение */
    color: #ffffff;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    backdrop-filter: blur(2px);
}

.footer-bottom p {
    color: #ffffff;
    opacity: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
    .header-content {
        padding: 0 15px;
    }
    
    .nav a {
        padding: 6px 12px;
        font-size: 1rem;
    }
}


@media (max-width: 480px) {
    .logo-wrapper {
        gap: 10px;
    }
    
    .logo-text {
        padding-left: 10px;
    }
    
    .logo-title {
        font-size: 1rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
    }
}

/* ===== HERO SECTION ===== */
.hero {
    text-align: left;
    padding: 5% 5% 5% 11%;  /* левый отступ всего 2% */
    max-width: none;  
    margin: 0;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    border-left: 5px solid #ffffff;  /* ← белая полоса */
    padding-left: 25px;
    margin-left: 0;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: #ffffff;
    font-weight: 300;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
    max-width: 700px;
    margin-left: 30px;
    padding-left: 5px;
}

/*  footer с часами */
.footer-section .hours {
    font-size: 1rem;
    color: var(--text-light);
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed rgba(139, 30, 30, 0.3);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.hours-label {
    color: var(--primary);
    font-weight: 500;
    margin-right: 5px;
}

.footer-section .hours::before {
    content: "";
    font-size: 1.1rem;
    margin-right: 5px;
    color: var(--primary);
}

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* старый content блок 
.content {
    display: none;
}*/

/* Адаптивность для hero */
@media (max-width: 1024px) {
    .hero {
        padding-left: 5%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
}

/* ===== КНОПКА СВЯЗИ И ПОПАП ===== */
.contact-button-container {
    position: relative;
    margin-left: 20px;
}

.contact-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.contact-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(139, 30, 30, 0.3);
}

.phone-icon {
    width: 18px;
    height: 18px;
}

/* Затемнение фона */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 999999 !important;
}

.popup-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all;
}

/* Попап */
.contact-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000000 !important;
}

.contact-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.popup-header h3 {
    margin: 0;
    color: var(--dark);
    font-size: 1.3rem;
}

.close-popup {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-popup:hover {
    background: #f0f0f0;
    color: var(--primary);
}

.popup-content {
    padding: 20px;
}

.popup-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    text-decoration: none;
    color: var(--text-dark) !important;
    border-radius: 8px;
    transition: background 0.2s;
    margin-bottom: 5px;
}

.popup-item:hover {
    background: #f5f5f5;
}

.popup-icon {
    width: 24px !important;;
    height: 24px !important;;
    color: var(--primary) !important;
}

.popup-item svg {
    fill: currentColor !important;
}
.popup-text {
    display: flex;
    flex-direction: column;
}

.popup-text strong {
    font-size: 1rem;
    color: var(--dark);
}

.popup-text small {
    font-size: 0.8rem;
    color: #666;
}


@media (max-width: 600px) {
    /* Хедер */
    .header-content {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
        justify-content: center;
    }
    
    .logo-wrapper {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .logo img {
        max-height: 50px;
        width: auto;
    }
    
    .logo-title {
        font-size: 1.1rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
    }
    
    /* Навигация -  прокручиваемая */
    .nav {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding: 5px 0;
        margin: 5px 0;
    }
    
    .nav a {
        font-size: 0.9rem;
        padding: 6px 10px;
        white-space: nowrap;
    }
    
    /* Кнопка связи */
    .contact-button-container {
        margin: 5px 0;
    }
    
    .contact-button {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* hero секция */
    .hero {
        padding: 30px 15px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        padding-left: 15px;
        border-left-width: 3px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-left: 10px;
    }
    
    /* Основной контент */
    main {
        padding: 0 10px;
    }
    
    .content, .services-content, .contact-content {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    /* Футер */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-bottom p {
        font-size: 0.7rem;
        padding: 0 10px;
    }
    
    /* Попап на мобильных */
    .contact-popup {
        width: 95%;
        max-width: none;
    }
    
    .popup-item {
        padding: 15px 10px;
    }
    
    .popup-icon {
        width: 28px !important;
        height: 28px !important;
    }
}

/* Галерея проектов */
.gallery {
    margin: 40px 0;
}
.gallery h2 {
    border-left: 5px solid var(--primary);
    padding-left: 15px;
    margin-bottom: 20px;
    color: var(--dark);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}
.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.gallery-item:hover {
    transform: scale(1.02);
}
.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    .gallery-item img {
        height: 140px;
    }
}

/* Lightbox для галереи */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}
.lightbox-overlay.active {
    visibility: visible;
    opacity: 1;
}
.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: default;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
    background: none;
    border: none;
    z-index: 100001;
}
.lightbox-close:hover {
    color: var(--primary);
}

/* Dropdown меню в навигации */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: transparent;
    color: var(--text-light);
    padding: 8px 15px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: normal;
    transition: background 0.3s;
    border-radius: 4px;
}

.dropbtn:hover {
    background: var(--primary);
}

.dropbtn[data-active="true"] {
    background: var(--primary);
}

.arrow {
    font-size: 0.8rem;
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.2s;
}

.dropdown:hover .arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(var(--dark-rgb), 0.95);
    backdrop-filter: blur(8px);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 8px;
    overflow: hidden;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: var(--text-light);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 0.95rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: var(--primary);
}

.dropdown:hover .dropdown-content {
    display: block;
}



/* ===== Сетка услуг (для страниц услуг и главной) ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.service-card {
    display: block;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-dark);
    border: 1px solid rgba(139, 30, 30, 0.2);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--primary);
}

.service-image {
    width: 100%;
    height: 180px;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    border-bottom: 3px solid var(--primary);
}

.service-title {
    padding: 15px;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark);
    background: white;
}



.hero-features {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 500px;
}
.hero-feature {
    font-size: 1.2rem;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.4);
    display: inline-block;
    padding: 6px 15px;
    border-radius: 30px;
    backdrop-filter: blur(2px);
    width: fit-content;
}

@media (max-width: 768px) {
    /* ===== Хедер и логотип ===== */
    .header-content {
        padding: 8px 15px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .logo-wrapper {
        width: 100%;
        justify-content: center;
        padding: 5px 0;
        gap: 8px;
    }
    .logo img {
        max-height: 40px;
    }
    .logo-text {
        border-left: 2px solid var(--primary);
        padding-left: 8px;
    }
    .logo-title {
        font-size: 1rem;
        line-height: 1.2;
    }
    .logo-subtitle {
        font-size: 0.7rem;
    }
    
    /* ===== Навигация и выпадайка ===== */
    .nav {
        gap: 4px;
        justify-content: center;
        margin: 5px 0;
    }
    .nav a, .dropbtn {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    .dropdown-content {
        display: none;  /* изначально скрыто, показывается JS */
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: auto;
        max-height: 70vh;
        overflow-y: auto;
        width: 100%;
        border-radius: 0;
        background-color: rgba(var(--dark-rgb), 0.98);
        box-shadow: 0 8px 16px rgba(0,0,0,0.3);
        margin-top: 10px;
        z-index: 10000;
    }
    /* Убеждаемся, что хедер не обрезает содержимое */
    header, .header-content, nav, .dropdown {
        overflow: visible;
    }
    .dropdown {
        position: static;
    }
    
    /* ===== Кнопка Contact Us ===== */
    .contact-button .button-text {
        display: inline-block;   /* none -скрываем текст, оставляем иконку */
    }
    .contact-button {
        padding: 8px 12px;
        border-radius: 30px;
        font-size: 0.9rem;
    }
    .contact-button-container {
        margin-left: 0;
    }
    
    /* ===== Hero секция ===== */
    .hero {
        text-align: center;
        padding: 40px 20px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
        margin: 0 auto;
    }
    .hero-feature {
        font-size: 0.9rem;
        padding: 4px 10px;
    }
    
    /* ===== Сетка услуг ===== */
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    .service-image {
        height: 150px;
    }
}