/* --- ESTILOS GENERALES --- */
body {
    font-family: 'Lato', sans-serif;
    margin: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background-color: #f3f4f6;
    color: #1f2937;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.section-title {
    color: #2c4f56;
    font-family: 'Poppins', sans-serif;
}

.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center; /* Align items vertically */
    height: 80px; /* Increase height */
    padding: 0 20px; /* Adjust padding */
}

#inicio {
    padding-top: 120px;
}

.logo-westo {
    width: 70px; /* Keep the increased size */
    height: auto;
    filter: brightness(1);
    transition: filter 0.3s ease;
    margin: auto 0; /* Center vertically with equal spacing */
}



/* --- MODO OSCURO --- */
.dark-mode {
    background-color: #1a202c;
    color: #f7fafc;
}

.dark-mode .section-bg {
    background-color: #2d3748;
}

.dark-mode .bg-white {
    background-color: #2d3748;
}

.dark-mode .bg-gray-100 {
    background-color: #2d3748;
}

.dark-mode .header-fixed {
    background-color: #1a202c;
}

.dark-mode .text-gray-700 {
    color: #cbd5e0;
}

.dark-mode .text-gray-800 {
    color: #f7fafc;
}

.dark-mode .text-blue-700 {
    color: #90caf9;
}

.dark-mode .text-blue-500 {
    color: #90caf9;
}

.dark-mode .border-gray-200 {
    border-color: #4a5568;
}

.dark-mode .shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dark-mode .section-title {
    color: #6b8b82;
}

.dark-mode .intro-text,
.dark-mode .intro-title {
    color: #f7fafc;
}

/* --- ESTILOS DE LA NUEVA SECCIÓN DE INICIO/NOSOTROS --- */
#inicio .hero-image-container {
    position: relative;
}

#inicio .hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.intro-title {
    font-family: 'Poppins', sans-serif;
}

/* --- BOTÓN DE WHATSAPP --- */
.whatsapp-button {
    display: inline-flex;
    align-items: center;
    background-color: #25d366;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.whatsapp-button:hover {
    background-color: #128c7e;
    transform: scale(1.05);
}

.whatsapp-icon {
    margin-right: 8px;
    font-size: 20px;
}

/* --- TARJETAS DE SERVICIOS --- */
.service-box {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    height: 220px; /* Altura fija */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.service-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.service-icon {
    font-size: 48px;
    color: #6b8b82;
    margin-bottom: 20px;
    transition: opacity 0.3s ease-in-out;
}

.service-title {
    color: #2c4f56;
    font-size: 1.5rem;
    font-weight: 700;
    transition: opacity 0.3s ease-in-out;
}

.service-description {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 79, 86, 0.95);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

.service-box:hover .service-description {
    opacity: 1;
    visibility: visible;
}

.service-box:hover .service-icon,
.service-box:hover .service-title {
    opacity: 0;
}

.dark-mode .service-box {
    background-color: #2d3748;
    border-color: #4a5568;
}

.dark-mode .service-title {
    color: #a5c3bb;
}

.dark-mode .service-description {
    color: #cbd5e0;
}

/* --- TARJETAS DE TESTIMONIOS --- */
.testimonial-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin: 15px;
}

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

.testimonial-text {
    font-style: italic;
    color: #4a5568;
    margin-bottom: 20px;
    position: relative;
}

.testimonial-text::before {
    content: '"';
    font-size: 60px;
    position: absolute;
    left: -15px;
    top: -20px;
    color: rgba(107, 139, 130, 0.2);
    font-family: serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.author-info h4 {
    margin: 0;
    color: #2c4f56;
}

.author-info p {
    margin: 5px 0 0;
    color: #718096;
    font-size: 14px;
}

.dark-mode .testimonial-card {
    background: #2d3748;
}

.dark-mode .testimonial-text {
    color: #cbd5e0;
}

.dark-mode .author-info h4 {
    color: #90caf9;
}

/* --- CHATBOT DE PRESUPUESTO --- */
#chatbot-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.5s ease-in-out;
    font-family: 'Jost', sans-serif;
}

.dark-mode #chatbot-container {
    background: #2d3748;
}

#chat-window {
    min-height: 100px;
    max-height: 100px;
    height: auto;
    overflow-y: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.5s ease-in-out;
}

.chat-window-expanded {
    max-height: 550px !important;
    overflow-y: auto !important;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    line-height: 1.5;
}

.bot-message {
    background-color: #e2e8f0;
    color: #2d3748;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.dark-mode .bot-message {
    background-color: #4a5568;
    color: #f7fafc;
}

.user-message {
    background-color: #2c4f56;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.dark-mode .user-message {
    background-color: #6b8b82;
}

#chat-input-container {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e2e8f0;
    flex-direction: column;
}

