/*
Theme Name: Lupa Protestante
Theme URI: https://www.lupaprotestante.com
Author: Ignacio Simal
Description: Theme propio de Lupa Protestante, replica en PHP nativo del layout de revista, sin dependencia de page builders.
Version: 1.0.0
Text Domain: lupa-protestante
*/

:root{
	--color-accent: #F5570B;
	--color-dark: #1a1a1a;
	--color-dark-2: #222222;
	--color-text: #2b2b2b;
	--color-text-light: #6b6b6b;
	--color-border: #e5e5e5;
	--color-bg: #ffffff;
	--color-bg-alt: #fafafa;
	--font-heading: 'Oswald', 'Arial Narrow', sans-serif;
	--font-body: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
	--max-width: 1200px;
	--shadow-card: 0 1px 3px rgba(0,0,0,0.08);
}

*{ box-sizing: border-box; }

body{
	margin: 0;
	font-family: var(--font-body);
	color: var(--color-text);
	background: var(--color-bg-alt);
	line-height: 1.6;
}

a{ color: inherit; text-decoration: none; }
a:hover{ color: var(--color-accent); }
img{ max-width: 100%; height: auto; display: block; }

.container{
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 20px;
}

h1,h2,h3,h4{
	font-family: var(--font-heading);
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 0.3px;
	margin: 0 0 12px;
}

