/* CSS personalizado para efectos y clases específicas */
body { 
    font-family: 'Inter', sans-serif; 
    color: #1a202c;
    margin: 0;
    padding: 0;
}

/* Oculta el botón flotante cuando el chatbot está abierto */
body.chatbot-open #chatbot-toggle-btn {
    display: none;
}

.page { 
    display: none; 
    animation: fadeInPage 0.5s ease-in-out; 
}

.page.active { 
    display: block; 
}

@keyframes fadeInPage { 
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

.photo-modal { 
    display: none; 
    position: fixed; 
    z-index: 1002; 
    padding-top: 60px; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); 
    animation: fadeIn 0.5s; 
}

.photo-modal-content { 
    margin: auto; 
    display: block; 
    width: auto; 
    max-width: 85%; 
    max-height: 85%; 
}

.close-photo-modal { 
    position: absolute; 
    top: 15px; 
    right: 35px; 
    color: #f1f1f1; 
    font-size: 40px; 
    font-weight: bold; 
    transition: 0.3s; 
    cursor: pointer; 
}

.close-photo-modal:hover, 
.close-photo-modal:focus { 
    color: #bbb; 
    text-decoration: none; 
    cursor: pointer; 
}

@keyframes fadeIn { 
    from { 
        opacity: 0; 
    } 
    to { 
        opacity: 1; 
    } 
}

/* Fondo de la sección de bienvenida con imagen y superposición oscura */
#bienvenida {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('fondo/fondo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover; 
    background-attachment: fixed; /* Parallax effect */
    background-blend-mode: overlay;
    background-color: rgb(180, 200, 225);
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 100px 20px;
}

/* Texto dentro de bienvenida en negro */
#bienvenida h1,
#bienvenida h2,
#bienvenida p {
    color: #000000; /* Se cambia a negro para que sea visible */
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.6);
    margin: 0 0 15px 0;
}

/* Formas flotantes */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.shape:nth-child(1) { width: 50px; height: 50px; top: 10%; left: 20%; animation-delay: 0s; }
.shape:nth-child(2) { width: 80px; height: 80px; top: 50%; left: 80%; animation-delay: 5s; }
.shape:nth-child(3) { width: 30px; height: 30px; top: 70%; left: 40%; animation-delay: 10s; }
.shape:nth-child(4) { width: 60px; height: 60px; top: 30%; left: 60%; animation-delay: 15s; }
.shape:nth-child(5) { width: 40px; height: 40px; top: 85%; left: 15%; animation-delay: 2s; }
.shape:nth-child(6) { width: 70px; height: 70px; top: 25%; left: 5%; animation-delay: 8s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
    50% { transform: translateY(-20px) scale(1.1); opacity: 0.8; }
}

/* Botón con efecto hover */
.cta-button {
    background: white;
    color: black;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    position: relative;
    z-index: 2;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Estilos específicos para el carrusel de actividades */
.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.carousel-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera*/
}
.carousel-item {
    flex: 0 0 auto;
    width: 250px;
    margin-right: 1.5rem; /* Gap-x-6 en Tailwind */
    scroll-snap-align: start;
}
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.5s ease-in-out;
}
.welcome-modal.show {
    visibility: visible;
    opacity: 1;
}
.welcome-modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: bounceIn 0.8s;
    max-width: 90%;
    position: relative;
}
@keyframes bounceIn {
    0% { transform: scale(0.9); opacity: 0; }
    60% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); }
}
.close-welcome-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    color: #777;
    cursor: pointer;
    transition: color 0.3s;
}
.close-welcome-modal:hover {
    color: #333;
}

/* Popup modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.card {
  background: #fff;
  width: 760px;
  max-width: 95%;
  border-radius: 14px;
  padding: 22px;
  display: flex;
  gap: 18px;
  align-items: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  position: relative;
}
.card .text { flex:1; text-align: center; }
.card h2 { margin: 0 0 8px; color: #222; font-size: 28px; font-weight: bold; }
.card p { margin: 4px 0; color: #444; font-size: 20px; line-height: 1.3; }
.closeBtn {
  position:absolute;
  top:12px;
  right:16px;
  font-size:26px;
  cursor:pointer;
  color:#666;
}

/* Pequeña mejora responsive del contenido de la card */
@media (max-width: 640px) {
  .card { flex-direction: column; padding: 18px; gap: 12px; }
  .card h2 { font-size: 22px; }
  .card p { font-size: 16px; }
}

/* Estilos de la FAQ */
.faq-item {
    border-bottom: 1px solid #e2e8f0;
}
.faq-question {
    cursor: pointer;
    transition: background-color 0.3s;
}
.faq-question:hover {
    background-color: #f7fafc;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding: 0 1rem;
}
.faq-answer.active {
    max-height: 200px; /* Ajusta este valor si necesitas más espacio */
    padding: 1rem;
}

/* Estilos del buscador */
.search-container {
    position: relative;
}

.search-container input {
    padding-left: 2.5rem; /* Espacio para el icono */
    transition: width 0.3s ease-in-out;
    width: 0;
    opacity: 0;
}

.search-container input:focus {
    width: 150px;
    opacity: 1;
}

.search-container .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}
.search-result-card {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1-px rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
    border-left: 4px solid #3b82f6;
}
.search-result-card h3 {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
}
.search-result-card p {
    margin-top: 0.5rem;
    color: #4b5563;
}

/* Estilos para la sección de Información sobre JAC */
.info-card {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.info-card h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1a202c;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 0.5rem;
}

.info-card p {
    color: #4a5568;
    line-height: 1.6;
}

.info-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.info-list li {
    background: #e2f2ff;
    border-left: 4px solid #3b82f6;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Estilos del chatbot */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    width: 350px;
    max-height: 500px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease-in-out;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
}

.chatbot-container.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background-color: #3b82f6;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.chat-body {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 80%;
    padding: 10px;
    border-radius: 12px;
    word-wrap: break-word;
}

.user-message {
    background-color: #e2f2ff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background-color: #f3f4f6;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-input {
    padding: 1rem;
    display: flex;
    gap: 8px;
    border-top: 1px solid #e2e8f0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

.loading-dots span {
  animation: pulse 1s infinite ease-in-out;
  background-color: #6b7280;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  display: inline-block;
  margin: 0 2px;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@media (max-width: 450px) {
    .chatbot-container {
        width: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-height: 100%;
    }
}

/* Estilos del mensaje flotante del chatbot */
#welcome-message {
    position: fixed;
    bottom: 90px;
    right: 80px;
    background-color: #3b82f6;
    color: white;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    transform: translateY(10px);
    max-width: 250px;
    text-align: center;
}
#welcome-message.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#welcome-message::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 15px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #3b82f6;
}
