:root {
    --selca-azul-oscuro: #0a4275;
    --selca-azul-medio: #1d72b8;
    --selca-azul-claro: #32b5e5;
    --selca-texto-azul: #184c8a;
    --selca-texto-turquesa: #29b8b9;
    --selca-fondo: #ffffff;
}

body {
    padding-top: 56px;
    background-color: var(--selca-fondo);
}

.hero-section {
    position: relative; /* Needed for the icon background */
    color: white;
    padding: 100px 0;
    overflow: hidden; /* Hide overflowing icons */
}

.hero-section .container {
    position: relative; /* Ensure text is above the icon background */
    z-index: 2;
}

.hero-icons-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-icons-bg .bi {
    position: absolute;
    color: var(--selca-azul-medio);
    opacity: 0.05;
    transform: rotate(-25deg);
}

/* Individual icon positioning and sizing */
.hero-icons-bg .bi-truck {
    font-size: 15em;
    top: -20%;
    left: 5%;
}

.hero-icons-bg .bi-airplane {
    font-size: 12em;
    top: 10%;
    right: 10%;
    transform: rotate(20deg);
}

.hero-icons-bg .bi-globe-americas {
    font-size: 20em;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(15deg);
    opacity: 0.03;
}

.hero-icons-bg .bi-box-seam {
    font-size: 10em;
    bottom: 5%;
    left: 20%;
    transform: rotate(-15deg);
}

.hero-icons-bg .bi-shield-check {
    font-size: 8em;
    top: 60%;
    right: 15%;
}

.hero-icons-bg .bi-water {
    font-size: 13em;
    bottom: -10%;
    right: -5%;
    transform: rotate(10deg);
}

.hero-icons-bg .bi-building {
    font-size: 9em;
    top: 25%;
    left: 30%;
    transform: rotate(5deg);
}

.hero-section .btn-primary {
    background-color: var(--selca-azul-claro);
    border-color: var(--selca-azul-claro);
    color: var(--selca-azul-oscuro);
    font-weight: bold;
}

.hero-section .btn-primary:hover {
    background-color: var(--selca-azul-medio);
    border-color: var(--selca-azul-medio);
}

.text-primary {
    color: var(--selca-azul-medio) !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--selca-texto-azul);
}

.subheading, .text-turquesa {
    color: var(--selca-texto-turquesa);
}

.btn-primary {
    background-color: var(--selca-azul-oscuro);
    border-color: var(--selca-azul-oscuro);
    color: var(--selca-fondo);
}

.btn-primary:hover {
    background-color: var(--selca-azul-medio);
    border-color: var(--selca-azul-medio);
}

.btn-outline-primary {
    color: var(--selca-azul-oscuro);
    border-color: var(--selca-azul-oscuro);
}

.btn-outline-primary:hover {
    color: white;
    background-color: var(--selca-azul-oscuro);
    border-color: var(--selca-azul-oscuro);
}

.navbar-dark .navbar-brand {
    color: var(--selca-fondo);
    font-weight: bold;
}

.navbar-brand .rif-text {
    font-size: 0.6em;
    font-weight: normal;
    opacity: 0.8;
    vertical-align: middle;
}

.navbar-selca-gradient {
    background: linear-gradient(90deg, var(--selca-azul-oscuro), var(--selca-azul-medio));
}


.navbar-dark .navbar-nav .nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--selca-azul-claro);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.navbar-dark .navbar-nav .nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

#servicios .card, #blog .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

#servicios .card:hover, #blog .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

#servicios .card.active, #blog .card.active {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: var(--selca-azul-medio);
}

