:root {
    /* Paleta mejorada */
    --primary: #E63946;
    --primary-dark: #C1121F;
    --secondary: #1D3557;
    --secondary-light: #457B9D;
    --accent: #F1C40F;
    --accent-dark: #D4AC0D;
    --dark: #0F1A20;
    --light: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    
    /* Variables de diseño */
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --box-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

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

html, body {
    height: 100%;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header compacto */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(15, 26, 32, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo i {
    color: white;
    font-size: 18px;
}

.brand__title {
    font-family: 'Oxanium', sans-serif;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

.brand__tag {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    margin-top: -2px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav__link {
    padding: 8px 12px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    transition: var(--transition);
}

.nav__link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.nav__btn {
    padding: 10px 16px;
    border-radius: 6px;
    background-color: transparent;
    color: var(--accent);
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.nav__btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    color: white;
}

.hamb {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background-color: transparent;
    color: white;
    cursor: pointer;
}

/* Hero legal mejorado */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%);
    color: white;
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
    radial-gradient(circle at 90% 10%, rgba(241, 196, 15, 0.08) 0%, transparent 25%),
    radial-gradient(circle at 10% 90%, rgba(230, 57, 70, 0.08) 0%, transparent 25%);
    pointer-events: none;
}

.hero__wrap {
    position: relative;
    z-index: 2;
}

.hero__title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    color: white;
}

.hero__sub {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin-bottom: 24px;
}

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

.chip {
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chip i {
    color: var(--accent);
}

/* Diseño del contenido legal mejorado */
.legal-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 0;
}

@media (min-width: 992px) {
    .legal-container {
    grid-template-columns: 280px 1fr;
    }
}

/* TOC mejorado */
.toc {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.toc__box {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    border-left: 4px solid var(--secondary);
}

.toc__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--secondary);
}

.toc__list {
    list-style: none;
}

.toc__list li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 16px;
}

.toc__list li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
}

.toc__list a {
    display: block;
    padding: 6px 0;
    color: var(--gray-800);
    transition: var(--transition);
}

.toc__list a:hover {
    color: var(--secondary);
    text-decoration: none;
    padding-left: 6px;
}

/* Documento legal mejorado */
.doc {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    position: relative;
}

.doc-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--gray-200);
}

.doc-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.section-number {
    background-color: var(--secondary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0;
}

.section-content {
    padding-left: 48px;
}

.section-content p {
    margin-bottom: 16px;
}

.section-content ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.section-content li {
    margin-bottom: 8px;
    position: relative;
}

.highlight {
    background-color: var(--gray-100);
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin: 20px 0;
}

/* Botón volver arriba */
.backtop {
    position: sticky;
    bottom: 30px;
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-top {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--box-shadow-lg);
    transition: var(--transition);
    font-size: 18px;
}

.btn-top:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

/* Footer profesional */
.footer {
    background-color: var(--dark);
    color: white;
    padding-top: 60px;
    position: relative;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.f__grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 40px;
    padding-bottom: 40px;
}

@media (min-width: 768px) {
    .f__grid {
    grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .f__grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

.f__about h4 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.f__about p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.social {
    display: flex;
    gap: 12px;
}

.social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social a:hover {
    background-color: var(--accent);
    color: var(--dark);
    transform: translateY(-3px);
}

.f__col h5 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.f__col h5::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
}

.f__col ul {
    list-style: none;
}

.f__col li {
    margin-bottom: 12px;
}

.f__col a {
    color: rgba(255, 255, 255, 0.75);
    transition: var(--transition);
    display: block;
}

.f__col a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.f__col p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 10px;
}

.f__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.f__bottom small {
    color: rgba(255, 255, 255, 0.6);
}

.f__links {
    display: flex;
    gap: 20px;
}

.f__links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

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

/* Responsive */
@media (max-width: 991px) {
    .nav {
    display: none;
    }
    
    .hamb {
    display: flex;
    align-items: center;
    justify-content: center;
    }
    
    .hero__title {
    font-size: 2rem;
    }
    
    .toc {
    position: static;
    margin-bottom: 30px;
    }
    
    .section-title {
    font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    .hero {
    padding: 40px 0;
    }
    
    .hero__title {
    font-size: 1.8rem;
    }
    
    .doc {
    padding: 20px;
    }
    
    .section-header {
    flex-direction: column;
    gap: 12px;
    }
    
    .section-content {
    padding-left: 0;
    }
}
