/* ===================================================================
   CSS PROPIO de Viveros del Pozo. Se carga el ULTIMO (inc/cabecera.asp),
   asi manda sobre la plantilla sin tener que tocarla.
   Colores de la web: verde #66bb6a, verde oscuro #33691e, texto #555.
   =================================================================== */
:root {
	--verde: #66bb6a;
	--verde-oscuro: #33691e;
	--verde-claro: #c8e6c9;
	--rojo: #c62828;
	--texto: #555555;
}

/* ---- Boton flotante de WhatsApp (antes copiado en cada pagina) ---- */
.btn-flotante { position: fixed; bottom: 40px; right: 40px; transition: all 300ms ease 0ms; z-index: 99; }
.btn-flotante:hover { transform: translateY(-7px); }
@media only screen and (max-width: 600px) {
	.btn-flotante { bottom: 20px; right: 20px; }
	.btn-flotante img { width: 48px; height: auto; }
}

/* ---- Cabecera y pie ---- */
.ico-red { margin: 5px 0 0; }
.navbar-brand img { max-width: 100%; height: auto; }
.pie-datos { color: var(--verde-claro); margin-top: 20px; }
.pie-datos a, .pie-enlace { color: var(--verde); }

/* ---- Titulos que cambiaron de etiqueta (solo un h1 por pagina): su
        aspecto lo ponen los selectores gemelos de custom.css y
        responsive.css, ver datos/herramientas/gemelas_css.py. Aqui solo
        lo que daba la etiqueta en si: "Blog" de la noticia es un <p>. ---- */
