/* Variables de colores */
:root {
    --primary-color: #1a73e8;
    --secondary-color: #34a853;
    --accent-color: #00796b;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #495057;
    --text-light: #6c757d;
    --white: #ffffff;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Estilos generales */
body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--dark-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

.btn {
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 500;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    font-weight: 700;
}

.divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 0 auto 20px;
    border-radius: 2px;
    position: relative;
}

.divider span {
    position: absolute;
    height: 8px;
    width: 8px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
}

.lead {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Navbar */
.navbar {
    background-color: rgba(26, 115, 232, 0.95) !important;
    padding: 10px 0;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    position: relative;
    padding: 0;
    margin-right: 20px;
}

.navbar-logo {
    height: 70px; /* Aumentado de 40px */
    width: auto;
    max-width: 250px;
    object-fit: contain;
    transition: var(--transition);
    position: relative;
    top: -5px; /* Hace que el logo sobresalga ligeramente hacia arriba */
    margin-bottom: -10px; /* Compensa el espacio adicional en la parte inferior */
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 5px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.btn-contacto {
    background-color: var(--secondary-color);
    color: var(--white) !important;
    border-radius: 50px;
    padding: 8px 20px !important;
}

.btn-contacto:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
#hero {
    position: relative;
    margin-top: 76px;
}

.carousel-item {
    height: 600px;
    position: relative;
}

.carousel-item img {
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.carousel-caption {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.carousel-caption h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInDown 1s;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-caption p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.carousel-caption .btn {
    animation: fadeIn 1.5s;
}

/* Estilos para el footer de cada diapositiva del carrusel */
.carousel-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

/* Stats Section */
#stats {
    background-color: var(--white);
    box-shadow: var(--shadow);
    margin-top: -50px;
    position: relative;
    z-index: 10;
    border-radius: 10px;
    padding: 30px 0;
}

.stat-item {
    padding: 20px;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-item h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}

/* Trayectoria Section */
#trayectoria {
    background-color: var(--white);
    padding: 80px 0;
}

.content-box {
    padding: 30px;
    border-radius: 10px;
    transition: var(--transition);
}

.content-box h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    position: relative;
    padding-left: 20px;
}

.content-box h3:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-color: var(--secondary-color);
    border-radius: 50%;
}

.content-box p {
    color: var(--text-color);
    margin-bottom: 25px;
    text-align: justify;
}

.image-box {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.image-box img {
    border-radius: 10px;
    transition: var(--transition);
}

.image-box:hover img {
    transform: scale(1.05);
}

.experience-badge {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 15px;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.experience-badge span {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.experience-badge p {
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.2;
}

/* Productos Section */
#productos {
    background-color: var(--light-color);
    padding: 80px 0;
}

.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 1;
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-info h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.product-info p {
    color: var(--text-color);
    margin-bottom: 15px;
}

.product-features {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.product-features span {
    margin-bottom: 5px;
    color: var(--text-light);
}

.product-features i {
    color: var(--secondary-color);
    margin-right: 5px;
}

/* Testimonios Section */
#testimonios {
    background-color: var(--white);
    padding: 80px 0;
}

.testimonial-card {
    background-color: var(--light-color);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-quote {
    position: absolute;
    top: 20px;
    left: 20px;
    color: rgba(26, 115, 232, 0.1);
    font-size: 3rem;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-top: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid var(--primary-color);
}

.testimonial-author h5 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.testimonial-rating {
    color: #ffc107;
}

/* Agendar Cita Section */
#agendar-cita {
    background: linear-gradient(rgba(26, 115, 232, 0.9), rgba(52, 168, 83, 0.9)), url('../images/medico1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    padding: 80px 0;
}

#agendar-cita .section-header h2,
#agendar-cita .lead {
    color: var(--white);
}

.appointment-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.appointment-info {
    padding: 30px;
    color: var(--text-color);
}

.appointment-info h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.appointment-info p {
    margin-bottom: 10px;
}

.appointment-info i {
    color: var(--secondary-color);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.social-links {
    display: flex;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--light-color);
    color: var(--primary-color);
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.appointment-action {
    padding: 30px;
    background-color: var(--light-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.appointment-action h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 60px 0 20px;
}

footer h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

footer p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
}

footer .social-icon {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

footer .social-icon:hover {
    background-color: var(--primary-color);
}

hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 30px 0;
}

.copyright {
    color: rgba(255, 255, 255, 0.7);
}

.privacy-links a {
    color: rgba(255, 255, 255, 0.7);
    margin-left: 15px;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 90px;
    right: 20px;
    background-color: #25d366;
    color: var(--white);
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: var(--white);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    font-size: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: translateY(-5px);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: rgba(26, 115, 232, 0.95);
        padding: 15px;
        border-radius: 10px;
        margin-top: 10px;
    }
    
    .carousel-caption h1 {
        font-size: 2.5rem;
    }
    
    .carousel-caption p {
        font-size: 1.2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .carousel-item {
        height: 400px;
    }
    
    .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .appointment-info, .appointment-action {
        padding: 20px;
    }

    #popupCarousel .carousel-item {
        height: 300px;
    }
    
    #popupCarousel .carousel-caption h3 {
        font-size: 1.4rem;
    }
    
    #popupCarousel .carousel-caption p {
        font-size: 1rem;
    }
}

@media (max-width: 575px) {
    .carousel-item {
        height: 350px;
    }
    
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }

    .carousel-footer {
        flex-direction: column;
        gap: 10px;
    }

    .carousel-footer .btn {
        width: 100%;
    }
    
    .btn-lg {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }

    .navbar-logo {
        height: 45px; /* Aumentado de 30px */
        max-width: 180px;
        top: -3px; /* Ajuste para móviles */
    }

    #popupCarousel .carousel-item {
        padding-bottom: 100px; /* Más espacio para el footer en móviles */
    }

    #popupCarousel .carousel-control-prev,
    #popupCarousel .carousel-control-next {
        bottom: 100px;
    }
    
    #popupCarousel .carousel-caption {
        padding: 10px;
    }
    
    #popupCarousel .carousel-caption h3 {
        font-size: 1.2rem;
    }
    
    #popupCarousel .carousel-caption p {
        font-size: 0.9rem;
    }

    #popupCarousel .carousel-indicators {
        bottom: 110px;
    }
}

/* Estilos para el Popup Modal con Carrusel */
#welcomeModal .modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

#welcomeModal .modal-header {
    color: var(--white);
    border-bottom: none;
    padding: 15px 20px;
}

#welcomeModal .modal-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

#welcomeModal .modal-footer {
    border-top: none;
    padding: 15px 20px;
}

#welcomeModal .btn-close {
    color: var(--dark-color);
    opacity: 1;
    filter: none;
}

#popupCarousel {
    border-radius: 0;
}

/* Ajustar la altura del carrusel para acomodar el footer */
#popupCarousel .carousel-item {
    position: relative;
    padding-bottom: 60px; /* Espacio para el footer */
}

/* Ajustar controles del carrusel para que no se superpongan con el footer */
#popupCarousel .carousel-control-prev,
#popupCarousel .carousel-control-next {
    bottom: 60px;
}

/* Ajustar indicadores del carrusel */
#popupCarousel .carousel-indicators {
    bottom: 70px;
}

#popupCarousel .carousel-item img {
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
}

#popupCarousel .carousel-caption {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 15px;
    bottom: 20px;
}

#popupCarousel .carousel-caption h3 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

#popupCarousel .carousel-caption p {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 0;
}