/* --- Estilo general de la cartilla --- */
.cartilla-card {
    border-radius: 16px;
    border-left: 8px solid #0d6efd;
    background: #fff;
}

/* --- Foto de mascota --- */
.pet-photo {
    max-height: 220px;
    object-fit: cover;
    border-radius: 16px;
    width: 100%;
}

.pet-photo-overlay {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 110, 253, 0.85);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* --- Tarjetas de vacunas --- */
.vacuna-card {
    background-color: #fefefe;
    border-radius: 16px;
    transition: all 0.3s ease;
    border-left: 5px solid #cce0ff;
    cursor: pointer;
}

.vacuna-card.aplicada {
    border-left-color: #0d6efd;
    background-color: #e9f3ff;
}

.vacuna-card:hover {
    border-left: 5px solid #0d6efd;
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    background-color: #f2f8ff;
}

/* --- Inputs y labels de check --- */
.form-check-input,
.form-check-label {
    cursor: pointer;
}

/* --- Carrusel --- */
.carousel .carousel-item {
    min-height: 250px;
}

/* --- Botón toggle vacunas --- */
.toggle-vacunas-btn {
    background: linear-gradient(45deg, #0d6efd, #66b3ff);
    color: white;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toggle-vacunas-btn:hover {
    background: linear-gradient(45deg, #0b5ed7, #0d6efd);
    transform: scale(1.03);
}

.toggle-vacunas-btn i.fa-syringe {
    animation: pulse 2s infinite;
}

/* --- Animación del ícono de jeringa --- */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Info de los datos generales --- */
.info-block {
    background-color: #fdfdfd;
    border-left: 5px solid #0d6efd;
    font-size: 0.95rem;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.info-block:hover {
    background-color: #e9f3ff;
    transform: translateY(-2px);
}

/* --- Controles del carrusel --- */
.carousel-control-prev,
.carousel-control-next,
.btn-carousel-mobile,
.btn-carousel-desktop {
    background: linear-gradient(45deg, #0d6efd, #66b3ff) !important;
    color: white;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-carousel-mobile:hover,
.btn-carousel-desktop:hover {
    background: linear-gradient(45deg, #0b5ed7, #0d6efd) !important;
    transform: scale(1.03);
}

/* --- Responsivo: mejora de experiencia móvil --- */
@media (max-width: 576px) {
    .info-block {
        flex-direction: column;
        align-items: flex-start;
    }
    .info-block i {
        margin-bottom: 6px;
    }

    .pet-photo {
        margin-bottom: 1rem;
    }

    .fw-bold.text-primary.fs-5 {
        font-size: 1.25rem;
    }
}

/* Gradiente azul para header del modal */
.bg-gradient-primary {
    background: linear-gradient(45deg, #0d6efd, #66b3ff);
}

/* Bordes redondeados más suaves en el modal */
.modal-content {
    border-radius: 1rem;
}

/* Asegurar el botón cerrar sea blanco */
.btn-close-white {
    filter: invert(1);
}

/* Animación para modales */
@keyframes modalZoomIn {
    0% {
      transform: scale(0.7);
      opacity: 0;
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }
  
  .modal.fade .modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: scale(0.7);
    opacity: 0;
  }
  
  .modal.fade.show .modal-dialog {
    animation: modalZoomIn 0.3s ease-out;
    transform: scale(1);
    opacity: 1;
  }
  


  /* --- Tarjetas de medicamentos --- */
.medicamento-card {
    background-color: #fefefe;
    border-radius: 16px;
    transition: all 0.3s ease;
    border-left: 5px solid #d1f0e1;
    cursor: pointer;
}

.medicamento-card:hover {
    border-left: 5px solid #20c997; /* Verde agua, moderno */
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    background-color: #effaf4;
}

/* --- Botón toggle medicamentos --- */
.toggle-medicamentos-btn {
    background: linear-gradient(45deg, #20c997, #66d9b3); /* Verde agua degradado */
    color: white;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toggle-medicamentos-btn:hover {
    background: linear-gradient(45deg, #17a589, #20c997);
    transform: scale(1.03);
}

.toggle-medicamentos-btn i.fa-pills {
    animation: pulse 2s infinite;
}

/* --- Animación del ícono de pastilla --- */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Modal de medicamentos igual que vacunas --- */
#addMedicineModal .modal-content {
    border-radius: 1rem;
}

#addMedicineModal .modal-header {
    background: linear-gradient(45deg, #20c997, #66d9b3);
    color: white;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

#addMedicineModal .btn-close-white {
    filter: invert(1);
}


/* Efecto Hover para info-block */
.info-block {
    transition: all 0.3s ease;
}

.info-block:hover {
    background-color: #f0f8ff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.15);
}

/* Animación de fade-in */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out both;
}

/* Fallback overlay para imagen */
.fallback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 110, 253, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 1rem;
    pointer-events: none;
}

.cartilla-card {
    border-radius: 16px;
    border-left: 8px solid #0d6efd;
    background: #fff;
    transition: transform 0.3s ease;
}

.cartilla-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

.carousel-item {
    overflow: visible; /* permite que el modal sobresalga del slide */
    position: relative;
    z-index: 0;
}
.modal {
    z-index: 1055; /* mayor que cualquier z-index de Bootstrap components */
}
