/*
Theme Name: Tornaviaje Theme
Theme URI: https://tornaviaje.org
Author: Antigravity AI
Author URI: https://tornaviaje.org
Description: Tema premium personalizado estilo revista editorial y cuaderno de campo para Tornaviaje.org.
Version: 1.0.0
Text Domain: tornaviaje
*/

/* 1. Importación de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Spectral:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* 2. Variables del Sistema de Diseño */
:root {
    --bg-color: #f4f4f2;       /* Blanco roto premium neutral (no amarillento) */
    --card-bg: #ffffff;        /* Fondo blanco para las tarjetas */
    --text-primary: #111111;   /* Negro carbón exacto */
    --text-muted: #555555;     /* Gris grafito exacto */
    --accent: #174B75;         /* Azul editorial exacto */
    --accent-hover: #1c5d91;   /* Hover del azul editorial */
    --border-color: #e2e1db;   /* Color para bordes y separadores cálidos */
    --newsletter-bg: #DCE6F2;  /* Azul niebla exacto para newsletter/cajas */
    --font-serif: 'Spectral', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-lg: 20px;         /* feature-card: 20px */
    --radius-md: 16px;         /* secondary-card: 16px */
    --radius-sm: 13px;         /* recent-card: 13px */
    --radius-xs: 14px;         /* side-module: 14px */
    --radius-button: 7px;      /* Botones: 6px-8px */
    
    /* Sombras proyectadas hacia la izquierda (X negativo) */
    --shadow-feature: -18px 18px 42px rgba(17, 17, 17, 0.16), -3px 3px 8px rgba(17, 17, 17, 0.08);
    --shadow-secondary: -14px 14px 32px rgba(17, 17, 17, 0.14), -2px 2px 6px rgba(17, 17, 17, 0.06);
    --shadow-recent: -8px 8px 22px rgba(17, 17, 17, 0.11), -1px 1px 4px rgba(17, 17, 17, 0.05);
    --shadow-side: -12px 12px 28px rgba(17, 17, 17, 0.12), -2px 2px 6px rgba(17, 17, 17, 0.05);
    
    --transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 3. Estilos Generales y Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 25px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* 4. Estilos de Cabecera (Header) */
.site-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 22px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.site-branding a {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 500;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.site-branding .logo-dot {
    font-weight: 400;
    color: var(--text-muted);
}

/* Menú de Navegación */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 26px;
}

.main-navigation a {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 2px;
}

.main-navigation a:hover {
    color: var(--accent);
}

/* Acciones del Header (Iconos + Texto) */
.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-actions a {
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-primary);
}

.header-actions a:hover {
    color: var(--accent);
}

.header-actions .icon {
    width: 17px;
    height: 17px;
}

/* 5. Maquetación Principal Portada (Layout) */
.homepage-container {
    display: flex;
    gap: 45px;
    margin-top: 45px;
    margin-bottom: 70px;
}

.homepage-sidebar {
    width: 25%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.homepage-main-content {
    width: 75%;
    display: flex;
    flex-direction: column;
    gap: 45px;
}

/* 6. COLUMNA IZQUIERDA: Sidebar Components */
/* Presentación */
.presentation-title {
    font-family: var(--font-serif);
    font-size: 31px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.6px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.presentation-subtitle {
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.45;
}

.presentation-divider {
    width: 50px;
    height: 1px;
    background-color: #d1cfc9;
    border: none;
    margin-top: 25px;
    margin-bottom: 0;
}

/* Tarjeta Newsletter */
.newsletter-card {
    background-color: var(--newsletter-bg);
    border-radius: var(--radius-xs);
    padding: 30px 25px;
    box-shadow: var(--shadow-side);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-icon-container {
    background-color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.newsletter-mail-icon {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.newsletter-card h3 {
    font-family: var(--font-serif);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
}

.newsletter-card p {
    font-size: 13.5px;
    color: #5a6e7f;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input[type="email"] {
    background: var(--card-bg);
    border: 1px solid #d5dee5;
    border-radius: var(--radius-button);
    padding: 12px 15px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-primary);
    width: 100%;
    outline: none;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-button);
    padding: 12px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

/* Tarjeta Publicidad Selectiva */
.sidebar-ad-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ad-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.ad-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-xs);
    padding: 20px;
    box-shadow: var(--shadow-side);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.ad-content {
    flex: 1;
}

.ad-content h4 {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
}

.ad-content p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

.ad-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent);
}

.ad-link:hover {
    color: var(--accent-hover);
}

.ad-image-placeholder {
    width: 60px;
    height: 70px;
    background-color: #f2efe9;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.compass-svg {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
}

/* 7. COLUMNA DERECHA: Main Content Components */
/* Bloque Héroe */
.hero-card {
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    height: 390px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    box-shadow: var(--shadow-feature);
    position: relative;
}

.hero-card-content {
    padding: 40px;
    color: #ffffff;
    width: 100%;
    z-index: 2;
}

.post-badge {
    background-color: var(--accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 5px 9px;
    border-radius: 3px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 38px;
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.8px;
}

.hero-title a {
    color: #ffffff;
}

.hero-excerpt {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 22px;
    max-width: 65%;
}

.btn-read-more {
    display: inline-block;
    background-color: #ffffff;
    color: var(--text-primary);
    padding: 10px 22px;
    border-radius: var(--radius-button);
    font-size: 13px;
    font-weight: 600;
}

.btn-read-more:hover {
    background-color: var(--accent);
    color: #ffffff;
}

/* Bloque Cuadrícula (Grid) */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.grid-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-secondary);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
}

