/*
Theme Name: cihspywp2-7
Theme URI: https://cihsp.org.py
Author: Centro de Investigaciones de Historia Social del Paraguay
Author URI: https://cihsp.org.py
Description: Tema Nativo Elegante cihspywp2-7 para el CIHSP. Sistema de Personalización Total (100%) de todas las secciones desde Apariencia -> Personalizar, Integración Nativa con la Biblioteca de Medios (wp.media), Detección Inteligente de Fotos, Perfiles Académicos (CVpy, ORCID, PDF) y 3 Diseños de Miembros.
Version: 2.7.0
License: GNU General Public License v2 or later
Text Domain: cihspywp2-7
*/

:root {
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --primary-navy: #14191e;
    --secondary-slate: #1f2730;
    --accent-ochre: #d9381e;
    --accent-ochre-hover: #b82b13;
    --accent-gold: #c5a059;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;

    --bg-light: #f8fafc;
    --border-light: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 25px 30px -5px rgba(0, 0, 0, 0.15);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-full: 9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); color: var(--text-primary); background-color: #ffffff; line-height: 1.7; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; color: var(--primary-navy); }
a { color: var(--accent-ochre); text-decoration: none; }
p { margin-bottom: 1.1rem; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5.5rem 0; }
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--primary-navy); color: #ffffff; }
.text-center { text-align: center; }

/* REGLA CRÍTICA DE LOGOTIPO */
.custom-logo, .site-logo-img, img.custom-logo {
    max-height: 50px !important;
    max-width: 260px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: inline-block !important;
}

