/* ============================================================
   Ecovillage Mahavariana — Main Stylesheet
   Aesthetic: Organic, lush, warm — nature meets modern
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --forest:    #2c5f2e;
  --forest-md: #3a7d44;
  --forest-lt: #52a860;
  --earth:     #5c3d1e;
  --leaf:      #8ab661;
  --bark:      #7d5a3c;
  --cream:     #f7f3ec;
  --parchment: #f5f0d8;
  --gold:      #c9a84c;
  --text:      #2a2a2a;
  --text-lt:   #5a5a5a;
  --white:     #ffffff;
  --shadow:    rgba(0,0,0,0.15);
  --max-w:     1000px;
  --radius:    10px;
  --transition: 0.28s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}

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

/* ── Layout wrapper ─────────────────────────────────────────── */
.site-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 60px rgba(44,95,46,0.12);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(160deg, #1a3d1c 0%, #2c5f2e 50%, #3a7d44 100%);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(82,168,96,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.header-top {
  display: flex;
  justify-content: flex-end;
  padding: 8px 20px 4px;
  position: relative;
  z-index: 2;
}

.lang-switcher {
  display: flex;
  gap: 4px;
  align-items: center;
}

.lang-switcher a {
  color: rgba(255,255,255,0.65);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 3px;
  transition: var(--transition);
  text-transform: uppercase;
}

.lang-switcher a:hover,
.lang-switcher a.active {
  color: #fff;
  background: rgba(255,255,255,0.15);
}

.lang-switcher span {
  color: rgba(255,255,255,0.25);
  font-size: 10px;
}

.header-brand {
  text-align: center;
  padding: 10px 20px 6px;
  position: relative;
  z-index: 2;
}

.site-title {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #b5d99c 0%, #ffffff 40%, #c9a84c 80%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  line-height: 1.2;
  margin-bottom: 2px;
}

.site-subtitle {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 300;
}

/* ── Navigation ─────────────────────────────────────────────── */
.main-nav {
  position: relative;
  z-index: 2;
  padding: 0 20px 16px;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  gap: 4px;
  list-style: none;
  flex-wrap: wrap;
}

.main-nav ul li a {
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 7px 18px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.12);
  transition: var(--transition);
  display: block;
  cursor: pointer;
}

.main-nav ul li a:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

/* ── News Section ───────────────────────────────────────────── */
.news-section {
  padding: 28px 20px 24px;
  background: var(--parchment);
}

.news-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: 210px 210px;
  gap: 14px;

}

.news-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--shadow);
  transition: var(--transition);
  /* Height is defined by grid rows */
  min-height: 0;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(0,0,0,0.22);
}

.news-card.main {
  grid-row: 1 / 3;
  /* Spans both rows: 210 + 14 (gap) + 210 = 434px */
}

.news-card-bg {
  position: absolute;
  inset: 0;
  background: #2c5f2e center/cover no-repeat;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card-bg {
  transform: scale(1.04);
}

.news-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.news-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 18px 14px;
  color: #fff;
}

.news-card.main .news-card-content {
  padding: 22px 24px 20px;
}

.news-card-title {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(14px, 2.5vw, 20px);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 5px;
}

.news-card.main .news-card-title {
  font-size: clamp(16px, 3vw, 24px);
}

.news-card-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  line-height: 1.45;
  margin-bottom: 10px;
}

.news-card-btn {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 50px;
  letter-spacing: 0.06em;
  backdrop-filter: blur(4px);
  transition: var(--transition);
}

.news-card:hover .news-card-btn {
  background: rgba(255,255,255,0.25);
}

/* ── Activities Section ─────────────────────────────────────── */
.activities-section {
  padding: 28px 20px 32px;
}

.section-header {
  margin-bottom: 20px;
}

.section-title {
  display: inline-block;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--forest);
  padding: 10px 24px;
  border-radius: 4px;
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.activity-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(0,0,0,0.13);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.activity-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.2);
}

.activity-body {
  padding: 16px 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.activity-title {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 7px;
  line-height: 1.3;
}

.activity-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.82);
  line-height: 1.5;
  flex: 1;
}