/* --- Enhancements for Hero Title --- */
.title-shine-effect {
    background: linear-gradient(145deg, var(--selca-azul-claro), #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    overflow: hidden;
    padding-bottom: 0.3em; /* Add space inside the element for descenders */
}

.title-shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(60deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 40%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 60%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine 6s infinite linear;
}

@keyframes shine {
    0% {
        left: -150%;
    }
    100% {
        left: 150%;
    }
}


/* --- Carousel Enhancements --- */
.carousel-inner img {
    width: 100%;
    max-height: 500px; /* Increased height for better impact */
    object-fit: cover; /* Ensures the image covers the area without distortion */
}

.carousel-control-prev, .carousel-control-next {
    width: auto; /* Adjust width as needed */
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent background for contrast */
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    height: 50px;
    width: 50px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.carousel-control-prev {
    left: 1rem;
}

.carousel-control-next {
    right: 1rem;
}

.carousel-control-prev:hover, .carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon, .carousel-control-next-icon {
    filter: brightness(0) invert(1); /* Ensures icons are white */
}

.carousel-indicators [data-bs-target] {
    background-color: rgba(255, 255, 255, 0.7); /* Brighter, semi-transparent indicators */
    border-radius: 50%;
    width: 12px;
    height: 12px;
    border: 1px solid rgba(0, 0, 0, 0.5);
}

.carousel-indicators .active {
    background-color: var(--selca-azul-claro); /* Active indicator uses brand color */
}

@media (max-width: 767.98px) {
    .carousel-img {
        display: none;
    }

    .carousel-caption {
        position: static;
        color: #212529;
    }
}

.footer-selca a {
    color: #ffffff;
    transition: color 0.3s ease;
}

.footer-selca a:hover {
    color: var(--selca-azul-claro);
}

#testimonios .testimonial-card {
    text-align: center;
    padding: 2rem;
}

#testimonios .testimonial-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--selca-azul-claro);
}

#testimonios .testimonial-card p.lead {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.executive-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

/* Estilos para la sección "Sobre Nosotros" */
.about-logo {
    max-width: 57%; /* Reduce el tamaño de la imagen */
    height: auto; /* Mantiene la proporción */
    margin: 1rem auto; /* Centra la imagen horizontalmente y añade margen vertical */
    display: block; /* Asegura que margin: auto funcione para centrar */
}

/* --- Open Blinds Effect CSS ---*/
.image-blinds-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Hide parts of the image initially */
    z-index: 0; /* Place behind the text */
    background-color: var(--selca-azul-oscuro);
}

.blinds-effect-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image covers the container */
    animation: vertical-blinds 10s infinite; /* Apply animation */
}

