/* ======================================================================
   EVAS - Hoja de estilos
   Paleta extraída del logo; preserva el diseño del boceto original.
   ====================================================================== */

:root {
    --brand-purple: #4a1a4c;
    --brand-orange: #f36c21;
    --brand-yellow: #fdb813;
    --brand-green: #8dc63f;
    --brand-red: #e62020;
    --bg-body: #fdfaf5;
    --text-main: #2d132c;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(74, 26, 76, 0.15);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: var(--white) !important;
    border-bottom: 4px solid var(--brand-yellow);
    padding: 15px 0;
}

.navbar-brand img {
    height: 55px;
    margin-right: 12px;
}

/* Botones */
.btn-primary {
    background-color: var(--brand-purple);
    border: none;
    border-radius: 50px;
    padding: 10px 30px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-primary:hover {
    background-color: var(--brand-orange);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--brand-purple);
    border-color: var(--brand-purple);
    border-radius: 50px;
}

.btn-outline-primary:hover {
    background-color: var(--brand-purple);
    color: white;
}

/* Secciones */
.hero-banner {
    background: linear-gradient(135deg, var(--brand-purple) 0%, #7d2a81 100%);
    color: white;
    padding: 120px 0;
    border-radius: 0 0 60px 60px;
    box-shadow: var(--shadow);
}

/* En escritorio la portada es un poco más alta para lucir la foto de fondo. */
@media (min-width: 992px) {
    .hero-banner { padding: 170px 0; }
}

.card-business {
    border: none;
    border-radius: 25px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    border-bottom: 6px solid var(--brand-orange);
}

.card-business:hover {
    transform: translateY(-10px);
}

.card-business img {
    height: 300px;
    object-fit: contain;
    background: var(--white);
}

.category-tag {
    background: var(--brand-purple);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 12px;
}

/* Gallery */
.gallery-item {
    height: 280px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Galería Global: mostrar el logo/imagen completo sin recortar ni deformar. */
.gallery-item--logo img {
    object-fit: contain;
    background: var(--white);
    padding: 15px;
}

/* Flechas anterior/siguiente del lightbox (#lightboxModal) */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    border: 0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    line-height: 1;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.2s ease;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.75);
}

.lightbox-nav--prev { left: 12px; }
.lightbox-nav--next { right: 12px; }

/* Map Placeholder */
.map-container {
    background: white;
    border: 2px dashed var(--brand-yellow);
    border-radius: 35px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--brand-purple);
}

/* Detail View */
.detail-header {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.product-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    border-left: 5px solid var(--brand-green);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
}

/* Variante visual para tarjetas de servicios */
.product-card.service-card {
    border-left-color: var(--brand-orange);
}

footer {
    background: var(--brand-purple);
    color: white;
    padding: 80px 0 40px;
    margin-top: auto;
    border-top: 6px solid var(--brand-yellow);
}

.admin-table {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ---- Contacto destacado de la agrupación (tarjeta «Dónde Estamos») ---- */
.contact-highlight {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem 1.5rem;
    border-top: 2px solid var(--brand-yellow);
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    /* Alto cómodo de toque para quienes tienen dificultades motrices. */
    min-height: 44px;
    padding: .25rem .5rem;
    border-radius: 12px;
    color: var(--brand-purple);
    font-weight: 700;
    text-decoration: none;
    word-break: break-word;
    transition: color .2s ease, background-color .2s ease;
}

.contact-link:hover,
.contact-link:focus-visible {
    color: var(--brand-orange);
    background-color: rgba(243, 108, 33, .08);
}

/* En el pie el fondo es morado: el texto va en blanco. El correo es largo, así
   que se achica un punto para que quepa en una sola línea y no se parta a la
   mitad de la palabra. */
.footer-contact .contact-link {
    color: #fff;
    justify-content: center;
    font-weight: 400;
    font-size: .95rem;
}

.footer-contact .contact-link:hover,
.footer-contact .contact-link:focus-visible {
    color: var(--brand-yellow);
    background-color: rgba(255, 255, 255, .1);
}

/* ---- Ojito para mostrar/ocultar contraseñas ----
   El wrapper lo inyecta app.js y envuelve SOLO al input, por lo que su alto es
   exactamente el del campo: el botón estirado con top/bottom queda centrado
   tanto en .form-control-lg (login) como en el tamaño normal. */
.pw-field {
    position: relative;
}

/* El campo del login usa la utilidad .px-4, que Bootstrap emite con !important;
   por eso aquí también hace falta, con mayor especificidad para ganarle. */
.pw-field .form-control {
    padding-right: 3.25rem !important;
}

/* Bootstrap dibuja su icono de validación como background del input, en
   calc(100% - 9px): justo debajo del ojito. Lo apagamos dentro de .pw-field
   para que no se superpongan; el borde rojo y el mensaje siguen indicando el
   error. */
.pw-field .form-control.is-invalid,
.pw-field .form-control.is-valid {
    background-image: none;
}

/* app.js saca el .invalid-feedback de su hermandad con el input al envolverlo.
   PHP solo imprime ese div cuando hay error, así que mostrarlo siempre es
   correcto y evita depender del selector ~ de Bootstrap. */
.pw-field+.invalid-feedback {
    display: block;
}

.pw-toggle {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    /* objetivo táctil accesible */
    padding: 0 .75rem;
    border: 0;
    background: transparent;
    color: var(--brand-purple);
    opacity: .75;
    cursor: pointer;
    border-radius: 50rem;
    transition: opacity .2s ease, color .2s ease;
}

.pw-toggle:hover {
    opacity: 1;
    color: var(--brand-orange);
}

.pw-toggle:focus-visible {
    opacity: 1;
    outline: 3px solid var(--brand-yellow);
    outline-offset: -3px;
}
