/* =============================================
   ERDOS LEGAL SERVICES — CUSTOM STYLES 
   ============================================= */

/* ── Variables ── */
:root {
  --gold:       #B8963E;
  --gold-light: #D4AF5A;
  --gold-pale:  #F0E0B0;
  --gold-dark:  #8A6E25;
  --navy:       #0A1220;
  --navy2:      #0F1A2E;
  --navy3:      #162240;
  --sidebar-w:  280px;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Roboto', sans-serif; }

/* Bootstrap overrides */
.text-primary   { color: var(--gold) !important; }
.bg-primary     { background: var(--gold) !important; }
.bg-secondary   { background: linear-gradient(160deg, var(--navy) 0%, var(--navy2) 100%) !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%) !important;
  border: none !important;
  color: #fff !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.3s ease !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184,150,62,0.35) !important;
}
.btn-outline-primary {
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  transition: all 0.3s ease !important;
}
.btn-outline-primary:hover {
  background: var(--gold) !important;
  color: #fff !important;
}

h6.text-uppercase {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 4px;
  color: var(--gold) !important;
  font-weight: 600;
}
h1, h2, h3 { font-family: 'Cormorant Garamond', serif; font-weight: 700; }

/* =============================================
   LAYOUT — sidebar + main
   ============================================= */
.erdos-layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.erdos-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(175deg, var(--navy) 0%, var(--navy2) 60%, var(--navy3) 100%);
  border-right: 1px solid rgba(184,150,62,0.15);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 1050;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* Logo area */
.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px 28px;
  text-decoration: none !important;
  gap: 18px;
}
.erdos-logo-icon {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  transition: filter 0.4s ease;
}
.sidebar-logo:hover .erdos-logo-icon {
  filter: drop-shadow(0 0 14px rgba(184,150,62,0.65));
}
.sidebar-logo-text {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.sidebar-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 700;
  font-style: italic;
  color: var(--gold-light);
  letter-spacing: 2px;
  line-height: 1;
}
.sidebar-rule {
  display: block;
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.sidebar-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
}

/* Divider */
.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184,150,62,0.2), transparent);
  margin: 4px 20px;
}

/* Nav links */
.sidebar-nav {
  padding: 16px 0;
  flex: 1;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 28px;
  color: rgba(255,255,255,0.55) !important;
  text-decoration: none !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  position: relative;
  transition: all 0.25s ease;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  color: rgba(255,255,255,0.9) !important;
  background: rgba(184,150,62,0.06);
  border-left-color: rgba(184,150,62,0.4);
}
.sidebar-link.active {
  color: var(--gold-light) !important;
  background: rgba(184,150,62,0.1);
  border-left-color: var(--gold);
}
.sidebar-link-icon {
  width: 18px;
  text-align: center;
  color: var(--gold);
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.25s;
}
.sidebar-link:hover .sidebar-link-icon,
.sidebar-link.active .sidebar-link-icon { opacity: 1; }

/* Contact block */
.sidebar-contact {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.45) !important;
  text-decoration: none !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.sidebar-contact-item i { color: var(--gold); font-size: 0.8rem; width: 14px; }
.sidebar-contact-item:hover { color: rgba(255,255,255,0.8) !important; }
.sidebar-cta {
  display: block;
  margin-top: 6px;
  padding: 11px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #fff !important;
  text-decoration: none !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.sidebar-cta:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  box-shadow: 0 4px 16px rgba(184,150,62,0.3);
  transform: translateY(-1px);
}

/* Social icons */
.sidebar-social {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px 24px 28px;
}
.sidebar-social-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(184,150,62,0.25);
  border-radius: 3px;
  color: rgba(255,255,255,0.4) !important;
  font-size: 0.78rem;
  text-decoration: none !important;
  transition: all 0.25s ease;
}
.sidebar-social-btn:hover {
  border-color: var(--gold);
  color: var(--gold) !important;
  background: rgba(184,150,62,0.08);
}

/* ── MAIN CONTENT ── */
.erdos-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
}

/* ── MOBILE TOPBAR ── */
.erdos-mobile-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: var(--navy2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1040;
  border-bottom: 2px solid rgba(184,150,62,0.3);
  transition: box-shadow 0.3s ease;
}
.erdos-mobile-topbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}

