/* Sistema de diseño con temática apícola */
:root {
    /* Paleta de colores de miel y panal - Amarillos suavizados */
    --color-honey-50: #fffbeb;
    --color-honey-100: #fef3c7;
    --color-honey-200: #fde68a;
    --color-honey-300: #fcd34d;
    --color-honey-400: #fbbf24;
    --color-honey-500: #f59e0b;
    --color-honey-600: #d97706;
    --color-honey-700: #b45309;
    --color-honey-800: #92400e;
    --color-honey-900: #78350f;

    /* Colores secundarios - Ámbar y tonos apícolas */
    --color-amber-300: #fcd34d;
    --color-amber-400: #fbbf24;
    --color-amber-500: #f59e0b;
    --color-amber-600: #d97706;
    --color-amber-700: #b45309;

    /* Tonos cálidos complementarios */
    --color-wax-300: #fbd38d;
    --color-wax-400: #f6ad55;
    --color-wax-500: #ed8936;
    --color-royal-jelly: #fffaf0;
    --color-propolis: #7b341e;

    /* Fondos y neutrales */
    --color-bg-primary: #fffcf5;
    --color-bg-secondary: #fffbeb;
    --color-bg-tertiary: #ffffff;
    --color-text-primary: #513c06;
    --color-text-secondary: #78350f;
    --color-text-muted: #92400e80;

    /* Bordes y sombras */
    --color-border: rgba(217, 119, 6, 0.15);
    --color-border-focus: rgba(217, 119, 6, 0.5);
    --color-shadow-sm: 0 1px 2px rgba(180, 83, 9, 0.05);
    --color-shadow-md: 0 4px 12px rgba(180, 83, 9, 0.08);
    --color-shadow-lg: 0 10px 25px rgba(180, 83, 9, 0.12);
    --color-shadow-focus: 0 0 0 3px rgba(217, 119, 6, 0.25);

    /* Resto de variables se mantienen igual */
    --font-sans: "Nunito", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
    --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
        monospace;

    /* Tamaños de fuente */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;

    /* Espaciado */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Bordes */
    --rounded-sm: 0.125rem;
    --rounded: 0.25rem;
    --rounded-md: 0.375rem;
    --rounded-lg: 0.5rem;
    --rounded-xl: 0.75rem;
    --rounded-2xl: 1rem;
    --rounded-3xl: 1.5rem;
    --rounded-full: 9999px;

    /* Transiciones */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Anchura máxima para contenido */
    --content-width-xs: 20rem;
    --content-width-sm: 24rem;
    --content-width-md: 28rem;
    --content-width-lg: 32rem;
    --content-width-xl: 36rem;
    --content-width-2xl: 42rem;
    --content-width-3xl: 48rem;
    --content-width-4xl: 56rem;
    --content-width-5xl: 64rem;
    --content-width-6xl: 72rem;
    --content-width-7xl: 80rem;
}

/* Configuración base mejorada */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
    overflow-x: hidden;
}

/* Configuración base mejorada con temática apícola */
body {
    background-color: var(--color-bg-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='90' viewBox='0 0 52 90'%3E%3Cpath fill='%23f59e0b' fill-opacity='0.05' d='M26 0L0 45l26 45 26-45L26 0zm13 45l-13 22.5L13 45 26 22.5 39 45z'/%3E%3C/svg%3E");
    background-size: 100px auto;
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg {
    max-width: 100%;
    display: block;
}

/* Tipografía mejorada */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 0;
}

/* Tipografía mejorada con estilo apícola */
h1 {
    font-size: var(--text-4xl);
    color: var(--color-honey-700);
    margin-bottom: var(--space-8);
    position: relative;
    padding-bottom: var(--space-6);
    text-align: center;
    text-shadow: 0 1px 2px rgba(217, 119, 6, 0.1);
}

h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    border-radius: var(--rounded-full);
    background: linear-gradient(
        90deg,
        var(--color-honey-400),
        var(--color-amber-500),
        var(--color-honey-400)
    );
}

