/* =====================================================
   TUNGA CMS — Landing Page Styles
   File: public/landing.css
   Faithfully mirrors the landingpage/ Next.js repo.
   Primary brand color: #008A75
   ===================================================== */

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

:root {
  --green: #008A75;
  --green-hover: #007060;
  --green-light: rgba(0,138,117,0.2);
  --bg-hover: #F8F7F0;
  --text: #111;
  --text-gray: #6b7280;
  --white: #ffffff;
  --radius: 6px;
  --nav-h: 80px;
  --trans: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   TOP NAVIGATION
============================================================ */
.top-nav {
  background: var(--white);
  padding: 0.75rem 0;
  position: relative;
  z-index: 50;
}

.top-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.top-nav-logos {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-nav-logos img {
  width: 100px;
  height: auto;
  object-fit: contain;
}

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

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-item svg { flex-shrink: 0; }

.contact-label {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 500;
  line-height: 1;
}

.contact-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.25;
}

.contact-divider {
  width: 1px;
  height: 32px;
  background: #e5e7eb;
}

/* ============================================================
   HERO SECTION
============================================================ */
.hero {
  position: relative;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: visible; /* allow features to overflow */
}

/* Background image + overlay */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(2px);
}

/* ============================================================
   BOTTOM NAVIGATION (inside hero, absolute at top)
============================================================ */
.bottom-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.bottom-nav-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bottom-nav-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  z-index: 10;
}

/* Logo */
.nav-logo img {
  width: 140px;
  height: auto;
  object-fit: contain;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a,
.nav-dropdown-btn {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0;
  transition: color var(--trans);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}

.nav-links a:hover,
.nav-dropdown-btn:hover { color: var(--green); }

.chevron {
  transition: transform var(--trans);
  flex-shrink: 0;
}

/* Dropdown */
.has-dropdown {
  position: relative;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.open .dropdown-menu {
  display: block;
}

.has-dropdown:hover .chevron,
.has-dropdown.open .chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  border: 1px solid #f3f4f6;
  overflow: hidden;
  min-width: 200px;
  z-index: 50;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1.25rem;
  font-size: 13px;
  color: #374151;
  border-bottom: 1px solid #f9fafb;
  transition: background var(--trans), color var(--trans);
}

.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: var(--bg-hover); color: var(--green); }

/* Language switcher */
.lang-switcher {
  position: relative;
  display: block;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(107,114,128,0.10);
  border-radius: var(--radius);
  padding: 0.625rem 1rem;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  backdrop-filter: blur(8px);
  transition: background var(--trans);
  cursor: pointer;
}

.lang-btn:hover { background: rgba(255,255,255,0.2); }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  border: 1px solid #f3f4f6;
  overflow: hidden;
  min-width: 150px;
  z-index: 50;
}

.lang-switcher.open .lang-dropdown { display: block; }
.lang-switcher.open .chevron { transform: rotate(180deg); }

.lang-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1.25rem;
  font-size: 13px;
  color: #374151;
  background: none;
  border: none;
  border-bottom: 1px solid #f9fafb;
  transition: background var(--trans), color var(--trans);
}

.lang-dropdown button:last-child { border-bottom: none; }
.lang-dropdown button:hover { background: var(--bg-hover); color: var(--green); }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border-top: 1px solid #f3f4f6;
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  z-index: 40;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1.5rem;
}

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

.mobile-menu a {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0;
  font-size: 14px;
}

.mobile-menu hr { border: none; border-top: 1px solid #f3f4f6; }

.mobile-dropdown { display: flex; flex-direction: column; }

.mobile-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0;
  font-size: 14px;
  text-align: left;
  width: 100%;
}

.mobile-sub {
  display: none;
  flex-direction: column;
  padding-left: 1rem;
  margin-top: 0.5rem;
  border-left: 2px solid rgba(0,138,117,0.2);
  gap: 0.75rem;
}

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

.mobile-sub a { color: #4b5563; font-size: 14px; }
.mobile-sub a:hover { color: var(--green); }

.mobile-lang-label { color: #6b7280; font-size: 14px; margin-bottom: -0.5rem; }

.mobile-lang-buttons { display: flex; flex-direction: column; gap: 0.5rem; }

.mobile-lang-buttons button {
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: none;
  border: none;
  color: #374151;
  font-size: 14px;
  transition: background var(--trans), color var(--trans);
}

.mobile-lang-buttons button:hover,
.mobile-lang-buttons button.active {
  background: var(--bg-hover);
  color: var(--green);
  font-weight: 500;
}

/* ============================================================
   HERO CONTENT (two columns)
============================================================ */
.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1280px; /* max-w-7xl */
  width: 100%;
  margin: 0 auto;
  padding: 5rem 1.5rem; /* py-20 px-6 — exact Tailwind match */
  display: grid;
  grid-template-columns: 1fr 1fr; /* md:grid-cols-2 */
  gap: 4rem; /* gap-16 */
  align-items: center; /* items-center */
}

/* Left column */
.hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 1.5rem;
  color: var(--white);
  animation: slideInLeft 0.8s ease both;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

.hero-eyebrow {
  text-transform: uppercase;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--white);
}

.hero-title {
  font-family: 'Covered By Your Grace', cursive;
  font-size: 3rem; /* text-5xl on mobile */
  font-weight: 400;
  line-height: 1; /* leading-none */
  letter-spacing: 0.05em; /* tracking-wider */
  color: var(--white);
}

.hero-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
  max-width: 400px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: none;
  transition: background var(--trans);
  cursor: pointer;
}

.btn-primary:hover { background: var(--green-hover); }

