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

:root {
  --navy-1: #010509;
  --navy-2: #020d1a;
  --navy-3: #03182e;
  --navy-4: #052a4a;
  --navy-5: #0a3d6b;
  --gold: #C9A84C;
  --gold-light: #e2c47a;
  --white: #ffffff;
  --gray-1: #f5f7fa;
  --gray-2: #e8ecf1;
  --gray-3: #b0bec5;
  --text: #1a2535;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Barlow', sans-serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.18);
}

html, body { height: 100%; font-family: var(--font-sans); background: var(--navy-1); color: var(--white); }

/* SCREENS */
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* ─── HOME ─── */
.home-bg {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(160deg, var(--navy-1) 0%, var(--navy-2) 30%, var(--navy-3) 65%, var(--navy-4) 100%);
}
.home-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(201,168,76,.08) 0%, transparent 60%);
}
.home-content {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 20px; gap: 28px;
}
.home-logo img { width: 80px; height: 80px; object-fit: contain; filter: drop-shadow(0 0 20px rgba(201,168,76,.3)); }
.home-title {
  font-family: var(--font-serif); font-size: clamp(36px,6vw,72px);
  font-weight: 300; text-align: center; line-height: 1.1; color: var(--white);
}
.home-title span { color: var(--gold); font-weight: 600; }
.home-subtitle { font-size: clamp(14px,1.8vw,18px); color: rgba(255,255,255,.65); text-align: center; max-width: 500px; line-height: 1.6; }

.home-cards { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 860px; }

.home-card {
  flex: 1; min-width: 280px; max-width: 380px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px; padding: 36px 28px;
  cursor: pointer; text-align: left;
  transition: transform .3s, box-shadow .3s, border-color .3s, background .3s;
  display: flex; flex-direction: column; gap: 12px;
}
.home-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  border-color: var(--gold);
  background: rgba(201,168,76,.06);
}
.home-card__icon { font-size: 36px; }
.home-card__title { font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--white); line-height: 1.3; }
.home-card__desc { font-size: 14px; color: rgba(255,255,255,.6); line-height: 1.6; flex: 1; }
.home-card__btn { font-size: 13px; font-weight: 600; color: var(--gold); letter-spacing: .5px; margin-top: 8px; }
.home-card--client { border-top: 3px solid var(--gold); }
.home-card--pro { border-top: 3px solid var(--navy-5); }
.home-card--pro:hover { border-top-color: var(--gold); }

.home-footer a { font-size: 13px; color: rgba(255,255,255,.4); text-decoration: none; }
.home-footer a:hover { color: var(--gold); }

/* ─── SHARED HEADER ─── */
.dir-header, .profile-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(1,5,9,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; gap: 16px;
}
.dir-header__logo { display: flex; align-items: center; gap: 10px; }
.dir-header__logo img { width: 36px; height: 36px; object-fit: contain; }
.dir-header__logo span { font-family: var(--font-serif); font-size: 18px; color: var(--white); font-weight: 600; }

.back-btn {
  background: none; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.7);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; font-family: var(--font-sans);
  transition: all .2s; white-space: nowrap;
}
.back-btn:hover { border-color: var(--gold); color: var(--gold); }

.register-btn-sm {
  background: var(--gold); color: var(--navy-1); border: none;
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 700; font-family: var(--font-sans);
  transition: background .2s; white-space: nowrap;
}
.register-btn-sm:hover { background: var(--gold-light); }

/* ─── DIRECTORY ─── */
#screen-directory { background: var(--gray-1); }

.dir-search-bar { background: var(--navy-2); padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,.06); }
.search-wrap { display: flex; gap: 10px; max-width: 800px; margin: 0 auto; }
.search-wrap input {
  flex: 1; padding: 12px 18px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.08);
  color: var(--white); font-size: 15px; font-family: var(--font-sans);
  outline: none; transition: border-color .2s;
}
.search-wrap input::placeholder { color: rgba(255,255,255,.4); }
.search-wrap input:focus { border-color: var(--gold); }
.geo-btn {
  background: rgba(201,168,76,.15); border: 1px solid var(--gold);
  color: var(--gold); padding: 12px 18px; border-radius: 10px;
  cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap;
  font-family: var(--font-sans); transition: all .2s;
}
.geo-btn:hover { background: var(--gold); color: var(--navy-1); }

.dir-filters {
  background: var(--navy-3); padding: 14px 24px;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.dir-filters select {
  padding: 9px 14px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.07);
  color: var(--white); font-size: 13px; font-family: var(--font-sans);
  cursor: pointer; outline: none; transition: border-color .2s;
}
.dir-filters select:focus { border-color: var(--gold); }
.dir-filters select option { background: var(--navy-3); color: var(--white); }
.clear-filters-btn {
  background: none; border: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.5);
  padding: 9px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
  font-family: var(--font-sans); transition: all .2s; margin-left: auto;
}
.clear-filters-btn:hover { border-color: #e57373; color: #e57373; }

.dir-geo-info {
  background: rgba(201,168,76,.12); border-bottom: 1px solid rgba(201,168,76,.25);
  padding: 10px 24px; display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--gold);
}
.dir-geo-info button { background: none; border: none; color: var(--gold); cursor: pointer; font-size: 16px; }

.dir-results-info { padding: 16px 24px 4px; font-size: 13px; color: var(--gray-3); }

.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; padding: 16px 24px 40px;
  max-width: 1400px; margin: 0 auto;
}