.dark-mode #chat-input-container {
    border-color: #4a5568;
}

#chat-input {
    flex-grow: 1;
    border: 1px solid #cbd5e0;
    border-radius: 20px;
    padding: 10px 15px;
    outline: none;
}

.dark-mode #chat-input {
    background-color: #1a202c;
    border-color: #4a5568;
    color: #f7fafc;
}

.chat-input-row {
    display: flex;
    align-items: center;
}

#send-button {
    background-color: #2c4f56;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#send-button:hover {
    background-color: #3a6b75;
}

.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.option-button {
    background-color: #fff;
    border: 1px solid #2c4f56;
    color: #2c4f56;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.dark-mode .option-button {
    background-color: #4a5568;
    color: #f7fafc;
    border-color: #6b8b82;
}

.option-button:hover {
    background-color: #2c4f56;
    color: white;
}

.dark-mode .option-button:hover {
    background-color: #6b8b82;
}

.start-button {
    background: #2c4f56;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    margin: 20px auto 0;
}

.start-button:hover {
    background: #3a6b75;
    transform: translateY(-2px);
}

.disclaimer-text {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 10px;
    padding-bottom: 20px;
}

.dark-mode .disclaimer-text {
    color: #a0aec0;
}

/* --- ESTILOS RESPONSIVOS --- */
@media (max-width: 768px) {
    .header-fixed {
        /* Allow items to wrap, and remove fixed height to allow expansion */
        flex-direction: column;
        height: auto;
        align-items: flex-start;
    }

    .header-fixed .container {
        /* Ensure the container with logo/button is full width */
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #nav-menu {
        /* The menu will be full width when it's not hidden */
        width: 100%;
    }

    #nav-menu ul {
        /* The list inside should be a column */
        flex-direction: column;
        width: 100%;
        padding-top: 10px; /* Space between header bar and menu items */
    }

    #nav-menu li {
        width: 100%;
        text-align: center;
    }

    #nav-menu .nav-link {
        /* Make links easier to tap */
        display: block;
        padding: 8px 0;
        width: 100%;
    }

    /* Keep other responsive rules */
    #inicio {
        flex-direction: column;
        text-align: center;
    }

    #inicio .md\:w-1\/2 {
        width: 100%;
        text-align: center;
    }

    .logo-westo {
        /* The logo was centered, but now the container is flex-start */
        /* Let's remove the auto margin to align it left */
        margin: 0;
    }

    .service-box {
        margin-bottom: 20px;
    }
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c4f56;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- ESTILOS DEL CARRUSEL --- */
.carrusel-container-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.carrusel-container {
    width: 87%;
    height: 152px;
    overflow: hidden;
    background: #f7f7f7;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    position: relative;
}

.dark-mode .carrusel-container {
    background: #1a202c;
}

.carrusel-track {
    display: flex;
    width: calc(140px * 26);
    animation: scroll 45s linear infinite;
    align-items: center;
    padding-top: 20px;
}

.item {
    width: 112px;
    height: 152px;
    margin: 0 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    justify-content: flex-start;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 12px;
}

.item:hover {
    transform: scale(1.05);
}

.image-wrapper {
    background: #fff;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 112px;
    height: 97px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
    margin-top: 6px;
}

.image-wrapper img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 5px;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.item:hover .image-wrapper img {
    filter: grayscale(0%);
}

.info-text {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: #7f8c8d;
}

.dark-mode .info-text {
    color: #cbd5e0;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-140px * 13));
    }
}

.carrusel-track:hover {
    animation-play-state: paused;
}

/* --- ESTILOS GALERÍA MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    overflow-y: auto;
    position: relative;
}

.dark-mode .modal-content {
    background: #2d3748;
}

.modal-close-button {
    display: none; /* Ocultar el botón original */
}

.modal-close-container {
    text-align: center;
    padding: 15px 0;
}

.modal-close-button-center {
    background: #2c4f56;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    display: inline-block;
}

.dark-mode .modal-close-button-center {
    background: #6b8b82;
}

.gallery-grid {
    column-count: 4;
    column-gap: 15px;
    margin-top: 10px; /* Reducido el margen superior */
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 5px solid #2d3748;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@media (max-width: 1024px) {
    .gallery-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
    }
}

/* --- NUBE DE PALABRAS --- */
#word-cloud-section {
    padding: 50px 0;
    /* Hidden visually but kept in DOM for SEO: move off-screen */
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#word-cloud-canvas {
    width: 100%;
    height: 400px;
    max-width: 800px;
    margin: 0 auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Estilos para el input del chat deshabilitado */
#chat-input:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  color: #6c757d;
}

.dark-mode #chat-input:disabled {
  background-color: #3a4759;
  color: #a0aec0;
}