/* ===== ESTILOS GENERALES ===== */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== SECCIÓN DE PORTADA ===== */
.cover {
    position: relative;
    height: 100vh;
    background-image: url('../img/fondo.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.cover__content {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 800px;
    padding: 20px;
}

.content__logo img {
    max-width: 300px;
    margin-bottom: 20px;
    width: 100%;
    height: auto;
}

.content__title {
    font-size: 3em;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
}

.content__text {
    font-size: 1.5em;
    margin-bottom: 30px;
    line-height: 1.4;
    
}

.content__cta {
    background-color: #B8860B;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 10px 0;
    border: 2px solid transparent;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.content__cta:hover {
    background-color: #ffffff;
    color: #B8860B;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.footer .text-muted {
    color: #ffffff !important;
}

.footer a.text-black[target="_blank"] {
    color: #B8860B !important;
    transition: color 0.3s ease;
}

.footer a.text-black[target="_blank"]:hover {
    color: #D4AF37 !important;
    text-decoration: none;
}
/* Filtro oscuro para la imagen de fondo */
.filter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* ===== ÁREAS DE PRÁCTICA ===== */
.practice {
    padding: 50px 0;
    background-color: #f9f9f9;
}

.practice .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.practice .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.practice .card i {
    color: #B8860B;
    margin-bottom: 15px;
    font-size: 3rem;
}

.practice .card-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.practice .card-text {
    font-size: 1em;
    color: #666;
}

/* ===== MODALES ===== */
.modal {
    z-index: 1050;
}

.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    background-color: #D4AF37;
    color: #fff;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.modal-title {
    font-size: 1.5em;
    font-weight: bold;
}

.modal-body {
    padding: 20px;
    font-size: 1.1em;
    color: #333;
}

.modal-footer {
    border-top: 1px solid #eee;
    padding: 15px;
}

.modal .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #fff;
}

.modal .btn-secondary {
    background-color: #B8860B;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.modal .btn-secondary:hover {
    background-color: #D4AF37;
}

.modal-backdrop {
    z-index: 1040;
    background-color: rgba(0, 0, 0, 0.5);
}

/* ===== FOOTER ===== */
.footer {
    background-color: #656564;
    color: #ffffff;
    padding: 40px 0;
    border-top: 2px solid #D4AF37;
}

.footer .container {
    max-width: 800px;
    margin: 0 auto;
}

.footer img {
    max-width: 100px;
    height: auto;
}

.footer a {
    color: #ffffff;
    margin: 0 10px;
    transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
    display: inline-block;
}

.footer a:hover {
    color: #D4AF37;
    transform: scale(1.2);
}

.footer p {
    font-size: 0.9em;
    color: #dcdcdc;
}

.footer a.text-black {
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.footer a.text-black:hover {
    color: #D4AF37;
}

/* ===== BOTONES FLOTANTES ===== */
.floating-button {
    position: fixed;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    opacity: 1;
    visibility: visible;
    z-index: 9998;
}

/* WhatsApp */
#WhatsApp {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 9999;
}

.whatsapp-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s ease-in-out;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    background-color: #ffffff;
   color:  #25D366;
}

.whatsapp-button i {
    font-size: 28px;
}

/* Chatbot */
#chatbot-button {
    position: fixed;
    bottom: 160px;
    right: 20px;
    background-color: #B8860B;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.4);
    transition: transform 0.3s ease-in-out;
    z-index: 9999;
}

#chatbot-button:hover {
    transform: scale(1.1);
    background-color: #D4AF37;
}

/* Contenedor del chatbot */
#chatbot-container {
    position: fixed;
    bottom: 230px;
    right: 20px;
    width: 300px;
    height: 380px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
    z-index: 9999;
}

#chatbot-container.visible {
    opacity: 1;
    visibility: visible;
}

#chatbot-header {
    background: #D4AF37;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbot-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

#chatbot-close:hover {
    transform: scale(1.2);
}

#chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chatbot-message {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    max-width: 80%;
}

.user-message {
    background: #D4AF37;
    color: white;
    align-self: flex-end;
}

.bot-message {
    background: #f1f1f1;
    align-self: flex-start;
}

#chatbot-input-container {
    display: flex;
    padding: 12px;
    border-top: 1px solid #ddd;
    background: #f9f9f9;
}

#chatbot-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    font-size: 16px; /* Previene zoom en iOS */
}

