/*
Theme Name: Thinkprom
Description: Tema ligero a medida para thinkprom.com (sustituye a Uncode). Landing en bloques editables.
Version: 1.2.1
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: thinkprom
License: GPL-2.0-or-later
*/

:root {
	--tp-accent: #43cb83;
	--tp-accent-dark: #2fa86a;
	--tp-brand: #941b80;
	--tp-ink: #222;
	--tp-text: #444;
	--tp-muted: #777;
	--tp-light: #f7f7f7;
	--tp-line: #eaeaea;
	--tp-dark: #222;
	--tp-darker: #111;
	--tp-radius: 10px;
	--tp-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--tp-gutter: clamp(16px, 4vw, 32px);
	--tp-section: clamp(56px, 9vw, 112px);
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 90px;
}

body {
	margin: 0;
	background: #fff;
	color: var(--tp-text);
	font-family: var(--tp-font);
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--tp-accent-dark);
	text-decoration: none;
}

a:hover,
a:focus-visible {
	text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.6em;
	color: var(--tp-ink);
	font-weight: 600;
	line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.1rem; }

p {
	margin: 0 0 1em;
}

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

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100;
	width: auto;
	height: auto;
	clip: auto;
	padding: 8px 16px;
	background: #fff;
}

.tp-container {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: var(--tp-gutter);
}

/* Buttons */
.wp-element-button,
.wp-block-button__link,
.wpcf7-submit {
	display: inline-block;
	padding: 0.85em 2em;
	border: 0;
	border-radius: 999px;
	background: var(--tp-accent);
	color: #fff;
	font: 600 0.85rem/1.2 var(--tp-font);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease;
}

.wp-element-button:hover,
.wp-block-button__link:hover,
.wpcf7-submit:hover {
	background: var(--tp-accent-dark);
	color: #fff;
	text-decoration: none;
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--tp-line);
	backdrop-filter: blur(6px);
}

.admin-bar .site-header {
	top: 32px;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 76px;
	gap: 24px;
}

.site-logo img,
.custom-logo {
	display: block;
	width: 380px;
	max-width: 70vw;
	height: auto;
}

.site-nav__menu,
.site-nav__menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__menu {
	display: flex;
	gap: 28px;
}

.site-nav__menu li {
	position: relative;
}

.site-nav__menu a {
	display: block;
	padding: 8px 0;
	color: var(--tp-ink);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.site-nav__menu a:hover,
.site-nav__menu .current-menu-item > a {
	color: var(--tp-accent-dark);
	text-decoration: none;
}

.site-nav__menu .sub-menu {
	position: absolute;
	top: 100%;
	left: -16px;
	min-width: 260px;
	padding: 10px 16px;
	border-radius: var(--tp-radius);
	background: #fff;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: all 0.15s ease;
}

.site-nav__menu li:hover > .sub-menu,
.site-nav__menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.site-nav__menu .sub-menu a {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
}

.nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
	display: block;
	width: 24px;
	height: 2px;
	margin: auto;
	background: var(--tp-ink);
	transition: transform 0.2s ease;
}

.nav-toggle__bar {
	position: relative;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
	position: absolute;
	content: "";
}

.nav-toggle__bar::before { top: -7px; }
.nav-toggle__bar::after { top: 7px; }