h1::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='12' viewBox='0 0 60 12'%3E%3Cpath fill='%23f59e0b' fill-opacity='0.3' d='M36 0h-4v12h4V0zm-8 0h-4v12h4V0zm-8 0h-4v12h4V0zm-8 0H8v12h4V0zM4 0H0v12h4V0zm44 0h-4v12h4V0zm-8 0h-4v12h4V0z'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    opacity: 0.8;
}

h2 {
    font-size: var(--text-3xl);
    color: var(--color-amber-600);
    margin-top: var(--space-12);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-3);
    position: relative;
    border-bottom: 1px solid var(--color-border);
}

h2::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 60px;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--color-honey-500),
        var(--color-amber-500)
    );
    border-radius: var(--rounded-full);
}

h3 {
    font-size: var(--text-2xl);
    color: var(--color-primary-700);
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
}

h4 {
    font-size: var(--text-xl);
    color: var(--color-secondary-600);
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

p {
    margin-bottom: var(--space-6);
    max-width: 80ch;
}

a {
    color: var(--color-amber-600);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
    transition: all var(--transition-fast);
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

a:hover,
a:focus {
    color: var(--color-honey-700);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
    border-radius: var(--rounded-sm);
}

a::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Header mejorado con temática de panal */
.legal-header {
    background-color: var(--color-bg-tertiary);
    box-shadow: var(--color-shadow-md);
    padding: var(--space-3) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill='%23f59e0b' fill-opacity='0.05'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/svg%3E");
}

.header-container {
    max-width: var(--content-width-7xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: var(--space-3);
    transition: transform var(--transition-normal);
}

.logo:hover {
    transform: translateY(-1px);
}

.logo img {
    height: 40px;
    width: 50px;
    transition: transform var(--transition-normal);
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-text {
    color: var(--color-primary-700);
    font-weight: 800;
    font-size: var(--text-xl);
    letter-spacing: -0.02em;
    background: linear-gradient(
        90deg,
        var(--color-honey-700),
        var(--color-amber-600)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.back-link {
    color: var(--color-secondary-600);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all var(--transition-normal);
    font-weight: 600;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--rounded-lg);
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border);
}

.back-link i {
    margin-right: var(--space-2);
    transition: transform var(--transition-normal);
}

.back-link:hover {
    background-color: var(--color-honey-50);
    color: var(--color-honey-700);
    border-color: var(--color-honey-400);
    transform: translateY(-1px);
    box-shadow: var(--color-shadow-sm);
}

.back-link:hover i {
    transform: translateX(-3px);
}

/* Contenido principal mejorado */
.main-content {
    flex: 1;
    padding: var(--space-12) var(--space-6);
    position: relative;
    z-index: 1;
}

.main-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(
        180deg,
        rgba(245, 158, 11, 0.1) 0%,
        rgba(245, 158, 11, 0) 100%
    );
    z-index: -1;
    pointer-events: none;
}

.legal-container {
    max-width: var(--content-width-6xl);
    margin: 0 auto;
    background: var(--color-bg-tertiary);
    border-radius: var(--rounded-2xl);
    box-shadow: 0 15px 30px -5px rgba(217, 119, 6, 0.1);
    padding: var(--space-12) var(--space-10);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
    border: 1px solid var(--color-border);
}

.legal-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(
        90deg,
        var(--color-honey-500),
        var(--color-amber-500),
        var(--color-honey-500)
    );
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

/* Efecto de panal de abejas alrededor del contenedor */
.legal-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
    border: 12px solid transparent;
    border-image: url("data:image/svg+xml,%3Csvg width='32' height='56' viewBox='0 0 32 56' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 0L0 28v28h32V28L16 0zm0 10l12 18v18H4V28L16 10z' fill='%23f59e0b' fill-opacity='0.05'/%3E%3C/svg%3E")
        12 stretch;
}

/* Tabla de contenidos mejorada con estilo apícola */
.toc {
    background: linear-gradient(
        135deg,
        var(--color-honey-50) 0%,
        var(--color-bg-tertiary) 100%
    );
    border-radius: var(--rounded-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--color-shadow-sm);
}

.toc-accordion {
    border-radius: var(--rounded-xl);
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 0;
}

.toc-toggle {
    background: linear-gradient(
        135deg,
        var(--color-honey-50),
        var(--color-honey-100)
    );
    border: 1px solid var(--color-honey-200);
    color: var(--color-honey-700);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--rounded-md);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition-fast);
}

