/* =============================================
   HelpRent Phangan — Design System
   ============================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800&family=Patrick+Hand&display=swap');

/* --- Custom Properties --- */
:root {
  /* Colors — Authentic Island */
  --clr-bg: #0f1f23;
  /* Deep Jungle Night */
  --clr-bg-card: #162428;
  --clr-bg-card-hover: #1e2e34;
  --clr-surface: #1a2c32;

  --clr-border: rgba(255, 255, 255, 0.08);

  --clr-text: #e2e8f0;
  --clr-text-muted: #94a3b8;

  --clr-accent: #f97316;
  /* Sunset Orange */
  --clr-accent-glow: rgba(249, 115, 22, 0.15);
  --clr-accent-hover: #fb923c;

  --clr-secondary: #facc15;
  /* Sunlight Gold */

  --clr-success: #22c55e;
  --clr-warning: #eab308;
  --clr-danger: #ef4444;

  --clr-whatsapp: #25d366;
  --clr-whatsapp-hover: #16a34a;

  /* Typography */
  --ff-heading: 'Outfit', sans-serif;
  --ff-body: 'Inter', sans-serif;
  --ff-hand: 'Patrick Hand', cursive;
  --fs-hero: clamp(2.5rem, 6vw, 4rem);
  /* Bolder */
  --fs-h2: clamp(1.75rem, 4vw, 2.25rem);
  --fs-h3: clamp(1.25rem, 3vw, 1.5rem);
  --fs-body: 1.125rem;
  /* 18px */
  --fs-small: 0.9375rem;
  /* 15px */
  --fs-xs: 0.8125rem;
  /* 13px */
  --lh-body: 1.7;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 5rem;
  /* Standardized 80px */
  --section-gap: 80px;
  --section-gap-mobile: 48px;

  /* Layout */
  --max-width: 1140px;
  /* Standardized premium width */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  /* ... shadow vars ... */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, .35);
  --shadow-card-hover: 0 12px 48px rgba(0, 212, 170, .18);
  /* More pronounced */
  --shadow-glow: 0 0 32px rgba(0, 212, 170, .25);

  /* Animations */
  --transition-base: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.2s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: var(--lh-body);
  min-height: 100vh;
}

h1,
h2,
h3,
h4 {
  font-family: var(--ff-heading);
  line-height: 1.15;
  color: var(--clr-text);
  letter-spacing: -0.02em;
  /* Tightened */
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

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

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Navigation --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 23, 36, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.site-nav.scrolled {
  background: rgba(10, 15, 25, 0.95);
  padding: 0.6rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo span {
  color: var(--clr-accent);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--clr-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--clr-accent);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--clr-accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Language Switcher Polish */
.lang-switcher {
  position: relative;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--clr-border);
  color: white;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.lang-current:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--clr-accent);
}

.lang-dropdown {
  position: absolute;
  top: 120%;
  right: 0;
  background: #1a202c;
  border: 1px solid #4a5568;
  border-radius: var(--radius-md);
  padding: 0.5rem;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

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

.lang-option {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: #cbd5e0;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.lang-option.active {
  color: var(--clr-accent);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--clr-text);
  font-size: 1.8rem;
  padding: var(--space-sm);
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10, 15, 25, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    gap: 2rem;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links .lang-switcher {
    margin: 1rem 0;
  }

  .nav-links .btn-secondary {
    width: 100%;
    text-align: center;
  }
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: var(--space-3xl) 0;
  text-align: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 36, 0.8), rgba(15, 23, 36, 1));
  z-index: 0;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--clr-accent-glow);
  border: 1px solid rgba(249, 115, 22, 0.2);
  color: var(--clr-accent);
  padding: var(--space-xs) var(--space-md);
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}

.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.hero h1 .accent {
  color: var(--clr-accent);
}

.hero p {
  color: var(--clr-text-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Districts Grid (Modern Overhaul) --- */
.districts-section {
  padding: var(--space-3xl) 0;
}

.district-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .district-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.district-card {
  position: relative;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.district-card:hover {
  transform: translateY(-8px);
}

.district-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 36, 0.95) 0%, rgba(15, 23, 36, 0.4) 50%, transparent 100%);
  z-index: 1;
}

.district-card-content {
  position: relative;
  z-index: 2;
}

.district-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
  font-family: var(--ff-heading);
}

.district-link {
  color: var(--clr-accent);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.district-card:hover .district-link {
  gap: 0.8rem;
  color: var(--clr-accent-hover);
}

/* --- Button Hierarchy --- */
.btn-primary {
  display: inline-block;
  background-color: var(--clr-accent);
  color: var(--clr-bg);
  padding: 0.9rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--clr-accent);
  text-align: center;
  font-family: var(--ff-heading);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--clr-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--clr-accent);
  padding: 0.9rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--clr-accent);
  text-align: center;
  font-family: var(--ff-heading);
}

.btn-secondary:hover {
  background-color: var(--clr-accent);
  color: var(--clr-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.2);
}

/* --- Grid Alignment --- */
.grid-stack {
  display: grid;
  height: 100%;
}

.card-equal {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-equal>*:last-child {
  margin-top: auto;
}

/* --- Footer --- */
.site-footer {
  padding: 5rem 0 2rem;
  background: var(--clr-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--clr-text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 4rem;
  margin-bottom: 4rem;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand .nav-logo {
  display: block;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 320px;
}

.footer-socials {
  display: flex;
  gap: 1.2rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-icon:hover {
  background: var(--clr-accent);
  color: var(--clr-bg);
  transform: translateY(-3px);
}

.footer-title {
  color: var(--clr-text);
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-family: var(--ff-heading);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 1rem;
}

.footer-links a {
  color: #a0aec0;
  text-decoration: none;
  transition: color 0.3s;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* --- Island Reality Checks --- */
.reality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.reality-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.reality-card:hover {
  border-color: var(--clr-accent);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* --- Global Utilities --- */
.accent {
  color: var(--clr-accent);
}

.text-center {
  text-align: center;
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

/* --- Services Hub --- */
.services-hub {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: -3rem;
  position: relative;
  z-index: 10;
}

@media (max-width: 992px) {
  .services-hub {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .services-hub {
    grid-template-columns: 1fr;
    margin-top: 0;
    padding-top: var(--space-xl);
  }
}

.service-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  padding: 2rem;
  border-radius: var(--radius-lg);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--clr-accent);
  background: var(--clr-bg-card-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--clr-text);
}

.service-card p {
  font-size: 0.95rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}

/* Footer Disclaimer */
.footer-disclaimer {
  grid-column: 1 / -1;
  text-align: center;
  margin: 2rem auto 0;
  max-width: 800px;
  font-size: 0.75rem;
  color: #718096;
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
}