/* 1. IMPORTACIÓN DE FUENTES DE PRESTIGIO */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&family=Open+Sans:wght@400;600&display=swap');
/* 2. CONFIGURACIÓN GENERAL */
body {
    background-color: #ffffff; /* O el color que tengas */
    font-family: 'Open Sans', sans-serif !important;
    font-size: 1.1rem !important;
    line-height: 1.8;
    color: #2d3436;
    letter-spacing: 0.3px;
}

h1, h2, h3, .navbar-brand span, .promo-title, .btn-mivet {
    font-family: 'Montserrat', sans-serif !important;
}

/* 3. NAVBAR */
.navbar { border-bottom: 0.25rem solid #00A896 !important; }
.navbar-brand span { color: #00A896; font-weight: 700; }
.navbar-nav .nav-link.active { color: #00A896 !important; font-weight: 600; }

/* 4. BLOQUE HERO Y PROMOS */
.hero-block { 
    background: #ffffff; 
    padding: 3rem; 
    border-radius: 1.5rem; 
    border: 1px solid #f0f0f0; 
    margin-bottom: 3rem; 
    position: relative; 
    overflow: hidden; 
}

.hero-block::before { 
    content: ""; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 6px; 
    background: #00A896; 
}

.marca-title { color: #00A896; font-weight: 800; font-size: 3rem !important; line-height: 1.2; }

.promo-box { 
    background: #f0f9f8; 
    padding: 2rem; 
    border-radius: 1rem; 
    border: 1px solid rgba(0,168,150,0.1); 
    height: 100%; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.promo-box:hover {
    background: #ffffff;
    border-color: #00A896;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,168,150,0.1);
}

.promo-title { color: #00A896; font-weight: 800; font-size: 1.5rem !important; line-height: 1.3; }

/* 5. TARJETAS DE SERVICIOS (CARDS) */
.custom-card {
    border: 1px solid #ddd !important;
    border-radius: 0 !important;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.custom-card:hover {
    transform: translateY(-10px);
    border-color: #00A896 !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

.card-img-container {
    width: 100%;
    aspect-ratio: 4 / 3 !important;
    overflow: hidden;
    border-radius: 0 !important;
}

.img-card {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 0 !important;
}

.text-justify {
    text-align: justify;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    hyphens: auto;
}

/* 6. BOTONES MIVET */
.btn-mivet {
    background-color: #00A896 !important;
    color: #ffffff !important;
    border-radius: 0 !important;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 12px 20px;
    width: 100%;
    display: block;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
}

.btn-mivet:hover {
    background-color: #007a6d !important;
    letter-spacing: 1px;
}

/* 7. SERVICIOS Y PELUQUERÍA */
.service-card { 
    background: #fff; 
    padding: 2rem; 
    border: 1px solid #eee; 
    transition: all 0.3s ease; 
    height: 100%; 
    border-radius: 0; 
}

.service-card:hover { 
    border-color: #00A896; 
    color: #00A896; 
}

.title-underline { 
    width: 80px; 
    height: 4px; 
    background: #00A896; 
    margin-top: 10px; 
    margin-bottom: 30px; 
}

.info-box { background: #00A896; color: #ffffff; padding: 2rem; border-radius: 1rem; height: 100%; }
.map-container { border-radius: 1rem; overflow: hidden; height: 100%; }

.logo-wrapper {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-logo-small {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
}

footer { 
    background-color: #1e272e !important; 
    border-top: 0.3rem solid #00A896; 
}

/* 8. MEDIA QUERIES (ADAPTABILIDAD MÓVIL) */
@media (max-width: 991.98px) {
    body { font-size: 1rem !important; }
    .marca-title { font-size: 2.2rem !important; }
    .hero-block { padding: 2rem 1.5rem; }
    .navbar-nav { padding-top: 1rem; text-align: center; }
    h1, h2, h3 { margin-bottom: 1rem; }
}

@media (max-width: 767.98px) {
    body { font-size: 0.95rem !important; }
    .promo-box { margin-bottom: 1rem; padding: 1.5rem; }
    .logo-wrapper { height: 120px; }
    .text-justify { text-align: left; }
    .marca-title { font-size: 1.8rem !important; }
    h1, h2 { font-size: 1.5rem !important; }
    h3, h4 { font-size: 1.2rem !important; }
    p { margin-bottom: 0.75rem; }
}

@media (max-width: 575.98px) {
    body { font-size: 0.9rem !important; }
    .marca-title { font-size: 1.5rem !important; }
    .btn-mivet { font-size: 0.8rem; padding: 10px; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.1rem !important; }
}

/* Aplicar tipografía de prestigio a títulos y botones */
h1, h2, h3, h4, h5, h6, .navbar-brand span, .promo-title, .btn-mivet {
    font-family: 'Montserrat', sans-serif !important;
}

/* Ajuste para que las descripciones de las tarjetas no se vean pequeñas */
.text-justify {
    font-size: 1rem !important;
    line-height: 1.7;
    margin-bottom: 0;
}

/* --- AJUSTE DINÁMICO DE TARJETAS (INDEX) --- */

/* De 1200px hasta 800px: Se ponen de 2 en 2 (50% cada una) */
@media (max-width: 1200px) and (min-width: 801px) {
    .container .row > article {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    /* Ajustamos el tamaño de la fuente un poco para que no sature el diseño */
    body {
        font-size: 1.05rem !important;
    }
    h2, h3 { font-size: 1.3rem !important; }
}

/* Por debajo de 800px: Se ponen de 1 en 1 (100% de ancho) */
@media (max-width: 800px) {
    .container .row > article {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Reducimos un poco el padding del hero para ganar espacio en móvil */
    .hero-block {
        padding: 1.5rem 1rem !important;
    }
    
    .marca-title {
        font-size: 1.8rem !important;
    }
    
    p { font-size: 0.95rem !important; }
}

/* 1. ESTADO NORMAL: VERDE AQUA OBLIGATORIO */
.service-card i, 
.service-card .bi,
.service-card [class^="bi-"] {
    color: #00A896 !important; /* Fuerza el verde desde el principio */
    display: inline-block;
    transition: all 0.4s ease; /* Movimiento fluido */
}

/* 2. ESTADO HOVER: CAMBIO COORDINADO DE ICONO Y TEXTO */
.service-card:hover i, 
.service-card:hover .bi,
.service-card:hover [class^="bi-"],
.service-card:hover h2 {
    color: #007a6d !important; /* Ambos cambian al mismo verde oscuro */
    transform: scale(1.1); /* Crecimiento natural */
}

/* 3. BORDE DE LA TARJETA AL PASAR EL RATÓN */
.service-card:hover {
    border-color: #00A896 !important;
}

/* --- ESTILOS DE LA PÁGINA DE OFERTAS --- */

/* La nueva caja del H3 */
.intro-offer-box {
    background: #ffffff;
    padding: 3rem 2rem;
    border-radius: 1.5rem;
    border: 1px solid #f0f0f0;
    border-top: 5px solid #00A896; /* Detalle superior en verde aqua */
    transition: all 0.4s ease;
}

.intro-offer-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 168, 150, 0.1) !important;
    border-color: #00A896;
}

/* Las tarjetas de abajo (Offer Cards) */
.offer-card {
    border-radius: 1.2rem !important;
    transition: all 0.4s ease;
    border: 1px solid #eee !important;
    display: flex;
    flex-direction: column;
}

.offer-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.offer-card p {
    flex-grow: 1;
}

.offer-card:hover {
    transform: translateY(-10px);
    border-color: #00A896 !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

/* El badge del mes */
.offer-badge {
    background-color: #00A896;
    color: white;
    width: fit-content;
    padding: 6px 20px;
    border-radius: 50px;
    font-weight: 700;
    margin: 20px auto 0 auto;
}

/* --- BOTONES DE PRECIO EN OFERTAS --- */

.price-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    color: #00A896 !important; /* Texto verde aqua inicial */
    border: 2px solid #00A896;
    border-radius: 50px; /* Forma de píldora elegante */
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none !important;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

/* HOVER DEL BOTÓN DE PRECIO */
.price-btn:hover {
    background-color: #00A896; /* Se rellena de verde */
    color: #ffffff !important; /* El texto pasa a blanco */
    box-shadow: 0 5px 15px rgba(0, 168, 150, 0.3);
    transform: scale(1.05); /* Crece un poquito */
}

/* Ajuste para que el botón no se pegue al texto de arriba */
.price-tag {
    display: none; /* Ocultamos la versión anterior si aún la tenías */
}

/* --- RESPONSIVE PARA LA PÁGINA DE OFERTAS --- */

/* Ajustes para Tablets (1200px a 768px) */
@media (max-width: 1200px) {
    .intro-offer-box h3 {
        font-size: 1.4rem !important; /* Reducimos un poco el H3 */
        padding: 1rem;
    }

    /* Forzamos que las ofertas ocupen el 50% (2 por fila) */
    .offer-card {
        margin-bottom: 20px;
    }
}

/* Ajustes para Móviles (Menos de 768px) */
@media (max-width: 768px) {
    .intro-offer-box {
        padding: 1.5rem !important; /* Menos relleno en móvil */
        border-left: none;
        border-top: 6px solid #00A896;
    }

    .intro-offer-box h3 {
        font-size: 1.2rem !important;
    }

    /* Las tarjetas pasan a ser de 1 en 1 (ancho completo) */
    .offer-card {
        width: 100% !important;
    }

    .price-btn {
        width: 100%; /* El botón de precio ocupa todo el ancho en móvil para que sea fácil pulsar */
        text-align: center;
    }

    /* Ajuste del título principal para que no se corte */
    h1.text-uppercase {
        font-size: 1.8rem !important;
    }
}

.blog-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.text-aqua {
    color: #00A896;
}

.vr {
    width: 1px;
    height: 20px;
    background-color: #ccc;
}

/* ==========================================================================
   MEDIA QUERIES ESPECÍFICOS PARA EL BLOG
   ========================================================================== */

/* 1. Pantallas Grandes (Escritorio) */
@media (min-width: 1200px) {
    .blog-content {
        padding-right: 2rem;
    }
}

/* 2. Tablets y Pantallas Medianas (Ajuste de columnas) */
@media (max-width: 991.98px) {
    aside .sticky-top {
        position: relative !important;
        top: 0 !important;
    }

    .marca-title {
        font-size: 2rem !important;
    }

    .blog-content .row.g-4 .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .blog-content p {
        font-size: 1rem;
    }
}

/* 3. Móviles (Ajuste de Tarjetas y Texto) */
@media (max-width: 767.98px) {
    .col-6.col-md-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .d-flex.justify-content-center.align-items-center.gap-3 {
        flex-direction: column;
        gap: 10px !important;
    }
    
    .vr { display: none; }

    .marca-title {
        font-size: 1.6rem !important;
    }

    .blog-content p {
        font-size: 0.95rem !important;
        text-align: left;
    }

    .blog-content .row.g-4 .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .breadcrumb {
        font-size: 0.9rem !important;
    }
    
    .blog-content h2 {
        font-size: 1.3rem !important;
    }
}

/* 4. Móviles muy pequeños */
@media (max-width: 480px) {
    .col-6.col-md-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .promo-box {
        padding: 1.2rem !important;
        font-size: 0.9rem !important;
    }
}
/* ==========================================================================
   CARRUSEL MIVET - ESTILOS PERSONALIZADOS
   ========================================================================== */

/* Optimización global de imágenes - todas se verán enteras */
img {
    object-fit: contain !important;
    max-width: 100%;
    height: auto;
}

/* Excepciones para carrusel que sí necesita cover */
.carrusel-img {
    height: 500px;
    object-fit: cover !important; /* Carrusel mantiene cover para mejor visualización */
    filter: brightness(0.8); /* Mejora legibilidad del texto blanco */
    transition: filter 0.3s ease;
}

@media (max-width: 992px) {
    .carrusel-img {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .carrusel-img {
        height: 350px;
    }
}

@media (max-width: 576px) {
    .carrusel-img {
        height: 280px;
    }
}

/* Carrusel de instalaciones - optimizado para contener imágenes completas */
.carrusel-instalaciones-img {
    height: 500px;
    object-fit: contain !important;
    background-color: #f5f5f5;
    transition: filter 0.3s ease;
}

@media (max-width: 992px) {
    .carrusel-instalaciones-img {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .carrusel-instalaciones-img {
        height: 350px;
    }
}

@media (max-width: 576px) {
    .carrusel-instalaciones-img {
        height: 300px;
    }
}

/* 2. Textos (Captions) */
.custom-caption {
    background: rgba(0, 168, 150, 0.85); /* Verde Aqua MiVet */
    border-radius: 1.2rem;
    padding: 1.5rem 2rem;
    bottom: 15%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    /* Soporte para Safari y navegadores basados en WebKit */
    -webkit-backdrop-filter: blur(5px); 
    /* Soporte estándar */
    backdrop-filter: blur(5px); 
}
.custom-caption h2 {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.custom-caption p {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* 3. Controles (Flechas) */
.carousel-control-prev-icon, 
.carousel-control-next-icon {
    background-color: #00A896; /* Tu color corporativo */
    border-radius: 50%;
    background-size: 45%; /* Icono de flecha más sutil */
    padding: 1.8rem;
    transition: all 0.3s ease;
}

.carousel-control-prev-icon:hover, 
.carousel-control-next-icon:hover {
    background-color: #007a6d; /* Oscurece al pasar el ratón */
    transform: scale(1.1);
}

/* 4. Indicadores (Rayitas inferiores) */
.carousel-indicators [data-bs-target] {
    background-color: #00A896;
    width: 40px;
    height: 5px;
    border-radius: 10px;
    opacity: 0.5;
}

.carousel-indicators .active {
    opacity: 1;
    width: 60px; /* La raya activa es más larga */
}

/* 5. Adaptabilidad (Responsive) */
@media (max-width: 992px) {
    .carrusel-img {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .carrusel-img {
        height: 300px;
    }
    .custom-caption {
        bottom: 5%;
        padding: 1rem;
        margin: 0 10px;
    }
    .custom-caption h2 {
        font-size: 1.4rem;
    }
    .custom-caption p {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   ESTILOS PARA GRID DE ASEGURADORAS
   ========================================================================== */

.insurance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.insurance-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.8rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    border: 2px solid #e8f7f5;
    border-radius: 1rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    min-height: 140px;
    gap: 0.8rem;
}

.insurance-card i {
    font-size: 2.5rem;
    color: #00A896;
    transition: all 0.3s ease;
}

.insurance-card span {
    font-weight: 600;
    color: #2d3436;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.insurance-card:hover {
    transform: translateY(-8px);
    border-color: #00A896;
    background: linear-gradient(135deg, #00A896 0%, #008b7d 100%);
    box-shadow: 0 12px 24px rgba(0, 168, 150, 0.2);
}

.insurance-card:hover i {
    color: #ffffff;
    transform: scale(1.15) rotate(10deg);
}

.insurance-card:hover span {
    color: #ffffff;
}

/* Responsive para tablets */
@media (max-width: 768px) {
    .insurance-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }

    .insurance-card {
        padding: 1.5rem 1rem;
        min-height: 130px;
    }

    .insurance-card i {
        font-size: 2.2rem;
    }

    .insurance-card span {
        font-size: 0.9rem;
    }
    
    /* Tarjetas con imagen - responsive */
    .card-img-container {
        aspect-ratio: 1/1 !important;
    }
    
    .intro-offer-box {
        padding: 1.5rem !important;
        min-height: auto;
    }
}

/* Responsive para móviles */
@media (max-width: 576px) {
    .insurance-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.8rem;
    }

    .insurance-card {
        padding: 1.2rem 0.8rem;
        min-height: 120px;
    }

    .insurance-card i {
        font-size: 2rem;
    }

    .insurance-card span {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    /* Tarjetas con imagen - móvil */
    .row.justify-content-center.mb-5.g-4 {
        flex-direction: column;
    }
    
    .row.justify-content-center.mb-5.g-4 .col-lg-5 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .card-img-container {
        aspect-ratio: 4/3 !important;
    }
}

/* Mejora de accesibilidad: focus visible */
.insurance-card:focus-visible {
    outline: 2px solid #00A896;
    outline-offset: 2px;
}

/* ==========================================================================
   ESTILOS PARA LA SECCIÓN DE EQUIPO
   ========================================================================== */

.team-card {
    background: #ffffff;
    padding: 2rem 1.5rem;
    border: 1px solid #e8f7f5;
    border-radius: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
}

.team-card:hover {
    transform: translateY(-8px);
    border-color: #00A896;
    box-shadow: 0 12px 28px rgba(0, 168, 150, 0.15);
}

.team-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
    border-radius: 1rem;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.team-card:hover .team-image img {
    transform: scale(1.08);
}

.team-card h3 {
    color: #2d3436;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.team-card p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.team-card p strong {
    color: #00A896;
}

/* Desktop - 2 tarjetas por fila */
@media (min-width: 992px) {
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Tablets - 2 tarjetas por fila */
@media (min-width: 768px) and (max-width: 991.98px) {
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .team-image {
        height: 300px;
    }

    .team-card h3 {
        font-size: 1.2rem;
    }
}

/* Móviles - 1 tarjeta por fila */
@media (max-width: 767.98px) {
    .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .team-image {
        height: 320px;
    }

    .team-card {
        padding: 1.5rem 1rem;
    }

    .team-card h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    .team-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .team-card .small {
        font-size: 0.9rem !important;
        line-height: 1.5;
    }
}
