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

/* ===== LIGHT THEME (default) ===== */
:root {
  --bg: #f7f6f3;
  --bg-card: #ffffff;
  --bg-card-hover: #fafaf8;
  --bg-link: rgba(0,0,0,0.03);
  --bg-link-hover: rgba(0,0,0,0.05);
  --text: #1a1a2e;
  --text-soft: #4a4a5a;
  --text-muted: #8e8e9a;
  --accent: #b8922e;
  --accent-dim: rgba(184,146,46,0.1);
  --teal: #1a8a7a;
  --teal-dim: rgba(26,138,122,0.08);
  --border: rgba(0,0,0,0.07);
  --border-hover: rgba(184,146,46,0.3);
  --glow: 0 0 0 1px rgba(184,146,46,0.12), 0 4px 16px rgba(184,146,46,0.06);
  --youtube: #e6002e;
  --instagram: #d62976;
  --whatsapp: #1fad54;
  --telegram: #229ed9;
  --facebook: #1877f2;
  --medical: #059669;
  --realty: #7c3aed;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.025);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.06);
  --header-bg: rgba(247,246,243,0.88);
  --notice-bg: #1a1a2e;
  --notice-text: rgba(255,255,255,0.7);
  --logo-filter: none;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --t: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  --t-spring: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light dark;
}

/* ===== DARK THEME ===== */
[data-theme="dark"] {
  --bg: #0e0e12;
  --bg-card: #18181f;
  --bg-card-hover: #1e1e28;
  --bg-link: rgba(255,255,255,0.03);
  --bg-link-hover: rgba(255,255,255,0.06);
  --text: #f0efe8;
  --text-soft: #a8a7a0;
  --text-muted: #6b6a65;
  --accent: #c8a04a;
  --accent-dim: rgba(200,160,74,0.12);
  --teal: #3ec9b0;
  --teal-dim: rgba(62,201,176,0.1);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(200,160,74,0.25);
  --glow: 0 0 0 1px rgba(200,160,74,0.15), 0 8px 32px rgba(200,160,74,0.06);
  --youtube: #ff4444;
  --instagram: #e1306c;
  --whatsapp: #25d366;
  --telegram: #2aabee;
  --facebook: #4599ff;
  --medical: #34d399;
  --realty: #a78bfa;
  --shadow: 0 2px 12px rgba(0,0,0,0.2);
  --shadow-hover: 0 12px 48px rgba(0,0,0,0.3);
  --header-bg: rgba(14,14,18,0.88);
  --notice-bg: rgba(200,160,74,0.08);
  --notice-text: #a8a7a0;
  --logo-filter: brightness(10);
}

/* Auto dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e12;
    --bg-card: #18181f;
    --bg-card-hover: #1e1e28;
    --bg-link: rgba(255,255,255,0.03);
    --bg-link-hover: rgba(255,255,255,0.06);
    --text: #f0efe8;
    --text-soft: #a8a7a0;
    --text-muted: #6b6a65;
    --accent: #c8a04a;
    --accent-dim: rgba(200,160,74,0.12);
    --teal: #3ec9b0;
    --teal-dim: rgba(62,201,176,0.1);
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(200,160,74,0.25);
    --glow: 0 0 0 1px rgba(200,160,74,0.15), 0 8px 32px rgba(200,160,74,0.06);
    --youtube: #ff4444;
    --instagram: #e1306c;
    --whatsapp: #25d366;
    --telegram: #2aabee;
    --facebook: #4599ff;
    --medical: #34d399;
    --realty: #a78bfa;
    --shadow: 0 2px 12px rgba(0,0,0,0.2);
    --shadow-hover: 0 12px 48px rgba(0,0,0,0.3);
    --header-bg: rgba(14,14,18,0.88);
    --notice-bg: rgba(200,160,74,0.08);
    --notice-text: #a8a7a0;
    --logo-filter: brightness(10);
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* Subtle grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* ===== NOTICE BANNER ===== */
.notice-banner {
  background: var(--notice-bg);
  color: var(--notice-text);
  font-size: 0.75rem;
  text-align: center;
  padding: 9px 24px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border);
}

.notice-banner a {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid rgba(184,146,46,0.3);
  transition: var(--t);
}

.notice-banner a:hover { border-color: var(--accent); }
.notice-arrow { display: inline-block; margin-left: 2px; transition: var(--t); }
.notice-banner a:hover .notice-arrow { transform: translateX(3px); }

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo { display: flex; align-items: center; }
.logo img { height: 22px; width: auto; filter: var(--logo-filter); transition: filter 0.4s ease; }

.nav { display: flex; align-items: center; gap: 2px; }

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--t);
}

.nav-link:hover { color: var(--text-soft); background: var(--bg-link); }

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--t);
  color: var(--text-muted);
  font-family: inherit;
  margin-left: 4px;
}

.theme-toggle:hover { border-color: var(--border-hover); color: var(--text-soft); }
.theme-toggle svg { width: 14px; height: 14px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}

/* Language Switcher */
.lang-switcher { position: relative; margin-left: 2px; }

.lang-current {
  display: flex; align-items: center; gap: 3px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--t);
  border: 1px solid var(--border);
  background: transparent;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lang-current:hover { border-color: var(--border-hover); color: var(--text-soft); }
.lang-current svg { width: 10px; height: 10px; transition: var(--t); }
.lang-switcher.open .lang-current svg { transform: rotate(180deg); }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  border: 1px solid var(--border);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.96);
  transition: var(--t);
  min-width: 120px;
}

.lang-switcher.open .lang-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}

.lang-option {
  display: block;
  padding: 9px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--t);
}

.lang-option:hover { background: var(--bg-link-hover); color: var(--text-soft); }
.lang-option.active { color: var(--accent); }

