/* =====================================================
   ВЛ 110кВ Новотроицкая-Город-2 — Дизайн-система v3.0
   Style: Abstract Technology (Neon Cyan + Violet)
   Generated by: UI UX Pro Max
   ===================================================== */

:root {
    /* Color Palette - Abstract Technology */
    --color-primary: #06B6D4;
    /* Cyan Neon */
    --color-secondary: #8B5CF6;
    /* Electric Violet */
    --color-accent: #22D3EE;
    /* Bright Cyan */
    --color-cta: #06B6D4;
    /* Call to Action */
    --color-background: #030712;
    /* Deep Space Black */
    --color-bg-secondary: #0F172A;
    /* Slate 900 */
    --color-text: #F8FAFC;
    /* Slate 50 */
    --color-text-secondary: #CBD5E1;
    /* Slate 300 */
    --color-text-muted: #64748B;
    /* Slate 500 */

    /* Gradient Colors */
    --gradient-primary: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 100%);
    --gradient-glow: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    --gradient-dark: linear-gradient(180deg, #030712 0%, #0F172A 100%);

    /* Backgrounds */
    --bg-card: rgba(15, 23, 42, 0.6);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --bg-overlay: rgba(3, 7, 18, 0.8);

    /* Spacing Variables */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Shadow Depths */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 30px rgba(6, 182, 212, 0.3);
    --shadow-glow-violet: 0 0 30px rgba(139, 92, 246, 0.3);

    /* Glass Effect */
    --glass-border: 1px solid rgba(100, 116, 139, 0.2);
    --glass-border-hover: 1px solid rgba(6, 182, 212, 0.4);
    --glass-backdrop: blur(20px);

    /* Typography */
    --font-main: 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fluid: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated Background */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: var(--color-background);
    overflow: hidden;
}

.bg-gradient::before,
.bg-gradient::after {
    content: '';
    position: absolute;
    width: 70vw;
    height: 70vh;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: drift 25s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-gradient::before {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.4), transparent 70%);
    top: -20%;
    left: -20%;
    animation-delay: -8s;
}

.bg-gradient::after {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4), transparent 70%);
    bottom: -20%;
    right: -20%;
    animation-delay: 0s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(15%, 10%) scale(1.15) rotate(5deg);
    }

    66% {
        transform: translate(-10%, 20%) scale(0.95) rotate(-5deg);
    }

    100% {
        transform: translate(-15%, -15%) scale(1.05) rotate(3deg);
    }
}

/* ===== LAYOUT & GRID ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--space-3xl) 0;
}

/* Masonry / Grid System */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-masonry {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: minmax(100px, auto);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ===== LIQUID GLASS CARDS ===== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-fluid);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
    z-index: 0;
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border: var(--glass-border-hover);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.glass-card:hover::before {
    transform: translateX(100%);
}

.glass-liquid {
    /* Special Morphing Effect for features */
    border-radius: var(--radius-lg);
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text);
}

h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
}

p {
    margin: 0 0 1rem;
    color: var(--color-text-muted);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    background: rgba(12, 10, 9, 0.85);
    /* Dark background */
    backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

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

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    /* More squared for industrial feel */
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(202, 138, 4, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(202, 138, 4, 0.4);
    filter: brightness(110%);
}

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

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

/* ===== HERO SECTION ===== */
.hero {
    min-height: 90vh;
    /* Slightly less than full height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1000px;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(202, 138, 4, 0.1);
    border: 1px solid rgba(202, 138, 4, 0.3);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--color-primary);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

/* ===== STATS ===== */
.stat-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===== TABLES ===== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.02);
}

td {
    color: var(--color-text-muted);
}

/* ===== ANIMATIONS ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* ===== FOOTER ===== */
.footer {
    padding: 4rem 0;
    text-align: center;
    border-top: var(--glass-border);
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 4rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .section {
        padding: var(--space-xl) 0;
    }

    .hero {
        padding: 4rem 1rem;
    }

    /* Mobile Menu Button */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }

    .mobile-menu-btn span {
        width: 100%;
        height: 3px;
        background-color: var(--color-text);
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    /* Hamburger Animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Mobile Nav Overlay */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 70%;
        max-width: 300px;
        background: rgba(12, 10, 9, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        border-left: var(--glass-border);
    }

    .nav-links.active {
        transform: translateX(0);
        display: flex;
        /* Ensure it overrides display:none if set elsewhere */
    }

    .nav-links a {
        font-size: 1.25rem;
        color: var(--color-text);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 2.5rem;
    }

    h1 {
        font-size: 2.5rem;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}


/* ===== GALLERY & LIGHTBOX ===== */
.filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(202, 138, 4, 0.2);
    border-color: var(--color-primary);
    color: #fff;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: 0.2s;
}

.lightbox-close:hover {
    background: rgba(239, 68, 68, 0.5);
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 0.9rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: 0.2s;
}

/* Docs Grid */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.doc-card:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ===== UTILITIES & LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0C0A09;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Smooth Focus */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===== CIRCUIT SELECTOR (TABS) ===== */
.circuit-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    margin-bottom: var(--space-xl);
    position: relative;
}

.circuit-selector::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 10, 9, 0.9) 0%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

.circuit-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1.25rem 2rem;
    min-width: 180px;
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.circuit-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.circuit-tab:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.circuit-tab.active {
    background: rgba(202, 138, 4, 0.15);
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(202, 138, 4, 0.2);
}

.circuit-tab.active::before {
    transform: scaleX(1);
}

.tab-icon {
    font-size: 1.5rem;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.circuit-tab.active .tab-icon,
.circuit-tab:hover .tab-icon {
    opacity: 1;
}

.tab-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.tab-subtitle {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.circuit-tab.active .tab-title {
    color: var(--color-primary);
}

/* Circuit Info Banner */
.circuit-info-banner {
    background: linear-gradient(135deg, rgba(202, 138, 4, 0.1) 0%, rgba(68, 64, 60, 0.1) 100%);
    border: 1px solid rgba(202, 138, 4, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.circuit-info-banner .circuit-name {
    font-size: 0.9rem;
    color: var(--color-text);
    flex: 1;
    min-width: 200px;
}

.circuit-info-banner .circuit-route {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.circuit-info-banner .route-arrow {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .circuit-selector {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.75rem;
    }

    .circuit-tab {
        min-width: unset;
        flex-direction: row;
        justify-content: flex-start;
        padding: 1rem 1.25rem;
        gap: 1rem;
    }

    .circuit-tab::before {
        width: 3px;
        height: 100%;
        top: 0;
        left: 0;
        right: unset;
        transform: scaleY(0);
    }

    .circuit-tab.active::before {
        transform: scaleY(1);
    }

    .tab-icon {
        font-size: 1.25rem;
    }

    .circuit-info-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}