/* Mejorar fade del carousel para evitar flash blanco */
.carousel.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  z-index: 1;
}
.carousel.carousel-fade .carousel-item.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}
.carousel.carousel-fade .carousel-inner {
  background: #222; /* color oscuro para evitar flash blanco */
}

/* Botones del slider sobrepuestos y visibles */
.carousel-control-prev, .carousel-control-next {
  z-index: 3;
  opacity: 0.85;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: rgba(0,0,0,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
}
.carousel-control-prev:hover, .carousel-control-next:hover {
  background: rgba(0,0,0,0.45);
  opacity: 1;
}
.carousel-control-prev-icon, .carousel-control-next-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-size: 2.5rem 2.5rem;
}
/* Carousel Fade Effect */
.carousel.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4,0,0.2,1);
}
.carousel.carousel-fade .carousel-item.active,
.carousel.carousel-fade .carousel-item-next.carousel-item-start,
.carousel.carousel-fade .carousel-item-prev.carousel-item-end {
  opacity: 1;
  z-index: 2;
}
.carousel.carousel-fade .carousel-item-next,
.carousel.carousel-fade .carousel-item-prev,
.carousel.carousel-fade .carousel-item.active.carousel-item-end,
.carousel.carousel-fade .carousel-item.active.carousel-item-start {
  opacity: 0;
  z-index: 1;
}
/* Custom styles for NutriMed */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Dropdown menu improvements */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 10px 0;
}

.dropdown-item {
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: rgba(0,123,255,0.1);
    color: var(--primary-color);
}

.dropdown-item.text-danger:hover {
    background-color: rgba(220,53,69,0.1);
    color: var(--danger-color);
}

/* Hero Section */
.hero-section {
    background: white;
    min-height: 40vh;
    display: flex;
    align-items: center;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

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

.card-img-top {
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 10px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.2);
}

/* Sections */
.section {
    padding: 80px 0;
}

/* Carousel */
.carousel-item img {
    border-radius: 15px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-indicators button {
    border-radius: 50%;
    width: 12px;
    height: 12px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

footer a:hover {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    border-bottom: none;
    font-weight: 600;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
}

/* Badges */
.badge {
    border-radius: 20px;
    padding: 0.5em 1em;
    font-weight: 500;
}

/* Alerts */
.alert {
    border-radius: 15px;
    border: none;
    padding: 20px;
}

.alert-dismissible .btn-close {
    border-radius: 50%;
}

/* Breadcrumb */
.breadcrumb {
    background: none;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* Loading animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.pulse-hover:hover {
    animation: pulse 0.3s ease-in-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* CTA Sections */
.cta-section {
    position: relative;
    overflow: hidden;
}



.cta-section .container {
    position: relative;
    z-index: 1;
}

/* Icon improvements */
.fa-stack {
    margin-bottom: 20px;
}

/* Table improvements */
.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}
