/*
Theme Name: Agency-db
Theme URI: https://dianabuendia.com
Author: Diana Buendía
Author URI: https://dianabuendia.com
Description: Tema propio, ligero y optimizado para PageSpeed, diseñado para trabajar junto a Elementor sin peso extra. El SEO técnico (título, meta, sitemap, robots.txt, schema) lo maneja por completo el plugin Dibuen SEO IA Pro — este tema deliberadamente no toca nada de eso, para no competir con él.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 8.0
License: GPLv2 or later
Text Domain: agency-db
*/

/*
==================================================
RESET MÍNIMO
==================================================
Elementor ya trae su propio sistema de estilos para el contenido que
construyes con él — este tema no debe pelear con eso. Aquí solo van
los estilos base del documento (tipografía, colores por defecto,
accesibilidad), nunca estilos de "componentes" que Elementor ya
resuelve mejor.
*/

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.6;
	color: #1d2327;
	background: #fff;
}

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

a {
	color: inherit;
}

/* Salta directo al contenido — accesibilidad y una señal más de calidad para Core Web Vitals */
.agency-db-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: #1d2327;
	color: #fff;
	padding: 12px 20px;
	z-index: 100000;
	text-decoration: none;
}

.agency-db-skip-link:focus {
	left: 0;
}

/* Contenedor mínimo para plantillas que no usan el canvas de Elementor (404, búsqueda) */
.agency-db-fallback {
	max-width: 800px;
	margin: 60px auto;
	padding: 0 20px;
}

/*
==================================================
SINGLE.PHP — HERO: IMAGEN IZQUIERDA + TÍTULO DERECHA
==================================================
*/

.agency-db-hero {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: center;
}

.agency-db-hero-image img {
	border-radius: 16px;
	width: 100%;
}

.agency-db-eyebrow {
	text-transform: uppercase;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
	margin: 0 0 12px;
}

.agency-db-eyebrow a {
	text-decoration: none;
	color: #b8630f;
}

.agency-db-article-title {
	font-size: 38px;
	line-height: 1.15;
	margin: 0 0 14px;
}

.agency-db-article-subtitle {
	font-size: 19px;
	color: #555;
	margin: 0 0 16px;
}

.agency-db-byline {
	font-size: 14px;
	color: #777;
	margin: 0;
}

@media (max-width: 782px) {
	.agency-db-hero {
		grid-template-columns: 1fr;
	}
}

/*
==================================================
SINGLE.PHP — DOS COLUMNAS: CONTENIDO + SIDEBAR
==================================================
*/

.agency-db-article-layout {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px 40px;
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 48px;
	align-items: start;
}

.agency-db-article-content {
	min-width: 0; /* evita que imágenes/tablas rompan el ancho de la columna */
}