.toc-toggle:hover {
    background: linear-gradient(
        135deg,
        var(--color-honey-100),
        var(--color-honey-200)
    );
    transform: translateY(-1px);
    box-shadow: var(--color-shadow-sm);
}

.toc-toggle:focus {
    outline: 2px solid var(--color-honey-300);
    outline-offset: 2px;
}

.toc-toggle i {
    transition: transform 0.3s ease;
}

.toc-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.toc-content {
    transition: max-height 0.3s ease-out, opacity 0.3s ease;
    padding-top: var(--space-3);
}

/* Animación de entrada y salida */
.toc-content[style*="display: block"] {
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.toc:hover {
    box-shadow: var(--color-shadow-md);
    transform: translateY(-2px);
    border-color: var(--color-primary-200);
}

.toc::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23f59e0b' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M0 0h20v20H0V0zm10 17a7 7 0 100-14 7 7 0 000 14zm0-1a6 6 0 100-12 6 6 0 000 12z'/%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
}

.toc::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' width='80' height='80'%3E%3Cpath fill='%23fef9c3' d='M14 16H9v-2h5V9.87a4 4 0 1 1 2 0V14h5v2h-5v15.95A10 10 0 0 0 23.66 27l-3.88-3.88a1 1 0 0 1 1.41-1.41l4.24 4.24a1 1 0 0 1 0 1.41l-4.24 4.24a1 1 0 0 1-1.41-1.41l3.88-3.88A12 12 0 0 1 11 31.95V16zm10.43-1.41a1 1 0 0 1 1.42 0l4.24 4.24a1 1 0 0 1 0 1.42l-4.24 4.24a1 1 0 0 1-1.42-1.42l3.88-3.88a1 1 0 0 0 0-1.42l-3.88-3.88a1 1 0 0 1 0-1.42zm4.24 4.24l3.88 3.88a1 1 0 0 1 0 1.41l-3.88 3.88a1 1 0 1 1-1.41-1.41l4.24-4.24a1 1 0 0 0 0-1.41l-4.24-4.24a1 1 0 1 1 1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    opacity: 0.15;
    pointer-events: none;
    transform: rotate(-15deg);
    transition: all var(--transition-slow);
}

.toc:hover::after {
    opacity: 0.25;
    transform: rotate(0deg);
}

.toc-title {
    color: var(--color-amber-700);
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    font-weight: 700;
}

.toc-title i,
.toc-title svg {
    margin-right: var(--space-2);
    color: var(--color-honey-500);
    font-size: 1.2em;
}

.toc-list {
    list-style-type: none;
    padding-left: var(--space-4);
    counter-reset: toc-counter;
}

.toc-list li {
    margin-bottom: var(--space-3);
    position: relative;
    counter-increment: toc-counter;
}

.toc-list li::before {
    content: "•"; /* Cambiado para quitar la numeración */
    color: var(--color-honey-500);
    font-weight: 600;
    position: absolute;
    left: -1rem;
    top: 0.2rem;
    font-size: 0.85em;
}

.toc-list a {
    text-decoration: none;
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
    display: inline-block;
    padding: var(--space-1) 0;
    border-bottom: 1px dashed transparent;
}

.toc-list a:hover {
    color: var(--color-honey-700);
    transform: translateX(var(--space-1));
    border-bottom-color: var(--color-honey-300);
}

