:root {
    --primary-color: #201e1c;
    --secondary-color: #e07a29;
    --background-color: #f7f3ee;
    --text-color: #000;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    font-size: 17px;
    line-height: 1.6;
}

header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 0 rgba(0,0,0,0);
    transition: box-shadow 0.45s ease, padding 0.45s ease;
}

header.scrolled {
    padding: 12px 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

header nav a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    font-weight: bold;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.35s ease, border-color 0.35s ease;
}

header nav a:hover {
    color: var(--secondary-color);
}

header nav a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

.logo {
    font-size: 22px;
    font-weight: bold;
    transition: color 0.4s ease;
}

.logo:hover {
    color: var(--secondary-color);
}

.hero {
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.55)), url('../images/legal.avif') center/cover no-repeat;
    padding: 120px 20px;
    text-align: center;
    color: white;
    background-color: var(--primary-color);
    overflow: hidden;
}

.hero h1,
.hero p,
.hero .btn {
    opacity: 0;
    transform: translateY(24px);
    animation: hero-in 1.3s ease forwards;
}

.hero h1 { font-size: 48px; margin-bottom: 10px; animation-delay: 0.15s; }
.hero p { font-size: 20px; animation-delay: 0.45s; }
.hero .btn { animation-delay: 0.75s; }

@keyframes hero-in {
    to { opacity: 1; transform: translateY(0); }
}

.btn {
    background: var(--secondary-color);
    padding: 12px 25px;
    color: black;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    display: inline-block;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(224,122,41,0.4);
}

.btn:active {
    transform: translateY(-1px);
}

.section {
    padding: 60px 20px;
    text-align: center;
}

.section h2 {
    font-size: 30px;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section > p {
    font-size: 18px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.dark {
    background: #f0e9e1;
}

.cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.card {
    background: white;
    color: var(--text-color);
    padding: 20px;
    width: 250px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.card h3 {
    font-size: 20px;
}

.card p {
    font-size: 16px;
}

.card .icon {
    margin-bottom: 10px;
}

.card .icon svg {
    width: 34px;
    height: 34px;
    stroke: var(--primary-color);
    transition: transform 0.5s ease;
}

.card:hover .icon svg {
    transform: scale(1.15) rotate(-4deg);
}

.card .icon.step-number {
    width: 34px;
    height: 34px;
    line-height: 34px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.stat h3 {
    font-size: 36px;
    color: var(--text-color);
    margin: 0 0 5px;
}

.section-scales .stat h3 {
    color: white;
}

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

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-1 { transition-delay: 0.1s; }
.reveal-2 { transition-delay: 0.25s; }
.reveal-3 { transition-delay: 0.4s; }
.reveal-4 { transition-delay: 0.55s; }
.reveal-5 { transition-delay: 0.7s; }
.reveal-6 { transition-delay: 0.85s; }

.stat h3 .count {
    display: inline-block;
}

.contact-form {
    max-width: 400px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
}

button {
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px;
}

.lang-btn {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 6px 14px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 20px;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 20px;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
    header {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: flex;
    }

    header nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 0 20px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
    }

    header nav.open {
        max-height: 480px;
        opacity: 1;
        padding: 10px 20px 24px;
    }

    header nav a {
        margin-left: 0;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.12);
    }

    header nav a.active {
        border-bottom: 1px solid var(--secondary-color);
    }

    header nav .lang-btn {
        margin-left: 0;
        margin-top: 12px;
        align-self: flex-start;
    }
}

.section-scales {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.7)), url('../images/merleg.jpeg') center/cover no-repeat;
    color: white;
}

.section-scales h2 {
    color: white;
}
