/*
Theme Name: Eye2
Description: Tema editorial ligero para Eye2Magazine, sin constructor visual ni JavaScript propio.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 8.1
Text Domain: eye2
*/

:root {
	--ink: #0e1116;
	--text: #1a1e23;
	--soft: #2f353b;
	--muted: #555c63;
	--line: #c9cdd2;
	--tint: #f2f3f5;
	--red: #d92d20;
	--red-text: #b42318;
	--serif: Georgia, "Times New Roman", Times, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--wrap: 1240px;
	--gutter: 24px;
}

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

body {
	margin: 0;
	background: #fff;
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.45;
	-webkit-text-size-adjust: 100%;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red-text); }
:focus-visible { outline: 2px solid var(--red-text); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip {
	position: absolute;
	left: 8px;
	top: -60px;
	z-index: 20;
	padding: 10px 14px;
	background: #fff;
	color: var(--ink);
}
.skip:focus { top: 8px; }

/* Cabecera */

.topbar { background: var(--ink); color: #fff; font-size: 13px; }
.topbar .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 24px;
	padding-block: 8px;
}
.topbar a { color: #fff; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }
.topbar__date::first-letter { text-transform: uppercase; }

.masthead {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 12px 24px;
	padding-block: 20px 16px;
}

.logo { display: block; color: var(--ink); line-height: 1; text-align: center; }
.logo:hover { color: var(--ink); }
.logo__name { display: block; font-weight: 800; font-size: 48px; letter-spacing: -0.02em; }
.logo__name sup {
	margin-left: 1px;
	color: var(--red);
	font-size: 26px;
	line-height: 0;
	vertical-align: 16px;
}
.logo__tag {
	display: block;
	margin-top: 4px;
	padding-left: 0.34em;
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.34em;
}

.sections { justify-self: start; }
.sections summary {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding-inline: 4px;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	list-style: none;
}
.sections summary::-webkit-details-marker { display: none; }
.sections__panel {
	position: absolute;
	inset-inline: var(--gutter);
	top: 100%;
	z-index: 10;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 2px 24px;
	margin: 0;
	padding: 18px 20px;
	border: 1px solid var(--ink);
	background: #fff;
	list-style: none;
}
.sections__panel a { display: block; padding-block: 9px; font-weight: 600; font-size: 15px; }

.search-box { display: flex; gap: 8px; margin: 0; }
.masthead .search-box { justify-self: end; }
.search-box input {
	width: 150px;
	height: 44px;
	padding-inline: 12px;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: #fff;
	color: var(--ink);
	font: inherit;
	font-size: 15px;
}
.search-box button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 2px;
	background: var(--ink);
	color: #fff;
	cursor: pointer;
}

.nav { border-top: 1px solid var(--ink); border-bottom: 3px solid var(--ink); }
.nav__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 28px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-weight: 700;
	font-size: 14px;
}
.nav__list a { display: block; margin-bottom: -3px; padding: 13px 0 10px; border-bottom: 3px solid transparent; }
.nav__list a[aria-current], .nav__list .current-menu-item a { border-bottom-color: var(--red); }

/* Tarjetas */

.card { min-width: 0; }
.card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--tint); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__kicker {
	display: block;
	margin: 12px 0 4px;
	color: var(--red-text);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.card__kicker:hover { text-decoration: underline; }
.card__title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1.2; }
.card__excerpt { margin: 10px 0 0; color: var(--soft); font-family: var(--serif); font-size: 17px; line-height: 1.4; }
.card__meta { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.card--lead .card__media, .card--wide .card__media, .card--secondary .card__media { aspect-ratio: 16 / 9; }
.card--lead .card__kicker { margin-top: 16px; font-size: 13px; }
.card--lead .card__title { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; letter-spacing: -0.01em; }
.card--lead .card__excerpt { font-size: 20px; }
.card--secondary .card__title { font-size: 23px; line-height: 1.15; }
.card--text { padding-top: 18px; border-top: 1px solid var(--line); }
.card--text .card__kicker { margin-top: 0; }

.card--wide { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 20px 32px; align-items: center; }
.card--wide .card__kicker { margin-top: 0; }
.card--wide .card__title { font-size: clamp(26px, 3vw, 34px); line-height: 1.1; }
.card--wide .card__excerpt { font-size: 19px; }

/* Portada y listados */

.main { padding-block: 28px 0; }

.hero { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 32px; }
.hero__side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.band { margin-top: 40px; padding-top: 12px; border-top: 3px solid var(--ink); }
.band__title {
	margin: 0 0 16px;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 32px 28px; }

.sponsored-band { margin-top: 40px; padding: 18px 20px 20px; background: var(--tint); }
.sponsored-band__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 20px;
	margin-bottom: 12px;
	font-size: 13px;
}
.sponsored-band__title {
	margin: 0;
	color: #3c4248;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.sponsored-band__head a { text-decoration: underline; }
.sponsored-band ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 10px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
	line-height: 1.35;
}