/* Right column — login card */
.hero-right {
  display: flex;
  justify-content: flex-end;
  animation: slideInRight 0.8s ease both;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

/* top-right glow orb */
.card-glow {
  position: absolute;
  top: -96px;
  right: -96px;
  width: 192px;
  height: 192px;
  background: rgba(0,138,117,0.20);
  filter: blur(100px);
  border-radius: 50%;
  transition: background var(--trans);
  pointer-events: none;
}

.login-card:hover .card-glow { background: rgba(0,138,117,0.30); }

.login-card-inner {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2rem; /* space-y-8 between header / form sections */
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem; /* space-y-2 */
}

.login-header img { width: 40px; height: 40px; object-fit: contain; }

.login-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.01em;
}

/* Alert */
.login-alert {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.login-alert.error   { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.login-alert.success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }
.login-alert.visible { display: block; }

/* Form — space-y-6 between fields */
#loginForm {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* space-y-6 */
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* space-y-2 */
}

.form-field label {
  font-size: 0.875rem; /* text-sm */
  font-weight: 500; /* font-medium */
  color: var(--white);
  margin-left: 0.25rem; /* ml-1 */
}

.form-field input {
  width: 100%;
  background: var(--white);
  border: none;
  border-radius: 6px; /* rounded-[6px] */
  padding: 0.75rem; /* p-3 */
  font-size: 13px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: box-shadow 0.3s ease;
}

.form-field input::placeholder { color: #6b7280; } /* placeholder:text-gray-500 */

.form-field input:focus {
  box-shadow: 0 0 0 2px rgba(0,138,117,0.5); /* focus:ring-2 focus:ring-[#008a75]/50 */
}

.pw-wrap { position: relative; }

.pw-wrap input { padding-right: 3rem; }

.pw-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: opacity var(--trans);
}

.pw-toggle:hover { opacity: 0.7; }

/* Sign in button — matches Button variant="default" w-full */
.btn-signin {
  width: 100%;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 6px; /* rounded-[6px] */
  height: 2.5rem; /* h-10 */
  padding: 0 1.25rem; /* px-5 */
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--trans);
}

.btn-signin:hover:not(:disabled) { background: var(--green-hover); }
.btn-signin:disabled { opacity: 0.7; cursor: not-allowed; }

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.login-footer-text {
  text-align: center;
  font-size: 0.75rem; /* text-xs */
  font-weight: 500;
  color: var(--white);
  padding-top: 0.5rem; /* pt-2 */
}

.login-footer-text a {
  color: var(--white);
  font-weight: 700;
  margin-left: 4px;
  transition: color var(--trans);
}

.login-footer-text a:hover { color: var(--green); }

/* ============================================================
   FEATURES — desktop (absolute, overlapping hero bottom)
============================================================ */
.features-wrap {
  position: absolute;
  bottom: -5rem; /* -bottom-20 */
  left: 0;
  right: 0;
  z-index: 30;
  transform: translateY(50%); /* translate-y-1/2 */
  padding: 3rem 1.5rem; /* py-12 px-6 */
  background: transparent;
}

.features-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center; /* items-center */
  text-align: center;
  background: var(--white);
  padding: 2.5rem; /* p-10 */
  border-radius: 20px; /* rounded-[20px] */
  /* shadow-xl */
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  transition: transform 0.5s ease; /* duration-500 */
}

.feature-card:hover {
  transform: translateY(-0.5rem); /* hover:-translate-y-2 */
}

.feature-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  flex-shrink: 0;
}

.feature-icon-wrap img { width: 20px; height: 20px; object-fit: contain; }

.feature-card h3 {
  font-size: 1.125rem; /* text-lg */
  font-weight: 600; /* font-semibold */
  color: #000; /* text-black */
  margin-bottom: 1rem; /* mb-4 */
  letter-spacing: -0.015em; /* tracking-tight */
  transition: color var(--trans);
}

.feature-card:hover h3 { color: var(--green); }

.feature-card p {
  color: #6b7280; /* text-gray-500 */
  line-height: 1.625; /* leading-relaxed */
  font-size: 13px;
}

/* Features mobile: below hero, hidden on desktop */
.features-mobile {
  display: none;
  padding: 3rem 1.5rem;
}

.features-mobile .features-grid { grid-template-columns: 1fr; }

/* Spacer below hero to reveal features that overflow below it */
.features-spacer {
  display: none; /* hidden on mobile */
}

/* ============================================================
   RESPONSIVE
============================================================ */

/* Desktop: text-8xl hero title + features spacer */
@media (min-width: 768px) {
  .hero-title { font-size: 6rem; } /* md:text-8xl = 6rem */
  /* Features extend ~260px below hero (bottom:-5rem + translateY(50%) of ~400px element) */
  .features-spacer { display: block; height: 18rem; }
}

@media (max-width: 767px) {
  /* Top nav: hide contacts */
  .top-nav-contacts { display: none; }

  /* Bottom nav: show hamburger, hide links + lang */
  .nav-links { display: none; }
  .lang-switcher { display: none; }
  .hamburger { display: flex; }

  /* Hero: single column */
  .hero-content {
    grid-template-columns: 1fr;
    padding: 5rem 1.5rem 3rem;
    gap: 2rem;
    text-align: center;
  }

  .hero-left { align-items: center; text-align: center; }
  .hero-right { justify-content: center; }

  /* Features: desktop overlay hidden, mobile section shown */
  .features-wrap { display: none; }
  .features-mobile { display: block; }
}

@media (max-width: 480px) {
  .top-nav-logos img { width: 70px; }
  .login-card { padding: 2rem 1.5rem; }
}