.grid-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-secondary);
}

.grid-card-image {
    height: 130px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.grid-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 5px 9px;
    border-radius: 3px;
    text-transform: uppercase;
    color: #ffffff;
    background-color: var(--accent); /* Todos uniformes con el azul corporativo */
    z-index: 2;
}

/* Play button overlay para videos */
.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(23, 75, 117, 0.85);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.play-icon {
    width: 18px;
    height: 18px;
    color: #ffffff;
    margin-left: 2px; /* Centrado óptico de la flecha */
}

.grid-card-content {
    padding: 15px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.grid-card-title {
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.25;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.grid-card-title a:hover {
    color: var(--accent);
}

.grid-card-excerpt {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 12px;
    flex-grow: 1;
}

.grid-card-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    align-self: flex-start;
}

.grid-card-link:hover {
    color: var(--accent-hover);
}

/* 8. SECCIÓN LO MÁS RECIENTE */
.section-recent {
    width: 100%;
}

.section-title-divider {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.recent-row {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 15px;
}

.recent-row::-webkit-scrollbar {
    height: 5px;
}

.recent-row::-webkit-scrollbar-track {
    background: transparent;
}

.recent-row::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.recent-card {
    width: 18.2%;
    min-width: 150px;
    flex-shrink: 0;
    background-color: var(--card-bg);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-recent);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.recent-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-recent);
}

.recent-card-image {
    height: 100px;
    background-size: cover;
    background-position: center;
    border-radius: 0;
    margin-bottom: 0;
    transition: var(--transition);
}

.recent-card-content {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.recent-card-category-label {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.recent-card-title {
    font-family: var(--font-serif);
    font-size: 12.5px;
    line-height: 1.25;
    font-weight: 600;
    margin-bottom: 3px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recent-card-title a:hover {
    color: var(--accent);
}

.recent-card-date {
    font-size: 10.5px;
    color: var(--text-muted);
}

/* 9. BARRA DE NAVEGACIÓN INFERIOR */
.bottom-navigation-bar {
    background-color: #f1efe9;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    margin-top: 40px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.bottom-nav-item:hover {
    color: var(--accent);
}

.bottom-nav-item svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
}

/* 10. Estilos de Páginas de Lectura (Single) */
.site-content-container {
    margin-top: 40px;
    margin-bottom: 60px;
}

.article-view {
    max-width: 740px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 50px 60px;
    box-shadow: var(--shadow-secondary);
}

.entry-category-badge {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
}

.entry-title {
    font-family: var(--font-serif);
    font-size: 40px;
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.entry-meta {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.entry-meta .meta-sep {
    margin: 0 10px;
}

.entry-featured-image {
    margin-bottom: 40px;
    margin-left: -60px;
    margin-right: -60px;
}

.entry-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 480px;
    object-fit: cover;
}

.entry-featured-image figcaption {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 10px;
    padding: 0 60px;
    font-style: italic;
}

/* Tipografía de Lectura */
.entry-content {
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-primary);
}

.entry-content p {
    margin-bottom: 25px;
}

.entry-content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-muted);
    font-size: 20px;
}

/* Formato Q&A para Entrevistas */
.interview-content p strong {
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 35px;
    margin-bottom: 8px;
}

