/* ============================================
   EVELI KARNER — Supervisor & Coach
   Modern Professional Website
   ============================================ */

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

:root {
  --gold: #C8973E;
  --gold-light: #D4A84E;
  --gold-pale: #F5EDE0;
  --cream: #FAF7F2;
  --cream-dark: #F0EBE3;
  --brown-dark: #2C2420;
  --brown: #4A3F37;
  --brown-light: #7A6D63;
  --text: #3A3330;
  --text-light: #6B5F57;
  --white: #FFFFFF;
  --border: #E5DDD4;
  --shadow: rgba(44, 36, 32, 0.08);
  --shadow-lg: rgba(44, 36, 32, 0.12);

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-height: 80px;
  --max-width: 1200px;
  --section-pad: 100px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--gold-light); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--brown-dark); font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

.subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-light);
  font-weight: 400;
  line-height: 1.7;
  max-width: 600px;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: block;
}

/* --- Navigation --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

nav.scrolled { box-shadow: 0 2px 20px var(--shadow); }

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brown-dark);
}
.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brown);
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-links a:hover, .nav-links a.active { color: var(--brown-dark); }

/* Language toggle */
.lang-toggle {
  display: flex;
  background: var(--cream-dark);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}

.lang-toggle button {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  background: transparent;
  color: var(--brown-light);
  transition: all 0.3s;
  letter-spacing: 0.05em;
}

.lang-toggle button.active {
  background: var(--white);
  color: var(--brown-dark);
  box-shadow: 0 1px 4px var(--shadow);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brown-dark);
  border-radius: 2px;
  transition: all 0.3s;
}

/* --- Hero Section --- */
.hero {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: var(--section-pad);
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-content { max-width: 540px; }
.hero-content h1 { margin-bottom: 24px; }
.hero-content .subtitle { margin-bottom: 36px; }

.hero-image {
  position: relative;
}

.hero-image img {
  border-radius: 16px;
  object-fit: cover;
  width: 100%;
  max-height: 600px;
  box-shadow: 0 20px 60px var(--shadow-lg);
}

.hero-image::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  z-index: -1;
  opacity: 0.4;
}

/* CTA Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--gold-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 151, 62, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--white);
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* --- Sections --- */
section {
  padding: var(--section-pad) 0;
}

.section-dark {
  background: var(--brown-dark);
  color: var(--cream);
}
.section-dark h2, .section-dark h3 { color: var(--cream); }
.section-dark .subtitle { color: rgba(250, 247, 242, 0.7); }
.section-dark .section-label { color: var(--gold-light); }

.section-alt { background: var(--white); }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header .subtitle {
  margin: 16px auto 0;
}

/* --- Highlights / Stats --- */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.highlight-card {
  text-align: center;
  padding: 40px 24px;
}

.highlight-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 12px;
}

.highlight-text {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.service-card {
  background: var(--white);
  border-radius: 16px;
  padding: 48px 40px;
  border: 1px solid var(--border);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px var(--shadow-lg);
  border-color: var(--gold);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--gold-pale);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.service-card h3 { margin-bottom: 16px; }

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

.service-card ul {
  list-style: none;
  margin-top: 20px;
  padding: 0;
}

.service-card ul li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-light);
  font-size: 0.92rem;
}

.service-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.6;
}

/* --- About Page --- */
.about-grid {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 80px;
  align-items: start;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.8;
}

.about-text p:first-of-type {
  font-size: 1.1rem;
  color: var(--text);
}

.about-image img {
  border-radius: 16px;
  box-shadow: 0 20px 60px var(--shadow-lg);
}

/* Credentials */
.credentials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.credential {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.credential img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
}

.credential-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown);
  line-height: 1.4;
}

/* --- Focus Areas --- */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.focus-item {
  padding: 32px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.focus-item h4 {
  color: var(--gold-light);
  margin-bottom: 10px;
  font-family: var(--font-body);
  font-weight: 600;
}

.focus-item p {
  font-size: 0.92rem;
  color: rgba(250, 247, 242, 0.7);
  line-height: 1.6;
}

/* --- Quote / Testimonial --- */
.quote-section {
  padding: 80px 0;
  text-align: center;
}

.quote-text {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-style: italic;
  color: var(--brown);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
  position: relative;
}

.quote-text::before {
  content: '\201C';
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.3;
  position: absolute;
  top: -40px;
  left: -20px;
  line-height: 1;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info h2 { margin-bottom: 20px; }
.contact-info .subtitle { margin-bottom: 36px; }

.contact-detail {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.contact-detail-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-detail-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--gold);
}

.contact-detail-text {
  font-size: 0.95rem;
  color: var(--text);
}
.contact-detail-text strong {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
  font-weight: 600;
}

.contact-form {
  background: var(--white);
  padding: 48px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px var(--shadow);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--cream);
  color: var(--text);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 151, 62, 0.1);
}

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

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* --- Footer --- */
footer {
  background: var(--brown-dark);
  color: rgba(250, 247, 242, 0.6);
  padding: 60px 0 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--cream);
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(250, 247, 242, 0.5);
}

.footer-links { display: flex; gap: 32px; }
.footer-links a {
  font-size: 0.85rem;
  color: rgba(250, 247, 242, 0.6);
}
.footer-links a:hover { color: var(--gold-light); }