@keyframes vertical-blinds {
    0%, 100% {
        clip-path: polygon(0% 0%, 0% 100%, 0% 100%, 0% 0%, 2.5% 0%, 2.5% 100%, 2.5% 100%, 2.5% 0%, 5% 0%, 5% 100%, 5% 100%, 5% 0%, 7.5% 0%, 7.5% 100%, 7.5% 100%, 7.5% 0%, 10% 0%, 10% 100%, 10% 100%, 10% 0%, 12.5% 0%, 12.5% 100%, 12.5% 100%, 12.5% 0%, 15% 0%, 15% 100%, 15% 100%, 15% 0%, 17.5% 0%, 17.5% 100%, 17.5% 100%, 17.5% 0%, 20% 0%, 20% 100%, 20% 100%, 20% 0%, 22.5% 0%, 22.5% 100%, 22.5% 100%, 22.5% 0%, 25% 0%, 25% 100%, 25% 100%, 25% 0%, 27.5% 0%, 27.5% 100%, 27.5% 100%, 27.5% 0%, 30% 0%, 30% 100%, 30% 100%, 30% 0%, 32.5% 0%, 32.5% 100%, 32.5% 100%, 32.5% 0%, 35% 0%, 35% 100%, 35% 100%, 35% 0%, 37.5% 0%, 37.5% 100%, 37.5% 100%, 37.5% 0%, 40% 0%, 40% 100%, 40% 100%, 40% 0%, 42.5% 0%, 42.5% 100%, 42.5% 100%, 42.5% 0%, 45% 0%, 45% 100%, 45% 100%, 45% 0%, 47.5% 0%, 47.5% 100%, 47.5% 100%, 47.5% 0%, 50% 0%, 50% 100%, 50% 100%, 50% 0%, 52.5% 0%, 52.5% 100%, 52.5% 100%, 52.5% 0%, 55% 0%, 55% 100%, 55% 100%, 55% 0%, 57.5% 0%, 57.5% 100%, 57.5% 100%, 57.5% 0%, 60% 0%, 60% 100%, 60% 100%, 60% 0%, 62.5% 0%, 62.5% 100%, 62.5% 100%, 62.5% 0%, 65% 0%, 65% 100%, 65% 100%, 65% 0%, 67.5% 0%, 67.5% 100%, 67.5% 100%, 67.5% 0%, 70% 0%, 70% 100%, 70% 100%, 70% 0%, 72.5% 0%, 72.5% 100%, 72.5% 100%, 72.5% 0%, 75% 0%, 75% 100%, 75% 100%, 75% 0%, 77.5% 0%, 77.5% 100%, 77.5% 100%, 77.5% 0%, 80% 0%, 80% 100%, 80% 100%, 80% 0%, 82.5% 0%, 82.5% 100%, 82.5% 100%, 82.5% 0%, 85% 0%, 85% 100%, 85% 100%, 85% 0%, 87.5% 0%, 87.5% 100%, 87.5% 100%, 87.5% 0%, 90% 0%, 90% 100%, 90% 100%, 90% 0%, 92.5% 0%, 92.5% 100%, 92.5% 100%, 92.5% 0%, 95% 0%, 95% 100%, 95% 100%, 95% 0%, 97.5% 0%, 97.5% 100%, 97.5% 100%, 97.5% 0%);
    }
    50% {
        clip-path: polygon(0% 0%, 0% 100%, 2.5% 100%, 2.5% 0%, 2.5% 0%, 2.5% 100%, 5% 100%, 5% 0%, 5% 0%, 5% 100%, 7.5% 100%, 7.5% 0%, 7.5% 0%, 7.5% 100%, 10% 100%, 10% 0%, 10% 0%, 10% 100%, 12.5% 100%, 12.5% 0%, 12.5% 0%, 12.5% 100%, 15% 100%, 15% 0%, 15% 0%, 15% 100%, 17.5% 100%, 17.5% 0%, 17.5% 0%, 17.5% 100%, 20% 100%, 20% 0%, 20% 0%, 20% 100%, 22.5% 100%, 22.5% 0%, 22.5% 0%, 22.5% 100%, 25% 100%, 25% 0%, 25% 0%, 25% 100%, 27.5% 100%, 27.5% 0%, 27.5% 0%, 27.5% 100%, 30% 100%, 30% 0%, 30% 0%, 30% 100%, 32.5% 100%, 32.5% 0%, 32.5% 0%, 32.5% 100%, 35% 100%, 35% 0%, 35% 0%, 35% 100%, 37.5% 100%, 37.5% 0%, 37.5% 0%, 37.5% 100%, 40% 100%, 40% 0%, 40% 0%, 40% 100%, 42.5% 100%, 42.5% 0%, 42.5% 0%, 42.5% 100%, 45% 100%, 45% 0%, 45% 0%, 45% 100%, 47.5% 100%, 47.5% 0%, 47.5% 0%, 47.5% 100%, 50% 100%, 50% 0%, 50% 0%, 50% 100%, 52.5% 100%, 52.5% 0%, 52.5% 0%, 52.5% 100%, 55% 100%, 55% 0%, 55% 0%, 55% 100%, 57.5% 100%, 57.5% 0%, 57.5% 0%, 57.5% 100%, 60% 100%, 60% 0%, 60% 0%, 60% 100%, 62.5% 100%, 62.5% 0%, 62.5% 0%, 62.5% 100%, 65% 100%, 65% 0%, 65% 0%, 65% 100%, 67.5% 100%, 67.5% 0%, 67.5% 0%, 67.5% 100%, 70% 100%, 70% 0%, 70% 0%, 70% 100%, 72.5% 100%, 72.5% 0%, 72.5% 0%, 72.5% 100%, 75% 100%, 75% 0%, 75% 0%, 75% 100%, 77.5% 100%, 77.5% 0%, 77.5% 0%, 77.5% 100%, 80% 100%, 80% 0%, 80% 0%, 80% 100%, 82.5% 100%, 82.5% 0%, 82.5% 0%, 82.5% 100%, 85% 100%, 85% 0%, 85% 0%, 85% 100%, 87.5% 100%, 87.5% 0%, 87.5% 0%, 87.5% 100%, 90% 100%, 90% 0%, 90% 0%, 90% 100%, 92.5% 100%, 92.5% 0%, 92.5% 0%, 92.5% 100%, 95% 100%, 95% 0%, 95% 0%, 95% 100%, 97.5% 100%, 97.5% 0%, 97.5% 0%, 97.5% 100%, 100% 100%, 100% 0%);
    }
}