/* Secciones mejoradas */
.section {
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

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

.section::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, var(--color-honey-300), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.section:hover::after {
    opacity: 1;
}

/* Secciones con decoración de panal */
.section:nth-child(odd)::before {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    right: -40px;
    top: 40px;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg width='56' height='100' viewBox='0 0 56 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28 0l28 50-28 50L0 50 28 0zm5 15.51L20.67 30.3v29.4l12.33 14.8 12.33-14.8V30.3L33 15.51zm-5-1.73l15 17.28v34.48l-15 18-15-18V31.06l15-17.28z' fill='%23f59e0b' fill-opacity='1'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(15deg);
    pointer-events: none;
}

/* Listas mejoradas */
ul,
ol {
    margin-bottom: var(--space-6);
    padding-left: var(--space-8);
}

ul li,
ol li {
    margin-bottom: var(--space-3);
    position: relative;
}

ul {
    list-style: none;
}

/* Listas mejoradas con estilo apícola */
ul li::before {
    content: "•";
    color: var(--color-honey-500);
    font-weight: bold;
    display: inline-block;
    width: 1.25em;
    margin-left: -0.5em;
    font-size: 1.2em;
}

ol {
    counter-reset: list-counter;
    list-style: none;
}

ol li {
    counter-increment: list-counter;
}

ol li::before {
    content: counter(list-counter) ".";
    color: var(--color-honey-500);
    font-weight: 600;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
}

/* Footer con decoración apícola */
.legal-footer {
    background: linear-gradient(
        180deg,
        var(--color-bg-secondary) 0%,
        var(--color-bg-tertiary) 100%
    );
    box-shadow: var(--color-shadow-md);
    padding: var(--space-8) 0 var(--space-6);
    text-align: center;
    margin-top: var(--space-12);
    position: relative;
    border-top: 1px solid var(--color-border);
}

.footer-container {
    max-width: var(--content-width-7xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
    gap: var(--space-4);
}

.footer-links a {
    margin: 0 var(--space-2);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--rounded-lg);
}

.footer-links a:hover {
    color: var(--color-honey-700);
    background-color: var(--color-honey-50);
}

.copyright {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    position: relative;
    display: inline-block;
}

copyright::before,
.copyright::after {
    content: "🐝";
    font-size: 0.8em;
    margin: 0 0.5rem;
    opacity: 0.7;
}

/* Bloques especiales */
.note,
.warning,
.info,
.tip {
    margin: var(--space-6) 0;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--rounded-lg);
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--color-honey-500);
    background-color: var(--color-honey-50);
}

.note {
    border-left-color: var(--color-honey-400);
}

.warning {
    background-color: #fef2f2;
    border-left-color: #f87171;
}

.info {
    background-color: #eff6ff;
    border-left-color: #60a5fa;
}

.tip {
    background-color: #ecfdf5;
    border-left-color: #34d399;
}

.note::after,
.warning::after,
.info::after,
.tip::after {
    content: "";
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 9l6-6 3 3-3 3 3 3-3 3-6-6zm18 0l-6 6-3-3 3-3-3-3 3-3 6 6z' fill='%23f59e0b' fill-opacity='0.08'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
}

/* Tablas mejoradas */
.table-wrapper {
    overflow-x: auto;
    margin: var(--space-6) 0;
    border-radius: var(--rounded-lg);
    box-shadow: var(--color-shadow-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: var(--text-base);
}

thead {
    background-color: var(--color-honey-50);
    color: var(--color-honey-800);
}

th,
td {
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
}

th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--text-sm);
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--color-honey-200);
}

tr:nth-child(even) {
    background-color: var(--color-bg-secondary);
}

tr:hover {
    background-color: var(--color-honey-50);
}

/* Animaciones mejoradas */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(var(--space-6));
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: 0% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Animaciones de flujo de miel */
@keyframes honeyFlow {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 0%;
    }
}

/* Utilidades mejoradas y expandidas */
.text-center {
    text-align: center;
}
.text-right {
    text-align: right;
}
.text-left {
    text-align: left;
}

.font-bold {
    font-weight: 700;
}
.font-semibold {
    font-weight: 600;
}
.font-medium {
    font-weight: 500;
}
.font-normal {
    font-weight: 400;
}
.font-light {
    font-weight: 300;
}

.text-xs {
    font-size: var(--text-xs);
}
.text-sm {
    font-size: var(--text-sm);
}
.text-base {
    font-size: var(--text-base);
}
.text-lg {
    font-size: var(--text-lg);
}
.text-xl {
    font-size: var(--text-xl);
}
.text-2xl {
    font-size: var(--text-2xl);
}
.text-3xl {
    font-size: var(--text-3xl);
}
.text-4xl {
    font-size: var(--text-4xl);
}