.footer-badges {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-badges img {
  height: 48px;
  width: auto;
  opacity: 0.7;
  border-radius: 6px;
  transition: opacity 0.3s;
}
.footer-badges img:hover { opacity: 1; }

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(250, 247, 242, 0.1);
  font-size: 0.8rem;
  text-align: center;
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .container { padding: 0 24px; }
  :root { --section-pad: 70px; }

  .hero-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }

  .hero { min-height: auto; padding-top: calc(var(--nav-height) + 40px); }
  .hero-content { max-width: 100%; }

  .hero-image { order: -1; max-width: 500px; margin: 0 auto; }

  .services-grid { grid-template-columns: 1fr; }
  .highlights { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .focus-grid { grid-template-columns: 1fr; }

  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--cream);
    padding: 24px 40px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px var(--shadow);
    gap: 20px;
  }

  .contact-form { padding: 32px 24px; }
}

@media (max-width: 600px) {
  .highlights { grid-template-columns: 1fr; gap: 16px; }
  .highlight-card { padding: 24px 16px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-links { flex-direction: column; gap: 12px; align-items: center; }
}

/* --- Language switching --- */
/* Always keep lang-toggle buttons visible */
.lang-toggle button[data-lang] { display: inline-block !important; }

[data-lang="en"] { display: none; }
body.lang-en [data-lang="en"] { display: block; }
body.lang-en [data-lang="et"] { display: none; }

/* Fix for inline elements */
span[data-lang="en"], a[data-lang="en"], label[data-lang="en"], strong[data-lang="en"] { display: none; }
body.lang-en span[data-lang="en"], body.lang-en a[data-lang="en"], body.lang-en strong[data-lang="en"] { display: inline; }
body.lang-en label[data-lang="en"] { display: block; }
body.lang-en span[data-lang="et"], body.lang-en a[data-lang="et"], body.lang-en label[data-lang="et"], body.lang-en strong[data-lang="et"] { display: none !important; }

/* Fix for flex/grid children */
.nav-links [data-lang="en"] { display: none; }
body.lang-en .nav-links [data-lang="en"] { display: block; }
body.lang-en .nav-links [data-lang="et"] { display: none; }

li[data-lang="en"] { display: none; }
body.lang-en li[data-lang="en"] { display: list-item; }
body.lang-en li[data-lang="et"] { display: none; }

.service-card ul li[data-lang="en"] { display: none; }
body.lang-en .service-card ul li[data-lang="en"] { display: block; }
body.lang-en .service-card ul li[data-lang="et"] { display: none; }

div[data-lang="en"].highlight-card,
div[data-lang="en"].service-card,
div[data-lang="en"].focus-item,
div[data-lang="en"].contact-detail { display: none; }

body.lang-en div[data-lang="en"].highlight-card,
body.lang-en div[data-lang="en"].service-card,
body.lang-en div[data-lang="en"].focus-item,
body.lang-en div[data-lang="en"].contact-detail { display: block; }

body.lang-en div[data-lang="et"].highlight-card,
body.lang-en div[data-lang="et"].service-card,
body.lang-en div[data-lang="et"].focus-item,
body.lang-en div[data-lang="et"].contact-detail { display: none; }

/* Flex children fix */
div[data-lang="en"].highlight-card { display: none; }
body.lang-en div[data-lang="en"].highlight-card { display: block; }
body.lang-en div[data-lang="et"].highlight-card { display: none; }

/* --- Blog Cards --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.blog-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px var(--shadow-lg);
  border-color: var(--gold);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card-body {
  padding: 28px 32px 32px;
}

.blog-card-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.blog-card-body h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  line-height: 1.35;
}

.blog-card-body h3 a {
  color: var(--brown-dark);
  transition: color 0.3s;
}

.blog-card-body h3 a:hover {
  color: var(--gold);
}

.blog-card-excerpt {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.blog-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-card-link:hover {
  gap: 10px;
}

/* --- Blog Post --- */
.blog-post {
  max-width: 760px;
  margin: 0 auto;
}

.blog-post-header {
  margin-bottom: 48px;
}

.blog-post-meta {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.blog-post-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text);
}

.blog-post-content p {
  margin-bottom: 24px;
}

.blog-post-content h2 {
  margin-top: 48px;
  margin-bottom: 20px;
  font-size: 1.6rem;
}

.blog-post-content h3 {
  margin-top: 36px;
  margin-bottom: 16px;
}

.blog-post-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--cream-dark);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--brown);
}

.blog-post-content ul, .blog-post-content ol {
  margin: 20px 0;
  padding-left: 24px;
}

.blog-post-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.blog-post-content img {
  border-radius: 12px;
  margin: 32px 0;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 32px;
}

.blog-back-link:hover { gap: 4px; }

/* --- Events / Speaking --- */
.events-list {
  max-width: 800px;
  margin: 0 auto;
}

.events-group-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
}

.event-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.event-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown);
  line-height: 1.5;
}

.event-details h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  line-height: 1.4;
}

.event-details p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.event-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--gold-pale);
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
  .event-item { grid-template-columns: 1fr; gap: 8px; }
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