/* ========================================================================= */
/* CHATBOT GLOBALY */
/* ========================================================================= */
#chatbot-jane-container {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 1050; /* Ensure the entire chatbot component stays on top */
}

#chatbot-jane-icon {
    position: absolute; /* Position relative to its fixed parent */
    right: 0;
    bottom: 0;
    cursor: pointer;
    z-index: 1049; /* Below the bubble, but above other content */
    transition: transform 0.3s ease;
    width: 64px; /* Define a fixed size */
    height: 64px;
    background-color: var(--selca-azul-oscuro); /* Fallback color */
    border-radius: 50%; /* Make the container round */
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    overflow: hidden; /* Hide corners of the non-round GIF */
}

#chatbot-jane-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Make the GIF cover the round container */
}

#chatbot-jane-icon:hover {
    transform: scale(1.1);
}

#chatbot-jane-window {
    position: fixed; /* Keep window fixed relative to viewport */
    bottom: 100px;
    right: 25px;
    width: 370px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    background: var(--selca-fondo);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
    z-index: 1049; /* Below chatbot window, above icon */
}

#chatbot-jane-window:target {
    transform: scale(1);
}

#chatbot-jane-header {
    background: linear-gradient(90deg, var(--selca-azul-oscuro), var(--selca-azul-medio));
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

#chatbot-jane-window .chatbot-title {
    font-weight: bold;
    font-size: 1.1rem;
}

#chatbot-jane-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    line-height: 1;
    opacity: 0.8;
    cursor: pointer;
}

#chatbot-jane-close:hover {
    opacity: 1;
}

#chatbot-jane-body {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chatbot-message {
    padding: 0.6rem 1rem;
    border-radius: 20px;
    max-width: 85%;
    line-height: 1.4;
    word-wrap: break-word;
}

.chatbot-message.jane {
    background-color: #e9ecef;
    color: #343a40;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.chatbot-message.user {
    background-color: var(--selca-azul-medio);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

#chatbot-jane-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#chatbot-jane-input {
    flex-grow: 1;
    border: 1px solid #ced4da;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

#chatbot-jane-input:focus {
    outline: none;
    border-color: var(--selca-azul-medio);
    box-shadow: 0 0 0 2px rgba(29, 114, 184, 0.25);
}

#chatbot-jane-send {
    background: var(--selca-azul-oscuro);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#chatbot-jane-send:hover {
    background: var(--selca-azul-medio);
}

/* New styles for chatbot options */
.chatbot-options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-start; /* Align options to the left */
}

.chat-option {
    background-color: #e0e0e0; /* Light grey background */
    color: #333; /* Dark text */
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 20px; /* Rounded buttons */
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    font-size: 0.9em;
}

.chat-option:hover {
    background-color: #d0d0d0;
    border-color: #a0a0a0;
    color: #000;
}

