/* General Styles */
html,
body {
    overflow-x: hidden;
    /* Previene el scroll horizontal indeseado */
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #000000;
    /* Texto principal negro */
    background-color: #FFFFFF;
    /* Fondo principal blanco */
}

#hero-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    display: none;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 20px 0;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    color: #000000;
    padding: 0.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid #EFA8A3;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo img {
    height: 180px;
    transition: transform 0.3s ease;
}

header .logo img:hover {
    transform: scale(1.05);
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

header nav ul li {
    display: inline;
    margin-left: 20px;
}

header nav ul li a {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 50px;
    position: relative;
    transition: all 0.3s ease;
    background: #EFA8A3;
}

header nav ul li a:hover {
    background: #000000;
    color: #ffffff;
    transform: translateY(-2px);
}



.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #000000;
    transition: all 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section - NUEVA ESTRUCTURA */
.hero {
    position: relative;
    /* Contenedor principal para el slider y el contenido */
    height: 90vh;
    /* Altura del 90% de la ventana del navegador */
    color: #FFFFFF;
    /* Color de texto blanco por defecto para esta sección */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Capa de fondo */
}

.hero-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cubre el espacio sin deformar, puede recortar */
}

.hero-content {
    position: relative;
    z-index: 2;
    /* Contenido por encima del slider */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.45);
    /* Overlay oscuro */
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.3em;
    margin-bottom: 30px;
    font-weight: 300;
    max-width: 600px;
    /* Evita que el texto sea demasiado ancho */
    margin-left: auto;
    /* Centra el bloque de párrafo */
    margin-right: auto;
    /* Centra el bloque de párrafo */
}

.btn-primary {
    display: inline-block;
    background: transparent;
    /* Fondo transparente para estilo "ghost button" */
    color: #ffffff;
    /* Texto de botón blanco */
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid #ffffff;
    /* Borde blanco */
}

.btn-primary:hover {
    background: #FFFFFF;
    /* Fondo blanco al pasar el mouse */
    color: #000000;
    /* Texto negro */
    transform: translateY(-3px);
}

/* Colores de navegación del Slider para que contrasten */
.hero-slider .swiper-pagination-bullet-active {
    background: #FFFFFF !important;
}

.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    color: #FFFFFF !important;
    --swiper-navigation-size: 30px;
}

/* About Us Section */
.about-us {
    padding: 100px 0;
    background: #FFFFFF;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.about-us h2 {
    font-size: 3em;
    margin-bottom: 40px;
    color: #000000;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.about-us p {
    font-size: 1.2em;
    line-height: 2;
    max-width: 900px;
    margin: 0 auto 25px;
    color: #333;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: #EFA8A3;
    text-align: center;
}

.services h2 {
    font-size: 2.8em;
    margin-bottom: 40px;
    color: #000000;
    font-weight: 600;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.service-item-horizontal {
    display: flex;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.service-item-horizontal:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-item-horizontal .service-image {
    flex: 1;
    background-color: #EFA8A3;
    min-height: 250px;
}

.service-item-horizontal .service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px 0 0 15px;
}

.service-item-horizontal .service-content {
    flex: 2;
    padding: 40px;
    text-align: left;
}

.service-item-horizontal.align-right {
    flex-direction: row-reverse;
}

.service-item-horizontal.align-right .service-image img {
    border-radius: 0 15px 15px 0;
}

.service-item-horizontal.align-right .service-content {
    text-align: right;
}

.service-item-horizontal h3 {
    color: #000000;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 1.8em;
}

.service-item-horizontal p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #333;
}

/* Team Section */
.team {
    padding: 80px 0;
    background: #FFFFFF;
    text-align: center;
}

.team h2 {
    font-size: 2.8em;
    margin-bottom: 40px;
    color: #000000;
    font-weight: 600;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.team-member {
    background-color: transparent;
    perspective: 1000px;
    height: 500px;
    /* Aumentada altura para evitar deformación */
}

.team-member-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 15px;
}

.team-member:hover .team-member-inner {
    transform: rotateY(180deg);
}

.team-member-front,
.team-member-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.team-member-front {
    background: #EFA8A3;
    /* Color blanco quitado para no afectar a la frase */
}

.team-member-back {
    background: #EFA8A3;
    color: white;
    transform: rotateY(180deg);
    justify-content: flex-start;
    /* Cambio para evitar centrado vertical incómodo */
    overflow-y: auto;
    padding: 25px;
    font-size: 0.9em;
    /* Fuente más pequeña */
}

/* Estilos para el contenido del reverso */
.team-member-back h3 {
    border-bottom: 2px solid white;
    padding-bottom: 10px;
    margin-bottom: 15px;
    width: 100%;
    text-align: center;
    font-size: 1.3em;
}

.team-member-back h4 {
    font-size: 1em;
    margin: 10px 0 5px;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.5);
    text-align: center;
    width: 100%;
}

.team-member-back p {
    text-align: justify;
    /* Párrafos justificados */
    width: 100%;
    margin-bottom: 10px;
}

.team-member-back ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.team-member-back ul li {
    margin-bottom: 5px;
    font-size: 0.95em;
    padding: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    text-align: justify;
    /* Listas justificadas */
}

