/* ==================== VARIABLES ==================== */
:root {
    --primary: #0a2e7a;
    --primary-light: #1a4fa0;
    --accent: #2563eb;
    --light-blue: #dbeafe;
    --lighter-blue: #eff6ff;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --white: #ffffff;
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ==================== GLOBAL ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--dark);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(10, 46, 122, 0.3);
}

.btn-outline-light {
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 500;
    border-width: 2px;
}

.btn-outline-light:hover {
    background-color: var(--white);
    color: var(--primary);
}

.btn-outline-dark {
    border-radius: 50px;
    padding: 10px 20px;
    border-width: 2px;
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ==================== HEADER ==================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.site-header .navbar {
    padding: 12px 0;
        display: flex;
    justify-content: space-between;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.2;
}

.brand-sub {
    font-size: 11px;
    color: var(--gray);
    line-height: 1.2;
}

.logo-img {
    height: 40px;
    width: auto;
}

.navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
    padding: 8px 16px;
    font-size: 15px;
}

.navbar-nav .nav-link:hover {
    color: var(--accent);
}

.btn-consultation {
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.btn-consultation:hover {
    background-color: var(--primary-light);
    color: var(--white);
}

/* ==================== HERO ==================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a3a6e 0%, #0a1628 50%, #1a3a6e 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5%, 5%); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 900"><defs><linearGradient id="g" x1="0%25" y1="0%25" x2="100%25" y2="100%25"><stop offset="0%25" style="stop-color:%231a3a6e;stop-opacity:0.9"/><stop offset="100%25" style="stop-color:%230a1628;stop-opacity:0.95"/></linearGradient></defs><rect fill="url(%23g)" width="1440" height="900"/></svg>');
    background-size: cover;
    opacity: 0.9;
}

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

.hero-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: contain;
}

.hero-title {
    font-size: 72px;
    font-weight: 300;
    color: var(--white);
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    line-height: 1.5;
}

.hero-buttons .btn {
    min-width: 200px;
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    animation: scrollBounce 2s infinite;
}

.scroll-down span {
    width: 4px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
    margin-top: 8px;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ==================== SECTIONS COMMON ==================== */
.section-label {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-title {
    font-size: 42px;
    font-weight: 300;
    color: var(--dark);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray);
    margin-top: 10px;
}

/* Decorative background pattern */
.advantages-section,
.team-section,
.stages-section,
.gallery-section,
.calculator-section {
    position: relative;
}

.advantages-section::before,
.team-section::before,
.stages-section::before,
.gallery-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    opacity: 0.4;
    background-image: url("/assets/img/bg_section.png");
    background-size: cover;
    pointer-events: none;
    z-index: -1;
}

/* ==================== ABOUT / STATS ==================== */
.about-section {
    padding: 100px 0;
    background: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-desc {
    font-size: 16px;
    color: var(--gray);
    margin-top: 8px;
}

.about-blue-block {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-radius: 0 20px 20px 0;
    position: relative;
    overflow: hidden;
}

.about-blue-block::after {
    content: '';
    position: absolute;
    right: -50px;
    bottom: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.about-blue-block h3 {
    font-weight: 400;
    font-size: 22px;
}

.about-blue-block p {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.9;
}

/* ==================== ADVANTAGES ==================== */
.advantages-section {
    padding: 100px 0;
    /* background: var(--white); */
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.advantage-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.advantage-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.advantage-icon i {
    font-size: 28px;
    color: var(--white);
}

.advantage-card h5 {
    font-size: 16px;
    font-weight: 500;
    color: var(--dark);
    margin: 0;
    line-height: 1.4;
}

/* ==================== TEAM ==================== */
.team-section {
    padding: 100px 0;
    /* background: var(--white); */
}

.team-photo {
    flex-shrink: 0;
}

.team-photo-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.team-photo-placeholder i {
    font-size: 36px;
    color: rgba(255, 255, 255, 0.7);
}

.team-member h5 {
    font-size: 18px;
    font-weight: 500;
    color: var(--dark);
}

/* ==================== MEDIATION ==================== */
.mediation-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--lighter-blue) 0%, var(--white) 100%);
    position: relative;
}

.mediation-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: var(--lighter-blue);
    clip-path: ellipse(80% 100% at 50% 0%);
}

.mediation-section .container {
    position: relative;
    z-index: 1;
}

.dispute-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dispute-tag {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.dispute-tag:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(10, 46, 122, 0.3);
}

/* ==================== STAGES ==================== */
.stages-section {
    padding: 100px 0;
    /* background: var(--white); */
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--light-blue);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 0;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    z-index: 1;
}

