/*
Theme Name: Aves Nativas Chilenas
Theme URI: https://avesnativaschilenas.cl/
Author: Cristian V.
Author URI: https://avesnativaschilenas.cl/
Description: Tema personalizado para Aves Nativas Chilenas — guía digital interactiva y repositorio ornitológico sobre la avifauna de Chile. Diseñado para ayudar a observadores, fotógrafos, científicos y conservacionistas a identificar especies, conocer hábitats y promover la protección de la biodiversidad chilena.
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aves-nativas-chile
Tags: one-column, custom-menu, post-thumbnails, featured-images, theme-options, right-sidebar

Aves Nativas Chilenas WordPress Theme, (C) 2026 avesnativaschilenas.cl
Aves Nativas Chilenas is distributed under the terms of the GNU GPL v2 or later.
*/

/* ===== Utilidades CSS mínimas nativas ===== */

/* === Menú de navegación desktop === */

/* Sub-menú: oculto por defecto, aparece en hover */
#site-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 0.5rem 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 100;
    list-style: none;
    margin: 0;
}

#site-navigation .menu-item-has-children:hover > .sub-menu,
#site-navigation .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#site-navigation .sub-menu .menu-item {
    margin: 0;
    padding: 0;
}

#site-navigation .sub-menu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: normal;
    line-height: 1.4;
}

#site-navigation .sub-menu a:hover {
    background-color: #f8f6f2;
    color: #1a5632;
}

/* Indicador de sub-menú (flecha) */
#site-navigation .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    margin-left: 5px;
    transform: rotate(45deg);
    vertical-align: middle;
    margin-top: -2px;
    opacity: 0.6;
}

/* === Menú móvil === */
#mobile-menu .sub-menu {
    padding-left: 1rem;
    margin: 0;
    list-style: none;
    border-left: 2px solid #e8f5e9;
    margin-left: 0.5rem;
}

#mobile-menu .sub-menu a {
    font-size: 0.8125rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    color: #64748b;
}

/* === Donar button destacado === */
#site-navigation .menu-item-donar > a {
    background: #1a5632;
    color: #ffffff;
    border-radius: 9999px;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: 0.5rem;
}
#site-navigation .menu-item-donar > a:hover {
    background: #0d3b1a;
    color: #ffffff;
}
#mobile-menu .menu-item-donar > a {
    color: #1a5632;
    font-weight: 700;
}
#mobile-menu .menu-item-donar > a::before {
    content: '\f004';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

/* === Menú móvil animación slide === */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 0;
}
#mobile-menu.open {
    max-height: 70vh;
    opacity: 1;
}

/* Transiciones globales */
*,
*::before,
*::after {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Scroll suave nativo */
html {
    scroll-behavior: smooth;
}

/* Tipografía base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings con serif */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* Contenedor de asterisco para comentarios */
.required-field-suffix {
    color: #dc2626;
}

/* Corrección de espaciado para menús de WordPress */
.sub-menu {
    z-index: 50;
}

/* Imágenes responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Skip link accesible */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Migas de pan */
.breadcrumb-sep {
    margin: 0 0.4rem;
    color: #94a3b8;
}

/* Fade-in sutil para imágenes lazy */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded,
img[loading="lazy"][src]:not([src=""]) {
    opacity: 1;
}

/* ===== Contenido del artículo (.entry-content) ===== */
.entry-content h2 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    color: #1a5632;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.25;
    font-size: 1.5rem;
}
.entry-content h3 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    color: #1a5632;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.25;
    font-size: 1.25rem;
}
@media (min-width: 640px) {
    .entry-content h2 { font-size: 1.875rem; }
    .entry-content h3 { font-size: 1.5rem; }
}
.entry-content p {
    margin-bottom: 1rem;
    color: #1e293b;
}
.entry-content ul,
.entry-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.entry-content ul > li,
.entry-content ol > li {
    margin-bottom: 0.5rem;
}
.entry-content ul {
    list-style: disc;
}
.entry-content ol {
    list-style: decimal;
}
.entry-content li {
    color: #1e293b;
}
.entry-content a {
    color: #1a5632;
    text-decoration: underline;
    transition: color 0.2s;
}
.entry-content a:hover {
    color: #d46a25;
}
.entry-content blockquote {
    border-left: 4px solid #d46a25;
    background: #f8f6f2;
    padding: 0.5rem 1rem 0.5rem 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #64748b;
}
.entry-content img {
    border-radius: 0.75rem;
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
}
.entry-content figure {
    margin: 1.5rem 0;
}
.entry-content figcaption {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}
.entry-content th {
    background: #1a5632;
    color: #fff;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
}
.entry-content td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    color: #374151;
}
.entry-content tr:nth-child(even) td {
    background: #f8f6f2;
}
.entry-content pre,
.entry-content code {
    background: #f1f5f9;
    color: #1e293b;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
}
.entry-content pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}
.entry-content pre code {
    background: transparent;
    padding: 0;
}
.entry-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid #e5e7eb;
}
/* Responsive: tablas no rompen en móvil */
@media (max-width: 640px) {
    .entry-content table {
        font-size: 0.75rem;
    }
    .entry-content td,
    .entry-content th {
        padding: 0.375rem 0.5rem;
    }
    .entry-content blockquote {
        padding-left: 0.75rem;
        padding-top: 0.375rem;
        padding-bottom: 0.375rem;
    }
}
