:root {
  --brand-blue: #0A192F;
  --brand-blue-dark: #020c1b;
  --brand-gold: #d4af37;
  --brand-gold-light: #fbeea4;
  --light-bg: #f8fafc;
  --light-sec: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;

  --gradient-brand: linear-gradient(135deg, var(--brand-blue) 0%, #1e3a8a 100%);
  --gradient-gold: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7);

  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --border-radius: 1.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--light-bg);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--light-sec);
}

::-webkit-scrollbar-thumb {
  background: var(--brand-gold);
  border-radius: 5px;
}

/* LANGUAGE BAR */
#langBar {
  background: var(--brand-blue-dark);
  border-bottom: 2px solid var(--brand-gold);
  padding: .6rem 0;
  font-size: .85rem;
  font-family: var(--font-heading);
  position: relative;
  z-index: 1060;
}

.lang-info {
  color: #e2e8f0;
  font-size: .8rem;
}

.lang-info i {
  color: var(--brand-gold);
  margin-right: .5rem;
}

.lang-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  border-radius: 50px;
  padding: .3rem .9rem;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .3s;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.lang-btn.active {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-blue-dark);
  font-weight: 800;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.lang-btn:not(.active):hover {
  border-color: var(--brand-gold);
  color: var(--brand-gold);
}

/* NAVBAR - GLASSMORPHISM */
#mainNav {
  background: rgba(253, 253, 253, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  padding: 1.2rem 0;
  transition: all .4s ease;
  z-index: 1050;
}

.navbar-brand img {
  max-height: 55px;
  transition: transform .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.navbar-brand:hover img {
  transform: scale(1.08) rotate(2deg);
}

.navbar-nav .nav-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  color: var(--brand-blue) !important;
  padding: .5rem 1.4rem !important;
  position: relative;
  transition: color .3s;
  letter-spacing: 0.5px;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  right: 50%;
  height: 3px;
  border-radius: 3px;
  background: var(--gradient-gold);
  transition: left .3s ease-out, right .3s ease-out;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  left: 1rem;
  right: 1rem;
}

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

/* BUTTONS */
.btn-brand,
.btn-gold {
  font-family: var(--font-heading);
  font-weight: 800;
  text-transform: uppercase;
  border: none;
  border-radius: 50px;
  padding: 1rem 2.5rem;
  font-size: .95rem;
  letter-spacing: 1px;
  transition: all .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-brand {
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 10px 25px rgba(10, 25, 47, 0.3);
}

.btn-brand:hover {
  background: var(--brand-blue-dark);
  color: var(--brand-gold);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(10, 25, 47, 0.4);
}

.btn-gold {
  background: var(--gradient-gold);
  color: var(--brand-blue-dark);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(212, 175, 55, 0.5);
  color: #000;
}

/* TYPOGRAPHY & SECTIONS */
section {
  padding: 110px 0;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3rem);
  color: var(--brand-blue-dark);
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.title-divider {
  width: 80px;
  height: 5px;
  background: var(--gradient-gold);
  border-radius: 5px;
  margin: 0 auto 2rem;
}

/* HERO */
#hero {
  position: relative;
  background: var(--light-sec);
  padding: 160px 0 100px;
  overflow: hidden;
}

#hero::before,
#hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  animation: pulseGlow 10s infinite alternate ease-in-out;
}

#hero::before {
  top: -10%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: rgba(212, 175, 55, 0.3);
}

#hero::after {
  bottom: -10%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: rgba(10, 25, 47, 0.15);
  animation-delay: -5s;
}

@keyframes pulseGlow {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.1) translate(-20px, 20px); }
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(3rem, 6vw, 4.5rem);
  color: var(--brand-blue-dark);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-title span {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-img-wrap {
  position: relative;
  z-index: 2;
  text-align: center;
  perspective: 1000px;
}

.hero-img-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: 2rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
  animation: floatHero 6s ease-in-out infinite;
  border: 8px solid rgba(255, 255, 255, 0.5);
}

@keyframes floatHero {
  0%, 100% { transform: translateY(0) rotateX(2deg); }
  50% { transform: translateY(-20px) rotateX(-2deg); }
}

/* REVEAL ANIMATIONS */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.9s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* SERVICES */
.service-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  height: 100%;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04);
  transition: all .5s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.service-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 35px 60px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

.sc-img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 2rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: all .4s;
}

/* BRANCH SECTIONS */
.branch-section {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 130px 0;
}

.branch-section:nth-child(even) {
  background-color: var(--light-sec);
}

.list-features {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.list-features li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.list-features li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--brand-gold);
}

/* FORM */
#contacto {
  background: var(--brand-blue-dark);
  color: #fff;
}

#contacto .section-title {
  color: #fff;
}

.form-box {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  padding: 3rem;
}

.form-control, .form-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: .5rem;
}

.form-control:focus, .form-select:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.2);
  color: #fff;
}

/* Fix for Bootstrap form-floating with select */
.form-floating > .form-select {
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
}

.form-select option {
  color: #000; /* Use default dark text for native dropdown list */
}

/* Fix for white/gray background on floating labels */
.form-floating > label {
  background-color: transparent !important;
  color: rgba(255, 255, 255, 0.5) !important;
  transition: all 0.2s ease;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
  color: var(--brand-gold) !important;
  background-color: transparent !important;
  opacity: 1;
}

.form-floating > label::after {
  background-color: transparent !important;
}

/* FOOTER */
footer {
  background: #0f172a;
  padding: 4rem 0 0;
  color: #94a3b8;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  margin-top: 3rem;
  text-align: center;
}
