/*
Theme Name: García Costas
Template: twentytwentyfive
Description: Tema hijo de Twenty Twenty-Five para garciacostas.com. Reproduce el aspecto de la web anterior con bloques nativos de WordPress.
Author: HGA
Version: 1.0.7
Requires at least: 6.7
Text Domain: garciacostas
*/

/* ---------- Cabecera ---------- */
.gc-header-top { padding-top: 30px; padding-bottom: 28px; }
.gc-header-top .wp-block-site-logo img { max-width: 369px; height: auto; }

.gc-navbar {
	background: linear-gradient(to bottom, #ff1c2a 0%, #dd1c29 35%, #b51822 60%, #730f15 100%);
	min-height: 45px;
}
.gc-navbar .wp-block-navigation { gap: 0; }
.gc-navbar .wp-block-navigation .wp-block-navigation-item__content {
	color: #d9d9d9;
	padding: 12px 30px;
	line-height: 21px;
	font-weight: 300;
}
.gc-navbar .wp-block-navigation .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
.gc-navbar .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.gc-navbar .wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content,
.gc-navbar .wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] {
	background: #660606;
	color: #ffffff;
	text-decoration: none;
}
.gc-navbar .wp-block-navigation .wp-block-navigation__submenu-container {
	background: #660606 !important;
	border: 0 !important;
	min-width: 220px;
}
.gc-navbar .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	color: #ffffff;
	padding: 10px 20px;
}
.gc-navbar .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item:hover > .wp-block-navigation-item__content {
	background: #8a0b0b;
}
.gc-navbar .wp-block-navigation__responsive-container-open { color: #fff; padding: 10px 0; }
.gc-navbar .wp-block-navigation__responsive-container.is-menu-open { background: #660606; color: #fff; }

.gc-navbar .wp-block-search { margin: 0; }
.gc-navbar .wp-block-search__inside-wrapper {
	background: #c11a24;
	border: 1px solid #8f1219 !important;
	border-radius: 4px;
	padding: 0 !important;
	box-shadow: inset 0 1px 3px rgba(0,0,0,.35);
}
.gc-navbar .wp-block-search__input {
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 13px;
	padding: 4px 10px;
	min-width: 120px;
}
.gc-navbar .wp-block-search__input::placeholder { color: #f2f2f2; }
.gc-navbar .wp-block-search__button {
	background: transparent;
	color: #fff;
	padding: 2px 8px;
	margin: 0;
	border: 0;
}
.gc-navbar .wp-block-search__button svg { fill: #fff; min-width: 20px; min-height: 20px; }

/* ---------- Banda de título de página ---------- */
.gc-page-heading {
	background: #f9f9f9;
	border-bottom: 1px solid #cdcdcd;
	padding-top: 15px;
	padding-bottom: 12px;
}
.gc-breadcrumb { color: #9a9a9a; font-size: 14px; margin: 0; }
.gc-breadcrumb a { color: #9a9a9a; }
.gc-breadcrumb a:hover { color: #e3001b; }
.gc-page-heading .wp-block-post-title,
.gc-page-heading h1 { margin-top: 2px; margin-bottom: 0; }

/* ---------- Contenido ---------- */
.gc-main { padding-top: 20px; padding-bottom: 50px; }
.gc-main p { margin-top: 0; margin-bottom: 1em; }
.gc-main .wp-block-columns { margin-bottom: 20px; }
.wp-block-image.is-style-rounded img { border-radius: 8px; }
.wp-block-separator.is-style-wide { border-top: 1px solid #e0e0e0; border-bottom: 0; margin: 20px 0; opacity: 1; }
.gc-map iframe { width: 100%; height: 390px; border: 0; }
.wp-block-table td, .wp-block-table th { border-color: #dddddd; padding: 6px 8px; }

/* Rejilla de logos (marcas, grupo) */
.wp-block-gallery.gc-logos { gap: 30px; align-items: center; }
.wp-block-gallery.gc-logos .wp-block-image img { object-fit: contain !important; height: 64px !important; width: 100% !important; padding: 0 !important; }
.wp-block-gallery.gc-logos.is-cropped .wp-block-image img { aspect-ratio: auto; }

/* Bloque lateral "Entradas recientes" de portada */
.gc-sidebox { background: #e3e3e3; padding: 15px; }
.gc-sidebox h3 { margin-top: 15px; }
.gc-sidebox .wp-block-latest-posts { padding-left: 0; list-style: none; }
.gc-sidebox .wp-block-latest-posts li { margin-bottom: 8px; }

/* ---------- Slider de portada (bloques Portada) ---------- */
.gc-slider { position: relative; height: 500px; overflow: hidden; box-shadow: 0 6px 8px -4px rgba(0,0,0,.6); margin-bottom: 10px; }
.gc-slider > .wp-block-cover {
	position: absolute;
	inset: 0;
	margin: 0 !important;
	min-height: 500px !important;
	opacity: 0;
	transition: opacity 1.2s ease;
	z-index: 1;
}
.gc-slider > .wp-block-cover.is-active { opacity: 1; z-index: 2; }
.gc-slider.no-js > .wp-block-cover:first-child { opacity: 1; }
.gc-slider .gc-slide-title { color: #fff; font-family: Arial, Helvetica, sans-serif; font-weight: 700; font-size: 48px; line-height: 1.05; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.gc-slider .gc-slide-link { position: absolute; inset: 0; z-index: 3; }
.gc-slider-dots { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; z-index: 5; }
.gc-slider-dots button { width: 12px; height: 12px; border-radius: 50%; border: 0; margin: 0 5px; background: rgba(255,255,255,.6); cursor: pointer; padding: 0; }
.gc-slider-dots button.is-active { background: #e3001b; }
@media (max-width: 781px) {
	.gc-slider, .gc-slider > .wp-block-cover { height: 300px; min-height: 300px !important; }
	.gc-slider .gc-slide-title { font-size: 28px; }
	.gc-slider .gc-slide-products { display: none; }
}

/* ---------- Noticias ---------- */
.gc-news-item { border-bottom: 1px solid #e5e5e5; padding-bottom: 20px; margin-bottom: 20px; }
.gc-news-item .wp-block-post-date { color: #9a9a9a; font-size: 12px; }

/* ---------- Pie ---------- */
.gc-footer {
	background: #f9f9f9;
	border-top: 1px solid #dddddd;
	padding-top: 10px;
	padding-bottom: 20px;
	font-size: 11px;
	line-height: 1.3;
	color: #5c5c5c;
}
.gc-footer p { margin: 0; }
.gc-footer a { color: #000; font-weight: 700; }
.gc-footer .gc-footer-logo img { max-width: 270px; height: auto; }

/* ---------- Formulario de contacto ---------- */
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 textarea { width: 100%; border: 1px solid #cdcdcd; padding: 6px 8px; font: inherit; }
.wpcf7 input[type=submit] { background: #e3001b; color: #fff; border: 0; padding: 8px 20px; border-radius: 4px; cursor: pointer; }
.wpcf7 input[type=submit]:hover { background: #660606; }

/* ---------- Ajustes ---------- */
.wp-site-blocks > * + *, .gc-header > * + * { margin-block-start: 0 !important; }
.gc-navbar .wp-block-navigation-submenu > .wp-block-navigation-item__content { padding-right: 8px; }
.gc-navbar .wp-block-navigation__submenu-icon { color: #fff; margin-left: 0; margin-right: 22px; }
.gc-cell { padding: 3px 10px; margin-top: 4px !important; }
.gc-cell p { margin: 0 !important; }
.gc-cell + .gc-cell, .gc-cell + p { margin-top: 0 !important; }
.gc-main .wp-block-column > .wp-block-columns { margin-bottom: 0; }
.gc-main .wp-block-column > .wp-block-columns + .wp-block-columns { margin-top: 0; }
.wp-block-column:has(> .gc-cell) > p { padding: 3px 10px; margin: 0 !important; }
.wp-block-column:has(> .gc-cell) > .gc-cell { margin: 0 !important; }
.wp-block-column:has(> .gc-cell) > * + * { margin-block-start: 0 !important; }
.wp-block-gallery.gc-logos { justify-content: center; }
.wp-block-gallery.gc-logos.has-nested-images figure.wp-block-image:not(#individual-image) { flex-grow: 0; width: calc(25% - 30px); }
@media (max-width: 600px) { .wp-block-gallery.gc-logos.has-nested-images figure.wp-block-image:not(#individual-image) { width: calc(50% - 30px); } }

/* El menú desplegable siempre por encima del slider y del contenido */
.gc-header, header.wp-block-template-part:has(.gc-header) { position: relative; z-index: 100; }
.gc-navbar .wp-block-navigation__submenu-container { z-index: 101; }
.gc-slider { isolation: isolate; z-index: 0; }

/* Logos del grupo: todos en una caja de la misma altura para que se vean proporcionados */
.wp-block-gallery.gc-logos.has-nested-images figure.wp-block-image:not(#individual-image) { display: flex; align-items: center; justify-content: center; }
.wp-block-gallery.gc-logos .wp-block-image img,
.wp-block-gallery.gc-logos.has-nested-images figure.wp-block-image:not(#individual-image) img { height: 64px !important; width: 100% !important; max-width: 180px; object-fit: contain !important; padding: 0 !important; margin: 0 auto; }
.wp-block-gallery.gc-logos figure.wp-block-image { height: 80px !important; max-height: 80px !important; }
.wp-block-gallery.gc-logos figure.wp-block-image a { display: flex !important; align-items: center; justify-content: center; height: 100%; width: 100%; }
.wp-block-gallery.gc-logos figure.wp-block-image img { max-height: 64px !important; max-width: 180px !important; }
.wp-block-gallery.gc-logos figure.wp-block-image img[src*="fundivisa"] { max-height: 80px !important; }

/* Espacio entre los títulos y el texto que les sigue (privacidad, aviso legal, marcas...) */
.gc-main :is(h2, h3, h4).wp-block-heading { margin-bottom: 0.5em; }

/* Tipo de producto: rectángulos rojos de la primera fila a la misma altura en todas las columnas */
.page-id-223 .gc-main .wp-block-column:has(> .gc-cell) > h6.wp-block-heading { min-height: 70px; display: flex; align-items: flex-end; justify-content: center; margin: 0; }
.page-id-223 .gc-main .wp-block-column:has(> .gc-cell) > h6.wp-block-heading:first-child { margin-top: 104px; }
@media (max-width: 781px) {
	.page-id-223 .gc-main .wp-block-column:has(> .gc-cell) > h6.wp-block-heading { min-height: 0; margin-top: 16px; }
	.page-id-223 .gc-main .wp-block-column:has(> .gc-cell) > h6.wp-block-heading:first-child { margin-top: 16px; }
}