/* Plantilla Perfiles */
.profile-card-layout {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.profile-sidebar {
    width: 30%;
    flex-shrink: 0;
}

.profile-main-content {
    width: 70%;
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 50px 60px;
    box-shadow: var(--shadow-secondary);
}

.profile-portrait {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: var(--shadow-secondary);
}

.profile-portrait img {
    width: 100%;
    height: auto;
    display: block;
}

.profile-quick-facts {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 25px;
    box-shadow: var(--shadow-side);
}

.profile-quick-facts h3 {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.profile-quick-facts ul {
    list-style: none;
}

.profile-quick-facts li {
    font-size: 14px;
    margin-bottom: 12px;
}

.profile-quick-facts li strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.profile-badge {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.profile-name {
    font-family: var(--font-serif);
    font-size: 44px;
    font-weight: 700;
    line-height: 1.15;
    margin-top: 10px;
    margin-bottom: 20px;
}

.profile-lead-in {
    font-size: 19px;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
}

/* Plantilla Exploraciones */
.exploration-detail-container {
    margin-top: 40px;
    margin-bottom: 60px;
}

.exploration-layout {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 50px 60px;
    box-shadow: var(--shadow-secondary);
}

.exploration-header {
    margin-bottom: 30px;
    text-align: center;
}

.exploration-badge {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.exploration-title {
    font-family: var(--font-serif);
    font-size: 42px;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 15px;
}

.exploration-quick-details {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 14px;
    color: var(--text-muted);
}

.exploration-banner {
    margin-left: -60px;
    margin-right: -60px;
    margin-bottom: 40px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.exploration-banner img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

.exploration-content-grid {
    display: flex;
    gap: 40px;
}

.exploration-diary {
    width: 70%;
}

.exploration-sidebar {
    width: 30%;
    flex-shrink: 0;
}

.exploration-meta-card {
    background-color: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: 30px 25px;
}

.exploration-meta-card h3 {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.meta-list {
    list-style: none;
}

.meta-list li {
    font-size: 14px;
    margin-bottom: 20px;
}

.meta-list li strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* Archivo Exploraciones */
.archive-exploraciones-container {
    margin-top: 50px;
    margin-bottom: 60px;
}

.page-header {
    margin-bottom: 40px;
}

.archive-badge {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-description {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 600px;
}

.exploraciones-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.exploracion-gallery-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-secondary);
    transition: var(--transition);
}

.exploracion-gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-secondary);
}

.exploracion-card-image {
    height: 280px;
    background-size: cover;
    background-position: center;
}

.exploracion-card-info {
    padding: 25px;
}

.exploracion-card-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.exploracion-card-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.exploracion-card-read-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

/* Multimedia Embeds */
.wp-block-embed,
.entry-content iframe {
    max-width: 100%;
    margin: 35px 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-secondary);
}

.wp-block-embed-youtube {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.wp-block-embed-youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Post Navigation */
.post-navigation {
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 600;
}

.post-navigation a {
    color: var(--accent);
}

.post-navigation a:hover {
    color: var(--accent-hover);
}

.site-footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 35px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-legal-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-legal-nav a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-legal-nav a:hover {
    color: var(--accent);
}

.footer-legal-nav .sep {
    color: var(--border-color);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    .footer-legal-nav {
        justify-content: center;
    }
}

/* 11.5. Estilos de la Galería Editorial */
.gallery-page-container {
    margin-top: 50px;
    margin-bottom: 80px;
}

.gallery-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-meta-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent);
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.gallery-main-title {
    font-family: var(--font-serif);
    font-size: 38px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.gallery-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}

.gallery-divider {
    width: 60px;
    height: 1px;
    background-color: var(--border-color);
    border: none;
    margin: 25px auto 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.gallery-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md); /* 16px */
    overflow: hidden;
    box-shadow: var(--shadow-secondary);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
}

.gallery-card-link-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-secondary);
}

