:root {
    --brand-1: #1e81b5; /* primario */
    --brand-2: #78b3d2; /* secundario */
    --brand-3: #f8f8f8; /* bg suave */
    --brand-4: #ececec; /* base clara */
    --brand-accent: #cd3300; /* CTA */
    --text: #0b1b2b;
    --bs-primary: #1e81b5;
    --bs-primary-rgb: 30, 129, 181;
    --bs-danger: #cd3300;
  }
  .hero-bg { background-size: cover; background-position: center; }
  .Remax_logo_Design {
    height: 4rem;
  }
  .btn-tab {
    border-radius: 50rem !important;
  }
  .btn-accent {
    background: var(--brand-accent);
    color: #fff;
  }
  .btn-accent:hover {
    background: #a32700;
    color: #fff;
  }
  .btn-outline-accent {
    border-color: var(--brand-accent);
    color: var(--brand-accent);
  }
  .btn-outline-accent:hover {
    background: var(--brand-accent);
    color: #fff;
  }
  .text-brand {
    color: var(--brand-1) !important;
  }
  .bg-soft {
    background: var(--brand-3);
  }
  .blue-design {
    background-color: #0f2233;
  }
  .black-design {
    background-color: #0f2233;
  }
  .red-design {
    background-color: var(--brand-accent);
  }
  .green-design {
    background-color: forestgreen;
  }
  body {
    color: var(--text);
    background: var(--brand-4);
  }
  .navbar {
    background: rgba(255,255,255,.9);
    backdrop-filter: saturate(160%) blur(6px);
  }
  
  .navbar-brand {
    font-weight: bold;
  }
  
  .navbar-nav .nav-link {
    color: var(--text) !important;
    font-weight: 400;
  }
  
  .navbar-nav .nav-link:hover {
    color: var(--brand-1) !important;
  }

  .stat-number {
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.02em;
  }
  footer {
    background: #0f2233;
    color: #dfe9ef;
  }
  footer a {
    color: #dfe9ef;
    text-decoration: none;
  }
  footer a:hover {
    opacity: .85;
  }
  
  /* HERO VIDEO STYLES */
  .hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
  }

  .hero-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 aspect ratio */
    transform: translate(-50%, -50%);
    pointer-events: none;
  }

  /* HERO STYLES */
  .hero {
    position: relative;
    min-height: 72vh;
    display: flex;
    align-items: center;
    color: #fff;
  }

  .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(30,129,181,.25), rgba(30,129,181,.15));
    z-index: 0;
  }

  .hero .card {
    background: rgba(11,27,43,.7);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
  }

  .focus-ring:focus {
    outline: 3px solid var(--brand-2);
    outline-offset: 2px;
  }
  
  /* Footer social icons */
  footer .bi {
    color: #ffffff !important;
    font-size: 1.2rem;
  }

  /* ========================================
     INTERSECTION OBSERVER ANIMATIONS
  ======================================== */

  /* Initial hidden states */
  .fade-in,
  .slide-up,
  .slide-down,
  .slide-in-left,
  .slide-in-right,
  .scale-in,
  .zoom-in {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  }

  .fade-in {
    opacity: 0;
  }

  .slide-up {
    transform: translateY(50px);
  }

  .slide-down {
    transform: translateY(-50px);
  }

  .slide-in-left {
    transform: translateX(-60px);
  }

  .slide-in-right {
    transform: translateX(60px);
  }

  .scale-in {
    transform: scale(0.9);
  }

  .zoom-in {
    transform: scale(0.85);
  }

  /* Active/visible states */
  .fade-in.animate,
  .slide-up.animate,
  .slide-down.animate,
  .slide-in-left.animate,
  .slide-in-right.animate,
  .scale-in.animate,
  .zoom-in.animate {
    opacity: 1;
    transform: translate(0) scale(1);
  }

  /* Stagger delays for multiple elements */
  .animate-delay-1 { transition-delay: 0.1s; }
  .animate-delay-2 { transition-delay: 0.2s; }
  .animate-delay-3 { transition-delay: 0.3s; }
  .animate-delay-4 { transition-delay: 0.4s; }
  .animate-delay-5 { transition-delay: 0.5s; }
  .animate-delay-6 { transition-delay: 0.6s; }

  /* Smooth animation for cards */
  .card-animated {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }

  .card-animated.animate {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  /* Project card animation */
  .card-proyecto {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }

  .card-proyecto.animate {
    opacity: 1;
    transform: translateY(0);
  }

  .sticky-crece-btn {
    position: fixed;
    right: 1.5rem;
    bottom: 2rem;
    z-index: 1080;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    padding: 0.7rem 1.1rem 0.7rem 0.8rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .sticky-crece-btn:hover {
    transform: translateY(-2px);
  }

  .sticky-crece-btn:focus-visible {
    outline: 3px solid var(--brand-2);
    outline-offset: 2px;
  }

  .sticky-crece-logo {
    width: 3.0rem;
    height: 3.0rem;
    object-fit: contain;
  }

  .sticky-crece-text {
    font-weight: 700;
    font-size: 2.05rem;
  }

  #modalCreceIntro .modal-content,
  #modalAgenteForm .modal-content {
    border-radius: 1rem;
  }

  @media (max-width: 576px) {
    .sticky-crece-btn {
      right: 0.75rem;
      bottom: 0.75rem;
      padding: 0.65rem 0.95rem 0.65rem 0.75rem;
    }

    .sticky-crece-text {
      font-size: 0.98rem;
    }
  }

/* Group photo block animation */
.group-photo-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 1rem 2.2rem rgba(11, 27, 43, 0.18);
}

.group-photo-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.35) 50%, transparent 75%);
  transform: translateX(-120%);
  pointer-events: none;
}

.group-photo-wrap.animate::before {
  animation: group-photo-shine 4.8s ease-in-out 0.4s infinite;
}

.group-photo-img {
  display: block;
  border-radius: inherit;
  transform: scale(1.12) translateY(1rem);
  filter: saturate(1.05) contrast(1.02);
  transition: transform 0.6s ease, filter 0.6s ease;
}

.group-photo-wrap.animate .group-photo-img {
  animation: group-photo-reveal 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.group-photo-wrap:hover .group-photo-img {
  transform: scale(1.04);
  filter: saturate(1.12) contrast(1.04);
}

@keyframes group-photo-reveal {
  0% {
    transform: scale(1.12) translateY(1rem);
    filter: saturate(1.05) contrast(1.02);
  }
  100% {
    transform: scale(1) translateY(0);
    filter: saturate(1.1) contrast(1.04);
  }
}

@keyframes group-photo-shine {
  0%,
  62% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .group-photo-wrap::before,
  .group-photo-wrap.animate::before,
  .group-photo-wrap.animate .group-photo-img,
  .group-photo-wrap:hover .group-photo-img {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}
