/*
Theme Name: Copes Theme
Theme URI: https://drcopesurologo.com.ar/
Description: Tema de la Plataforma Profesional Dr. Francisco Copes. Solo presentacion: la logica vive en el plugin copes-core.
Author: Proyecto Dr. Francisco Copes
Version: 0.4.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.1
Template: twentytwentyfive
Text Domain: copes-theme
*/

:root {
	--copes-verde: #0c3321;
	--copes-verde-medio: #1b5538;
	--copes-salvia: #4a5c51;
	--copes-crema: #f7f6ec;
	--copes-claro: #e6eae3;
	--copes-borde: #dde3dc;
	--copes-tinta: #23272a;
	--copes-sombra: 0 1px 2px rgba(12, 51, 33, .05), 0 8px 24px rgba(12, 51, 33, .06);
}

body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; }

/* Cabecera */
.copes-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--copes-borde); }
.admin-bar .copes-header { top: 32px; }
.copes-header__barra { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: .7rem; }
.copes-marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; flex-shrink: 0; }
.copes-marca img { width: 40px; height: 40px; object-fit: contain; display: block; }
.copes-marca__texto { display: flex; flex-direction: column; line-height: 1.15; }
.copes-marca__nombre { font-family: Lora, Georgia, serif; font-weight: 600; font-size: 1.12rem; color: var(--copes-verde); letter-spacing: -.01em; }
.copes-marca__rubro { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--copes-salvia); }
.copes-header .wp-block-navigation { font-size: .98rem; }
.copes-header .wp-block-navigation a { color: var(--copes-tinta); text-decoration: none; font-weight: 500; }
.copes-header .wp-block-navigation a:hover { color: var(--copes-verde); text-decoration: underline; text-underline-offset: 4px; }
.copes-header__acciones { display: flex; align-items: center; gap: 1.25rem; }
.copes-btn-header { background: var(--copes-verde); color: #fff !important; padding: .6rem 1.15rem; border-radius: 8px; font-weight: 600; font-size: .95rem; text-decoration: none !important; white-space: nowrap; }
.copes-btn-header:hover { background: var(--copes-verde-medio); }
@media (max-width: 860px) {
	.copes-marca__rubro { display: none; }
	.copes-btn-header { display: none; }
}

/* Botones */
.wp-block-button__link { transition: background-color .15s ease, color .15s ease; }
.wp-block-button.is-style-outline > .wp-block-button__link { color: var(--copes-verde); border: 2px solid var(--copes-verde); background: transparent; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--copes-verde); color: #fff; }
.copes-btn { display: inline-block; background: var(--copes-verde); color: #fff; padding: .95rem 1.7rem; border: 0; border-radius: 8px; font-size: 1.0625rem; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.copes-btn:hover { background: var(--copes-verde-medio); color: #fff; }
.copes-btn-wa { background: #1f7a52; }
.copes-link { color: var(--copes-verde); font-weight: 600; }

/* Portada */
.copes-hero { background: linear-gradient(180deg, var(--copes-crema) 0%, #fff 100%); border-bottom: 1px solid var(--copes-borde); }
.copes-hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3.5rem; align-items: center; padding-block: 4.5rem 4rem; }
.copes-hero__eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--copes-salvia); font-weight: 600; margin: 0 0 1rem; }
.copes-hero h1 { margin: 0 0 1.1rem; }
.copes-hero__lead { font-size: 1.2rem; line-height: 1.55; color: #3c4a42; margin: 0 0 1.9rem; max-width: 30rem; }
.copes-hero__acciones { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 1.6rem; }
.copes-hero__mat { font-size: .88rem; color: var(--copes-salvia); margin: 0; letter-spacing: .02em; }
.copes-hero__foto { position: relative; }
.copes-hero__foto img { width: 100%; display: block; border-radius: 14px; box-shadow: var(--copes-sombra); object-fit: cover; aspect-ratio: 4 / 5; }
@media (max-width: 880px) {
	.copes-hero__grid { grid-template-columns: 1fr; gap: 2.25rem; padding-block: 2.5rem 2.75rem; }
	.copes-hero__lead { font-size: 1.08rem; max-width: none; }
	.copes-hero__foto img { aspect-ratio: 5 / 4; object-position: center 22%; }
	.copes-hero__acciones .copes-btn { flex: 1 1 100%; text-align: center; }
}

/* Secciones */
.copes-seccion { padding-block: 4rem; }
.copes-seccion--crema { background: var(--copes-crema); }
.copes-seccion--verde { background: var(--copes-verde); color: #fff; }
.copes-seccion--verde h2, .copes-seccion--verde h3 { color: #fff; }
.copes-seccion--verde a { color: #cfe3d6; }
.copes-seccion__intro { max-width: 40rem; color: #41504a; }
.copes-seccion--verde .copes-seccion__intro { color: #d6e3da; }
.copes-cabecera-seccion { margin-bottom: 2rem; }
.copes-cabecera-seccion h2 { margin: 0 0 .6rem; }
@media (max-width: 880px) { .copes-seccion { padding-block: 2.75rem; } }

/* Sedes */
.copes-sedes-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.copes-sede-card { border: 1px solid var(--copes-borde); border-radius: 12px; padding: 1.4rem 1.35rem; background: #fff; display: flex; flex-direction: column; gap: .35rem; box-shadow: 0 1px 2px rgba(12,51,33,.04); }
.copes-sede-card h3 { margin: 0; font-size: 1.18rem; }
.copes-loc { color: var(--copes-salvia); margin: 0; font-size: .92rem; letter-spacing: .02em; }
.copes-sede-card .copes-link { margin-top: auto; padding-top: .9rem; }
.copes-horarios { list-style: none; padding: 0; margin: .4rem 0 0; font-size: .95rem; }
.copes-horarios li span { font-weight: 600; }
.copes-pendiente { color: var(--copes-salvia); font-style: italic; font-size: .95rem; }
.copes-sede dl { display: grid; grid-template-columns: minmax(8rem, 11rem) 1fr; gap: .7rem 1.5rem; margin: 1.5rem 0; }
.copes-sede dt { font-weight: 600; color: var(--copes-verde); }
.copes-sede dd { margin: 0; }
@media (max-width: 600px) {
	.copes-sede dl { grid-template-columns: 1fr; gap: .15rem; }
	.copes-sede dt { margin-top: 1rem; }
}

/* Actividad */
.copes-actividad { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.copes-actividad img { width: 100%; border-radius: 12px; display: block; object-fit: cover; aspect-ratio: 4 / 3; }
@media (max-width: 880px) { .copes-actividad { grid-template-columns: 1fr; gap: 1.75rem; } }

/* Preguntas frecuentes */
.copes-faq { display: grid; gap: .6rem; }
.copes-faq details { border: 1px solid var(--copes-borde); border-radius: 10px; background: #fff; padding: 0 1.2rem; }
.copes-faq summary { cursor: pointer; font-weight: 600; color: var(--copes-verde); padding: 1.05rem 0; list-style: none; font-size: 1.02rem; }
.copes-faq summary::-webkit-details-marker { display: none; }
.copes-faq summary::after { content: "+"; float: right; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--copes-salvia); }
.copes-faq details[open] summary::after { content: "\2013"; }
.copes-faq details > p { margin: 0 0 1.1rem; }

/* Formulario */
.copes-form { max-width: 36rem; }
.copes-form p { margin-block: 1.15rem; }
.copes-form label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .97rem; }
.copes-form input[type="text"], .copes-form input[type="tel"], .copes-form input[type="email"], .copes-form select {
	width: 100%; padding: .85rem .9rem; border: 1px solid #c6cfc6; border-radius: 8px; font-size: 1.0625rem; background: #fff; font-family: inherit; color: var(--copes-tinta);
}
.copes-form input:focus, .copes-form select:focus { outline: 2px solid var(--copes-verde); outline-offset: 1px; border-color: var(--copes-verde); }
.copes-form .copes-consent label, .copes-form .copes-hp label { font-weight: 400; }
.copes-form .copes-consent { background: var(--copes-crema); border-radius: 8px; padding: .9rem 1rem; }
.copes-form .copes-consent input { margin-right: .5rem; }
.copes-form .copes-btn { width: 100%; text-align: center; }
.copes-hp { position: absolute; left: -9999px; }
.copes-error { background: #f6e5e5; border-left: 4px solid #a33; padding: .9rem 1rem; border-radius: 0 8px 8px 0; }
.copes-urgencias { background: var(--copes-crema); border-left: 4px solid var(--copes-verde); padding: 1rem 1.1rem; font-size: .96rem; border-radius: 0 8px 8px 0; }
@media (min-width: 600px) { .copes-form .copes-btn { width: auto; min-width: 16rem; } }

/* Perfil */
.copes-perfil-bloque { border-top: 1px solid var(--copes-borde); padding-top: 1.3rem; margin-top: 1.3rem; }
.copes-perfil-bloque h3 { font-size: 1.08rem; color: var(--copes-verde); margin-bottom: .35rem; }

/* Pie */
.copes-footer { background: var(--copes-verde); color: #d6e3da; }
.copes-footer a { color: #fff; text-decoration: none; }
.copes-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.copes-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-block: 3.25rem 2rem; }
.copes-footer__marca img { width: 44px; height: 44px; object-fit: contain; margin-bottom: .8rem; }
.copes-footer__nombre { font-family: Lora, Georgia, serif; font-size: 1.15rem; color: #fff; font-weight: 600; margin: 0 0 .25rem; }
.copes-footer p { margin: 0 0 .45rem; font-size: .93rem; }
.copes-footer h4 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #9db5a6; margin: 0 0 .9rem; font-weight: 600; }
.copes-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .95rem; }
.copes-footer__legal { border-top: 1px solid rgba(255,255,255,.14); padding-block: 1.25rem 2.25rem; font-size: .85rem; color: #9db5a6; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; justify-content: space-between; }
.copes-footer__legal a { color: #cfe3d6; }
@media (max-width: 780px) { .copes-footer__grid { grid-template-columns: 1fr; gap: 2rem; padding-block: 2.5rem 1.5rem; } }

/* Contenedores */
.copes-interior { max-width: 72rem; margin-inline: auto; padding-inline: 1.25rem; }
.copes-footer__interior { max-width: 72rem; margin-inline: auto; padding-inline: 1.25rem; }
.copes-seccion > .wp-block-group { max-width: 72rem; margin-inline: auto; }
.copes-centro { text-align: center; }

/* AJUSTES FINOS */
@media (min-width: 861px) {
	.copes-header .wp-block-navigation__container > .wp-block-navigation-item:last-child { display: none; }
}
.wp-site-blocks > * { margin-block-start: 0; }
main.wp-block-group { margin-block: 0; }
.copes-footer { margin-block-start: 0; }
.copes-header { margin-block-end: 0; }
.copes-footer__marca img { opacity: .95; }

.copes-form input, .copes-form select, .copes-form textarea, .copes-form button { box-sizing: border-box; max-width: 100%; }
.copes-sede-card, .copes-faq details, .copes-urgencias, .copes-error, .copes-form .copes-consent { box-sizing: border-box; }
html, body { overflow-x: clip; }

/* Sedes con datos en la misma página */
.copes-sedes-grid--detalle { grid-template-columns: 1fr; gap: 1rem; }
.copes-sede-card--detalle { padding: 1.7rem; }
.copes-sede-card--detalle h3 { font-size: 1.3rem; }
.copes-sede-card--detalle .copes-sede dl { margin: 1.1rem 0 0; gap: .55rem 1.5rem; }
.copes-sede-card--detalle .copes-sede p { margin-bottom: 0; }
