/*
Theme Name: Catequesis Capuchinos
Theme URI: https://cateques-wp.local.lan
Author: Christian
Description: Tema calco del Joomla 1.5 Catequesis Familiar Capuchinos. Layout de 3 columnas en el main: sidebar izquierdo (banners + menu), contenido central, sidebar derecho (8 banners apilados). Header simple con logo + titulo. Fondo oscuro con acentos dorados.
Version: 1.0
License: GPL-2.0+
Text Domain: catequesis
Tags: dark, three-columns, left-sidebar, right-sidebar, custom-menu
*/

/* ============================================
   RESET & BASE
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", Verdana, sans-serif;
    font-size: 13px;
    color: #d5d5d5;
    background: #1a1a1a;
    line-height: 1.5;
}

a { color: #e8b94a; text-decoration: none; }
a:hover { color: #ffd97a; text-decoration: underline; }

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

p { margin-bottom: 1em; }

h1, h2, h3, h4, h5, h6 {
    color: #f0f0f0;
    font-weight: bold;
    margin: 1em 0 0.5em;
    line-height: 1.2;
}

h1 { font-size: 22px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
#wrapper {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   HEADER (logo + titulo, SIN columna derecha)
   ============================================ */
#header {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    border-bottom: 3px solid #8b6914;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-center {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 80px;
}

.header-center a {
    display: block;
    line-height: 0;
}

.header-logo-large {
    max-height: 220px;
    width: auto;
    max-width: 600px;
    height: auto;
    display: block;
}

.site-title {
    margin: 0;
    font-size: 32px;
    color: #ffd97a;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    line-height: 1.1;
}

.site-tagline {
    color: #c0c0c0;
    font-size: 14px;
    margin-top: 8px;
    font-style: italic;
    line-height: 1.4;
}

/* ============================================
   MAIN: 3 COLUMNAS (sidebar + content + sidebar-right)
   ============================================ */
#main {
    display: flex;
    flex: 1;
    align-items: stretch;
}

/* Sidebar izquierdo: banners + menu + buscador */
#sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #232323;
    border-right: 1px solid #3a3a3a;
    padding: 18px 0;
    order: 1;
}

/* Contenido central */
#content {
    flex: 1;
    padding: 25px 30px;
    background: #2a2a2a;
    overflow-x: auto;
    min-width: 0;
    order: 2;
}

/* Sidebar derecho: 8 banners apilados */
#sidebar-right {
    width: 220px;
    flex-shrink: 0;
    background: #232323;
    border-left: 1px solid #3a3a3a;
    padding: 18px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    order: 3;
}

#sidebar-right .sidebar-right-banner-link {
    display: block;
    width: 100%;
    text-align: center;
}

#sidebar-right .sidebar-right-banner-large img,
#sidebar-right .sidebar-right-banner-large .sidebar-right-banner {
    width: 100%;
    max-width: 200px;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    display: block;
    border: 1px solid #4a4a4a;
    margin: 0 auto;
}

#sidebar-right .sidebar-right-banner-small img,
#sidebar-right .sidebar-right-banner-small .sidebar-right-banner {
    width: 100%;
    max-width: 200px;
    height: auto;
    object-fit: contain;
    display: block;
    border: 1px solid #4a4a4a;
    margin: 0 auto;
}

/* ============================================
   MENU LATERAL (15 items estilo Joomla)
   ============================================ */
#sidebar .widget { margin-bottom: 25px; }

#sidebar .widget-title {
    background: linear-gradient(to bottom, #4a3a1a, #2a1f0a);
    color: #ffd97a;
    font-size: 13px;
    font-weight: bold;
    padding: 8px 14px;
    margin: 0 0 1px;
    border-bottom: 1px solid #6a5010;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#sidebar ul.menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

#sidebar ul.menu li {
    border-bottom: 1px solid #3a3a3a;
}

#sidebar ul.menu li a {
    display: block;
    padding: 9px 14px 9px 24px;
    color: #d5d5d5;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s;
}

#sidebar ul.menu li a:hover,
#sidebar ul.menu li.current-menu-item > a,
#sidebar ul.menu li.current_page_item > a {
    background: #3a2f1a;
    color: #ffd97a;
    text-decoration: none;
    border-left: 3px solid #e8b94a;
    padding-left: 21px;
}