.timeline-content h4 {
    font-size: 20px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.education-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #0a1628 100%);
    border-radius: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.education-banner::after {
    content: '';
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

/* ==================== CASES ==================== */
.cases-section {
    padding: 100px 0;
    background: var(--white);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.case-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 20px;
    overflow: hidden;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    transition: transform 0.3s ease;
}

.case-card:hover {
    transform: translateY(-5px);
}

.case-card::before {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.case-card-body {
    padding: 30px;
    position: relative;
    z-index: 1;
}

.case-card-body h5 {
    color: var(--white);
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
}

.case-card-body p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 0;
}

/* ==================== JUDICIAL ==================== */
.judicial-section {
    padding: 100px 0;
    background: var(--white);
}

.judicial-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--primary);
    padding: 30px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.judicial-tags::after {
    content: '';
    position: absolute;
    right: -50px;
    bottom: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.judicial-tag {
    display: inline-block;
    background: transparent;
    color: var(--white);
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.judicial-tag:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
}

/* ==================== GALLERY ==================== */
.gallery-section {
    padding: 100px 0;
    /* background: var(--white); */
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-placeholder i {
    font-size: 48px;
    color: var(--gray);
    opacity: 0.3;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: var(--white);
}

.gallery-date {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.gallery-title {
    display: block;
    font-size: 16px;
    font-weight: 500;
}

/* Gallery Modal */
.gallery-main-image {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-placeholder-large {
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-placeholder-large i {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.3);
}

.gallery-thumbs {
    padding-bottom: 10px;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.gallery-thumb.active {
    border-color: var(--accent);
}

.gallery-placeholder-sm {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-placeholder-sm i {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.3);
}

/* ==================== CALCULATOR ==================== */
.calculator-section {
    padding: 100px 0;
    background: var(--lighter-blue);
    position: relative;
}

.calc-tabs {
    display: flex;
    gap: 12px;
}

.btn-calc-tab {
    border-radius: 50px;
    padding: 10px 28px;
    font-weight: 500;
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-calc-tab.active,
.btn-calc-tab:hover {
    background: var(--primary);
    color: var(--white);
}

.calc-form .form-label {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 6px;
}

.calc-form .form-select,
.calc-form .form-control {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 10px 16px;
    font-size: 15px;
}

.calc-form .form-range::-webkit-slider-thumb {
    background: var(--accent);
}

.calc-services {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.calc-service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
    font-size: 15px;
}

.calc-service-item .form-switch .form-check-input {
    width: 48px;
    height: 24px;
    cursor: pointer;
}

.calc-service-item .form-switch .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.calc-result {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 20px;
    padding: 40px;
    color: var(--white);
    position: sticky;
    top: 100px;
}

.calc-result-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    opacity: 0.8;
}

.calc-result-value {
    font-size: 20px;
    font-weight: 600;
    opacity: 1;
    white-space: nowrap;
}

.calc-result-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
}

.calc-total-value {
    font-size: 36px;
    font-weight: 700;
}

.calc-note {
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.5;
}

.calc-result .btn-light {
    border-radius: 50px;
    padding: 14px 32px;
    font-weight: 600;
    color: var(--primary);
}

.calc-result .btn-outline-light {
    border-radius: 50px;
    padding: 14px 32px;
    font-weight: 500;
}

/* ==================== CONTACTS ==================== */
.contacts-section {
    padding: 100px 0 60px;
    background: var(--white);
    position: relative;
}

.contacts-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: var(--light-blue);
    clip-path: ellipse(80% 100% at 50% 100%);
}

.contacts-section .container {
    position: relative;
    z-index: 1;
}

.contact-info p {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--dark);
}

.contact-info a {
    color: var(--dark);
}

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

.contact-buttons .btn-primary {
    color: var(--white);
}

.contact-buttons .btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--white);
}

.contact-buttons .btn-outline-dark:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.contact-address {
    font-weight: 500;
}

.map-placeholder {
    border-radius: 20px;
    overflow: hidden;
    min-height: 350px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-inner {
    text-align: center;
    color: var(--gray);
}

/* ==================== FOOTER ==================== */
.site-footer {
    padding: 30px 0;
    background: var(--light-blue);
}

.footer-link {
    color: var(--gray);
    font-size: 14px;
    text-decoration: underline;
}

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

/* ==================== MODALS ==================== */
.modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

.modal-header {
    padding: 24px 30px 0;
}

.modal-body {
    padding: 24px 30px 30px;
}

.modal-title {
    font-weight: 500;
    font-size: 24px;
}

#consultForm .form-control,
#consultForm .form-select {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
}

#consultForm .form-control:focus,
#consultForm .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Docs Modal */
.doc-item {
    transition: background 0.3s ease;
}

.doc-item:hover {
    background: var(--lighter-blue);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
    /* Fix horizontal overflow from decorative elements */
    .advantages-section,
    .team-section,
    .stages-section,
    .gallery-section,
    .calculator-section {
        overflow: hidden;
    }

    .site-header .navbar {
        flex-wrap: nowrap;
    }

    .navbar-toggler {
        border: none;
        padding: 8px;
        margin-left: auto;
        flex-shrink: 0;
    }

    .navbar-toggler:focus {
        box-shadow: none;
        outline: 2px solid var(--accent);
    }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .navbar-collapse .btn-consultation {
        margin-top: 16px;
        display: block;
        text-align: center;
    }

    .hero-title {
        font-size: 48px;
        letter-spacing: 4px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .section-title {
        font-size: 32px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-number {
        font-size: 36px;
    }

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

    .stats-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .calc-result {
        margin-top: 40px;
        position: static;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 36px;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-buttons .btn {
        min-width: auto;
        width: 100%;
        margin-bottom: 12px;
    }

    .section-title {
        font-size: 28px;
    }

    .stat-number {
        font-size: 32px;
    }

    .dispute-tags {
        justify-content: center;
    }

    .judicial-tags {
        justify-content: center;
    }

    /* Fix timeline on mobile */
    .timeline {
        padding-left: 30px;
    }

    .timeline::before {
        left: 9px;
    }

    .timeline-marker {
        left: -37px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    /* Ensure no overflow from decorative pseudo-elements */
    .about-blue-block::after,
    .education-banner::after,
    .judicial-tags::after {
        display: none;
    }
}
