/* ============================================================ */
/* Universal House — Site CSS                                    */
/* ============================================================ */

/* Brand font: Ergonomique */
@font-face {
  font-family: 'Ergonomique';
  src: url('/assets/fonts/ergonomique-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ergonomique';
  src: url('/assets/fonts/Ergonomique-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ergonomique';
  src: url('/assets/fonts/Ergonomique-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ergonomique';
  src: url('/assets/fonts/Ergonomique-Semibold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ergonomique';
  src: url('/assets/fonts/Ergonomique-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ergonomique';
  src: url('/assets/fonts/Ergonomique-Black.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ergonomique';
  src: url('/assets/fonts/Ergonomique-Ultra.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Base */
html { scroll-behavior: smooth; }
body {
  font-family: 'Ergonomique', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Site logo - Logo-28 (1558x618, con minimo padding del usuario) */
/* El texto "UNIVERSAL HOUSE" solo ocupa el 52% vertical del logo, */
/* no usar overflow: rompe paginas interiores con hero oscuro. */
.site-logo {
  height: 72px;
  width: auto;
  display: block;
  max-width: calc(100vw - 80px);
  object-fit: contain;
}
@media (min-width: 768px) {
  .site-logo { height: 100px; max-width: calc(100vw - 240px); }
}
@media (min-width: 1024px) {
  .site-logo { height: 140px; max-width: 460px; }
}
@media (min-width: 1280px) {
  .site-logo { height: 156px; max-width: 520px; }
}

/* Hero swiper */
.hero-swiper { width: 100%; height: 85vh; min-height: 560px; max-height: 820px; }
.hero-slide { position: relative; background-size: cover; background-position: center center; }
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,24,66,0.45) 0%, rgba(13,24,66,0.75) 100%);
}
.swiper-pagination-bullet {
  background: #ffffff;
  opacity: 0.6;
  width: 10px;
  height: 10px;
}
.swiper-pagination-bullet-active {
  background: #e31e24;
  opacity: 1;
  width: 28px;
  border-radius: 4px;
  transition: all 0.3s;
}
.swiper-button-next, .swiper-button-prev { color: #ffffff; }
.swiper-button-next::after, .swiper-button-prev::after { font-size: 24px; font-weight: 900; }

/* Dropdown menu */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }

/* Mobile menu */
.mobile-menu { display: none; }
.mobile-menu.open { display: block; }

/* Page hero (for interior pages) */
.page-hero {
  min-height: 320px;
  background: linear-gradient(135deg, #0d1842 0%, #1a2a5e 45%, #e31e24 100%);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(255,200,69,0.15) 0%, transparent 60%);
  pointer-events: none;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.8s ease-out; }

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ============================================================ */
/* WhatsApp widget (Laura)                                        */
/* ============================================================ */
.wa-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 80;
  background: #25D366;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  cursor: pointer;
  transition: transform 0.2s;
  border: none;
}
.wa-btn:hover { transform: scale(1.08); }
.wa-btn svg { width: 32px; height: 32px; }
.wa-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  animation: pulseRing 2s infinite;
  pointer-events: none;
}
.wa-popup {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 79;
  width: 340px;
  max-width: calc(100vw - 48px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0,0,0,0.25);
  overflow: hidden;
  display: none;
  animation: fadeUp 0.3s;
}
.wa-popup.open { display: block; }
.wa-header {
  background: #128C7E;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wa-close {
  margin-left: auto;
  cursor: pointer;
  opacity: 0.8;
  padding: 4px;
  background: none;
  border: none;
  color: #fff;
}
.wa-close:hover { opacity: 1; }
.wa-body {
  padding: 18px;
  background: #e5ddd5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><rect width='40' height='40' fill='%23e5ddd5'/><path d='M0 20 L40 20 M20 0 L20 40' stroke='%23d8d0c7' stroke-width='0.5'/></svg>");
  min-height: 120px;
}
.wa-msg {
  background: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-bottom: 8px;
  max-width: 85%;
  position: relative;
}
.wa-msg::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 8px solid #fff;
  border-left: 8px solid transparent;
}
.wa-msg .name { color: #e31e24; font-weight: 700; font-size: 0.8rem; margin-bottom: 2px; }
.wa-msg .text { color: #111; font-size: 0.9rem; line-height: 1.4; }
.wa-msg .time { color: #888; font-size: 0.7rem; text-align: right; margin-top: 4px; }
.wa-footer { padding: 14px; background: #f0f0f0; }
.wa-footer a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #fff !important;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.wa-footer a:hover { background: #1da851; }
.wa-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
}
.wa-dot {
  width: 10px;
  height: 10px;
  background: #4fce5d;
  border-radius: 50%;
  border: 2px solid #fff;
  position: absolute;
  bottom: 0;
  right: 0;
}
.wa-info { flex: 1; min-width: 0; }
.wa-info .n { font-weight: 700; font-size: 0.95rem; margin: 0; }
.wa-info .s { font-size: 0.75rem; opacity: 0.85; margin: 0; }
.wa-avatar-wrap { position: relative; flex-shrink: 0; }

/* Responsive widget */
@media (max-width: 640px) {
  .wa-btn { width: 56px; height: 56px; bottom: 16px; right: 16px; }
  .wa-popup { right: 16px; bottom: 80px; width: calc(100vw - 32px); }
}

/* Active nav link */
.nav-link.active { color: #e31e24 !important; background: rgba(227,30,36,0.08); }

/* Typography utilities */
.prose-uh h2 { font-family: 'Ergonomique', sans-serif; font-weight: 800; color: #0d1842; }
.prose-uh p { color: #334155; line-height: 1.7; font-size: 1.0625rem; }