.page-head { margin-bottom: 28px; padding-bottom: 12px; border-bottom: 3px solid var(--ink); }
.page-head__title {
	margin: 0;
	font-family: var(--serif);
	font-weight: 700;
	font-size: clamp(30px, 4vw, 42px);
	line-height: 1.1;
}
.page-head__text { margin: 8px 0 0; color: var(--soft); font-family: var(--serif); font-size: 18px; }
.page-head__text p { margin: 0; }

.pagination { margin-top: 40px; }
.pagination .nav-links, .pagination.plain { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding-inline: 12px;
	border: 1px solid var(--line);
	font-weight: 600;
	font-size: 14px;
}
.pagination .page-numbers.current { border-color: var(--ink); background: var(--ink); color: #fff; }
.pagination .page-numbers.dots { border: 0; }

.authors {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 4px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.authors a { display: flex; justify-content: space-between; gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.authors span { color: var(--muted); font-size: 14px; }

/* Artículo */

.article__head, .article__media, .article__foot { margin-inline: auto; }
.article__head { max-width: 860px; }
.article__kicker {
	display: inline-block;
	margin-bottom: 10px;
	color: var(--red-text);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.article__title {
	margin: 0;
	font-family: var(--serif);
	font-weight: 700;
	font-size: clamp(32px, 5vw, 50px);
	line-height: 1.06;
	letter-spacing: -0.01em;
}
.article__dek { margin: 16px 0 0; color: var(--soft); font-family: var(--serif); font-size: clamp(20px, 2.4vw, 23px); line-height: 1.35; }
.article__byline {
	margin: 18px 0 0;
	padding-block: 12px;
	border-block: 1px solid var(--line);
	color: #3c4248;
	font-size: 14px;
}
.article__byline a { color: var(--ink); font-weight: 700; }

.notice { max-width: 860px; margin: 16px auto 0; padding: 10px 14px; background: var(--tint); color: #3c4248; font-size: 14px; }
.notice strong { color: var(--ink); }

.article__media { max-width: 1040px; margin-top: 24px; margin-bottom: 0; }
.article__media img { width: 100%; max-height: 640px; object-fit: contain; background: var(--tint); }
.article__media figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; }

.article__foot { max-width: 680px; margin-top: 28px; font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags a { display: block; padding: 6px 10px; border: 1px solid var(--line); }

/* Artículo en dos columnas */

.article-layout {
	display: grid;
	grid-template-columns: minmax(0, 780px) 340px;
	justify-content: space-between;
	gap: 48px;
}
.article-layout__main { min-width: 0; }
.article-layout .article__head, .article-layout .article__media, .article-layout .article__foot,
.article-layout .notice, .article-layout .prose { max-width: none; margin-inline: 0; }
.article-layout .prose > :first-child { margin-top: 0; }

.sidebar { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.sidebar__sticky { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 32px; }
.side-block { padding-top: 12px; border-top: 3px solid var(--ink); }
.side-block .band__title, .side-about .band__title { margin-bottom: 12px; }

.side-list { margin: 0; padding: 0; list-style: none; }
.side-list li + li { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.side-list a { display: flex; gap: 12px; }
.side-list img { flex: none; width: 72px; height: 72px; object-fit: cover; background: var(--tint); }
.side-list__title { display: block; font-family: var(--serif); font-weight: 700; font-size: 16px; line-height: 1.25; }
.side-list time { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

.side-rank { margin: 0; padding: 0; list-style: none; counter-reset: side-rank; }
.side-rank li {
	display: flex;
	gap: 12px;
	padding-block: 10px;
	border-bottom: 1px solid var(--line);
	counter-increment: side-rank;
	font-family: var(--serif);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.25;
}
.side-rank li:first-child { padding-top: 0; }
.side-rank li::before {
	content: counter(side-rank);
	flex: none;
	width: 20px;
	color: var(--red-text);
	font-size: 22px;
	line-height: 1;
}

.side-about { padding: 18px 20px 20px; background: var(--tint); }
.side-about p { margin: 0 0 12px; color: var(--soft); font-family: var(--serif); font-size: 16px; line-height: 1.4; }
.side-about ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 14px; }
.side-about ul a { text-decoration: underline; }

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding-inline: 18px;
	border-radius: 2px;
	background: var(--ink);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
}
.button:hover { background: var(--red-text); color: #fff; }

/* Texto de los artículos y las páginas */

.prose {
	max-width: 680px;
	margin: 28px auto 0;
	color: var(--text);
	font-family: var(--serif);
	font-size: 20px;
	line-height: 1.6;
	overflow-wrap: break-word;
}
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure, .prose table, .prose pre { margin: 0 0 20px; }
.prose h2, .prose h3, .prose h4 { margin: 32px 0 12px; color: var(--ink); font-weight: 700; line-height: 1.15; }
.prose h2 { font-size: 29px; }
.prose h3 { font-size: 24px; }
.prose h4 { font-size: 20px; }
.prose a { color: var(--red-text); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose blockquote { padding-left: 18px; border-left: 3px solid var(--ink); color: var(--soft); font-style: italic; }
.prose iframe, .prose video { display: block; width: 100%; max-width: 100%; border: 0; }
.prose iframe { aspect-ratio: 16 / 9; height: auto; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-family: var(--sans); font-size: 16px; }
.prose th, .prose td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
.prose pre { overflow-x: auto; padding: 14px; background: var(--tint); font-size: 15px; }
.prose img { margin-inline: auto; }

.wp-caption, .prose figure { max-width: 100%; }
.wp-caption-text, .prose figcaption, .gallery-caption { margin-top: 8px; color: var(--muted); font-family: var(--sans); font-size: 13px; line-height: 1.4; }
.alignleft { float: left; margin: 6px 20px 12px 0; max-width: 50%; }
.alignright { float: right; margin: 6px 0 12px 20px; max-width: 50%; }
.aligncenter { display: block; margin-inline: auto; }
.prose::after { content: ""; display: block; clear: both; }

/* Formularios (Contact Form 7) */

.wpcf7 { display: flow-root; font-family: var(--sans); font-size: 16px; }
.wpcf7 label { display: block; font-weight: 600; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	margin-top: 6px;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: #fff;
	color: var(--ink);
	font: inherit;
	font-weight: 400;
}
.wpcf7 input[type="submit"] {
	min-height: 48px;
	padding-inline: 30px;
	border: 0;
	border-radius: 2px;
	background: var(--red-text);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.wpcf7 input[type="submit"]:hover { background: var(--ink); }
.wpcf7 input:focus, .wpcf7 textarea:focus { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 0; }
.wpcf7 .hidden-fields-container { display: none; }
.wpcf7 br { display: none; }
.wpcf7-form-control-wrap { display: block; }
.wpcf7-not-valid-tip { margin-top: 4px; color: var(--red-text); font-size: 13px; }

/* Contact Form 7 genera la etiqueta y el campo en párrafos separados. */
.wpcf7-form > p { margin: 0 0 6px; font-weight: 600; font-size: 15px; }
.wpcf7-form > p:has(.wpcf7-form-control-wrap) { margin-bottom: 18px; }
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form textarea { margin-top: 0; }
.wpcf7-form textarea { height: 170px; resize: vertical; }
.wpcf7-form input[type="submit"] { display: block; margin-top: 16px; }

.contact-card .wpcf7-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.contact-card .wpcf7-form > * { grid-column: 1 / -1; min-width: 0; }
.contact-card .wpcf7-form > p:nth-of-type(1) { grid-area: 1 / 1; }
.contact-card .wpcf7-form > p:nth-of-type(2) { grid-area: 2 / 1; }
.contact-card .wpcf7-form > p:nth-of-type(3) { grid-area: 1 / 2; }
.contact-card .wpcf7-form > p:nth-of-type(4) { grid-area: 2 / 2; }
.wpcf7-acceptance, .wpcf7-form-control-wrap:has(.wpcf7-acceptance) { display: inline; }
.wpcf7-acceptance .wpcf7-list-item { margin: 0 6px 0 0; }
.wpcf7-acceptance input { width: 18px; height: 18px; vertical-align: -3px; accent-color: var(--red-text); }
.wpcf7-form > p:has(.wpcf7-acceptance) { color: var(--soft); font-weight: 400; font-size: 14px; }
.wpcf7-form > p:has(.wpcf7-acceptance) a { color: var(--red-text); text-decoration: underline; }

/* Página de contacto */

.contact-hero { padding-block: 44px 96px; border-top: 6px solid var(--red); background: var(--ink); color: #fff; }
.contact-hero__kicker {
	margin: 0 0 8px;
	color: #ff8a7f;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.contact-hero__title {
	margin: 0;
	font-family: var(--serif);
	font-weight: 700;
	font-size: clamp(52px, 9vw, 96px);
	line-height: 1;
	letter-spacing: -0.02em;
}
.contact-hero__title span { color: #ff6a5c; }
.contact-hero__text { max-width: 640px; margin: 18px 0 0; color: #e4e6e9; font-family: var(--serif); font-size: clamp(19px, 2.2vw, 23px); line-height: 1.4; }

.contact-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
	align-items: start;
	gap: 32px 40px;
	margin-top: -56px;
}
.contact-card {
	min-width: 0;
	padding: 32px 36px 36px;
	border-top: 4px solid var(--red);
	background: #fff;
	box-shadow: 0 14px 40px rgba(14, 17, 22, 0.16);
}
.contact-card__title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 32px; line-height: 1.1; }
.contact-card__text { margin: 8px 0 24px; color: var(--muted); font-size: 15px; }

.contact-reasons { display: flex; flex-direction: column; min-width: 0; padding-top: 72px; }
.contact-reason { display: flex; gap: 16px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.contact-reason:last-child { border-bottom: 0; }
.contact-reason svg { flex: none; color: var(--red-text); }
.contact-reason__title { margin: 0 0 6px; font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1.2; }
.contact-reason p { margin: 0; color: var(--soft); font-size: 15px; line-height: 1.45; }
.contact-reason a { display: inline-block; margin-top: 8px; color: var(--red-text); font-weight: 700; font-size: 14px; text-decoration: underline; }

.gallery { display: grid; gap: 12px; margin-bottom: 20px; }
.gallery-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; }

/* Pie */

.footer { margin-top: 48px; background: var(--ink); color: #fff; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; padding-block: 32px; }
.footer__brand { margin: 0; font-weight: 800; font-size: 28px; letter-spacing: -0.02em; line-height: 1; }
.footer__brand sup { color: #ff6a5c; font-size: 15px; line-height: 0; vertical-align: 9px; }
.footer__tag { margin: 8px 0 0; color: #d5d8dc; font-size: 14px; }
.footer ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.footer a { color: #fff; }
.footer a:hover { text-decoration: underline; }

/* Pantallas estrechas */

@media (max-width: 1000px) {
	.article-layout { grid-template-columns: minmax(0, 1fr); }
	.sidebar__sticky { position: static; }
	.contact-layout { grid-template-columns: minmax(0, 1fr); }
	.contact-reasons { padding-top: 0; }
}

@media (max-width: 900px) {
	.hero { grid-template-columns: minmax(0, 1fr); }
	.card--wide { grid-template-columns: minmax(0, 1fr); }
	.card--wide .card__kicker { margin-top: 0; }
}

@media (max-width: 640px) {
	:root { --gutter: 16px; }

	.masthead { grid-template-columns: auto 1fr; padding-block: 12px; }
	.logo { grid-column: 2; grid-row: 1; justify-self: end; text-align: right; }
	.logo__name { font-size: 36px; }
	.logo__name sup { font-size: 20px; vertical-align: 12px; }
	.logo__tag { padding-left: 0; font-size: 9px; }
	.masthead .search-box { grid-column: 1 / -1; justify-self: stretch; }
	.masthead .search-box input { flex: 1; width: auto; min-width: 0; }

	.nav__list { flex-wrap: nowrap; justify-content: flex-start; gap: 0 20px; overflow: auto hidden; white-space: nowrap; scrollbar-width: none; }
	.nav__list::-webkit-scrollbar { display: none; }
	.nav__list a { margin-bottom: 0; }

	.grid { grid-template-columns: minmax(0, 1fr); }
	.contact-hero { padding-block: 32px 80px; }
	.contact-card { padding: 24px 20px 26px; }
	.contact-card .wpcf7-form { display: block; }
	.prose { font-size: 19px; }
	.alignleft, .alignright { float: none; margin: 0 auto 16px; max-width: 100%; }
	.gallery-columns-3, .gallery-columns-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
