/* ======================================================= */
/* HEADER */
/* ======================================================= */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --primary-green: #2d5a27;
    --light-green: #eef5ee;
    --salad-green: #eeffa0;
    --cta-hover: #1f3f1b;
}

.main-header {
    background-color: var(--salad-green);
    border-bottom: 2px solid rgba(0,0,0,0.05);
    min-height: 80px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0;
}

.navbar {
    padding: 0;
    width: 100%;
}

.logo-text {
    font-size: 1.5rem;
    color: var(--primary-green) !important;
}

.nav-item, .menu-item  {
    display: block;
    margin: 0.5rem 1rem;
}

.nav-link {
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    color: var(--primary-green);
    display: inline;
}

.nav-link::after{
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    display: block;
    margin-top: 2px;
    right: 0;
    background: var(--primary-green);
    transition: width 0.3s ease;
    -webkit-transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-green);
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
    background: var(--primary-green);
}


.btn-success {
    background-color: var(--primary-green);
    border-color: none;
}

.btn-success:hover {
    background-color: var(--primary-green);
    border-color: none;
}

/* Для мобилок */
@media (max-width: 991px) {
    .navbar-collapse {
        padding: 1rem 0;
    }
}

/* ======================================================= */
/* MAIN PAGE */
/* ======================================================= */
.hero-section {
    height: calc(100vh - 80px);
    width: 100%;
}

#heroBackground .carousel-item {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 2.5s ease-in-out;
}

#heroBackground .carousel-item::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%); */
    background-color: rgba(0, 0, 0, 0.7); 
    z-index: 1;
}

.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.text-accent {
    color: var(--salad-green);
}