.section-header { margin-bottom: 3.5rem; }
.section-subtitle { display: inline-block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; color: var(--accent-ochre); text-transform: uppercase; margin-bottom: 0.5rem; }
.section-title { font-size: 2.35rem; color: var(--primary-navy); margin-bottom: 1rem; }
.section-title-dark { font-size: 2.35rem; color: #ffffff !important; margin-bottom: 1rem; }
.section-intro { font-size: 1.1rem; color: var(--text-secondary); max-width: 700px; margin: 0 auto; }
.section-intro-dark { font-size: 1.1rem; color: rgba(255,255,255,0.8) !important; max-width: 700px; margin: 0 auto; }
.section-title-line { width: 60px; height: 3px; background: linear-gradient(90deg, var(--accent-ochre), var(--accent-gold)); margin: 1.25rem auto 0; border-radius: var(--radius-full); }

.grid { display: grid; gap: 1.75rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.gap-medium { gap: 2rem; }
.gap-large { gap: 3.5rem; }

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

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 0.75rem 1.6rem; font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: all 0.2s ease; text-decoration: none; }
.btn-lg { padding: 0.95rem 2rem; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn-primary { background-color: var(--accent-ochre); color: #ffffff !important; box-shadow: 0 4px 12px rgba(217, 56, 30, 0.28); }
.btn-primary:hover { background-color: var(--accent-ochre-hover); color: #ffffff !important; transform: translateY(-2px); }
.btn-secondary { background-color: rgba(255, 255, 255, 0.06); color: #ffffff !important; border-color: rgba(255, 255, 255, 0.2); }
.btn-blue { background-color: var(--accent-blue); color: #ffffff !important; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
.btn-blue:hover { background-color: var(--accent-blue-hover); color: #ffffff !important; transform: translateY(-2px); }
.btn-atom-nav { background-color: rgba(217, 56, 30, 0.12); color: var(--accent-ochre) !important; border: 1px solid rgba(217, 56, 30, 0.3); padding: 0.55rem 1.1rem; font-size: 0.88rem; }
.btn-atom-nav:hover { background-color: var(--accent-ochre); color: #ffffff !important; }

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background-color: rgba(20, 25, 30, 0.97); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.logo-group { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; overflow: hidden; max-height: 54px; }
.logo-title { font-family: var(--font-heading); font-size: 1.45rem; font-weight: 700; color: #ffffff !important; line-height: 1; }
.logo-subtitle { font-size: 0.72rem; color: rgba(255, 255, 255, 0.7) !important; }
.desktop-nav ul { display: flex; align-items: center; gap: 1.75rem; list-style: none; }
.desktop-nav a { font-family: var(--font-body); font-size: 0.92rem; font-weight: 500; color: rgba(255, 255, 255, 0.85) !important; }
.desktop-nav a:hover { color: #ffffff !important; }

/* Hero Section */
.hero-section { position: relative; padding-top: 170px; padding-bottom: 100px; background: linear-gradient(135deg, #14191e 0%, #1f2730 100%); color: #ffffff; border-bottom: 1px solid rgba(197, 160, 89, 0.25); }
.hero-content { max-width: 880px; margin: 0 auto; text-align: center; }
.badge-legal { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.45rem 1.25rem; background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(197, 160, 89, 0.3); border-radius: var(--radius-full); font-size: 0.83rem; color: var(--accent-gold) !important; margin-bottom: 1.75rem; }
.hero-title { font-size: 3.2rem; font-weight: 700; color: #ffffff !important; margin-bottom: 1.5rem; line-height: 1.18; }
.hero-description { font-size: 1.2rem; color: rgba(255, 255, 255, 0.88) !important; margin-bottom: 2.75rem; }
.hero-buttons { display: flex; justify-content: center; gap: 1.25rem; margin-bottom: 3.5rem; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; max-width: 980px; margin: 0 auto; padding: 1.75rem; background-color: rgba(255, 255, 255, 0.03); border-radius: var(--radius-md); border: 1px solid rgba(255, 255, 255, 0.08); }
.stat-card { text-align: center; }
.stat-number { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 700; color: var(--accent-gold) !important; }
.stat-label { font-size: 0.85rem; color: rgba(255, 255, 255, 0.75) !important; }

/* Fondo Documental Highlight */
.atom-highlight-section { margin-top: -35px; position: relative; z-index: 10; padding-bottom: 4rem; }
.atom-card { background: #ffffff; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); border: 1px solid var(--border-light); padding: 2.75rem; }
.atom-card-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--border-light); padding-bottom: 1.5rem; }
.atom-icon-badge { width: 58px; height: 58px; background: linear-gradient(135deg, var(--accent-ochre), #b82b13); color: #ffffff; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0; }
.atom-tag { font-size: 0.78rem; font-weight: 700; color: var(--accent-ochre); letter-spacing: 0.08em; }
.archive-types-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.75rem 0; }
.archive-type-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.95rem 1.1rem; background-color: var(--bg-light); border-radius: var(--radius-sm); border: 1px solid var(--border-light); font-size: 0.9rem; font-weight: 500; }
.atom-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; border-top: 1px solid var(--border-light); padding-top: 1.5rem; }
.atom-status { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; color: var(--text-muted); }
.pulse-dot { width: 10px; height: 10px; background-color: #10b981; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }

/* Estilos de Miembros */
.member-card-exec { background: #ffffff; border-radius: var(--radius-md); padding: 2.25rem 2rem; box-shadow: var(--shadow-md); border: 1px solid var(--border-light); text-align: center; }
.member-card-editorial { background: #faf8f5; border-radius: var(--radius-md); padding: 2.25rem 2rem; border: 1px solid #e5e0d8; text-align: center; }
.member-directory-container { background: #14191e; border-radius: 14px; padding: 2.5rem; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: var(--shadow-lg); }
.directory-filters { display: flex; justify-content: center; gap: 0.85rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.filter-pill { padding: 0.5rem 1.25rem; border-radius: var(--radius-full); font-size: 0.85rem; font-weight: 600; cursor: pointer; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.8); border: 1px solid rgba(255, 255, 255, 0.15); }
.filter-pill.active { background: var(--accent-blue); color: #ffffff; border-color: var(--accent-blue); }

.member-card-directory { background: #1e2630; border-radius: 12px; padding: 1.75rem; border: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; justify-content: space-between; }
.member-dir-header { display: flex; gap: 1.25rem; align-items: flex-start; margin-bottom: 1.25rem; }
.member-dir-img { width: 95px; height: 95px; border-radius: 8px; object-fit: cover; flex-shrink: 0; border: 2px solid rgba(255, 255, 255, 0.15); }
.member-dir-placeholder { width: 95px; height: 95px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: var(--accent-gold); flex-shrink: 0; }
.member-dir-info h3 { color: #ffffff !important; font-size: 1.3rem; margin-bottom: 0.2rem; }
.member-dir-role { font-size: 0.83rem; color: var(--accent-gold) !important; font-weight: 600; display: block; margin-bottom: 0.6rem; }
.member-dir-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.dir-tag { padding: 0.2rem 0.6rem; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: var(--radius-full); font-size: 0.73rem; color: rgba(255, 255, 255, 0.85); }
.member-dir-bio { font-size: 0.9rem; color: rgba(255, 255, 255, 0.78); line-height: 1.6; margin-bottom: 1.5rem; }
.member-dir-footer { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.member-dir-email { font-size: 0.83rem; color: rgba(255, 255, 255, 0.7); }
.member-dir-email a { color: rgba(255, 255, 255, 0.9); }

/* single-cihsp_member.php */
.member-single-hero { padding-top: 160px; padding-bottom: 4rem; background: linear-gradient(135deg, #14191e 0%, #1f2730 100%); color: #ffffff; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.member-single-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 768px) { .member-single-grid { grid-template-columns: 280px 1fr; } }
.member-single-avatar { width: 100%; max-width: 280px; height: 320px; object-fit: cover; border-radius: var(--radius-md); border: 3px solid var(--accent-gold); box-shadow: var(--shadow-lg); }
.member-single-avatar-placeholder { width: 100%; max-width: 280px; height: 320px; background: rgba(255,255,255,0.06); border-radius: var(--radius-md); border: 3px solid var(--accent-gold); display: flex; align-items: center; justify-content: center; font-size: 4rem; color: var(--accent-gold); }

/* Formulario de Contacto */
.contact-form-card { background: #ffffff; padding: 2.5rem; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); border: 1px solid var(--border-light); width: 100%; }
.form-group { margin-bottom: 1.5rem; display: flex; flex-direction: column; align-items: flex-start; width: 100%; }
.form-group label { display: block !important; font-size: 0.88rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.45rem; text-align: left; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="url"], .form-group textarea, .form-group select { width: 100% !important; display: block !important; box-sizing: border-box !important; padding: 0.85rem 1.1rem !important; border: 1px solid #cbd5e1 !important; border-radius: var(--radius-sm) !important; font-family: var(--font-body) !important; font-size: 0.95rem !important; background-color: #f8fafc !important; color: var(--text-primary) !important; }

.pub-card { background: #ffffff; border-radius: var(--radius-md); padding: 2rem; box-shadow: var(--shadow-md); border: 1px solid var(--border-light); }
.pub-badge { display: inline-block; padding: 0.2rem 0.65rem; background: rgba(217,56,30,0.08); color: var(--accent-ochre); font-size: 0.72rem; font-weight: 700; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.pub-title { font-size: 1.3rem; color: var(--primary-navy); margin-bottom: 0.6rem; }
.pub-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; display: block; }
.pub-desc { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.25rem; }
.pub-link { font-size: 0.88rem; font-weight: 600; color: var(--accent-ochre); }

.site-footer { background-color: #14191e; color: rgba(255, 255, 255, 0.82) !important; padding-top: 5rem; border-top: 1px solid rgba(197, 160, 89, 0.25); }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding-bottom: 4rem; }
.footer-desc { margin-top: 1.25rem; font-size: 0.9rem; color: rgba(255, 255, 255, 0.75) !important; }
.footer-links h4 { color: #ffffff !important; margin-bottom: 1.25rem; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a { color: rgba(255, 255, 255, 0.78) !important; }
.footer-bottom { background-color: rgba(0, 0, 0, 0.4); padding: 1.5rem 0; font-size: 0.85rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer-bottom-flex { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: rgba(255, 255, 255, 0.65) !important; }