/* Styles for rating faces */
.rating-options .rating-face {
    font-size: 2rem; /* Larger icons */
    padding: 5px 10px;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.rating-options .rating-face:hover {
    transform: scale(1.2);
}

.rating-options .rating-face:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Color coding for rating faces */
.rating-options .rating-face[data-rating="insatisfecho"] {
    color: #dc3545; /* Red for sad */
}

.rating-options .rating-face[data-rating="satisfecho"] {
    color: #ffc107; /* Yellow for neutral */
}

.rating-options .rating-face[data-rating="muy satisfecho"] {
    color: #28a745; /* Green for happy */
}

/* Call to action bubble for chatbot */
.chatbot-call-to-action {
    position: absolute; /* Position relative to its fixed parent */
    bottom: 70px; /* Position above the icon */
    right: 0px;
    background-color: #fff;
    color: #333;
    padding: 10px 15px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 250px;
    text-align: center;
    font-size: 0.9em;
    line-height: 1.3;
    opacity: 0; /* Hidden by default */
    visibility: hidden;
    transform: scale(0.8);
    transform-origin: bottom right;
    transition: all 0.3s ease-in-out;
    z-index: 1048; /* Place it below the icon */
}

.chatbot-call-to-action::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fff;
}

/* Animation for the call to action bubble */
@keyframes pulseFade {
    0%, 100% {
        opacity: 0;
        visibility: hidden;
        transform: scale(0.8);
    }
    10%, 80% {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }
}

.chatbot-call-to-action.animate {
    animation: pulseFade 8s infinite; /* Adjust timing as needed */
}

.chatbot-call-to-action.hidden {
    display: none; /* Permanently hide */
}

/* ========================================================================= */
/* ESTILOS DEL NUEVO PIE DE PÁGINA (FOOTER) */
/* ========================================================================= */

.footer-selca {
    background-color: var(--selca-azul-oscuro);
    color: #ffffff;
}

.footer-selca .footer-heading {
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
}

.footer-selca a {
    color: #ffffff;
    transition: color 0.3s ease;
    text-decoration: none;
}

.footer-selca a:hover {
    color: var(--selca-azul-claro);
    text-decoration: underline;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-contact li {
    margin-bottom: 1rem;
    align-items: flex-start;
}

.footer-contact .bi {
    color: var(--selca-azul-claro);
    font-size: 1.1rem;
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.copyright-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.social-icons .social-icon .bi {
    font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons .social-icon:hover .bi {
    transform: scale(1.2);
    color: #ffffff;
}

/* ========================================================================= */
/* ESTILOS DEL HERO CAROUSEL */
/* ========================================================================= */

.hero-carousel-container {
    height: 50vh;
    min-height: 450px;
    background-color: var(--selca-azul-oscuro);
    position: relative;
}

.hero-carousel-container .carousel,
.hero-carousel-container .carousel-inner,
.hero-carousel-container .carousel-item {
    height: 100%;
}

.hero-carousel-container .carousel-item {
    position: relative; /* Necesario para la capa de superposición */
}

.hero-carousel-container .carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 66, 117, 0.5); /* Superposición de color azul oscuro semi-transparente */
}

.hero-carousel-container .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-carousel-container .carousel-caption {
    bottom: 50%;
    transform: translateY(50%);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 10; /* Asegura que el texto esté sobre la capa de superposición */
}

.hero-carousel-container .carousel-caption h1 {
    color: #ffffff;
    font-weight: bold;
}

.hero-carousel-container .carousel-caption p {
    color: #ffffff;
}

/* Media query para pantallas más pequeñas */
@media (max-width: 768px) {
    .hero-carousel-container {
        height: 50vh;
    }

    .hero-carousel-container .carousel-caption h1 {
        font-size: 2.5rem;
    }
}

 /*
=========================================================================
/ FORZAR TRANSICIÓN FADE DEL CARRUSEL (Estilo Base para Bootstrap 5/4) /
=========================================================================
*/
.carousel-fade .carousel-item {
  /* Oculta los ítems por defecto */
  opacity: 0;
  /* Configura la duración y la propiedad de la transición */
  transition: opacity 0.6s ease-in-out;
  /* Anula cualquier transformación de deslizamiento (slide) */
  transform: none; 
}

/* El ítem activo/visible debe tener opacidad 1 y z-index mayor */
.carousel-fade .carousel-item.active {
  z-index: 1;
  opacity: 1;
}

/* * El ítem que entra durante la transición (siempre el .active) debe estar por 
* encima del que sale (el que no tiene .active durante la transición). 
* Esto asegura que el fade sea suave.
*/
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
  z-index: 1; /* El ítem que está a punto de convertirse en .active */
  opacity: 0; /* Ya tiene opacidad 0, pero lo reconfirmamos */
}