.hero-badge {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(45, 90, 39, 0.3);
    border: 1px solid var(--salad-green);
    border-radius: 50px;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-success {
    background-color: var(--primary-green) !important;
    border: none;
}

.btn-success:hover {
    background-color: #1e3d1a !important;
    transform: translateY(-3px);
    transition: all 0.3s ease;
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition-duration: 2500ms;
    transition-property: opacity;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

.carousel-item {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.text-salad {
    color: #98fb98;
}

.about-short {
    background-color: #fcfdfb;
}

.about-short h2 {
    color: #2D5A27;
}

.about-short p {
    font-size: 1.2rem;
    max-width: 850px;
    margin: 0 auto;
}

.tracking-wider {
    letter-spacing: 2px;
    font-size: 0.85rem;
}

/* Блок преимущества */
.adv-card-wrapper {
    position: relative;
    padding-top: 50px;
}

.adv-bg-box {
    background-color: #F4F7F0;
    border-radius: 30px;
    min-height: 250px;
    position: relative;
    margin-left: 100px;
}

.bg-light-sage {
    background-color: #E2E8D8;
}

.adv-overlap-img {
    position: absolute;
    top: -50px;
    left: -100px;
    width: 400px;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.20), 
                0 25px 35px rgba(0, 0, 0, 0.3);
    z-index: 3;
}

.adv-overlap-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.adv-card-wrapper:hover .adv-overlap-img img {
    transform: scale(1.05);
}

.adv-overlap-img {
    position: absolute;
    top: -40px;
    left: -120px;
    width: 450px;
    height: 350px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 
                0 15px 35px rgba(0, 0, 0, 0.45);
    z-index: 3;
}

.adv-overlap-img img {
    object-fit: cover;
    transition: transform 0.5s ease;
}

.adv-card-wrapper:hover .adv-overlap-img img {
    transform: scale(1.05);
}

.adv-reverse .adv-bg-box {
    margin-left: 0;
    margin-right: 120px;
}

.adv-reverse .adv-overlap-img {
    left: auto;
    right: -120px;
}

.check-projects {
    margin-top: 75px;
}

@media (max-width: 991px) {
    .adv-bg-box {
        margin-left: 0;
        margin-top: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 0;
    }

    .adv-card-wrapper {
        position: relative;
        padding-top: 20px;
    }

    .adv-overlap-img {
        position: relative;
        top: -40px;
        left: 0;
        width: 80% !important;
        height: 220px;
        margin: 0 auto;
        border-radius: 20px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        z-index: 5;
    }

    .adv-text-content {
        width: 100%;
        text-align: center;
        padding: 0 20px 30px 20px !important;
    }
    
    .adv-bg-box .row {
        width: 100%;
    }

    .adv-reverse .adv-bg-box {
        margin-right: 0;
        margin-top: 60px;
    }

    .adv-reverse .adv-overlap-img {
        right: 0;
        margin: 0 auto;
        top: -40px;
        position: relative;
    }
    
    .adv-overlap-img {
        width: 80% !important;
    }

    .check-projects {
        margin-top: 50px;
    }
}

/* Блок услуги */
.services-section {
    background-color: #fcfdfb;
}

.service-card {
    background: #ffffff;
    border-radius: 20px;
    transition: all 0.4s ease;
    border: 1px solid rgba(45, 90, 39, 0.05) !important;
}

.service-card:hover {
    transform: translateY(-10px);
    background-color: #E2E8D8;
    box-shadow: 0 15px 30px rgba(45, 90, 39, 0.1) !important;
}

.service-icon {
    font-size: 2.5rem;
    color: #2D5A27;
    background: #F4F7F0;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    transition: background 0.4s ease;
}

.service-card:hover .service-icon {
    background: #ffffff;
}

.service-card h4 {
    color: #2D5A27;
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.tracking-wider {
    letter-spacing: 2px;
    font-size: 0.85rem;
}

/* блок FAQ */
.faq-section .accordion-item {
    border: 1px solid rgba(45, 90, 39, 0.1) !important;
    background-color: #ffffff;
}

.faq-section .accordion-button {
    color: #2D5A27;
    background-color: #ffffff;
    box-shadow: none !important;
    padding: 20px;
}

.faq-section .accordion-button:not(.collapsed) {
    color: #2D5A27;
    background-color: #F4F7F0;
}

.faq-section .accordion-button::after {
    content: '+';
    background-image: none;
    font-size: 1.5rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: none;
    transition: transform 0.3s ease;
}

.faq-section .accordion-button:not(.collapsed)::after {
    content: '−';
    background-image: none;
    transform: rotate(0deg);
}

.faq-section .accordion-body {
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ======================================================= */
/* SERVICES PAGE */
/* ======================================================= */
/* Пакетні картки */
.package-card {
    background: #fdfdfd;
    border: 1px solid rgba(45, 90, 39, 0.05) !important;
    transition: all 0.3s ease;
}

.package-card:hover {
    background: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05) !important;
}

.icon-circle {
    width: 50px;
    height: 50px;
    background: #F4F7F0;
    color: #2D5A27;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Процес (сходинки) */
.process-steps {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

/* Лінія, що з'єднує цифри */
.process-steps::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 10px;
    bottom: 50px;
    width: 2px;
    background: #E2E8D8;
    z-index: 1;
}

.step-number {
    width: 42px;
    height: 42px;
    background: #2D5A27;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    z-index: 2;
    position: relative;
}

.step-item {
    position: relative;
}

.btn-outline-success {
    border: var(--primary-green) 1px solid !important;
}

.btn-outline-success:hover {
    background-color: var(--primary-green) !important;
}

/* Адаптивність для процесу */
@media (max-width: 768px) {
    .process-steps::before {
        display: none;
    }
    .step-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .step-content {
        margin-left: 0 !important;
        margin-top: 15px;
    }
}

/* ======================================================= */
/* ABOUT PAGE */
/* ======================================================= */
/* Hero для About */
.about-hero {
    min-height: 400px;
    display: flex;
    align-items: center;
}

/* Історія */
.story-text p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Команда */
.team-img-wrapper {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #F4F7F0;
    transition: transform 0.3s ease;
    isolation: isolate; /* Створює новий контекст накладання */
    mask-image: radial-gradient(white, black);
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* Фікс для заокруглення в Safari */
    transform: translateZ(0);
}

.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0); /* Примусово включає апаратне прискорення */
    image-rendering: -webkit-optimize-contrast; /* Покращує чіткість у Safari */
}

.team-card:hover .team-img-wrapper {
    transform: scale(1.05);
    border-color: #2D5A27;
}

.team-card h4 {
    color: #1A3317;
}

/* Переваги */
.benefits-simple i {
    font-size: 2.5rem;
    opacity: 0.8;
}

.benefits-simple h5 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Адаптивність */
@media (max-width: 768px) {
    .about-hero h1 { font-size: 2.5rem; }
    .team-img-wrapper { width: 160px; height: 160px; }
}

/* ======================================================= */
/* CONACTS PAGE */
/* ======================================================= */
.map-container {
    position: relative;
    line-height: 0; /* Прибирає мікро-відступ знизу */
    border: 1px solid rgba(45, 90, 39, 0.1);
    transition: transform 0.3s ease;
}

.map-container:hover {
    transform: translateY(-5px); /* Легкий ефект підняття, як у ваших карток послуг */
}

.map-container iframe {
    filter: grayscale(0.2) contrast(1.1);
    display: block;
}

/* Адаптивність для мобільних */
@media (max-width: 768px) {
    .map-container iframe {
        height: 300px; /* Зменшуємо висоту на телефонах */
    }
}

/* ======================================================= */
/* PORTFOLIO PAGE */
/* ======================================================= */
.project-detailed-card {
    transition: all 0.3s ease;
}

.project-img-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-text {
    color: #bbb;
    font-size: 0.9rem;
    padding: 20px;
    text-align: center;
}

.img-label {
    position: absolute;
    top: 20px;
    left: 20px;
    background: white;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.list-materials li {
    padding: 5px 0;
    color: #555;
}

.video-card {
    transition: transform 0.3s ease;
    max-width: 900px;
    margin: 0 auto;
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #000;
}

.video-card:hover {
    transform: translateY(-5px);
}

.gallery-tile {
    position: relative;
    height: 400px; /* Фиксированная высота для создания ритма */
    cursor: pointer;
}

.gallery-tile img {
    transition: transform 0.7s cubic-bezier(0.2, 1, 0.3, 1);
}

.gallery-link:hover .gallery-tile img {
    transform: scale(1.08);
}

/* Оверлей при наведении */
.tile-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(45, 90, 39, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-link:hover .tile-overlay {
    opacity: 1;
}

.view-btn {
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* Адаптивность */
@media (max-width: 992px) {
    .gallery-tile { height: 300px; }
}
@media (max-width: 576px) {
    .gallery-tile { height: 250px; }
}

@media (max-width: 768px) {
    .gallery-img-wrapper {
        height: 250px !important;
    }
}

@media (max-width: 768px) {
    .portfolio-video .display-5 {
        font-size: 2rem;
    }
}

/* Адаптивність */
@media (max-width: 991px) {
    .project-img-wrapper {
        height: 300px !important;
    }
    .project-detailed-card .text-lg-end {
        text-align: left !important;
    }
}

@media (max-width: 576px) {
    .project-img-wrapper {
        height: 200px !important;
    }
    .img-label {
        top: 10px;
        left: 10px;
        font-size: 0.65rem;
    }
}

/* ======================================================= */
/* FOOTER */
/* ======================================================= */
.footer-section {
    background-color: var(--cta-hover);
    color: #e9ecef;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

.footer-section h5 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer-menu {
    padding: 0;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-menu li a:hover {
    color: #ffffff;
    padding-left: 8px;
}

.footer-section .text-secondary {
    color: rgba(255, 255, 255, 0.4) !important;
}

@media (max-width: 767px) {
    .footer-section {
        text-align: center;
    }
    
    .footer-menu li a:hover {
        padding-left: 0;
    }
}


/* ======================================================= */
/* Шаблон для политик */
/* ======================================================= */
.policy-page {
    background-color: #ffffff;
}

.policy_link {
    color: var(--primary-green) !important;
}

.policy-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.policy-content h3 {
    margin-top: 2rem;
    position: relative;
    padding-bottom: 5px;
}

.policy-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #2D5A27;
}

.policy-content p {
    margin-bottom: 1.5rem;
}

.policy-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.2rem;
}

.policy-content li {
    margin-bottom: 0.5rem;
    list-style-type: none;
    position: relative;
}

.policy-content li::before {
    content: "•";
    color: #2D5A27;
    font-weight: bold;
    display: inline-block; 
    width: 1em;
    margin-left: -1em;
}

.form-label-modal {
    color: #2D5A27;
}

/* Адаптивність */
@media (max-width: 992px) {
    .auth-buttons {
        margin-top: 20px;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .policy-page {
        padding-top: 2rem !important;
    }
    .policy-header h1 {
        font-size: 2rem;
    }
    .policy-content {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    #welcomePdfModal .modal-dialog {
        margin: 0;
    }
    #welcomePdfModal .modal-content {
        height: 100vh;
        border-radius: 0;
    }
    .pdf-container {
        height: 85vh !important;
    }
}