.erdos-logo-icon-sm { width: 36px; height: 36px; }
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}
.mobile-brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 700;
  font-style: italic;
  color: var(--gold-light);
  letter-spacing: 1.5px;
  line-height: 1;
}
.mobile-brand-sub {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.5rem;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Hamburger */
.sidebar-toggle {
  background: none;
  border: none;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  outline: none !important;
}
.sidebar-toggle span {
  display: block;
  width: 26px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ── SIDEBAR OVERLAY ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,10,18,0.65);
  z-index: 1045;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 991.98px) {
  .erdos-sidebar {
    transform: translateX(-100%);
    width: min(var(--sidebar-w), 82vw);
  }
  .erdos-sidebar.open {
    transform: translateX(0);
    box-shadow: 6px 0 40px rgba(0,0,0,0.5);
  }
  .erdos-main {
    margin-left: 0;
    padding-top: 64px; /* topbar height */
  }
  /* carousel height on mobile */
  .carousel-item[style*="100vh"] {
    height: 70vh !important;
    min-height: 350px !important;
  }
}
@media (min-width: 992px) {
  .erdos-mobile-topbar { display: none !important; }
}

/* =============================================
   ANIMATIONS
   ============================================= */
.fade-in-up, .fade-in-left, .fade-in-right {
  opacity: 0;
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.fade-in-up    { transform: translateY(28px); }
.fade-in-left  { transform: translateX(-28px); }
.fade-in-right { transform: translateX(28px); }
.fade-in-up.visible, .fade-in-left.visible, .fade-in-right.visible {
  opacity: 1; transform: none;
}

/* Carousel caption */
.carousel-item.active .carousel-caption h4 { animation: fadeDown 0.8s ease forwards; }
.carousel-item.active .carousel-caption h3 { animation: fadeUp 0.9s ease 0.2s both; }
.carousel-item.active .carousel-caption a  { animation: fadeScale 0.7s ease 0.45s both; }
@keyframes fadeDown  { from{opacity:0;transform:translateY(-24px)} to{opacity:1;transform:none} }
@keyframes fadeUp    { from{opacity:0;transform:translateY(24px)}  to{opacity:1;transform:none} }
@keyframes fadeScale { from{opacity:0;transform:scale(0.85)}        to{opacity:1;transform:none} }

/* =============================================
   SERVICE + TEAM CARDS
   ============================================= */
.service-card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-bottom-color 0.3s ease !important;
  border-bottom: 3px solid transparent !important;
}
.service-card-hover:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 16px 42px rgba(0,0,0,0.12) !important;
  border-bottom-color: var(--gold) !important;
}
.icon-box { transition: transform 0.3s ease; }
.service-card-hover:hover .icon-box { transform: scale(1.1); }
.team-item { transition: transform 0.3s ease, box-shadow 0.3s ease !important; }
.team-item:hover { transform: translateY(-6px) !important; box-shadow: 0 14px 36px rgba(0,0,0,0.13) !important; }

/* Features numbers */
.btn-lg-square.px-3 {
  background: transparent !important;
  border: 2px solid var(--gold) !important;
  min-width: 52px; flex-shrink: 0;
}
.btn-lg-square.px-3 h5 { color: var(--gold) !important; }

/* =============================================
   FLOATING BUTTONS
   ============================================= */
.back-to-top {
  position: fixed;
  right: 124px; bottom: 20px;
  z-index: 9998;
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  display: none;
}
.whatsapp-float {
  position: fixed;
  width: 52px; height: 52px;
  bottom: 20px;
  right: 20px; /* will be overridden below */
  background: #25D366;
  color: #fff !important;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 16px rgba(37,211,102,0.45);
  z-index: 9999;
  text-decoration: none !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.whatsapp-float:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 22px rgba(37,211,102,0.65);
  color: #fff !important;
}

/* =============================================
   LEGAL PAGES
   ============================================= */
.legal-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem; font-weight: 700;
  color: var(--navy);
  margin-top: 2.5rem; margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold-pale);
}
.legal-section p, .legal-section li { color: #444; line-height: 1.85; font-size: 0.97rem; }
.legal-section ul { padding-left: 1.4rem; }
.legal-section ul li { margin-bottom: 0.5rem; }
.faq-item { border-left: 3px solid var(--gold); padding-left: 1.2rem; margin-bottom: 2rem; }
.faq-item h5 { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; }
.faq-item p { color: #555; line-height: 1.8; }
.sitemap-grid a {
  display: block; padding: 6px 0;
  color: var(--navy); text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
  border-bottom: 1px solid #f0ede8; font-size: 0.95rem;
}
.sitemap-grid a:hover { color: var(--gold); padding-left: 6px; }

/* =============================================
   FOOTER LINKS
   ============================================= */
.footer-link-col a { transition: color 0.2s ease, padding-left 0.2s ease; }
.footer-link-col a:hover { color: var(--gold-light) !important; padding-left: 4px; }

/* =============================================
   PAGE HEADER BG
   ============================================= */
.bg-page-header {
  background: linear-gradient(rgba(10,18,32,0.75), rgba(10,18,32,0.75)), url(../img/carousel-2.jpg) no-repeat center center;
  background-size: cover;
}
.bg-appointment {
  background: linear-gradient(rgba(10,18,32,0.8), rgba(10,18,32,0.8)), url(../img/carousel-1.jpg) no-repeat center center;
  background-size: cover;
}
.bg-action {
  background: linear-gradient(rgba(10,18,32,0.75), rgba(10,18,32,0.75)), url(../img/carousel-2.jpg) no-repeat center center;
  background-size: cover;
}

/* WhatsApp: far right */

/* Floating buttons final positions */
.whatsapp-float { right: 20px !important; bottom: 20px !important; }
.back-to-top    { right: 124px !important; bottom: 20px !important; }

/* =============================================
   SERVICE FULL CARDS (página especialidades)
   ============================================= */
.service-full-card {
  background: #fff;
  border-radius: 6px;
  padding: 32px 28px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  border-top: 3px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-top-color 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service-full-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.12);
  border-top-color: var(--gold);
}
.sfc-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy3) 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.service-full-card:hover .sfc-icon { transform: scale(1.1) rotate(5deg); }
.service-full-card h5 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  line-height: 1.2;
}
.service-full-card p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.75;
  margin: 0;
  flex: 1;
}