.agency-db-article-sidebar {
	position: sticky;
	top: 20px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.agency-db-widget {
	background: #f6f0e7;
	border-radius: 16px;
	padding: 20px;
}

.agency-db-widget-title {
	margin: 0 0 10px;
	font-size: 16px;
}

@media (max-width: 900px) {
	.agency-db-article-layout {
		grid-template-columns: 1fr;
	}

	.agency-db-article-sidebar {
		position: static;
	}
}

/*
==================================================
SINGLE.PHP — BIOGRAFÍA DEL AUTOR
==================================================
*/

.agency-db-author-bio {
	max-width: 1200px;
	margin: 0 auto 40px;
	padding: 24px 20px;
	display: flex;
	gap: 20px;
	align-items: flex-start;
	border-top: 1px solid #e5e5e5;
	border-bottom: 1px solid #e5e5e5;
}

.agency-db-author-avatar img {
	border-radius: 50%;
}

.agency-db-author-name {
	margin: 0 0 6px;
	font-size: 18px;
}

.agency-db-author-description {
	margin: 0 0 10px;
	color: #555;
}

.agency-db-author-social {
	display: flex;
	gap: 14px;
	font-size: 13px;
}

.agency-db-author-social a {
	text-decoration: none;
	font-weight: 600;
}

/*
==================================================
SINGLE.PHP — MÁS HISTORIAS
==================================================
*/

.agency-db-related {
	max-width: 1200px;
}

.agency-db-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.agency-db-related-grid > * {
	min-width: 0;
}

.agency-db-related-card {
	display: block;
	text-decoration: none;
	color: inherit;
}

.agency-db-related-card img {
	border-radius: 12px;
	margin-bottom: 12px;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.agency-db-related-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.4;
	word-break: break-word;
}

@media (max-width: 700px) {
	.agency-db-related-grid {
		grid-template-columns: 1fr;
	}

	.agency-db-author-bio {
		flex-direction: column;
	}
}

/*
==================================================
SINGLE.PHP — COMPARTIR EN REDES
==================================================
*/

.agency-db-share {
	display: flex;
	gap: 10px;
	margin-bottom: 24px;
}

.agency-db-share-btn {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
}

.agency-db-share-facebook { background: #1877f2; }
.agency-db-share-x        { background: #000; }
.agency-db-share-whatsapp { background: #25d366; }
.agency-db-share-linkedin { background: #0a66c2; }

/*
==================================================
SINGLE.PHP — ANTERIOR / SIGUIENTE
==================================================
*/

.agency-db-post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e5e5e5;
}

.agency-db-post-nav a {
	display: block;
	text-decoration: none;
	color: inherit;
}

.agency-db-post-nav-next {
	text-align: right;
}

.agency-db-post-nav-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #b8630f;
	margin-bottom: 4px;
}

.agency-db-post-nav-title {
	display: block;
	font-size: 14px;
	line-height: 1.4;
}

@media (max-width: 600px) {
	.agency-db-post-nav {
		grid-template-columns: 1fr;
	}

	.agency-db-post-nav-next {
		text-align: left;
	}
}

/*
==================================================
COMMENTS.PHP
==================================================
*/

.agency-db-comments-wrap {
	margin-top: 30px;
}

.agency-db-comments-title {
	font-size: 20px;
	margin-bottom: 20px;
}

.agency-db-comment-list {
	list-style: none;
	margin: 0 0 30px;
	padding: 0;
}

.agency-db-comment-list .comment-body {
	display: flex;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid #eee;
}

.agency-db-comment-list .avatar {
	border-radius: 50%;
	flex-shrink: 0;
}

.agency-db-comment-list .comment-author cite {
	font-style: normal;
	font-weight: 700;
	display: block;
}

.agency-db-comment-list .comment-metadata {
	font-size: 12px;
	color: #888;
	margin-bottom: 6px;
}

#respond {
	background: #f6f0e7;
	border-radius: 16px;
	padding: 24px;
}

#respond .comment-form-comment textarea {
	width: 100%;
	border-radius: 10px;
	border: 1px solid #d1d5db;
	padding: 12px;
}

#respond .form-submit input[type="submit"] {
	background: #d9791f;
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 12px 28px;
	font-weight: 700;
	cursor: pointer;
	width: 100%;
}

/*
==================================================
CATEGORY.PHP
==================================================
*/

.agency-db-category {
	max-width: 1200px;
}

.agency-db-category-layout {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 40px;
	align-items: start;
}

.agency-db-category-sidebar {
	position: sticky;
	top: 20px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

@media (max-width: 900px) {
	.agency-db-category-layout {
		grid-template-columns: 1fr;
	}

	.agency-db-category-sidebar {
		position: static;
	}
}

.agency-db-category-title {
	font-size: 28px;
	margin-bottom: 10px;
}

.agency-db-archive-description {
	color: #666;
	margin-bottom: 30px;
}

.agency-db-cat-list {
	display: flex;
	flex-direction: column;
}

.agency-db-cat-post {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 24px;
	padding: 24px 0;
}

.agency-db-cat-post + .agency-db-cat-post {
	border-top: 1px solid #e5e5e5;
}

.agency-db-cat-post-thumb {
	display: block;
	border-radius: 12px;
	overflow: hidden;
}

.agency-db-cat-post-thumb img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	margin: 0;
}

.agency-db-cat-post-body {
	min-width: 0;
}

.agency-db-cat-post-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #777;
	margin-bottom: 10px;
}

.agency-db-cat-post-meta img {
	border-radius: 50%;
}

.agency-db-cat-post-title {
	font-size: 22px;
	line-height: 1.3;
	margin: 0 0 10px;
}

.agency-db-cat-post-title a {
	text-decoration: none;
	color: inherit;
}

.agency-db-cat-post-excerpt {
	color: #555;
	margin: 0 0 16px;
}

.agency-db-cat-post-readmore {
	display: inline-block;
	background: #1d2327;
	color: #fff;
	text-decoration: none;
	padding: 10px 20px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 14px;
}

.agency-db-cat-post-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.agency-db-cat-share-btn {
	background: none;
	border: none;
	font-size: 16px;
	cursor: pointer;
	color: #777;
	padding: 0;
}

.agency-db-cat-post-continue {
	text-decoration: none;
	font-weight: 700;
	color: #1d2327;
	font-size: 14px;
}