/* ===== MAIN CONTENT ===== */
.main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== SECTIONS ===== */
.section { padding: 28px 0 12px; }
.section:first-child { padding-top: 20px; }

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-left: 2px;
}

.section-label::before {
  content: '';
  width: 3px;
  height: 14px;
  background: linear-gradient(180deg, var(--accent), var(--teal));
  border-radius: 2px;
  flex-shrink: 0;
}

.section-label h2 {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ===== BENTO GRID ===== */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--t);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184,146,46,0.08), transparent);
  transition: var(--t);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.card:hover::after {
  background: linear-gradient(90deg, transparent, rgba(184,146,46,0.2), transparent);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.card-badge svg { width: 12px; height: 12px; }

.card-badge.youtube { background: rgba(230,0,46,0.08); color: var(--youtube); }
.card-badge.youtube svg { fill: var(--youtube); }
.card-badge.instagram { background: rgba(214,41,118,0.08); color: var(--instagram); }
.card-badge.instagram svg { fill: var(--instagram); }
.card-badge.medical { background: rgba(5,150,105,0.08); color: var(--medical); }
.card-badge.medical svg { fill: var(--medical); }
.card-badge.realty { background: rgba(124,58,237,0.08); color: var(--realty); }
.card-badge.realty svg { fill: var(--realty); }
.card-badge.english { background: var(--teal-dim); color: var(--teal); }
.card-badge.english svg { fill: var(--teal); }

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
  font-weight: 300;
}

/* ===== LINK BUTTONS ===== */
.link-list { display: flex; flex-direction: column; gap: 4px; }

.link-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 400;
  transition: var(--t);
  background: var(--bg-link);
  color: var(--text-soft);
  border: 1px solid transparent;
}

.link-btn:hover {
  background: var(--bg-link-hover);
  border-color: var(--border-hover);
  color: var(--text);
}

.link-btn svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.65; }
.link-btn:hover svg { opacity: 1; }

.link-btn .arrow {
  margin-left: auto;
  width: 10px; height: 10px;
  opacity: 0;
  transform: translateX(-4px);
  transition: var(--t);
  color: var(--accent);
}

.link-btn:hover .arrow { opacity: 0.6; transform: translateX(0); }

.link-btn.yt svg { fill: var(--youtube); }
.link-btn.ig svg { fill: var(--instagram); }
.link-btn.wa svg { fill: var(--whatsapp); }
.link-btn.tg svg { fill: var(--telegram); }
.link-btn.fb svg { fill: var(--facebook); }
.link-btn.web svg { fill: var(--teal); }

.card-wide { grid-column: 1 / -1; }

/* ===== CONTACT SECTION ===== */
.contact-section { padding: 28px 0 16px; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.contact-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}

.contact-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-card p {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
  font-weight: 300;
}

.contact-buttons { display: flex; flex-direction: column; gap: 6px; }

.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  transition: var(--t);
  letter-spacing: 0.02em;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  filter: brightness(1.1);
}

.cta-btn svg { width: 14px; height: 14px; fill: currentColor; }
.cta-btn.wa { background: var(--whatsapp); }
.cta-btn.tg { background: var(--telegram); }

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 0.6875rem;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  letter-spacing: 0.03em;
}

.footer a { color: var(--accent); font-weight: 500; }
.footer a:hover { color: var(--text-soft); }

/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--t-spring), transform 0.6s var(--t-spring);
}

.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-xs);
  transition: var(--t);
}

.hamburger:hover { background: var(--bg-link); }
.hamburger svg { width: 18px; height: 18px; color: var(--text-soft); }

.mobile-nav {
  display: none;
  position: fixed;
  top: 56px;
  left: 0; right: 0; bottom: 0;
  background: var(--bg);
  backdrop-filter: blur(24px);
  z-index: 99;
  padding: 16px 24px;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: var(--t);
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { background: var(--bg-link); color: var(--text); }

/* ===== RESPONSIVE — Tablet ===== */
@media (max-width: 860px) {
  .header { padding: 0 20px; }
  .main { padding: 0 20px; }
  .bento { gap: 8px; }
  .card { padding: 18px; }
  .contact-grid { gap: 8px; }
}

/* ===== RESPONSIVE — Small tablet / Large phone ===== */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .desktop-nav { display: none; }

  .header-inner { height: 52px; }
  .logo img { height: 20px; }

  .notice-banner { font-size: 0.6875rem; padding: 7px 16px; }
  .header { padding: 0 16px; }
  .main { padding: 0 16px; }

  .section { padding: 24px 0 10px; }
  .section:first-child { padding-top: 16px; }

  .bento { grid-template-columns: 1fr; gap: 8px; }
  .card { padding: 18px; }
  .card-wide { grid-column: 1; }

  .contact-grid { grid-template-columns: 1fr; gap: 8px; }

  .footer { padding: 24px 16px; }
}

/* ===== RESPONSIVE — Small phone ===== */
@media (max-width: 400px) {
  .header { padding: 0 12px; }
  .main { padding: 0 12px; }
  .notice-banner { font-size: 0.625rem; padding: 6px 12px; }

  .section-label h2 { font-size: 0.625rem; letter-spacing: 0.1em; }

  .card { padding: 14px; }
  .card h3 { font-size: 0.95rem; }
  .card p { font-size: 0.65rem; }

  .link-btn { padding: 7px 8px; font-size: 0.7rem; gap: 6px; }
  .link-btn svg { width: 12px; height: 12px; }

  .cta-btn { padding: 10px 14px; font-size: 0.7rem; }

  .contact-card h3 { font-size: 0.9rem; }
  .contact-card p { font-size: 0.65rem; }

  .footer { font-size: 0.625rem; }
}

@media (min-width: 769px) {
  .mobile-nav { display: none !important; }
}
