/* 
    Interbel Infra - Design System & Styles
    Theme: Modern Dark/Light with National Identity
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Outfit:wght@400;700;900&display=swap');

/*
Theme Name: Iterbel Infra
Theme URI: https://iterbel.by
Author: McWest
Author URI: https://iterbel.by
Description: Custom WordPress theme for Iterbel Infra
Version: 1.0
Text Domain: iterbel
*/

:root {
    /* Color Palette */
    --bg-dark: #fcfaff;
    --bg-surface: #ffffff;
    --accent: #5e8f47;
    /* Bright Green from design */
    --accent-dark: #5e8f47;
    --accent-glow: rgba(94, 143, 71, 0.2);
    --header-bg: #141715;
    /* Almost black */
    --footer-bg: #111412;
    --dark-green: #111b15;
    /* Why Us section background */

    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);

    /* Layout & Animation */
    --nav-height: 120px;
    --transition: all 0.3s ease;
}

/* ==========================================================================
   2. BASE STYLES & RESET
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--header-bg);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.text-logo {
    display: flex;
    flex-direction: column;
    line-height: 0.9;
    text-decoration: none;
}

.logo-main {
    font-size: 48px;
    font-weight: 900;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
}

.logo-sub {
    font-size: 28px;
    font-weight: 700;
    color: #5e8f47;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 2px;
}

/* Visibility Helpers */
.mobile-only {
    display: none;
}

@media (max-width: 992px) {
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .logo-img-mobile {
        height: 60px;
        /* Adjust size for mobile header */
        width: auto;
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
    height: var(--nav-height);
}

.nav-menu ul {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-menu a:hover {
    color: var(--accent);
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-socials {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: var(--text-light);
    transition: var(--transition);
    background: transparent;
}

.social-icon i {
    color: var(--accent);
    font-size: 1.2rem;
}

.social-icon:hover {
    border-color: var(--accent);
    background: rgba(94, 143, 71, 0.1);
    transform: translateY(-2px);
}

.social-icon:hover i {
    color: var(--text-light);
}

/* ==========================================================================
   5. NATIONAL ORNAMENTS (RIBBONS)
   ========================================================================== */
.ribbon-menu {
    position: absolute;
    bottom: -15px;
    /* Sits right under the header */
    left: 0;
    width: 100%;
    height: 20px;
    background-image: url('Assets/ribbon_uniform_menu.png');
    background-repeat: repeat-x;
    background-size: auto 100%;
    z-index: 999;
}

.ribbon-divider {
    width: 100%;
    height: 30px;
    background-image: url('Assets/ribbon_uniform2.png');
    background-repeat: repeat-x;
    background-size: auto 100%;
    position: relative;
    z-index: 5;
    opacity: 1;
}

/* ==========================================================================
   6. MAIN LAYOUT
   ========================================================================== */
main {
    margin-top: var(--nav-height);
}

section {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.section-title {
    max-width: 600px;
}

.section-subtitle {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.section-subtitle::before {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--accent);
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
}

/* ==========================================================================
   7. HERO & INNER HERO SECTIONS
   ========================================================================== */
.inner-hero {
    padding: 150px 5% 100px;
    background: var(--header-bg);
    color: var(--text-light);
    text-align: center;
    position: relative;
}



.inner-hero h1 {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.inner-hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: calc(100vh - var(--nav-height));
    width: 100%;
    display: flex;
    align-items: center;
    padding: 120px 5% 80px;
    background-size: cover;
    background-position: center -30%;
    background-attachment: fixed;
    max-width: 100%;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark gradient overlay fading to the right */
    background: linear-gradient(90deg, rgba(10, 15, 12, 0.95) 0%, rgba(10, 15, 12, 0.8) 40%, rgba(10, 15, 12, 0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    margin-left: 0;
    /* Align left */
}

.hero h1 {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.hero h1 span {
    color: var(--accent);
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 3rem;
}

.hero-btns {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.h-stat {
    display: flex;
    align-items: center;
    gap: 15px;
}

.h-stat i {
    font-size: 1.5rem;
    color: var(--accent);
}

.h-stat span {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 150px;
}

/* ==========================================================================
   8. COMPONENTS (BUTTONS)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-light);
}

.btn-outline-dark {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.btn-outline-dark:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================================================
   9. SERVICES SECTION
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-card {
    position: relative;
    height: 380px;
    border-radius: 8px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 15, 12, 0.9) 0%, rgba(10, 15, 12, 0.4) 50%, rgba(10, 15, 12, 0) 100%);
    z-index: 1;
    transition: var(--transition);
}

.service-card:hover::before {
    background: linear-gradient(to top, rgba(10, 15, 12, 0.95) 0%, rgba(10, 15, 12, 0.6) 60%, rgba(10, 15, 12, 0.2) 100%);
}

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

.sc-content {
    position: relative;
    z-index: 2;
}

.sc-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card:hover .sc-icon {
    background: var(--accent);
    border-color: var(--accent);
}

.sc-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.sc-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.5;
}

.sc-arrow {
    position: absolute;
    bottom: 30px;
    right: 30px;
    color: var(--accent);
    font-size: 1.2rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
    z-index: 2;
}

.service-card:hover .sc-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   10. WHY US SECTION (STATS)
   ========================================================================== */
.why-section {
    background: var(--dark-green);
    color: var(--text-light);
    max-width: 100%;
}

.why-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
    padding: 80px 5%;
}

.why-left h2 {
    font-size: 2.5rem;
    line-height: 1.2;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 40px;
}

.stat-item i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   11. PROJECTS (BEFORE/AFTER SLIDERS)
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.ba-slider {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    cursor: ew-resize;
}

.ba-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.ba-before {
    z-index: 1;
}

.ba-after {
    z-index: 2;
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #fff;
    z-index: 3;
    transform: translateX(-50%);
    pointer-events: none;
}

.ba-handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.ba-handle-circle i {
    font-size: 0.8rem;
}

.ba-label {
    position: absolute;
    top: 15px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.7rem;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 4;
    pointer-events: none;
}

.ba-label.left {
    left: 15px;
}

.ba-label.right {
    right: 15px;
}

.ba-caption {
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.projects-action {
    text-align: center;
}

/* ==========================================================================
   12. FOOTER
   ========================================================================== */
footer {
    background: var(--footer-bg);
    padding: 80px 5%;
    max-width: 100%;
    color: var(--text-light);
}

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

.footer-logo img {
    height: 60px;
    margin-bottom: 20px;
}

.footer-logo p {
    color: var(--text-muted);
}

.footer-info h4 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.footer-info p,
.footer-info a {
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
}

.footer-info a:hover {
    color: var(--accent);
}

/* ==========================================================================
   13. RESPONSIVE DESIGN
   ========================================================================== */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 4rem;
    }
}

@media (min-width: 2000px) {
    .hero {
        background-position: center 10%;
    }
}

@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--header-bg);
        padding: 100px 30px;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: block;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 2rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-content {
        padding: 0 20px;
        /* Side padding for logo and menu */
    }

    .contact-header {
        display: flex;
        gap: 10px;
    }

    .social-icon {
        width: 35px;
        height: 35px;
    }

    .social-icon i {
        font-size: 1rem;
    }

    .why-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .why-grid {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 30px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        background-position: 65% 20%;
        /* Сдвиг картинки для мобильных (измените % по вкусу) */
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    /* Lock before/after sliders in the middle on mobile */
    .ba-slider {
        pointer-events: none;
        /* Disable dragging */
    }

    .ba-after {
        clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%) !important;
    }

    .ba-handle,
    .ba-handle-circle {
        left: 50% !important;
    }
}