/* Abogados label in logo */
.sidebar-abogados {
  color: rgba(180,180,180,0.55);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* =============================================
   APPOINTMENT SECTION — rediseño completo
   ============================================= */
.appt-section {
  position: relative;
  padding: 100px 0;
  background:
    linear-gradient(160deg, rgba(10,18,32,0.93) 0%, rgba(15,26,48,0.96) 100%),
    url(../img/carousel-1.jpg) center center / cover no-repeat;
  overflow: hidden;
}
.appt-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 15% 50%, rgba(184,150,62,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 80% at 85% 30%, rgba(184,150,62,0.05) 0%, transparent 60%);
  pointer-events: none;
}
/* Decorative gold line left */
.appt-section::after {
  content: '';
  position: absolute;
  left: 0; top: 15%; bottom: 15%;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}

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

/* ── Card ── */
.appt-card {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(184,150,62,0.2);
  border-radius: 8px;
  padding: 52px 48px 48px;
  backdrop-filter: blur(6px);
  box-shadow: 0 32px 80px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}
@media (max-width: 575px) {
  .appt-card { padding: 36px 24px 32px; }
  .appt-section { padding: 72px 0; }
}

/* ── Header ── */
.appt-card-header { margin-bottom: 36px; text-align: center; }
.appt-eyebrow {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.appt-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.15;
}
.appt-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  margin: 0;
  max-width: 460px;
  margin-left: auto; margin-right: auto;
}

/* ── Grid ── */
.appt-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 480px) { .appt-grid-2 { grid-template-columns: 1fr; } }

/* ── Fields ── */
.appt-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.appt-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.appt-label span { color: var(--gold); }

.appt-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(184,150,62,0.18);
  border-radius: 4px;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}
.appt-input::placeholder { color: rgba(255,255,255,0.22); }
.appt-input:focus {
  border-color: var(--gold);
  background: rgba(184,150,62,0.06);
  box-shadow: 0 0 0 3px rgba(184,150,62,0.12);
}
/* Date input native calendar icon color */
.appt-input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.4);
  cursor: pointer;
}
.appt-input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 0.8; }

/* Select */
.appt-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B8963E' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
  cursor: pointer;
}
.appt-select option { background: #0f1a2e; color: #fff; }

/* Textarea */
.appt-textarea {
  height: auto !important;
  padding: 14px 18px;
  resize: vertical;
  min-height: 90px;
}

/* ── Footer ── */
.appt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.appt-privacy {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.28);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.appt-privacy .fa { color: var(--gold); opacity: 0.6; }

/* ── Submit Button ── */
.appt-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 36px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.appt-btn:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(184,150,62,0.4);
}
.appt-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.appt-btn .fa { font-size: 0.8rem; transition: transform 0.25s ease; }
.appt-btn:hover .fa { transform: translateX(4px); }

@media (max-width: 480px) {
  .appt-footer { flex-direction: column; align-items: stretch; }
  .appt-btn { justify-content: center; width: 100%; }
}

/* Alert inside appointment */
#appointmentMsg .alert {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  border-radius: 4px;
  margin-bottom: 20px;
  border: none;
}
#appointmentMsg .alert-success {
  background: rgba(39,174,96,0.15);
  color: #6fcf97;
  border-left: 3px solid #27ae60;
}
#appointmentMsg .alert-warning {
  background: rgba(184,150,62,0.12);
  color: var(--gold-light);
  border-left: 3px solid var(--gold);
}
#appointmentMsg .alert-danger {
  background: rgba(235,87,87,0.12);
  color: #eb5757;
  border-left: 3px solid #eb5757;
}
