@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Merriweather:wght@700&display=swap');

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Offsets the sticky header so it doesn't cover the title */
}
:root {
  --primary: #5c4033; 
  --primary-dark: #3e2b22;
  --accent: #d4af37; 
  --text: #2d2a26;
  --muted: #7a7672;
  --bg: #faf9f6; 
  --card: #ffffff;
  --border: #e5e2db;
  --radius: 12px;
  --btn-text: #ffffff; 
  --header-bg: #fcfbfa;
}

* { box-sizing: border-box; }
body { 
  margin:0; 
  font-family: 'Inter', system-ui, sans-serif; 
  color: var(--text); 
  background: var(--bg); 
  line-height: 1.6; 
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }

h1, h2, h3 { 
  font-family: 'Merriweather', serif;
  margin: 0 0 1rem; 
  color: var(--text); 
  font-weight: 700; 
}
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.25; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }

/* --- HEADER STYLES --- */
.site-header { 
  background: var(--header-bg); 
  border-bottom: 1px solid var(--border); 
  position: sticky; top:0; z-index: 10; 
  padding: 1rem 0;
}
.nav { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
}

/* Logo */
.brand { 
  display: flex; 
  align-items: center; 
  gap: 1rem; 
  text-decoration: none; 
}
.logo-box {
  background: var(--primary);
  color: var(--bg);
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; }
.logo-title { 
  font-family: 'Inter', sans-serif;
  font-weight: 700; 
  font-size: 1.35rem; 
  color: var(--text); 
  line-height: 1.1;
}
.logo-tagline { font-size: 0.8rem; color: var(--muted); }

/* Header Buttons */
.header-actions { 
  display: flex; 
  align-items: center; 
  gap: 1rem; 
}
.btn-lang, .btn-signin {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-lang:hover, .btn-signin:hover { background: var(--bg); border-color: var(--muted); }

/* Main Buttons */
.btn-primary, .btn-outline {
  display: inline-block; padding: .8rem 1.5rem; border-radius: 8px;
  font-weight: 600; border: 1px solid transparent; cursor: pointer;
  text-align: center; transition: all 0.2s ease; font-size: 1rem;
}
.btn-primary { background: var(--primary); color: var(--btn-text); }
.btn-primary:hover { background: var(--primary-dark); color: var(--btn-text); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--btn-text); }

/* Hero Section */
.hero { background: var(--card); border-bottom: 1px solid var(--border); padding: 5rem 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4rem; align-items: center; }
.hero p { color: var(--muted); font-size: 1.15rem; margin-bottom: 2rem; max-width: 95%; }
.hero-buttons { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.hero-trust { font-size: 0.9rem; color: var(--muted); display: flex; gap: 1.5rem; justify-content: flex-start; font-weight: 500;}

/* Example Card */
.example-card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; box-shadow: 0 16px 50px rgba(0,0,0,0.05); }
.example-card .eyebrow { font-size: 0.8rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 1rem; }
.example-card h3 { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1.6rem; margin: 0; }
.example-card .location { color: var(--muted); font-size: 0.95rem; margin-top: 0.5rem; }
.example-card .details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.example-card .details-grid .label { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
.example-card .details-grid .value { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.offer-box { border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; display: flex; align-items: center; justify-content: space-between; background: var(--card); }
.offer-box .offer-info { display: flex; align-items: center; gap: 1rem; }
.offer-box .icon { color: var(--primary); }
.offer-box .offer-title { font-weight: 600; font-size: 1rem; }
.offer-box .offer-sub { font-size: 0.85rem; color: var(--muted); }
.offer-box .status { font-size: 0.9rem; color: var(--muted); font-weight: 600; }

/* Grids & Cards */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.card h3 { font-family: 'Inter', sans-serif; font-size: 1.25rem; margin-bottom: 0.5rem; }

/* Localities */
.locality-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-weight: 600; transition: all 0.2s ease; font-size: 1.1rem; }
.locality-card:hover { border-color: var(--primary); background: var(--bg); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.locality-card svg { width: 24px; height: 24px; color: var(--primary); flex-shrink: 0; }

/* Steps */
.step-card { position: relative; padding-top: 2rem; background: transparent; border: none; box-shadow: none; padding-left: 0; }
.step-num { font-family: 'Merriweather', serif; font-size: 3rem; font-weight: 800; color: var(--primary); opacity: 0.9; line-height: 1; margin-bottom: 1rem; }
.step-card h3 { font-size: 1.4rem; margin-bottom: 1rem; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form label { display: flex; flex-direction: column; gap: .4rem; font-weight: 500; }
.form input, .form select, .form textarea { padding: .8rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit; background: var(--card); color: var(--text); }
.row-between { display:flex; justify-content:space-between; align-items:center; margin-bottom:1rem; flex-wrap:wrap; gap:.5rem; }
.muted { color: var(--muted); font-size: .95rem; }
.alert { padding: 1rem; border-radius: 8px; margin: 1rem auto; font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.site-footer { background: var(--card); border-top: 1px solid var(--border); color: var(--muted); padding:2.5rem 0; text-align:center; margin-top: 4rem; }

/* --- RESPONSIVE (MOBILE) --- */
@media (max-width: 900px) {
  .hero { padding: 3rem 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .hero p { margin: 0 auto 2rem; }
  .hero-buttons, .hero-trust { justify-content: center; }
  
  .grid-3 { grid-template-columns: 1fr; gap: 2rem; }
  .section { padding: 2.5rem 0; }
  
  /* Fix padding for section headers on mobile */
 
}

@media (max-width: 600px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  
  /* Header Adjustments */
  .site-header { padding: 1.5rem 0 1rem 0; }
  .nav { flex-direction: column; gap: 1.5rem; }
  .header-actions { width: 100%; justify-content: space-between; gap: 0.5rem; padding: 0 1rem; }
  
  /* Make buttons equal width on phone */
  .header-actions .btn-signin, 
  .header-actions .btn-primary {
    flex: 1;
    text-align: center;
    padding: 0.8rem 0.5rem;
    font-size: 0.95rem;
  }
  
  
  
  /* Hero Adjustments */
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons a { width: 100%; }
  .hero-trust { flex-direction: column; gap: 0.5rem; align-items: center; }
  
  /* Example Card Adjustments */
  .example-card { padding: 1.5rem; }
  .example-card .details-grid { gap: 0.5rem; }
  .example-card .details-grid .value { font-size: 1.2rem; }
  .offer-box { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .offer-box .status { align-self: flex-end; }

  /* Steps & Localities Header Spacing */
  h2 { font-size: 1.8rem !important; }
  .step-num { font-size: 2.5rem; }
  
  /* Ensure sections have proper edge padding */
  .container { padding: 0 1.25rem; }
}

/* Requirements Page Filter Bar */
.filter-container {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.search-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-bar select {
  flex: 1;
  min-width: 150px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background-color: var(--bg);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%237a7672%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 0.65rem auto;
  transition: all 0.2s ease;
}

.search-bar select:focus {
  outline: none;
  border-color: var(--primary);
}

.search-bar .reset-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 8px;
}

/* Mobile Fix for Filter Bar */
@media (max-width: 600px) {
  .search-bar { flex-direction: column; align-items: stretch; }
  .search-bar select, .search-bar button, .search-bar .reset-btn { width: 100%; }
}