.mt-0 {
    margin-top: 0;
}
.mt-1 {
    margin-top: var(--space-1);
}
.mt-2 {
    margin-top: var(--space-2);
}
.mt-3 {
    margin-top: var(--space-3);
}
.mt-4 {
    margin-top: var(--space-4);
}
.mt-5 {
    margin-top: var(--space-5);
}
.mt-6 {
    margin-top: var(--space-6);
}
.mt-8 {
    margin-top: var(--space-8);
}
.mt-10 {
    margin-top: var(--space-10);
}
.mt-12 {
    margin-top: var(--space-12);
}

.mb-0 {
    margin-bottom: 0;
}
.mb-1 {
    margin-bottom: var(--space-1);
}
.mb-2 {
    margin-bottom: var(--space-2);
}
.mb-3 {
    margin-bottom: var(--space-3);
}
.mb-4 {
    margin-bottom: var(--space-4);
}
.mb-5 {
    margin-bottom: var(--space-5);
}
.mb-6 {
    margin-bottom: var(--space-6);
}
.mb-8 {
    margin-bottom: var(--space-8);
}
.mb-10 {
    margin-bottom: var(--space-10);
}
.mb-12 {
    margin-bottom: var(--space-12);
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}
.my-0 {
    margin-top: 0;
    margin-bottom: 0;
}

.p-0 {
    padding: 0;
}
.p-1 {
    padding: var(--space-1);
}
.p-2 {
    padding: var(--space-2);
}
.p-3 {
    padding: var(--space-3);
}
.p-4 {
    padding: var(--space-4);
}
.p-6 {
    padding: var(--space-6);
}

.px-2 {
    padding-left: var(--space-2);
    padding-right: var(--space-2);
}
.px-4 {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}
.px-6 {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}
.py-2 {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
}
.py-4 {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
}
.py-6 {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
}

.flex {
    display: flex;
}
.items-center {
    align-items: center;
}
.justify-center {
    justify-content: center;
}
.justify-between {
    justify-content: space-between;
}
.gap-1 {
    gap: var(--space-1);
}
.gap-2 {
    gap: var(--space-2);
}
.gap-4 {
    gap: var(--space-4);
}

.hidden {
    display: none;
}
.block {
    display: block;
}
.inline-block {
    display: inline-block;
}
.relative {
    position: relative;
}

/* Scroll suave */
.scroll-smooth {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Altura del header sticky */
}

/* Media queries mejoradas */
@media (max-width: 1024px) {
    .legal-container {
        padding: var(--space-8) var(--space-6);
    }

    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: var(--space-8) var(--space-4);
    }

    .legal-container {
        padding: var(--space-6) var(--space-5);
        border-radius: var(--rounded-xl);
    }

    h1 {
        font-size: var(--text-2xl);
        padding-bottom: var(--space-4);
        margin-bottom: var(--space-6);
    }

    h1::after {
        width: 100px;
    }

    h2 {
        font-size: var(--text-xl);
        margin-top: var(--space-8);
        margin-bottom: var(--space-4);
    }

    h3 {
        font-size: var(--text-lg);
    }

    h1::before {
        width: 70px;
    }

    .section:nth-child(odd)::before {
        width: 50px;
        height: 50px;
        right: -25px;
    }
}

@media (max-width: 640px) {
    .legal-container {
        padding: var(--space-6) var(--space-4);
    }

    .header-container {
        padding: 0 var(--space-4);
    }

    .logo-text {
        font-size: var(--text-lg);
    }

    .back-link {
        font-size: var(--text-sm);
        padding: var(--space-1) var(--space-2);
    }
}

/* Funcionalidad de impresión mejorada */
@media print {
    .legal-header,
    .legal-footer,
    .toc,
    .back-link {
        display: none !important;
    }

    .legal-container {
        box-shadow: none;
        padding: 0;
        max-width: 100%;
        margin: 0;
    }

    body {
        background: white;
        font-size: 12pt;
        color: black;
    }

    h1,
    h2,
    h3,
    h4 {
        page-break-after: avoid;
        break-after: avoid;
    }

    p,
    li,
    figure,
    img {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    a {
        text-decoration: none;
        color: #000;
    }

    a:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #555;
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important;
        scroll-behavior: auto !important;
    }
}
