/* ============ VARIABLES ============ */
:root {
  --dark-blue: #2F3A45;
  --accent-blue: #3B82F6;
  --light-gray: #dcdbdb;
  --dark-gray: #1F2937;
  --gradient-blue: linear-gradient(135deg, #3B82F6 0%, #2F3A45 100%);
  --font-title: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

/* ============ BASE ============ */
* { scroll-behavior: smooth; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--dark-gray);
  background-color: #fff;
}
.title-font { font-family: var(--font-title); }
.text-accent { color: var(--accent-blue); }
.section-light { background-color: var(--light-gray); }
.section-dark { background-color: var(--dark-gray); }

/* ============ NAVBAR (Glassmorphism on scroll) ============ */

/* En tu archivo estilos.css */
.logo-navbar {
    height: 75px;
    width: auto;
}
.custom-navbar {
  transition: all 0.3s ease;
  padding: 0.85rem 0;
  background-color: var(--dark-gray);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.custom-navbar .navbar-brand,
.custom-navbar .nav-link {
  color: #fff !important;
  font-weight: 500;
  transition: color 0.25s ease;
}
.custom-navbar .nav-link:hover { color: var(--accent-blue) !important; }
/* Glassmorphism reforzado al hacer scroll */
.custom-navbar.scrolled {
  background-color: rgba(31, 41, 55, 0.85);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  padding: 0.5rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* ============ BUTTONS ============ */
.btn-gradient {
  background: var(--gradient-blue);
  color: #fff;
  border: none;
  font-weight: 600;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.35);
}
.btn-gradient:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.45);
}

/* ============ HERO ============ */
/* IMG-HERO: cambia esta URL por la foto real */
.hero {
  min-height: 100vh;
  background-image: url('https://images.unsplash.com/photo-1519682337058-a94d519337bc?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(31,41,55,0.85), rgba(47,58,69,0.7));
}
.hero h1 { text-shadow: 0 4px 24px rgba(0,0,0,0.4); }

/* ============ PORTFOLIO CAROUSEL ============ */
/* ---- Transición suave entre slides ---- */
#portfolioCarousel .carousel-item {
  background-color: var(--dark-gray); /* Añade fondo oscuro para rellenar los espacios de las imágenes */
  transition: transform 1.2s ease-in-out, opacity 1.2s ease-in-out;
  text-align: center; /* Centra la imagen por si acaso */
}

#portfolioCarousel.carousel-fade .carousel-item {
  transition: opacity 1.2s ease-in-out;
}

.portfolio-img {
  height: 540px;
  width: 100%;
  object-fit: contain; /* <-- ESTO MUESTRA LA IMAGEN COMPLETA SIN RECORTAR */
  filter: brightness(0.85); /* Un poco más de brillo, 0.7 la oscurecía demasiado */
  transition: transform 6s ease-in-out, filter 1.2s ease-in-out;
}

/* Efecto Ken Burns: reducido para evitar pixelado en imágenes pequeñas */
#portfolioCarousel .carousel-item.active .portfolio-img {
  transform: scale(1.03); /* Reducido de 1.08 a 1.03 para que el zoom no pixele tanto */
}
/* Caption con fade-in suave */
#portfolioCarousel .carousel-item .carousel-caption {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-in-out 0.3s, transform 1s ease-in-out 0.3s;
}
#portfolioCarousel .carousel-item.active .carousel-caption {
  opacity: 1;
  transform: translateY(0);
}
#portfolioCarousel .carousel-caption {
  background: rgba(31, 41, 55, 0.55);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  bottom: 2.5rem;
  left: 10%; right: 10%;
}
#portfolioCarousel .carousel-caption h3 { color: #fff; }

/* ============ ADVANTAGE CARDS ============ */
.card-advantage {
  background-color: var(--dark-blue);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  color: #fff;
  transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.card-advantage:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.35);
  background-color: #34404c;
}

/* ============ FORM ============ */
#contactForm .form-control:focus,
#contactForm .form-select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 0.2rem rgba(59,130,246,0.2);
}

/* ============ WHATSAPP FLOAT + PULSE ============ */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 60px; height: 60px;
  background-color: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  z-index: 9999;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  animation: pulse 2s infinite;
  text-decoration: none;
}
.whatsapp-float:hover { color: #fff; transform: scale(1.08); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70%  { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .portfolio-img { 
      height: 360px; 
      object-fit: contain; /* Mantiene la proporción en móviles */
  }
}