/* ---------- Topbar ---------- */
.topbar{
	background: var(--color-dark);
	color: #ccc;
	font-size: 13px;
}
.topbar .container{
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 40px;
}
.topbar .breadcrumb a{ color: #ccc; }
.topbar .breadcrumb a:hover{ color: var(--color-accent); }
.topbar .social a{
	margin-left: 14px;
	color: #ccc;
}
.topbar .social a:hover{ color: var(--color-accent); }

/* ---------- Branding ---------- */
.site-branding{
	background: var(--color-bg);
	border-bottom: 1px solid var(--color-border);
	padding: 28px 0;
}
.site-branding .container{
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px;
}
.site-branding .logo img,
.site-branding .logo{
	max-height: 70px;
}
.site-branding .logo-text{
	font-family: var(--font-heading);
	font-size: 34px;
	font-weight: 800;
	line-height: 1;
}
.site-branding .logo-text span{ color: var(--color-accent); }
.site-branding .tagline{
	font-family: var(--font-heading);
	font-size: 22px;
	color: #444;
	text-transform: none;
}
.site-branding .tagline em{
	color: var(--color-accent);
	font-style: normal;
}

/* ---------- Main nav ---------- */
.main-navigation{
	background: var(--color-bg);
	border-bottom: 1px solid var(--color-border);
}
.main-navigation .container{ display: flex; align-items: center; justify-content: space-between; }
.main-navigation ul{
	list-style: none;
	display: flex;
	margin: 0;
	padding: 0;
}
.main-navigation li a{
	display: block;
	padding: 18px 16px;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}
.main-navigation li a:hover{ color: var(--color-accent); }

.nav-toggle{
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 32px; height: 32px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
}
.nav-toggle span{
	display: block;
	width: 100%;
	height: 2px;
	background: var(--color-dark);
	transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity: 0; }
.nav-toggle.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.nav-search-toggle{
	background: none;
	border: none;
	cursor: pointer;
	padding: 0 4px;
	font-size: 15px;
	color: var(--color-dark);
}
.nav-search-toggle:hover{ color: var(--color-accent); }

.nav-search-panel{
	max-height: 0;
	overflow: hidden;
	background: var(--color-bg-alt);
	border-bottom: 1px solid transparent;
	transition: max-height .25s ease, border-color .25s ease;
}
.nav-search-panel.is-open{
	max-height: 90px;
	border-bottom-color: var(--color-border);
}
.nav-search-form{
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 16px 20px;
	display: flex;
	gap: 10px;
}
.nav-search-field{
	flex: 1;
	border: 1px solid var(--color-border);
	background: var(--color-bg);
	padding: 10px 14px;
	font-family: var(--font-body);
	font-size: 15px;
	color: var(--color-text);
}
.nav-search-field:focus{
	outline: none;
	border-color: var(--color-accent);
}
.nav-search-submit{
	border: none;
	background: var(--color-accent);
	color: #fff;
	width: 44px;
	cursor: pointer;
	font-size: 15px;
}
.nav-search-submit:hover{ opacity: .9; }

/* ---------- Ticker ---------- */
.latest-ticker{
	background: var(--color-bg);
	border-bottom: 1px solid var(--color-border);
}
.latest-ticker .container{
	display: flex;
	align-items: center;
	height: 44px;
	gap: 14px;
}
.latest-ticker .ticker-label{
	font-family: var(--font-heading);
	font-weight: 700;
	color: var(--color-accent);
	font-size: 14px;
	white-space: nowrap;
	border-right: 2px solid var(--color-border);
	padding-right: 14px;
}
.latest-ticker .ticker-track{
	flex: 1;
	overflow: hidden;
	position: relative;
	height: 20px;
}
.latest-ticker .ticker-item{
	position: absolute;
	inset: 0;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	opacity: 0;
	transition: opacity .4s ease;
}
.latest-ticker .ticker-item.is-active{ opacity: 1; }
.latest-ticker .ticker-nav{
	display: flex;
	gap: 6px;
}
.latest-ticker .ticker-nav button{
	border: 1px solid var(--color-border);
	background: var(--color-bg);
	width: 26px;
	height: 26px;
	cursor: pointer;
	font-size: 12px;
}
.latest-ticker .ticker-nav button:hover{ background: var(--color-accent); color:#fff; border-color: var(--color-accent); }

/* ---------- Banner rotativo ---------- */
.site-banner{
	max-width: var(--max-width);
	margin: 24px auto 0;
	padding: 0 20px;
}
.site-banner-track{
	position: relative;
	width: 100%;
	aspect-ratio: 5/1;
	overflow: hidden;
	border-radius: 2px;
	background: var(--color-bg-alt);
}
.banner-slide{
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity .6s ease;
}
.banner-slide.is-active{ opacity: 1; z-index: 1; }
.banner-slide a,
.banner-slide img,
.banner-slide video{ display:block; width:100%; height:100%; }
.banner-slide img,
.banner-slide video{ object-fit: contain; }
.banner-dots{
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 10px;
}
.banner-dot{
	width: 9px; height: 9px;
	border-radius: 50%;
	border: none;
	background: var(--color-border);
	cursor: pointer;
	padding: 0;
}
.banner-dot.is-active{ background: var(--color-accent); }

/* La proporción se mantiene igual en todos los tamaños, ya que object-fit: contain evita cualquier recorte, la imagen simplemente escala con la pantalla */
@media (max-width: 700px){
	.banner-dots{ margin-top: 12px; gap: 12px; }
	.banner-dot{ width: 12px; height: 12px; }
}

/* ---------- Section blocks ---------- */
.section-block{
	background: var(--color-bg);
	box-shadow: var(--shadow-card);
	margin: 24px 0;
	padding: 24px;
}
.section-title{
	display: flex;
	align-items: center;
	font-size: 18px;
	margin-bottom: 20px;
}
.section-title::before{
	content: '';
	display: inline-block;
	width: 4px;
	height: 20px;
	background: var(--color-accent);
	margin-right: 10px;
}
.comments-invite{
	font-family: var(--font-body);
	text-transform: none;
	font-weight: 600;
	font-size: 15px;
	color: var(--color-text-light);
	margin: 0 0 14px;
}

/* Grid of 9 cards */
.card-grid{
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 26px;
}
.card{ display: block; }
.card .card-thumb{
	position: relative;
	overflow: hidden;
	margin-bottom: 12px;
	aspect-ratio: 16/10;
	background: var(--color-bg-alt);
}
.card .card-thumb img{ width:100%; height:100%; object-fit: contain; }
.card .card-badge{
	position: absolute;
	top: 10px; right: 10px;
	background: rgba(255,255,255,0.9);
	border-radius: 50%;
	width: 40px; height: 40px;
	display:flex; align-items:center; justify-content:center;
	font-size: 10px; font-weight: 700; color: var(--color-accent);
}
.card h3{
	font-size: 16px;
	text-transform: none;
	margin-bottom: 6px;
}
.card .card-excerpt{
	font-size: 13px;
	color: var(--color-text-light);
	margin: 0 0 8px;
	line-height: 1.5;
}
.card .card-date{
	font-size: 12px;
	color: var(--color-text-light);
	text-transform: uppercase;
}

/* Bloques de categoría en columnas — el número de columnas lo fija --col-count según el grupo configurado en el Personalizador */
.category-columns{
	--col-count: 2;
	display: grid;
	grid-template-columns: repeat(var(--col-count), 1fr);
	gap: 22px;
	margin: 24px 0;
}
/* Con 3 o más columnas en la fila, ajustamos tipografía del destacado para que respire */
.category-columns[style*="--col-count: 3"] .featured-post h3,
.category-columns[style*="--col-count: 4"] .featured-post h3{
	font-size: 16px;
}
.category-columns[style*="--col-count: 3"] .featured-post .excerpt,
.category-columns[style*="--col-count: 4"] .featured-post .excerpt{
	font-size: 13px;
}
.category-columns[style*="--col-count: 3"] .section-block,
.category-columns[style*="--col-count: 4"] .section-block{
	padding: 18px;
}
.category-column .section-block{ margin: 0; height: 100%; }
.featured-post{ margin-bottom: 18px; }
.featured-post .featured-thumb{
	position: relative;
	aspect-ratio: 16/9;
	overflow: hidden;
	margin-bottom: 12px;
}
.featured-post .featured-thumb img{ width:100%; height:100%; object-fit:cover; }
.featured-post h3{ font-size: 18px; text-transform: none; }
.featured-post .excerpt{
	color: var(--color-text-light);
	font-size: 14px;
	margin: 6px 0;
}
.post-list{ list-style:none; margin:0; padding:0; }
.post-list li{
	display: flex;
	gap: 12px;
	padding: 12px 0;
	border-top: 1px solid var(--color-border);
}
.post-list li:first-child{ border-top: none; }
.post-list .list-thumb{
	flex: 0 0 70px;
	height: 55px;
	overflow: hidden;
}
.post-list .list-thumb img{ width:100%; height:100%; object-fit:cover; }
.post-list h4{
	font-size: 14px;
	text-transform: none;
	margin: 0 0 4px;
	font-weight: 600;
}
.post-list .card-date{ font-size: 11px; }

/* Espacio de publicidad que rellena una columna sin categoría o sin posts */
.category-column--ad{ height: 100%; }
.ad-slot{
	background: var(--color-bg);
	box-shadow: var(--shadow-card);
	height: 100%;
	min-height: 220px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 20px;
	overflow: hidden;
}
.ad-slot img{ width: 100%; height: auto; border-radius: 2px; }
.ad-slot a{ display:block; width:100%; height:100%; }
.ad-slot-label{
	display: block;
	font-size: 10px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--color-text-light);
	margin-bottom: 8px;
}
.ad-slot--empty{
	border: 1px dashed var(--color-border);
	box-shadow: none;
	background: var(--color-bg-alt);
}
.ad-slot--empty p{
	font-size: 12px;
	color: var(--color-text-light);
	margin: 0;
}

/* ---------- Single post ---------- */
.single-wrap{
	max-width: var(--max-width);
	margin: 24px auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: 2.2fr 1fr;
	gap: 30px;
	align-items: start;
}
.single-main{
	background: var(--color-bg);
	box-shadow: var(--shadow-card);
	padding: 30px;
}
.single-breadcrumb{
	font-size: 13px;
	color: var(--color-text-light);
	margin-bottom: 16px;
}
.single-featured-image{ margin-bottom: 20px; }
.single-meta{
	font-size: 12px;
	text-transform: uppercase;
	color: var(--color-text-light);
	margin-bottom: 10px;
}
.single-title{
	font-size: 30px;
	margin-bottom: 16px;
}
.single-share{
	display:flex;
	gap: 8px;
	margin-bottom: 24px;
}
.single-share a{
	width: 34px; height: 34px;
	border-radius: 50%;
	background: var(--color-bg-alt);
	display:flex; align-items:center; justify-content:center;
	font-size: 13px;
}
.single-content{ font-size: 17px; }
.single-content p{ margin: 0 0 20px; }

.sidebar-widget{
	background: var(--color-bg);
	box-shadow: var(--shadow-card);
	padding: 24px;
	margin-bottom: 24px;
}
.sidebar-widget .widget-title{
	display:flex; align-items:center;
	font-size: 15px;
	margin-bottom: 16px;
}
.sidebar-widget .widget-title::before{
	content:'';
	display:inline-block;
	width:4px; height:16px;
	background: var(--color-accent);
	margin-right: 8px;
}
.author-box{ display:flex; gap:14px; align-items:flex-start; }
.author-box img{ width: 70px; height: 70px; border-radius: 50%; object-fit: cover; }
.author-box h4{ font-size: 16px; text-transform:none; margin: 0 0 6px; }
.author-box p{ font-size: 13px; color: var(--color-text-light); margin: 0 0 10px; }
.author-box .author-link{ font-size: 13px; color: var(--color-accent); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer{
	background: var(--color-dark-2);
	color: #bbb;
	margin-top: 40px;
	padding: 50px 0 0;
}
.footer-columns{
	display: grid;
	grid-template-columns: 1.2fr 1fr 1fr;
	gap: 40px;
	padding-bottom: 40px;
	border-bottom: 1px solid #3a3a3a;
}
.footer-columns .widget-title{
	color: #fff;
	font-size: 15px;
	display:flex; align-items:center;
	margin-bottom: 16px;
}
.footer-columns .widget-title::before{
	content:'';
	display:inline-block;
	width:4px; height:16px;
	background: var(--color-accent);
	margin-right: 8px;
}
.footer-columns a{ color: #bbb; }
.footer-columns a:hover{ color: var(--color-accent); }
.footer-bottom{
	display:flex;
	justify-content: space-between;
	align-items:center;
	flex-wrap: wrap;
	gap: 12px;
	padding: 20px 0;
	font-size: 13px;
}
.footer-bottom nav ul{
	list-style:none;
	display:flex;
	gap: 18px;
	margin:0; padding:0;
}

.back-to-top{
	position: fixed;
	right: 24px; bottom: 24px;
	width: 44px; height: 44px;
	background: var(--color-accent);
	color: #fff;
	border-radius: 4px;
	display:flex; align-items:center; justify-content:center;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}
.back-to-top.is-visible{ opacity: 1; pointer-events: auto; }

/* ---------- Listado de autores ---------- */
.author-grid{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.author-card{
	display: block;
	text-align: center;
	padding: 24px 16px;
	border: 1px solid var(--color-border);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.author-card:hover{
	border-color: var(--color-accent);
	box-shadow: var(--shadow-card);
}
.author-card img{
	margin: 0 auto 14px;
	border-radius: 50%;
}
.author-card h3{
	font-size: 16px;
	text-transform: none;
	margin: 0 0 6px;
	color: var(--color-text);
}
.author-card:hover h3{ color: var(--color-accent); }
.author-card-count{
	display: inline-block;
	font-size: 12px;
	color: var(--color-text-light);
	text-transform: uppercase;
	margin-bottom: 10px;
}
.author-card p{
	font-size: 13px;
	color: var(--color-text-light);
	margin: 0;
}

.author-archive-header .author-box img{
	width: 90px; height: 90px; border-radius: 50%; object-fit: cover;
}

@media (max-width: 900px){
	.author-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
	.author-grid{ grid-template-columns: 1fr; }
}
/* ---------- Responsive general ---------- */
@media (max-width: 1000px){
	/* Grupos de 3 o más columnas bajan a 2 antes de colapsar del todo */
	.category-columns[style*="--col-count: 3"],
	.category-columns[style*="--col-count: 4"]{
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 900px){
	.card-grid{ grid-template-columns: repeat(2, 1fr); }
	.category-columns{ grid-template-columns: 1fr; }
	.single-wrap{ grid-template-columns: 1fr; }
	.footer-columns{ grid-template-columns: 1fr; }
}
@media (max-width: 700px){
	.card-grid{ grid-template-columns: 1fr; }
	.nav-toggle{ display: flex; }
	.main-navigation .container{ flex-wrap: wrap; }
	.main-navigation ul#primary-menu{
		flex-basis: 100%;
		flex-direction: column;
		max-height: 0;
		overflow: hidden;
		order: 3;
		transition: max-height .3s ease;
	}
	.main-navigation ul#primary-menu.is-open{ max-height: 600px; }
	.main-navigation li a{ padding: 12px 4px; border-top: 1px solid var(--color-border); }
	.site-branding .container{ flex-direction: column; align-items: flex-start; }
}