@media (max-width: 900px) {
	.nav-toggle {
		display: block;
	}

	.site-nav {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		display: none;
		padding: 8px var(--tp-gutter) 24px;
		background: #fff;
		border-bottom: 1px solid var(--tp-line);
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav__menu {
		flex-direction: column;
		gap: 0;
	}

	.site-nav__menu .sub-menu {
		position: static;
		min-width: 0;
		padding: 0 0 0 16px;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

/* Classic themes wrap every group's content in an extra div; let the children sit in the group's own grid/flex. */
.wp-block-group__inner-container {
	display: contents;
}

/* Landing sections */
.tp-front > .alignfull {
	margin: 0;
	padding-block: var(--tp-section);
}

.tp-front .wp-block-group.tp-container,
.tp-front .tp-container {
	max-width: 1200px;
}

.tp-eyebrow {
	margin-bottom: 0.6em;
	color: var(--tp-accent);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.tp-dark {
	background-color: var(--tp-dark);
	color: rgba(255, 255, 255, 0.78);
}

.tp-dark h1,
.tp-dark h2,
.tp-dark h3,
.tp-dark h3 a {
	color: #fff;
}

.tp-dark a {
	color: var(--tp-accent);
}

.tp-front h2.has-text-align-center {
	max-width: 820px;
	margin-inline: auto;
	margin-bottom: 1.6em;
}

/* Hero: the old Thinkprom video (it carries its own messages, so nothing is laid over it) */
.tp-front .tp-hero {
	min-height: min(78vh, 62vw);
	padding: 0;
	background: var(--tp-darker);
}

/* Darker overlay to hide the video's low quality; its own messages stay readable */
.tp-front .tp-hero.wp-block-cover .wp-block-cover__background.has-background-dim {
	background-color: #000 !important;
	opacity: 0.5;
}

/* Headline right below the video */
.tp-headline {
	margin-bottom: clamp(40px, 6vw, 72px);
}

.tp-headline h1 {
	max-width: 820px;
}

.tp-headline h1::after {
	display: block;
	width: 72px;
	height: 4px;
	margin-top: 0.4em;
	border-radius: 2px;
	background: var(--tp-accent);
	content: "";
}

.tp-headline .tp-lead {
	max-width: 680px;
	font-size: 1.1rem;
}

.tp-headline .wp-block-buttons {
	margin-top: 2em;
}

/* Cover heroes: the home video and inner-page headers */
.tp-front > .wp-block-cover.alignfull {
	margin: 0;
}

.tp-front .tp-page-hero {
	min-height: clamp(280px, 40vw, 440px);
	padding-block: clamp(72px, 10vw, 128px);
}

.tp-page-hero h1 {
	max-width: 900px;
	margin-inline: auto;
	color: #fff;
}

.tp-page-hero .tp-lead {
	max-width: 680px;
	margin-inline: auto;
	color: rgba(255, 255, 255, 0.85);
	font-size: 1.1rem;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-cover__video-background {
		display: none;
	}
}

/* Inner pages: text + image sections */
.tp-light {
	background: var(--tp-light);
}

.tp-split {
	gap: clamp(24px, 6vw, 80px);
}

.tp-rounded img {
	width: 100%;
	border-radius: var(--tp-radius);
}

.tp-front .tp-narrow .tp-container {
	max-width: 820px;
}

/* Intro */
.tp-intro .wp-block-columns {
	gap: clamp(24px, 6vw, 80px);
}

/* Why: 3 x 3 grid of cards */
.tp-why__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.tp-why__item {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 32px 28px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--tp-radius);
	background: var(--tp-darker);
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.tp-why__item:hover {
	transform: translateY(-4px);
	border-color: var(--tp-accent);
}

.tp-why__item > * {
	margin: 0 !important;
}

.tp-why__icon img {
	width: 56px;
}

.tp-why__item p {
	color: #fff;
	font-weight: 500;
}

@media (max-width: 900px) {
	.tp-why__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.tp-why__grid {
		grid-template-columns: 1fr;
	}
}

/* Cards (services / products) */
.tp-grid {
	display: grid;
	gap: 24px;
}

.tp-grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tp-grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.tp-card {
	padding: 32px 28px;
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	background: #fff;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tp-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.tp-card--dark {
	border-color: rgba(255, 255, 255, 0.08);
	background: var(--tp-darker);
}

.tp-card__icon {
	margin: 0 0 20px !important;
}

.tp-card__icon img {
	width: 56px;
}

.tp-card h3 {
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 1rem;
}

.tp-card p {
	margin: 0;
	font-size: 0.92rem;
}

/* Work gallery */
.tp-work {
	background: var(--tp-light);
}

.tp-front .tp-work__gallery.wp-block-gallery {
	--wp--style--unstable-gallery-gap: 12px;
	gap: 12px;
}

.tp-front .tp-work__gallery.wp-block-gallery img {
	aspect-ratio: 5 / 2;
	object-fit: cover;
}

.tp-work__gallery img {
	border-radius: 6px;
	transition: transform 0.3s ease;
}

.tp-work__gallery .wp-block-image:hover img {
	transform: scale(1.03);
}

/* Clients */
.tp-front .tp-clients {
	padding-block: clamp(40px, 6vw, 72px);
	background-color: var(--tp-darker);
}

.tp-front .tp-clients__logos.wp-block-gallery {
	--wp--style--unstable-gallery-gap: 40px;
	align-items: center;
	gap: 24px 40px;
}

.tp-clients__logos img {
	max-height: 96px;
	width: auto !important;
	margin: auto;
	opacity: 0.75;
	transition: opacity 0.2s ease;
}

.tp-clients__logos .wp-block-image:hover img {
	opacity: 1;
}

/* News (latest posts block): 3 cards in a row */
.tp-news .wp-block-latest-posts.is-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	margin: 0;
	padding: 0;
}

.tp-news .wp-block-latest-posts.is-grid li {
	display: flex;
	flex-direction: column;
	width: auto;
	margin: 0;
	padding-bottom: 24px;
	overflow: hidden;
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	background: #fff;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tp-news .wp-block-latest-posts.is-grid li:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.tp-news .wp-block-latest-posts.is-grid li > :not(.wp-block-latest-posts__featured-image) {
	padding-inline: 24px;
}

.tp-news .wp-block-latest-posts__featured-image {
	margin: 0 0 8px;
}

.wp-block-latest-posts__featured-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.wp-block-latest-posts__post-title {
	display: block;
	margin-top: 0.6em;
	color: var(--tp-ink);
	font-weight: 600;
	line-height: 1.35;
}

.wp-block-latest-posts__post-date {
	color: var(--tp-muted);
	font-size: 0.8rem;
}

.wp-block-latest-posts__post-excerpt {
	display: -webkit-box;
	overflow: hidden;
	margin-top: 0.4em;
	font-size: 0.92rem;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
}

@media (max-width: 900px) {
	.tp-news .wp-block-latest-posts.is-grid {
		grid-template-columns: 1fr;
	}
}

/* Contact */
.tp-front .tp-contact {
	background: linear-gradient(rgba(17, 17, 17, 0.88), rgba(17, 17, 17, 0.88)),
		url("assets/images/workshops.jpg") center / cover no-repeat;
}

.tp-contact__cols {
	gap: clamp(24px, 6vw, 80px);
}

/* Inner pages use whole sentences as the contact heading. */
.tp-contact h2 {
	font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}

.tp-contact__data {
	font-size: 0.95rem;
}

.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.wpcf7 textarea,
.wpcf7 select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	font: inherit;
}

.tp-main .wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.tp-main .wpcf7 textarea,
.tp-main .wpcf7 select {
	border-color: var(--tp-line);
	background: #fff;
	color: var(--tp-ink);
}

.wpcf7 textarea {
	max-height: 180px;
}

/* Inner pages / posts */
.tp-main {
	padding-block: clamp(40px, 7vw, 88px);
}

.tp-entry {
	max-width: 820px;
	margin-inline: auto;
}

.tp-entry__header {
	margin-bottom: 2em;
}

.tp-entry__meta {
	margin: 0;
	color: var(--tp-muted);
	font-size: 0.85rem;
}

.tp-entry__thumb {
	margin: 0 0 2em;
}

.tp-entry__thumb img {
	width: 100%;
	border-radius: var(--tp-radius);
}

.tp-entry__content > * + * {
	margin-top: 1em;
}

.tp-entry__content img {
	border-radius: 6px;
}

/* Old builder content hard-coded white text meant for dark backgrounds. */
.tp-entry__content [style*="color: #ffffff"],
.tp-entry__content [style*="color: #fff;"] {
	color: inherit !important;
}

.tp-legacy-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 12px;
	margin-block: 1.5em;
}

.tp-legacy-gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	aspect-ratio: 4 / 3;
}