.activity-actions {
  display: flex;
  gap: 7px;
  padding: 10px 16px 14px;
  flex-wrap: wrap;
}

.btn-know {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.04em;
  min-width: 80px;
}

.btn-interest {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.04em;
  min-width: 80px;
  display: inline-block;
}

.btn-know:hover, .btn-interest:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  background: linear-gradient(135deg, #1a3d1c, #2c5f2e);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 20px;
  font-size: 13px;
}

.site-footer a {
  color: var(--leaf);
}

/* ── Modals ─────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 35, 16, 0.72);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-overlay.active {
  display: flex;
}

/* Outer shell — clips the rounded corners cleanly */
.modal-box {
  background: transparent;
  border-radius: 20px;
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 2px 0 rgba(255,255,255,0.08) inset,
    0 32px 80px rgba(0,0,0,0.45),
    0 8px 24px rgba(0,0,0,0.2);
  animation: modalIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden; /* THIS is what makes corners crisp */
  border: 1px solid rgba(255,255,255,0.1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(28px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.modal-header {
  background: linear-gradient(135deg, #1e4d20 0%, #2c5f2e 55%, #3a7d44 100%);
  color: #fff;
  padding: 24px 28px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-shrink: 0;
  position: relative;
  /* Subtle texture line at bottom */
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* Decorative accent bar at very top of header */
.modal-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--leaf), var(--gold), var(--leaf));
}

.modal-title {
  font-family: 'Nunito', sans-serif;
  font-size: 21px;
  font-weight: 800;
  flex: 1;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.modal-close {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  margin-top: 2px;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  transform: rotate(90deg);
}

/* Scrollable body */
.modal-body {
  padding: 26px 30px 32px;
  line-height: 1.75;
  overflow-y: auto;
  flex: 1;
  background: #fff;
  /* Subtle inner shadow at top to show scroll depth */
  background-image: 
    linear-gradient(#fff 30%, rgba(255,255,255,0)),
    linear-gradient(rgba(255,255,255,0), #fff 70%);
  background-size: 100% 40px, 100% 40px;
  background-attachment: local, local;
}

.modal-body h3 {
  font-family: 'Nunito', sans-serif;
  color: var(--forest);
  margin: 20px 0 9px;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding-bottom: 6px;
  border-bottom: 2px solid #eef5ec;
}

.modal-body h3:first-child { margin-top: 0; }

.modal-body p {
  margin-bottom: 13px;
  color: #3a3a3a;
  font-size: 14px;
}

.modal-body ul {
  padding-left: 0;
  margin-bottom: 14px;
  list-style: none;
}

.modal-body ul li {
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
  font-size: 14px;
  color: #3a3a3a;
}

.modal-body ul li::before {
  content: '🌿';
  position: absolute;
  left: 0;
  font-size: 11px;
  top: 2px;
}

.modal-body a {
  color: var(--forest-md);
  text-decoration: none;
  border-bottom: 1px solid rgba(58,125,68,0.3);
  transition: var(--transition);
}

.modal-body a:hover {
  color: var(--forest);
  border-bottom-color: var(--forest);
}

.modal-body iframe {
  width: 100%;
  border-radius: 12px;
  margin: 14px 0;
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.modal-body img {
  border-radius: 10px;
  margin: 12px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* ── Contact Form ───────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-lt);
  letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea,
.form-group select {
  border: 2px solid #e0dbd2;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: #fafaf8;
  transition: var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--forest-md);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(58,125,68,0.1);
}

.form-group textarea { resize: vertical; min-height: 110px; }

.btn-submit {
  background: linear-gradient(135deg, var(--forest), var(--forest-md));
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  align-self: flex-start;
  letter-spacing: 0.05em;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44,95,46,0.35);
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }


/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 700px) {
  .news-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 250px 190px 190px;
    
  }
  .news-card.main { grid-row: 1; }

  .activities-grid { grid-template-columns: repeat(2, 1fr); }

  .main-nav ul li a { font-size: 12px; padding: 6px 12px; }
  .site-title { font-size: 22px; }
}

@media (max-width: 480px) {
  .activities-grid { grid-template-columns: 1fr; }
  .news-section, .activities-section { padding: 18px 14px; }
}