/* * ESTO ES CRÍTICO: 
* El ítem saliente (que *pierde* la clase .active) debe tener z-index 0
* temporalmente, y mantener la opacidad 1 mientras dura la transición del que entra.
*/
.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    z-index: 0; /* Coloca el ítem saliente debajo */
    opacity: 1; /* Mantiene la visibilidad mientras se desvanece el siguiente */
    transition: none; /* Evita que el saliente también se desvanezca al mismo tiempo */
}

/* El ítem que acaba de entrar (el nuevo .active) */
.carousel-fade .carousel-item-next,
.carousel-fade .carousel-item-prev,
.carousel-fade .carousel-item.active {
    display: block; /* Asegura que se muestre durante la transición */
}

/* Estilos para el título/subtítulo superpuesto en la imagen del carrusel principal */
.carousel-item .image-overlay-caption {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo semitransparente para legibilidad */
    padding: 10px 15px;
    border-radius: 5px;
    max-width: 30%; /* Evita que sea demasiado ancho */
    text-align: left;
    z-index: 11; /* Asegura que esté por encima de la capa oscura del carrusel */
}

.image-overlay-caption h6 {
    font-size: 0.6rem; /* Título pequeño pero legible */
    font-weight: bold;
    margin-bottom: 5px;
    color: #ffffff; /* Asegura que el texto sea blanco */
}

.image-overlay-caption p {
    font-size: 0.6rem; /* Texto aún más pequeño para el subtítulo */
    margin-bottom: 0;
    color: #ffffff; /* Asegura que el texto sea blanco */
}

/* --- Estilos personalizados para el Carrusel de Portafolio --- */

/* Añade bordes redondeados al contenedor del carrusel */
#carouselPortafolio {
    border-radius: 15px;
    overflow: hidden; /* Asegura que las imágenes respeten los bordes redondeados */
}

/* Añade sombra de texto para mejorar la legibilidad en las leyendas del carrusel de portafolio */
#carouselPortafolio .carousel-caption {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Sombra negra para contraste */
}

/* Cambia el cursor a una mano para indicar que las tarjetas de servicio son clicables y añade efecto hover */
.service-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Estilos para la imagen en la tarjeta de servicio */
.service-card-image {
    max-height: 60px; /* Altura máxima para la imagen */
    width: auto; /* Ancho automático para mantener la proporción */
    max-width: 100%;
    margin-bottom: 1rem;
}

/* Animación sutil para los mensajes del chatbot */
@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-message.message-appear {
    animation: messageAppear 0.3s ease-out forwards;
}

/* Elimina el subrayado de los enlaces de las tarjetas de servicio */
a.card-link,
a.card-link:hover {
    text-decoration: none;
    color: inherit;
}

.chatbot-header-buttons {
    display: flex;
    align-items: center;
}

#chatbot-reset-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0.8;
    cursor: pointer;
    margin-right: 10px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

#chatbot-reset-button:hover {
    opacity: 1;
}

#chatbot-jane-close {
    text-decoration: none;
    transition: opacity 0.2s ease;
}