@media (max-width: 600px) {
	.agency-db-cat-post {
		grid-template-columns: 1fr;
	}
}

/*
==================================================
HEADER — BARRA SUPERIOR
==================================================
*/

.agency-db-topbar {
	background: var(--agency-db-primary, #1d2327);
	color: #fff;
	font-size: 13px;
}

.agency-db-topbar-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 8px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}

.agency-db-topbar-contact {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.agency-db-topbar-contact a,
.agency-db-topbar-contact span {
	color: #fff;
	text-decoration: none;
	opacity: .9;
}

.agency-db-topbar-social {
	display: flex;
	gap: 8px;
}

.agency-db-topbar-social a {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .15);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	font-size: 12px;
	font-weight: 700;
}

/*
==================================================
HEADER — LOGO, MENÚ, CTA
==================================================
*/

.agency-db-site-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px 20px;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 30px;
}

.agency-db-header-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	justify-self: end;
}

.agency-db-branding {
	flex-shrink: 0;
}

.agency-db-site-title {
	font-size: 22px;
	font-weight: 800;
	text-decoration: none;
	color: var(--agency-db-primary, #1d2327);
}

.agency-db-primary-nav {
	display: flex;
	justify-content: center;
}

.agency-db-menu {
	list-style: none;
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0;
}

.agency-db-menu a {
	text-decoration: none;
	color: var(--agency-db-primary, #1d2327);
	font-weight: 600;
	font-size: 15px;
}

.agency-db-menu a:hover {
	color: var(--agency-db-accent, #d9791f);
}

.agency-db-cta-btn {
	background: var(--agency-db-accent, #d9791f);
	color: #fff;
	text-decoration: none;
	padding: 12px 24px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
	flex-shrink: 0;
}

.agency-db-header-accent {
	height: 6px;
	background: linear-gradient(90deg, var(--agency-db-primary, #1d2327), var(--agency-db-accent, #d9791f));
}

.agency-db-menu-toggle {
	display: none;
	background: none;
	border: none;
	flex-direction: column;
	gap: 5px;
	cursor: pointer;
	padding: 6px;
}

.agency-db-menu-toggle span {
	width: 24px;
	height: 2px;
	background: var(--agency-db-primary, #1d2327);
	display: block;
}

/*
==================================================
HEADER — RESPONSIVE
==================================================
*/

@media (max-width: 782px) {

	.agency-db-topbar-contact {
		display: none;
	}

	.agency-db-site-header-inner {
		grid-template-columns: auto auto;
		grid-template-areas: "logo actions" "nav nav";
		row-gap: 0;
	}

	.agency-db-branding {
		grid-area: logo;
	}

	.agency-db-header-actions {
		grid-area: actions;
	}

	.agency-db-menu-toggle {
		display: flex;
	}

	.agency-db-primary-nav {
		grid-area: nav;
		display: none;
		justify-content: flex-start;
		margin-top: 12px;
	}

	.agency-db-primary-nav.is-open {
		display: flex;
	}

	.agency-db-menu {
		flex-direction: column;
		gap: 0;
	}

	.agency-db-menu li {
		border-top: 1px solid #eee;
	}

	.agency-db-menu a {
		display: block;
		padding: 12px 0;
	}
}

/*
==================================================
FOOTER
==================================================
*/

.agency-db-site-footer {
	background: var(--agency-db-primary, #1d2327);
	color: #fff;
	margin-top: 40px;
}

.agency-db-site-footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 30px 20px;
	text-align: center;
}

.agency-db-footer-menu {
	list-style: none;
	display: flex;
	justify-content: center;
	gap: 24px;
	margin: 0 0 16px;
	padding: 0;
	flex-wrap: wrap;
}

.agency-db-footer-menu a {
	color: #fff;
	text-decoration: none;
	opacity: .85;
	font-size: 14px;
}

.agency-db-footer-copyright {
	font-size: 13px;
	opacity: .7;
	margin: 0;
}

/*
==================================================
PAGINACIÓN (category.php, archive.php)
==================================================
*/

.pagination,
.navigation.pagination {
	margin-top: 30px;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	margin: 0 4px 4px 0;
	border: 1px solid #d5d5d5;
	border-radius: 6px;
	text-decoration: none;
	color: #1d2327;
	font-size: 14px;
}

a.page-numbers:hover {
	border-color: var(--agency-db-accent, #d9791f);
	color: var(--agency-db-accent, #d9791f);
}

.page-numbers.current {
	background: #f0f0f0;
	font-weight: 700;
	border-color: #b5b5b5;
}

.page-numbers.dots {
	border: none;
}