#chatbot-send {
    background: #B8860B;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 8px;
    transition: background 0.3s;
}

#chatbot-send:hover {
    background: #D4AF37;
}

/* ===== SECCIÓN DE CONSULTA ===== */
.consulta-section {
    margin-top: 40px;
    padding: 20px 0;
}

.consulta-section .buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.consulta-section .buttons button {
    padding: 12px 20px;
    background-color: #575d64;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    touch-action: manipulation; /* Mejora la respuesta táctil */
}

.consulta-section .buttons button:hover {
    background-color: #9e9999;
}

.btn-link.ver-mas {
    color: #ee9f29;
    text-decoration: none;
    font-size: 0.9em;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.btn-link.ver-mas:hover {
    text-decoration: underline;
}

/* ===== NAVBAR ===== */
.navbar-brand img {
    margin-left: 15px;
    width: 50px;
    height: 50px;
}

/* ===== LOADER ===== */
#loader {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
}

#loader .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #D4AF37;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== MEDIA QUERIES ===== */

/* Tabletas */
@media (max-width: 992px) and (min-width: 769px) {
    .content__title {
        font-size: 2.2rem;
    }
    
    .content__text {
        font-size: 1.3rem;
    }
}

/* Móviles */
@media (max-width: 768px) {
    /* Ajustes generales */
    body {
        font-size: 14px;
    }
    
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    /* Portada */
    .cover {
        height: auto;
        min-height: 100vh;
        padding: 80px 0 60px;
    }
    
    .cover__content {
        padding: 20px 15px;
        width: 100%;
    }
    
    .content__logo img {
        max-width: 200px;
        margin-bottom: 15px;
    }
    
    .content__title {
        font-size: 1.8rem;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .content__text {
        font-size: 1.1rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }
    
    .content__cta {
        padding: 14px 25px;
        font-size: 1rem;
        margin: 8px 0;
        width: auto;
        max-width: 280px;
    }
    
    /* Áreas de práctica */
    .practice {
        padding: 30px 0;
    }
    
    .practice .card-title {
        font-size: 1.2rem;
    }
    
    .practice .card i {
        font-size: 2.5rem;
    }
    
    /* Botones flotantes */
    .floating-button, .whatsapp-button, #chatbot-button {
        min-width: 44px;
        min-height: 44px;
    }
    
    #WhatsApp {
        bottom: 100px;
        right: 15px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-button i {
        font-size: 24px;
    }
    
    #chatbot-button {
        bottom: 160px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    /* Chatbot */
    #chatbot-container {
        width: 90%;
        height: 50vh;
        bottom: 200px;
        right: 5%;
        left: 5%;
    }
    
    /* Footer */
    .footer {
        padding: 30px 0;
    }
    
    .footer img {
        max-width: 80px;
    }
    
    /* Navbar */
    .navbar-brand img {
        width: 50px;
        height: 50px;
        margin-left: 5px;
    }
    
    /* Consulta section */
    .consulta-section .buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .consulta-section .buttons button {
        width: 100%;
        margin-bottom: 10px;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    /* Espacio para botones flotantes */
    .main-content {
        padding-bottom: 150px;
    }
}

/* Móviles pequeños */
@media (max-width: 576px) {
    .content__title {
        font-size: 1.5rem;
    }
    
    .content__text {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .content__cta {
        padding: 12px 20px;
        font-size: 0.95rem;
        width: 90%;
        max-width: 260px;
    }
    
    #WhatsApp {
        bottom: 90px;
        right: 10px;
    }
    
    #chatbot-button {
        bottom: 150px;
        right: 10px;
    }
    
    /* Mejorar espaciado en modales */
    .modal-body {
        padding: 15px;
    }
}

/* Pantallas grandes */
@media (min-width: 1600px) {
    .cover__content {
        max-width: 1000px;
    }
    
    .content__title {
        font-size: 3.5rem;
    }
    
    .content__text {
        font-size: 1.8rem;
    }
    
    .content__cta {
        font-size: 1.4rem;
        padding: 18px 35px;
    }
}

/* Ajustes específicos para iOS */
@supports (-webkit-touch-callout: none) {
    .cover {
        height: -webkit-fill-available;
    }
}

/* Mejora de imágenes */
img {
    max-width: 100%;
    height: auto;
}

/* Mejora de tablas en móviles */
@media (max-width: 768px) {
    table {
        width: 100% !important;
        display: block;
        overflow-x: auto;
    }
}