.inner-header .cab-tit { line-height: 1.2; }
.titulo-centrado { text-align: center; padding-bottom: 40px; }
.boton-catalogo { background-color: var(--verde); color: #fff; }

/* ---- Horario en la portada (bloque verde) ---- */
.why-ecova.horario-portada { background: var(--verde); }
.horario-sub { font-weight: 600 !important; font-size: 20px !important; margin: 0 auto 10px !important; text-transform: uppercase; letter-spacing: 1px; }
.horario-dias { list-style: none; margin: 0 auto 25px; padding: 0; max-width: 620px; color: #fff; font-family: 'Roboto', sans-serif; font-size: 20px; }
.horario-dias li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.35); text-align: left; }
.horario-dias li:last-child { border-bottom: 0; }
.horario-dias strong { font-weight: 600; }
/* La plantilla pinta las listas en gris: aqui manda el blanco */
.horario-dias li, .horario-dias strong, .horario-dias span, .horario-dias em { color: #fff; }
.horario-dias em { font-style: normal; font-size: 14px; background: rgba(255,255,255,.2); border-radius: 3px; padding: 1px 7px; align-self: center; margin-right: auto; }
.horario-dias span { margin-left: auto; text-align: right; }
.horario-dias .cerrado { font-weight: 700; text-transform: uppercase; }
.horario-dias.horario-peq { font-size: 16px; margin-bottom: 0; opacity: .95; }

/* ---- Horario en contacto (recuadro gris) ---- */
.horario-lista { list-style: none; margin: 0 0 15px; padding: 0; color: var(--texto); font-size: 16px; line-height: 24px; }
.horario-lista li { padding: 2px 0; }
.horario-lista em { font-style: normal; font-size: 13px; background: #e8f5e9; color: var(--verde-oscuro); border-radius: 3px; padding: 0 5px; }
.horario-lista strong::after { content: ":"; }
.horario-lista .cerrado { font-weight: 600; }
.c-info h6 small { font-weight: 400; }

/* ---- Formulario de contacto ---- */
.contacto-form-bloque { padding-bottom: 120px; }
.contact-form label { display: block; font-weight: 500; color: #333; margin: 0 0 5px; }
.contact-form label.check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.contact-form label.check input { margin-top: 5px; flex: 0 0 auto; width: 18px; height: 18px; }
.asterisco { color: var(--rojo); font-weight: 700; }
.nota-obligatorio { font-size: 14px; margin: -15px 0 15px; color: var(--texto); }
.contador { display: block; text-align: right; color: #888; font-size: 13px; }
.captcha { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* La imagen del codigo mide 86x21 de verdad: se ensena al doble y con
   "pixelated" para que los numeros salgan nitidos, no emborronados. */
.captcha-img { flex: 0 0 auto; width: 172px; height: 42px; image-rendering: pixelated; border: 1px solid #c8e6c9; border-radius: 4px; background: #fff; }
.captcha .form-control { max-width: 160px; font-size: 20px; letter-spacing: 3px; }
.captcha-otra { background: none; border: 0; color: var(--verde-oscuro); text-decoration: underline; cursor: pointer; padding: 4px 0; font-size: 15px; }
/* Campo trampa: fuera de la vista de las personas, no con display:none
   (algunos robots se lo saltan si esta oculto asi). */
.campo-trampa { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.aviso { border-radius: 5px; padding: 15px 18px; margin: 0 0 25px; font-size: 17px; }
.aviso ul { margin: 8px 0 0; padding-left: 20px; }
.aviso-ok { background: #e8f5e9; border: 1px solid var(--verde); color: #1b5e20; }
.aviso-error { background: #ffebee; border: 1px solid #e57373; color: #b71c1c; }
.google-map { padding-top: 60px; }
.google-map iframe { width: 100%; max-width: 100%; border: 2px solid #e1e1e1; }

/* ---- Noticias (detalle_noticia.asp) ---- */
.texto-noticia img { max-width: 100%; height: auto; }
.bloque-noticia { clear: both; padding-top: 10px; margin: 0 0 30px; }
.blog-single-content .subtit-noticia { font-size: 22px; font-weight: 600; color: #222; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--verde-claro); }
.subtit-noticia i { color: var(--verde); margin-right: 6px; }

/* Fotos que se amplian: lupa en la esquina y un leve zoom al pasar */
.foto-ampliable { position: relative; display: block; overflow: hidden; border-radius: 6px; cursor: zoom-in; }
.foto-ampliable img { display: block; width: 100%; transition: transform .35s ease; }
.foto-ampliable:hover img, .foto-ampliable:focus img { transform: scale(1.04); }
/* La principal, como mucho 560 px de alto (antes ocupaba pantalla y media): la foto entera se ve al ampliarla */
.blog-single-thumb .foto-ampliable img { max-height: 560px; object-fit: cover; }
.foto-ampliable .lupa { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; pointer-events: none; }
.foto-ampliable:focus-visible { outline: 3px solid var(--verde); outline-offset: 2px; }

/* Galeria: miniaturas iguales (recortadas) en cuadricula */
.galeria-noticia { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.galeria-noticia li { margin: 0; }
.galeria-noticia img { aspect-ratio: 4 / 3; height: auto; object-fit: cover; }

/* Video: siempre en 16:9 y a todo el ancho (aunque el codigo traiga
   width="851" height="480", como el de las noticias antiguas) */
.video-noticia iframe { display: block; width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; border: 0; border-radius: 6px; background: #000; }

/* Documentos para descargar: una tarjeta por fichero */
.documentos-noticia { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.documentos-noticia li { margin: 0; }
.documento { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid #e1e1e1; border-left: 5px solid #9e9e9e; border-radius: 6px; background: #fafafa; color: #333; transition: background .2s, box-shadow .2s; }
.documento:hover, .documento:focus { background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.1); color: #333; text-decoration: none; }
.doc-icono { font-size: 34px; flex: 0 0 auto; color: #757575; }
.doc-datos { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.doc-nombre { font-weight: 600; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.doc-meta { font-size: 13px; color: #777; margin-top: 2px; }
.doc-accion { flex: 0 0 auto; background: var(--verde); color: #fff; border-radius: 20px; padding: 6px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.doc-pdf { border-left-color: #d32f2f; } .doc-pdf .doc-icono { color: #d32f2f; }
.doc-word { border-left-color: #1e5bb8; } .doc-word .doc-icono { color: #1e5bb8; }
.doc-excel { border-left-color: #1d7a45; } .doc-excel .doc-icono { color: #1d7a45; }
.doc-ppt { border-left-color: #d0582a; } .doc-ppt .doc-icono { color: #d0582a; }

/* Visor de fotos a pantalla completa (js/web.js) */
.visor { position: fixed; inset: 0; z-index: 10000; background: #0d120d; display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: pan-y pinch-zoom; }
.visor[hidden] { display: none; }
.visor-foto { max-width: calc(100vw - 140px); max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 4px; box-shadow: 0 6px 30px rgba(0,0,0,.5); user-select: none; }
.visor-pie { color: #eee; font-size: 15px; text-align: center; margin: 12px 20px 0; max-width: 900px; min-height: 1.4em; }
.visor-cuenta { position: absolute; top: 18px; left: 20px; color: #ccc; font-size: 15px; }
.visor button { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; width: 50px; height: 50px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.visor button:hover, .visor button:focus-visible { background: rgba(255,255,255,.3); outline: none; }
.visor-cerrar { top: 10px; right: 12px; }
.visor-ant { left: 14px; top: 50%; transform: translateY(-50%); }
.visor-sig { right: 14px; top: 50%; transform: translateY(-50%); }
.visor-solo .visor-ant, .visor-solo .visor-sig, .visor-solo .visor-cuenta { display: none; }
body.visor-abierto { overflow: hidden; }
.texto-404 ul { margin: 10px 0 0 20px; }
.texto-404 li { margin: 6px 0; font-size: 18px; }

/* ===================================================================
   MOVIL: aprovechar todo el ancho (mandamiento "Responsive").
   Margen lateral unico de 12 px y sin cajas con relleno sumado.
   =================================================================== */
@media (max-width: 767px) {
	.container { padding-left: 12px; padding-right: 12px; }
	/* Las filas de Bootstrap tienen margen negativo igual al relleno de
	   sus columnas: se cambian LOS DOS a la vez, tambien en las filas
	   metidas dentro de otras, o se salen por la derecha. */
	.container .row { margin-left: -12px; margin-right: -12px; }
	.container .row > [class*="col-"] { padding-left: 12px; padding-right: 12px; }
	.why-ecova p { width: 100%; }
	.horario-dias { font-size: 17px; }
	.horario-dias li { padding: 5px 0; }
	.horario-dias.horario-peq { font-size: 15px; }
	.c-info { padding: 12px; }
	.contacto-form-bloque { padding-bottom: 60px; }
	.google-map { padding-top: 10px; }
	.google-map iframe { height: 320px; }
	ul.cform li { margin-bottom: 14px; }
	/* Noticia: dos fotos por fila, documentos compactos, visor a toda la pantalla */
	.galeria-noticia { grid-template-columns: 1fr 1fr; gap: 8px; }
	.foto-ampliable .lupa { width: 32px; height: 32px; font-size: 14px; right: 6px; bottom: 6px; }
	.bloque-noticia { margin-bottom: 22px; }
	.blog-single-content .subtit-noticia { font-size: 20px; }
	.documento { gap: 10px; padding: 10px; }
	.doc-icono { font-size: 28px; }
	.doc-accion { padding: 5px 10px; font-size: 13px; }
	.visor-foto { max-width: 100vw; max-height: calc(100dvh - 140px); border-radius: 0; }
	.visor-ant, .visor-sig { top: auto !important; bottom: 14px; transform: none !important; }
	/* Tablas -> fichas (js/web.js pone data-label en cada celda). Se usa
	   en la tabla que mete CookieFirst en la politica de cookies. */
	table.tabla-fichas, table.tabla-fichas tbody, table.tabla-fichas tr, table.tabla-fichas td { display: block; width: 100% !important; }
	table.tabla-fichas { min-width: 0 !important; }
	table.tabla-fichas thead { display: none; }
	table.tabla-fichas caption { display: block; text-align: left; }
	table.tabla-fichas tr { border: 1px solid #e1e1e1; border-radius: 5px; margin: 0 0 10px; padding: 4px 8px; }
	table.tabla-fichas td { border: 0 !important; padding: 2px 0 !important; word-break: break-word; text-align: left !important; min-width: 0 !important; max-width: 100% !important; white-space: normal !important; box-sizing: border-box; }
	table.tabla-fichas td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: #333; }
}