/* ============================================
   BANNERS EN SIDEBAR IZQUIERDO
   ============================================ */
#sidebar .sidebar-banner,
#sidebar .sidebar-banner-fixed {
    padding: 8px 10px;
    text-align: center;
    margin-bottom: 4px;
}

#sidebar .sidebar-banner img,
#sidebar .sidebar-banner .banner-img,
#sidebar .sidebar-banner-fixed img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 1px solid #3a3a3a;
}

/* ============================================
   CONTENT AREA
   ============================================ */
.page-header {
    background: #232323;
    border-left: 4px solid #e8b94a;
    padding: 10px 18px;
    margin-bottom: 20px;
    color: #ffd97a;
}

.page-header h1,
.page-header h2 {
    margin: 0;
    font-size: 18px;
    color: #ffd97a;
}

.post,
.page,
.category-archive,
.article-list {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #3a3a3a;
}

.post h2,
.article-list h3 {
    color: #f0f0f0;
    margin-top: 0;
}

.post h2 a,
.article-list h3 a {
    color: #ffd97a;
}

.post-meta {
    color: #888;
    font-size: 11px;
    margin-bottom: 12px;
}

.post-content img,
.page-content img {
    border: 3px solid #3a3a3a;
    margin: 8px;
    max-width: 100%;
    height: auto;
}

.post-content iframe { max-width: 100%; }

/* ============================================
   AUDIO PLAYER
   ============================================ */
.audio-player {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.audio-player audio { width: 100%; }

/* ============================================
   GALLERY
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.gallery-grid .gallery-item {
    background: #232323;
    border: 1px solid #3a3a3a;
    padding: 6px;
    text-align: center;
}

.gallery-grid .gallery-item img {
    max-width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    margin: 0 auto 4px;
}

.gallery-grid .gallery-item .caption {
    font-size: 11px;
    color: #aaa;
}

/* ============================================
   FORMS (CF7)
   ============================================ */
.wpcf7-form {
    background: #232323;
    border: 1px solid #3a3a3a;
    padding: 20px;
    border-radius: 4px;
    max-width: 600px;
}

.wpcf7-form p { margin-bottom: 14px; }

.wpcf7-form label {
    display: block;
    color: #d5d5d5;
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 12px;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="subject"],
.wpcf7-form textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #4a4a4a;
    color: #e0e0e0;
    padding: 7px 10px;
    font-family: inherit;
    font-size: 13px;
    border-radius: 3px;
}

.wpcf7-form textarea { min-height: 120px; resize: vertical; }

.wpcf7-form input[type="submit"] {
    background: linear-gradient(to bottom, #c8a04a, #8b6914);
    color: #1a1a1a;
    border: none;
    padding: 9px 25px;
    font-weight: bold;
    font-size: 13px;
    border-radius: 3px;
    cursor: pointer;
    transition: filter 0.15s;
}

.wpcf7-form input[type="submit"]:hover { filter: brightness(1.15); }

/* ============================================
   WEBLINKS (Enlaces Web)
   ============================================ */
.weblinks-list { list-style: none; padding: 0; }

.weblinks-list li {
    background: #232323;
    border: 1px solid #3a3a3a;
    border-left: 4px solid #e8b94a;
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 0 3px 3px 0;
}

.weblinks-list li a {
    font-weight: bold;
    color: #ffd97a;
    display: block;
    margin-bottom: 3px;
}

.weblinks-list li .description {
    color: #aaa;
    font-size: 12px;
}

/* ============================================
   FOOTER
   ============================================ */
#footer {
    background: #1a1a1a;
    border-top: 2px solid #3a3a3a;
    padding: 15px 20px;
    text-align: center;
    color: #888;
    font-size: 11px;
}

#footer a { color: #e8b94a; }

#footer .footer-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

#footer .footer-menu li a {
    color: #c0c0c0;
    font-size: 12px;
}

/* ============================================
   UTILITIES
   ============================================ */
.alignleft { float: left; margin: 0 15px 10px 0; }
.alignright { float: right; margin: 0 0 10px 15px; }
.aligncenter { display: block; margin: 0 auto 10px; }

.text-center { text-align: center; }

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

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