.tp-legacy-icon {
	display: flex;
	align-items: center;
	gap: 16px;
}

.tp-legacy-icon img {
	width: 56px;
}

.tp-archive__header {
	margin-bottom: 2.5em;
}

.tp-post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 40px 32px;
}

.tp-post-card__thumb {
	display: block;
	overflow: hidden;
	border-radius: var(--tp-radius);
	background: var(--tp-light);
	aspect-ratio: 3 / 2;
}

.tp-post-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tp-post-card__body {
	padding-top: 16px;
}

.tp-post-card__title {
	font-size: 1.15rem;
}

.tp-post-card__title a {
	color: var(--tp-ink);
}

.nav-links {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 3em;
	padding-top: 2em;
	border-top: 1px solid var(--tp-line);
}

.pagination .nav-links {
	justify-content: center;
}

.page-numbers {
	padding: 4px 10px;
}

.page-numbers.current {
	border-radius: 4px;
	background: var(--tp-accent);
	color: #fff;
}

/* Footer */
.site-footer {
	padding-top: 64px;
	background: var(--tp-darker);
	color: rgba(255, 255, 255, 0.65);
	font-size: 0.9rem;
}

.site-footer a {
	color: rgba(255, 255, 255, 0.85);
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 40px;
}

.site-footer__brand .site-logo img {
	width: 180px;
	margin-bottom: 16px;
}

.site-footer__contact {
	font-style: normal;
}

.site-footer__legal ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__copy {
	margin: 48px auto 0;
	padding-block: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.8rem;
}

@media (max-width: 782px) {
	.site-footer__inner {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
