:root {
    --primary-color: #FCA311;
    --secondary-color: #0A192F;
}

body {
    padding-top: 56px;
}

.hero-section {
    background-color: var(--secondary-color);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-background-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    user-select: none;
    pointer-events: none;
}

.hero-background-icons i {
    position: absolute;
    color: rgba(255, 255, 255, 0.03);
    transition: color 0.3s ease;
}

/* Composición artística del fondo */
.hero-background-icons i:nth-child(1) { font-size: 6rem; top: 10%; left: 5%; transform: rotate(-15deg); }
.hero-background-icons i:nth-child(2) { font-size: 4rem; top: 20%; left: 30%; transform: rotate(10deg); }
.hero-background-icons i:nth-child(3) { font-size: 8rem; top: 5%; right: 10%; transform: rotate(25deg); }
.hero-background-icons i:nth-child(4) { font-size: 5rem; top: 40%; right: 25%; transform: rotate(-10deg); }
.hero-background-icons i:nth-child(5) { font-size: 7rem; top: 60%; left: 15%; transform: rotate(20deg); }
.hero-background-icons i:nth-child(6) { font-size: 9rem; bottom: 5%; right: 5%; transform: rotate(-25deg); }
.hero-background-icons i:nth-child(7) { font-size: 5rem; bottom: 20%; left: 50%; transform: rotate(15deg); }
.hero-background-icons i:nth-child(8) { font-size: 7rem; top: 75%; right: 30%; transform: rotate(-20deg); }
.hero-background-icons i:nth-child(9) { font-size: 4rem; top: 50%; left: 40%; transform: rotate(5deg); }
.hero-background-icons i:nth-child(10) { font-size: 8rem; top: 25%; left: 60%; transform: rotate(-15deg); }
.hero-background-icons i:nth-child(11) { font-size: 6rem; bottom: 10%; left: 2%; transform: rotate(30deg); }
.hero-background-icons i:nth-child(12) { font-size: 5rem; top: -5%; left: 45%; transform: rotate(-25deg); }
.hero-background-icons i:nth-child(13) { font-size: 9rem; top: 50%; right: -5%; transform: rotate(10deg); }
.hero-background-icons i:nth-child(14) { font-size: 4rem; bottom: 30%; right: 40%; transform: rotate(20deg); }
.hero-background-icons i:nth-child(15) { font-size: 7rem; top: 80%; left: 40%; transform: rotate(-5deg); }
.hero-background-icons i:nth-child(16) { font-size: 6rem; top: 60%; right: 50%; transform: rotate(15deg); }
.hero-background-icons i:nth-child(17) { font-size: 8rem; bottom: -10%; left: 25%; transform: rotate(-20deg); }
.hero-background-icons i:nth-child(18) { font-size: 5rem; top: 90%; right: 20%; transform: rotate(10deg); }

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

.hero-section .btn-primary:hover {
    background-color: #e0930f;
    border-color: #e0930f;
}

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

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #e0930f;
    border-color: #e0930f;
}

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

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

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

.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(--primary-color);
    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, #proyectos-destacados .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

#servicios .card.active, #proyectos-destacados .card.active {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: var(--primary-color);
}

.carousel-inner img {
    max-height: 400px;
    object-fit: cover;
}

.card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* --- Hero Logo Style --- */
.hero-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(252, 163, 17, 0.5); /* Optional glow effect */
    animation: pulse-glow 4s ease-in-out infinite;
}

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

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

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

footer .bi:hover {
    transform: scale(1.2);
    color: var(--primary-color);
}

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

#testimonios .testimonial-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

#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;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1);
}

.darken-on-hover {
    transition: background-color 0.5s ease, color 0.5s ease;
}

.darken-on-hover:hover {
    background-color: #212529 !important;
    color: #f8f9fa;
}

.darken-on-hover:hover h2,
.darken-on-hover:hover h3,
.darken-on-hover:hover h5,
.darken-on-hover:hover p {
    color: #f8f9fa;
}

.darken-on-hover:hover .card {
    background-color: #343a40;
    color: #f8f9fa;
}

.darken-on-hover:hover .text-primary {
    color: var(--primary-color) !important;
}

.darken-on-hover:hover .text-muted {
    color: #adb5bd !important;
}

.darken-on-hover:hover .form-label {
    color: #f8f9fa;
}

.darken-on-hover:hover .form-control {
    background-color: #343a40;
    color: #f8f9fa;
    border-color: #6c757d;
}

.darken-on-hover:hover .form-control::placeholder {
    color: #adb5bd;
}

.darken-on-hover:hover .form-control:focus {
    background-color: #495057;
    color: #f8f9fa;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(252, 163, 17, 0.25);
}

/* Estilos para el carrusel de múltiples testimonios */
@media (max-width: 767.98px) {
    #carouselTestimonios .carousel-item .row .col-md-4:not(:first-child) {
        display: none;
    }
}

/* ========================================================================= */
/* CHATBOT STYLES */
/* ========================================================================= */
#chatbot-jane-container {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 1050;
}

#chatbot-jane-icon {
    position: absolute;
    right: 0;
    bottom: 0;
    cursor: pointer;
    z-index: 1049;
    transition: transform 0.3s ease;
    width: 64px;
    height: 64px;
    background-color: #0A192F; /* secondary-color */
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chatbot-jane-icon i {
    font-size: 32px;
    color: white;
}

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

#chatbot-jane-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 370px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    background: #ffffff;
    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;
}

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

#chatbot-jane-window .chatbot-header {
    background: #0A192F; /* secondary-color */
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

#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;
    animation: messageAppear 0.3s ease-out forwards;
}

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

.chatbot-message.user {
    background-color: #FCA311; /* primary-color */
    color: #0A192F;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

#chatbot-jane-window .chatbot-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: #FCA311;
    box-shadow: 0 0 0 2px rgba(252, 163, 17, 0.25);
}

#chatbot-jane-send {
    background: #0A192F; /* secondary-color */
    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: #142c4d;
}

.chatbot-call-to-action {
    position: absolute;
    bottom: 80px;
    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;
    visibility: hidden;
    transform: scale(0.8);
    transform-origin: bottom right;
    transition: all 0.3s ease-in-out;
    z-index: 1051;
}

.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;
}

@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 2s infinite; /* Delay start by 2s */
}

.chatbot-call-to-action.hidden {
    display: none;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Portfolio Carousel Style Refinements --- */

/* 1. Rounded corners for the carousel */
#carouselPortafolio {
    border-radius: 15px;
    overflow: hidden; /* Ensures the images inside respect the rounded corners */
}

/* 2. Improved visibility for carousel controls */
#carouselPortafolio .carousel-control-prev,
#carouselPortafolio .carousel-control-next {
    background-color: rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 1rem;
}

#carouselPortafolio .carousel-control-prev:hover,
#carouselPortafolio .carousel-control-next:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* --- Hero Logo Animation --- */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 15px rgba(252, 163, 17, 0.5);
    }
    50% {
        box-shadow: 0 0 25px 10px rgba(252, 163, 17, 0.8);
    }
    100% {
        box-shadow: 0 0 15px rgba(252, 163, 17, 0.5);
    }
}