/* ─── PROFESSIONAL CARD ─── */
.pro-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  cursor: pointer; transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.pro-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.pro-card__photo {
  width: 100%; height: 200px; object-fit: cover; object-position: top center;
  background: var(--navy-3);
}
.pro-card__photo-placeholder {
  width: 100%; height: 200px; background: linear-gradient(135deg, var(--navy-3), var(--navy-4));
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
}
.pro-card__body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pro-card__profession {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--gold); background: rgba(201,168,76,.1); border: 1px solid rgba(201,168,76,.25);
  padding: 3px 9px; border-radius: 20px; display: inline-block;
}
.pro-card__name { font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--text); line-height: 1.2; }
.pro-card__location { font-size: 13px; color: var(--gray-3); display: flex; align-items: center; gap: 4px; }
.pro-card__areas { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; flex: 1; }
.pro-card__area-tag {
  font-size: 11px; color: var(--navy-4); background: var(--gray-2);
  padding: 3px 8px; border-radius: 6px;
}
.pro-card__distance { font-size: 12px; color: var(--navy-5); font-weight: 600; margin-top: 4px; }
.pro-card__footer {
  padding: 12px 18px; border-top: 1px solid var(--gray-2);
  display: flex; align-items: center; justify-content: space-between;
}
.pro-card__cta {
  font-size: 13px; font-weight: 700; color: var(--navy-3);
  background: none; border: 1px solid var(--navy-3);
  padding: 7px 14px; border-radius: 8px; cursor: pointer;
  font-family: var(--font-sans); transition: all .2s;
}
.pro-card:hover .pro-card__cta { background: var(--navy-3); color: var(--white); }

/* ─── PROFILE PAGE ─── */
#screen-profile { background: var(--gray-1); }
.profile-content { max-width: 860px; margin: 0 auto; padding: 32px 24px 60px; }

.profile-hero {
  background: linear-gradient(135deg, var(--navy-2), var(--navy-4));
  border-radius: 16px; padding: 36px; display: flex; gap: 28px;
  align-items: flex-start; margin-bottom: 28px; flex-wrap: wrap;
}
.profile-photo {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--gold); flex-shrink: 0;
}
.profile-photo-placeholder {
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--navy-3); border: 3px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; flex-shrink: 0;
}
.profile-hero__info { flex: 1; min-width: 200px; }
.profile-hero__profession {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.profile-hero__name { font-family: var(--font-serif); font-size: 36px; font-weight: 600; color: var(--white); line-height: 1.1; margin-bottom: 10px; }
.profile-hero__location { font-size: 15px; color: rgba(255,255,255,.65); margin-bottom: 16px; }
.profile-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-whatsapp {
  background: #25D366; color: var(--white); border: none;
  padding: 12px 22px; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 700; font-family: var(--font-sans);
  transition: background .2s; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-whatsapp:hover { background: #1ebe5a; }
.btn-email {
  background: rgba(255,255,255,.1); color: var(--white); border: 1px solid rgba(255,255,255,.25);
  padding: 12px 22px; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: var(--font-sans);
  transition: all .2s; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-email:hover { background: rgba(255,255,255,.18); }

.profile-section { background: var(--white); border-radius: var(--radius); padding: 28px; margin-bottom: 16px; box-shadow: var(--shadow); }
.profile-section h3 { font-family: var(--font-serif); font-size: 20px; color: var(--navy-3); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--gray-2); }
.profile-section p { font-size: 15px; color: #4a5568; line-height: 1.8; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-tag {
  font-size: 13px; color: var(--navy-3); background: var(--gray-2);
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--gray-2);
}

/* ─── REGISTER ─── */
#screen-register { background: var(--gray-1); }
.register-wrap { max-width: 760px; margin: 0 auto; padding: 32px 24px 60px; }
.register-hero {
  background: linear-gradient(135deg, var(--navy-2), var(--navy-4));
  border-radius: 16px; padding: 36px; margin-bottom: 28px; text-align: center;
}
.register-hero h2 { font-family: var(--font-serif); font-size: 30px; color: var(--white); margin-bottom: 10px; }
.register-hero p { font-size: 15px; color: rgba(255,255,255,.65); }

.form-placeholder { background: var(--white); border-radius: var(--radius); padding: 40px; text-align: center; box-shadow: var(--shadow); }
.form-placeholder__icon { font-size: 48px; margin-bottom: 16px; }
.form-placeholder h3 { font-family: var(--font-serif); font-size: 24px; color: var(--navy-3); margin-bottom: 8px; }
.form-placeholder p { font-size: 15px; color: #666; margin-bottom: 20px; }
.form-coming-soon { background: var(--gray-1); border-radius: 10px; padding: 24px; color: var(--gray-3); }

/* Google Form iframe */
#google-form-embed iframe { width: 100%; border: none; border-radius: 10px; }

/* ─── LOADING & EMPTY ─── */
.loading-state { grid-column: 1/-1; text-align: center; padding: 60px; color: var(--gray-3); }
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--gray-2);
  border-top-color: var(--gold); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.dir-empty { text-align: center; padding: 60px 24px; color: var(--gray-3); display: none; }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.dir-empty h3 { font-size: 20px; color: var(--text); margin-bottom: 8px; }
.dir-empty button { background: none; border: none; color: var(--gold); cursor: pointer; font-size: 15px; text-decoration: underline; }

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .home-cards { flex-direction: column; }
  .home-card { max-width: 100%; }
  .dir-header, .profile-header { padding: 12px 16px; }
  .dir-header__logo span { display: none; }
  .dir-search-bar { padding: 14px 16px; }
  .dir-filters { padding: 12px 16px; }
  .dir-filters select { font-size: 12px; padding: 8px 10px; }
  .dir-grid { padding: 12px 16px 40px; gap: 14px; grid-template-columns: 1fr; }
  .profile-hero { padding: 24px; flex-direction: column; align-items: center; text-align: center; }
  .profile-hero__name { font-size: 28px; }
  .profile-hero__actions { justify-content: center; }
  .register-wrap, .profile-content { padding: 20px 16px 40px; }
}
