/* ==========================================================================
   Base: Establecer rem = texto normal
   ========================================================================== */
html {
    /* 17px en mobile → 19px en desktop */
    font-size: clamp(17px, 16px + 0.3vw, 19px) !important;
}

/* Forzar el tamaño base en el body */
body.aav-single-post {
    font-size: 1rem !important;
}

/* ==========================================================================
   Variables CSS
   ========================================================================== */
:root {
    /* Colores */
    --aav-primary: #ff7700;
    --aav-text: #444444;
    --aav-heading: #000000;
    --aav-gray: #666;
    --aav-border: #e5e5e5;
    --aav-bg-light: #f8f9fa;
    --aav-bg-warning: #fff3cd;
    --aav-bg-info: #d1ecf1;
    --aav-bg-important: #f8d7da;
    
    /* Layout */
    --aav-sidebar-width: 369px; /* 345px + 24px padding izquierdo del TOC */
    --aav-gap: 40px; /* Gap específico de 40px */
    --aav-content-padding: 3rem;
    --aav-content-width: 865px; /* Ancho específico del contenido */
    
    /* Tipografía basada en rem */
    --aav-font-size: 1rem;           /* 19px/17px base */
    --aav-line-height: 1.6rem;       /* 30.4px */
    
    --aav-h1-size: 2rem;             /* 38px */
    --aav-h1-height: 2.6rem;         /* 49.4px */
    
    --aav-h2-size: 1.5rem;           /* 28.5px */
    --aav-h2-height: 1.95rem;        /* 37.05px */
    
    --aav-h3-size: 1.25rem;          /* 23.75px */
    --aav-h3-height: 1.625rem;       /* 30.875px */
    
    --aav-meta-size: 0.9rem;         /* 17.1px */
    --aav-meta-height: 1.44rem;      /* 27.36px */
}

/* ==========================================================================
   Ocultar elementos duplicados del tema Flatsome
   ========================================================================== */
.aav-single-post .entry-header .entry-header-text,
.aav-single-post .entry-header .entry-title,
.aav-single-post .entry-header .entry-meta,
.aav-single-post .entry-header .entry-divider {
    display: none !important;
}

/* ==========================================================================
   Ajustes de contenedores del tema
   ========================================================================== */
.aav-single-post #content .large-10.col {
    flex: 0 0 100%;
    max-width: 100%;
}

.aav-single-post .row {
    max-width: 100% !important;
    width: 100%;
}

.aav-single-post #content.blog-wrapper {
    padding-top: 0 !important;
}

.aav-single-post .article-inner {
    padding-top: 0;
}

.aav-single-post #content .col,
.aav-single-post #content .columns {
    padding: 0 !important;
}

/* ==========================================================================
   Ajustes globales de tipografía - Mayor especificidad
   ========================================================================== */
.aav-single-post,
.aav-single-post .entry-content,
.aav-single-post .article-inner {
    font-size: var(--aav-font-size) !important;
    line-height: var(--aav-line-height) !important;
    color: var(--aav-text) !important;
}

/* ==========================================================================
   Utilidades
   ========================================================================== */
.aav-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Animaciones
   ========================================================================== */
@keyframes aav-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aav-modal-body > * {
    animation: aav-fade-in 0.3s ease forwards;
}

/* ==========================================================================
   Print styles
   ========================================================================== */
@media print {
    .aav-sidebar,
    .aav-donation-block,
    .aav-related-guides,
    .aav-modal-overlay {
        display: none !important;
    }
    
    .aav-layout {
        display: block;
    }
    
    .aav-content {
        box-shadow: none;
        padding: 0;
    }
    
    .aav-references-content {
        max-height: none !important;
    }
}