.team-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #EFA8A3;
    margin: 0 auto 20px;
    overflow: hidden;
    flex-shrink: 0;
    /* Evita que la imagen se aplaste */
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member h3 {
    margin: 15px 0 5px;
    color: #FFFFFF;
    font-size: 1.4em;
    /* Ajustado para mejor balance */
    line-height: 1.2;
}

.team-member h4 {
    margin: 0 0 15px;
    color: #333;
    /* Un gris oscuro para subtítulos se ve más elegante */
    font-size: 0.95em;
    font-weight: 500;
    line-height: 1.3;
    min-height: 2.6em;
    /* Tratando de alinear alturas de títulos de varias líneas */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos específicos para la Cédula */
.cedula {
    margin-bottom: 10px;
    color: #FFFFFF;
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

.cedula strong {
    color: #FFFFFF;
    font-weight: 600;
}

/* Estilos específicos para la Frase/Cita */
.quote {
    font-size: 0.85em;
    /* Tamaño uniforme y legible */
    line-height: 1.4;
    color: #2c2c2c;
    /* Negro suave para lectura */
    font-style: italic;
    margin-top: auto;
    /* Empuja la cita hacia abajo si hay espacio extra */
    margin-bottom: 10px;
    padding: 0 5px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    /* Limita a 5 líneas para evitar desbordamiento extremo */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.team-member p strong {
    color: #FFFFFF;
}

/* Ajuste al contenedor frontal para distribuir mejor */
.team-member-front {
    background: #EFA8A3;
    padding: 25px 20px;
    /* Un poco más de padding vertical */
    justify-content: flex-start;
    /* Mantiene orden superior */
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: #EFA8A3;
    text-align: center;
}

.contact h2 {
    font-size: 2.8em;
    margin-bottom: 40px;
    color: #000000;
    font-weight: 600;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    text-align: left;
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
}

.contact-info .info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-info .info-item i {
    font-size: 1.5em;
    color: #000000;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.contact-info .info-item p {
    margin: 0;
    font-size: 1.1em;
    color: #000000;
}

.map-container {
    margin-top: 20px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.contact-form {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    margin: 0;
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form #telefono,
.contact-form #mensaje,
.contact-form button {
    grid-column: 1 / span 2;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #EFA8A3;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 1em;
    background-color: #f9f9f9;
    box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.contact-form button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 50px;
    background: #000000;
    color: #ffffff;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.contact-form button:hover {
    background: #333;
}

/* Footer */
footer {
    background: #EFA8A3;
    color: #000000;
    text-align: center;
    padding: 20px 0;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

footer p {
    margin: 0;
    color: #000000;
    margin-bottom: 10px;
}

.social-links a {
    color: #000000;
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #555;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    /* Forma de píldora */
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    /* Espaciado interno */
    gap: 10px;
    /* Espacio entre el ícono y el texto */
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
    /* Tamaño del texto */
    font-weight: 600;
}

.whatsapp-float i {
    font-size: 28px;
    /* Tamaño del ícono */
}

.whatsapp-float:hover {
    transform: scale(1.05);
    /* Un poco más grande al pasar el mouse */
}

.cookie-banner,
.social-float,
.news-banner {
    display: none !important;
}

/* Media Queries Adaptadas */
@media only screen and (max-width: 859px) {
    .container {
        width: 90%;
    }

    header .logo img {
        height: 120px;
    }

    .menu-toggle {
        display: flex;
    }

    header nav {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: rgba(255, 255, 255, 0.98);
        padding: 10px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    header nav.active {
        display: flex;
    }

    header nav ul {
        flex-direction: column;
        width: 100%;
    }

    header nav ul li {
        margin: 10px 0;
        text-align: center;
    }

    .hero {
        height: 75vh;
        /* Altura fija al 75% de la pantalla para mejor proporción */
        padding: 0;
        /* El flex se encarga del centrado */
    }

    .hero h1 {
        font-size: 2.2em;
        /* Reducimos el tamaño del título */
    }

    .hero p {
        font-size: 1.1em;
        /* Reducimos el tamaño del párrafo */
    }

    .hero-slider {
        height: 100%;
    }

    .service-item-horizontal,
    .service-item-horizontal.align-right {
        flex-direction: column;
    }

    .service-item-horizontal .service-image,
    .service-item-horizontal.align-right .service-image {
        width: 100%;
        min-height: 200px;
    }

    .service-item-horizontal .service-image img,
    .service-item-horizontal.align-right .service-image img {
        border-radius: 15px 15px 0 0;
    }

    .service-item-horizontal .service-content,
    .service-item-horizontal.align-right .service-content {
        text-align: center;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .contact-form #telefono,
    .contact-form #mensaje,
    .contact-form button {
        grid-column: auto;
    }

    .contact-info {
        min-width: 100%;
        padding: 20px;
    }

    .contact-info .info-item p {
        font-size: 0.9em;
        word-break: break-all;
        flex: 1;
        min-width: 0;
    }

    .whatsapp-float {
        width: auto;
        /* Ancho automático para el texto */
        height: auto;
        padding: 10px 15px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float span {
        display: none;
        /* Ocultamos el texto en móvil para que solo se vea el ícono */
    }

    .whatsapp-float i {
        font-size: 24px;
    }
}