/*
Theme Name: AMAFJUBA
Theme URI: https://amafjuba.org.ar
Description: Tema profesional para AMAFJUBA — Asociación de Magistrados y Funcionarios Jubilados y Pensionados del Poder Judicial, Provincia de Buenos Aires. Optimizado para Elementor Pro. Incluye fallbacks funcionales para garantizar visualización de contenido incluso sin el page builder activo.
Author: Emanuel Di Santi
Author URI: https://allia.com.ar
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: magistradosfuncionariosjba
Tags: elementor, custom, flexible, translation-ready

========================================
INSTRUCCIONES PARA PERSONALIZAR:
========================================
- Version: Incrementar con cada actualización (1.0.0 → 1.0.1 → 1.1.0 → 2.0.0)

📋 VERSIONADO SEMÁNTICO:
- 1.0.0 → Primera versión estable
- 1.0.1 → Corrección de bugs
- 1.1.0 → Nueva funcionalidad menor
- 2.0.0 → Cambio importante/breaking change

🔄 ARCHIVOS A ACTUALIZAR AL CAMBIAR VERSIÓN:
- Este archivo (style.css)
- functions.php (constante THEME_VERSION)
- readme.txt

========================================
ESTILOS BASE DEL TEMA
========================================
*/

/* ==========================================================================
   🎨 RESET Y ESTILOS GLOBALES
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

/* ==========================================================================
   📐 CONTENEDORES Y LAYOUT
   ========================================================================== */

.site-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-area {
    padding: 40px 0;
}

/* ==========================================================================
   🔤 TIPOGRAFÍA
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin: 0 0 1.5rem;
}

a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #005177;
    text-decoration: underline;
}

/* ==========================================================================
   🖼️ IMÁGENES Y MEDIA
   ========================================================================== */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.wp-post-image {
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   📰 ESTILOS DE CONTENIDO (GUTENBERG)
   ========================================================================== */

.entry-content {
    margin-bottom: 2rem;
}

.entry-content > * {
    margin-bottom: 1.5rem;
}

.entry-content ul,
.entry-content ol {
    padding-left: 2rem;
}

.entry-content blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #0073aa;
    background: #f7f7f7;
    font-style: italic;
}

.entry-content pre {
    background: #f4f4f4;
    padding: 1rem;
    overflow-x: auto;
    border-radius: 4px;
}

.entry-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "Courier New", monospace;
}

/* ==========================================================================
   🎯 BOTONES
   ========================================================================== */

.btn,
.wp-block-button__link {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.btn:hover,
.wp-block-button__link:hover {
    background: #005177;
    text-decoration: none;
}

/* ==========================================================================
   📱 RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    body {
        font-size: 18px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .site-container {
        padding: 0 15px;
    }
}

/* ==========================================================================
   ✨ COMPATIBILIDAD ELEMENTOR
   ========================================================================== */

/* Ocultar elementos cuando Elementor está activo */
.elementor-page .site-header,
.elementor-page .site-footer {
    display: none;
}

/* ==========================================================================
   🔧 UTILIDADES
   ========================================================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ===== SELECTOR DE ORDEN - FORO EN ACCIÓN ===== */
.foro-orden-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Open Sans', sans-serif;
}

.foro-orden-label {
    font-size: 18px;
    font-weight: 600;
    color: #07302F;
}

.foro-orden-select {
    font-family: 'Open Sans', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #D3B589;
    background-color: #0C504E;
    border: none;
    border-radius: 15px;
    padding: 8px 44px 8px 20px; /* espacio a la derecha para la flecha */
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23D3B589' d='M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.373-24.569 9.373-33.942 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 12px;
    transition: all 0.3s ease;
}

/* Hover: invertido + flecha oscura */
.foro-orden-select:hover {
    background-color: #D3B589;
    color: #0C504E;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%230C504E' d='M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.373-24.569 9.373-33.942 0z'/%3E%3C/svg%3E");
}

/* Opciones del desplegable legibles */
.foro-orden-select option {
    background-color: #fff;
    color: #0C504E;
}

@media (max-width: 768px) {
    .foro-orden-label {
       font-size: 20px;
    }
    .foro-orden-select {
        font-size: 20px;
    }
}