.gallery-image-wrapper {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-card:hover .gallery-image-wrapper img {
    transform: scale(1.03);
}

.gallery-card-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gallery-card-title {
    font-family: var(--font-serif);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.gallery-card-description {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.gallery-card-credit {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    font-style: italic;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

/* Responsivo para la Galería */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-main-title {
        font-size: 30px;
    }
}

/* 11.6. Estilos de Detalle de Galería (Fotos + Texto Lateral) */
.gallery-detail-container {
    margin-top: 40px;
    margin-bottom: 80px;
}

.gallery-breadcrumb {
    margin-bottom: 25px;
}

.gallery-breadcrumb a {
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--accent);
    transition: var(--transition);
}

.gallery-breadcrumb a:hover {
    color: var(--accent-hover);
}

.gallery-detail-layout {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

/* Columna de fotos (60%) */
.gallery-visual-column {
    width: 60%;
    flex-shrink: 0;
}

.gallery-viewer {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-image-container {
    position: relative;
    border-radius: var(--radius-lg); /* 20px */
    overflow: hidden;
    box-shadow: var(--shadow-feature);
    background-color: var(--card-bg);
    aspect-ratio: 3/2; /* Mantener proporción apaisada limpia */
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-viewer-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(17,17,17,0.85) 0%, rgba(17,17,17,0.4) 60%, rgba(17,17,17,0) 100%);
    color: #ffffff;
    padding: 25px 20px 20px 20px;
    font-size: 13.5px;
    line-height: 1.4;
    font-weight: 400;
    font-family: var(--font-sans);
}

/* Fila de Miniaturas */
.thumbnails-slider-container {
    width: 100%;
    overflow: hidden;
}

.thumbnails-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px 2px 12px 2px;
}

/* Scrollbar para miniaturas */
.thumbnails-slider::-webkit-scrollbar {
    height: 5px;
}

.thumbnails-slider::-webkit-scrollbar-track {
    background: transparent;
}

.thumbnails-slider::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.thumb-item {
    width: 90px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius-button); /* 7px */
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    opacity: 0.65;
    box-shadow: var(--shadow-recent);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-item.active {
    border-color: var(--accent);
    opacity: 1;
    transform: scale(1.02);
}

.thumb-item:hover {
    opacity: 0.9;
}

/* Columna de texto lateral (40%) */
.gallery-text-column {
    width: 40%;
    position: sticky;
    top: 100px; /* Sticky para que flote al hacer scroll al lado de las fotos */
}

.gallery-detail-header {
    margin-bottom: 25px;
}

.gallery-detail-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent);
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.gallery-detail-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 20px;
    letter-spacing: -0.4px;
}

.gallery-metadata-box {
    background-color: var(--card-bg);
    border-radius: var(--radius-xs); /* 14px */
    padding: 18px 20px;
    box-shadow: var(--shadow-side);
}

.meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.meta-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.meta-row:first-child {
    padding-top: 0;
}

.meta-label {
    font-weight: 600;
    color: var(--text-primary);
}

.meta-val {
    color: var(--text-muted);
}

.gallery-detail-content {
    margin-top: 25px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-primary);
}

.lead-text {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.gallery-detail-content h3 {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.gallery-detail-content p {
    margin-bottom: 15px;
    color: var(--text-muted);
}

/* Responsivo para el Detalle de Galería */
@media (max-width: 1024px) {
    .gallery-detail-layout {
        flex-direction: column;
        gap: 35px;
    }
    
    .gallery-visual-column {
        width: 100%;
    }
    
    .gallery-text-column {
        width: 100%;
        position: static;
    }
}

/* 12. Diseño Adaptivo (Media Queries) */
@media (max-width: 1024px) {
    .homepage-container {
        flex-direction: column;
    }
    
    .homepage-sidebar {
        width: 100%;
        order: 2;
    }
    
    .homepage-main-content {
        width: 100%;
        order: 1;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .recent-row {
        gap: 15px;
    }
    
    .recent-card {
        width: 30%;
    }
}

@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-navigation {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        padding: 12px 0;
        margin-top: 8px;
        -ms-overflow-style: none;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(to right, black 82%, transparent 98%);
        mask-image: linear-gradient(to right, black 82%, transparent 98%);
    }

    .main-navigation::-webkit-scrollbar {
        display: none;
    }

    .main-navigation ul {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 22px;
        padding: 0 20px;
        margin: 0;
    }
    
    .main-navigation ul li {
        margin: 0;
        flex-shrink: 0;
    }
    
    .main-navigation a {
        display: block;
        padding: 4px 0;
        background-color: transparent;
        border: none;
        border-radius: 0;
        font-family: var(--font-sans);
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: var(--text-primary);
        box-shadow: none;
        transition: var(--transition);
    }
    
    .main-navigation a:hover {
        background-color: transparent;
        color: var(--accent);
        border-color: transparent;
    }

    .main-navigation ul li.current-menu-item a,
    .main-navigation ul li.current_page_parent a {
        color: var(--accent);
        border-bottom: 2px solid var(--accent);
    }
    
    .hero-card {
        height: 380px;
    }
    
    .hero-title {
        font-size: 26px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .recent-card {
        width: 45%;
    }
    
    .bottom-navigation-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}
