/* =============================================
   WISDOM OF UNIVERSE — Cosmic Theme (Clean Build)
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Raleway:wght@300;400;500;600&display=swap');

:root {
  --color-bg-deep:       #06050e;
  --color-bg-card:       rgba(12, 10, 30, 0.82);
  --color-bg-card-hover: rgba(20, 16, 50, 0.9);
  --color-text:          #e8e4f0;
  --color-text-muted:    #d0cbdf;
  --color-text-bright:   #f5f3fa;
  --color-accent:        #c9a0ff;
  --color-accent-warm:   #f0a45b;
  --color-accent-glow:   #7b5cff;
  --color-border:        rgba(201, 160, 255, 0.12);
  --color-border-hover:  rgba(201, 160, 255, 0.3);
  --color-link:          #c9a0ff;
  --color-link-hover:    #f0a45b;
  --font-display:  'Cinzel', Georgia, serif;
  --font-body:     'Cormorant Garamond', Georgia, serif;
  --font-ui:       'Raleway', sans-serif;
  --max-width:     1140px;
  --radius:        12px;
  --radius-sm:     8px;
  --transition:    0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 18px; }
body {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg-deep);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- Background --- */
.bg-fixed {
  position: fixed; inset: 0; z-index: -2;
  background: url('../images/background.webp') center center / cover no-repeat;
}
.bg-overlay {
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    rgba(6, 5, 14, 0.2) 0%,
    rgba(6, 5, 14, 0.25) 40%,
    rgba(6, 5, 14, 0.3) 100%);
}

/* --- Links --- */
a { color: var(--color-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-link-hover); }

/* --- Utility --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  background: rgba(6, 5, 14, 0.65);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.site-logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.site-logo img {
  height: 52px; width: auto;
  filter: drop-shadow(0 0 12px rgba(201, 160, 255, 0.3));
  transition: filter var(--transition);
}
.site-logo:hover img { filter: drop-shadow(0 0 20px rgba(201, 160, 255, 0.5)); }
.site-logo span {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 500;
  color: var(--color-text-bright);
  letter-spacing: 0.06em;
}

/* Nav */
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a {
  font-family: var(--font-ui);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 8px 18px; border-radius: 100px;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--color-text-bright);
  border-color: var(--color-border-hover);
  background: rgba(201, 160, 255, 0.06);
}

/* Mobile hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--color-text); margin: 6px 0; border-radius: 2px; transition: all 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative; min-height: 55vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 80px 24px 60px; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 80%, rgba(123, 92, 255, 0.12), transparent 70%);
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 600;
  color: var(--color-text-bright); letter-spacing: 0.04em; line-height: 1.25;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.7);
}
.hero p {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  color: var(--color-text); font-weight: 300; line-height: 1.7; font-style: italic;
}
.hero-divider {
  width: 80px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  margin: 28px auto; border: none;
}

/* =============================================
   ARTICLES GRID
   ============================================= */
.section-heading {
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 500;
  color: var(--color-text-bright); letter-spacing: 0.06em;
  text-align: center; margin-bottom: 48px;
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px; padding-bottom: 80px;
}
.article-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
  box-shadow: 0 0 15px rgba(100, 140, 255, 0.15), 0 0 30px rgba(100, 140, 255, 0.05);
}
.article-card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 0 25px rgba(100, 140, 255, 0.3), 0 0 50px rgba(100, 140, 255, 0.1), 0 4px 20px rgba(0,0,0,0.3);
}
.article-card-image {
  width: 100%; height: 200px; object-fit: cover;
  display: block; opacity: 1; transition: opacity var(--transition);
}
.article-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.article-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 500;
  color: var(--color-text-bright); line-height: 1.45; margin-bottom: 12px;
}
.article-card-body p {
  font-size: 1.1rem; color: var(--color-text); line-height: 1.65; flex: 1;
}
.article-card-body .read-more {
  font-family: var(--font-ui);
  font-size: 0.85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--color-accent); margin-top: 18px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--transition);
}
.article-card-body .read-more:hover { color: var(--color-accent-warm); gap: 10px; }

/* =============================================
   ARTICLE PAGE
   ============================================= */
.article-hero { padding: 100px 24px 40px; text-align: center; }
.article-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 600;
  color: var(--color-text-bright); line-height: 1.3;
  max-width: 800px; margin: 0 auto 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.7);
}

.article-content {
  max-width: 780px; margin: 0 auto;
  padding: 48px 40px 80px;
  background: rgba(6, 5, 14, 0.5);
  border-radius: 16px;
  border: 1px solid rgba(201, 160, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.article-content p { margin-bottom: 1.8em; font-size: 1.3rem; line-height: 1.9; }

/* Drop cap */
.article-content p:first-of-type:not(.img-caption)::first-letter {
  font-family: var(--font-display);
  font-size: 3.4em; float: left; line-height: 0.85;
  margin-right: 10px; margin-top: 6px;
  color: var(--color-accent);
  text-shadow: 0 0 20px rgba(201, 160, 255, 0.3);
}

/* Section dividers */
.article-content p:nth-of-type(4n):not(.img-caption)::after,
.article-content p:nth-of-type(7n):not(.img-caption)::after {
  content: '✦'; display: block; text-align: center;
  margin: 2.2em 0 0.6em; font-size: 0.9rem;
  color: rgba(201, 160, 255, 0.4); letter-spacing: 1.2em;
}

/* Blockquote / Pull quote */
.article-content blockquote {
  border-left: 3px solid var(--color-accent);
  margin: 2.5em 0; padding: 20px 28px;
  background: rgba(201, 160, 255, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.4rem; font-style: italic;
  color: var(--color-text-bright); line-height: 1.8;
}

.article-content img {
  max-width: 60%; height: auto; border-radius: var(--radius-sm);
  margin: 2em auto; display: block;
  background: var(--color-bg-deep);
  border: 3px solid var(--color-bg-deep);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
}
.article-content a { color: var(--color-accent); border-bottom: 1px solid rgba(201, 160, 255, 0.2); transition: all var(--transition); }
.article-content a:hover { color: var(--color-accent-warm); border-bottom-color: var(--color-accent-warm); }
.article-content strong { color: var(--color-text-bright); font-weight: 600; }

/* Table styling */
.article-content table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 0.95rem; }
.article-content th { padding: 12px; text-align: left; color: var(--color-accent); border-bottom: 2px solid var(--color-border-hover); }
.article-content td { padding: 10px 12px; border-bottom: 1px solid var(--color-border); }

/* Collapsible References */
.article-references { margin-top: 3em; border-top: 1px solid var(--color-border); }
.article-references summary {
  font-family: var(--font-ui);
  font-size: 0.85rem; font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  cursor: pointer; padding: 16px 0; list-style: none;
  transition: color var(--transition);
}
.article-references summary::-webkit-details-marker { display: none; }
.article-references summary:hover { color: var(--color-accent); }
.article-references[open] summary { margin-bottom: 12px; }
.article-references a {
  display: block; font-family: var(--font-ui);
  font-size: 0.8rem; color: var(--color-text-muted);
  word-break: break-all; margin-bottom: 8px; border-bottom: none;
}
.article-references a:hover { color: var(--color-accent); }

/* Related Articles */
.related-articles { margin-top: 3em; padding-top: 2em; border-top: 1px solid var(--color-border); }
.related-articles h3 {
  font-family: var(--font-ui);
  font-size: 0.85rem; font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px;
}
.related-articles a {
  display: block; font-family: var(--font-body);
  font-size: 1.1rem; color: var(--color-accent);
  padding: 10px 0; border-bottom: 1px solid var(--color-border);
  transition: all var(--transition);
}
.related-articles a:last-child { border-bottom: none; }
.related-articles a:hover { color: var(--color-accent-warm); padding-left: 8px; }

/* Article Navigation */
.article-nav {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 780px; margin: 0 auto; padding: 20px 24px;
}
.article-nav a {
  font-family: var(--font-ui);
  font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: 10px 20px; border: 1px solid var(--color-border);
  border-radius: 100px; transition: all var(--transition); text-decoration: none;
}
.article-nav a:hover {
  color: var(--color-text-bright);
  border-color: var(--color-border-hover);
  background: rgba(201, 160, 255, 0.06);
}
.article-nav .nav-placeholder { width: 120px; }

/* =============================================
   ABOUT PAGE
   ============================================= */
.about-content {
  max-width: 780px; margin: 0 auto;
  padding: 48px 40px 80px;
  background: rgba(6, 5, 14, 0.5);
  border-radius: 16px;
  border: 1px solid rgba(201, 160, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.about-content p { margin-bottom: 1.6em; font-size: 1.3rem; line-height: 1.85; }

/* =============================================
   CONTACT FORM
   ============================================= */
.contact-section { padding: 80px 24px; text-align: center; }
.contact-form { max-width: 560px; margin: 0 auto; text-align: left; }
.form-group { margin-bottom: 24px; }
.form-group label {
  display: block; font-family: var(--font-ui);
  font-size: 0.85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--color-text-muted); margin-bottom: 8px;
}
.form-group input, .form-group textarea {
  width: 100%; padding: 14px 18px;
  font-family: var(--font-body); font-size: 1.05rem;
  color: var(--color-text-bright);
  background: rgba(12, 10, 30, 0.7);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--color-accent); }
.form-group textarea { min-height: 160px; resize: vertical; }
.form-submit {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui);
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-bg-deep);
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-glow));
  padding: 14px 40px; border: none; border-radius: 100px;
  cursor: pointer; transition: all var(--transition);
}
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(201, 160, 255, 0.3); }
.form-status { margin-top: 16px; font-family: var(--font-ui); font-size: 0.9rem; text-align: center; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  padding: 40px 24px; text-align: center;
  border-top: 1px solid var(--color-border);
  background: rgba(6, 5, 14, 0.6);
}
.footer-logo { height: 40px; margin-bottom: 16px; filter: drop-shadow(0 0 8px rgba(201, 160, 255, 0.2)); }
.site-footer p { font-family: var(--font-ui); font-size: 0.85rem; color: var(--color-text-muted); letter-spacing: 0.06em; }
.footer-links { margin-top: 12px; display: flex; justify-content: center; gap: 24px; }
.footer-links a { font-family: var(--font-ui); font-size: 0.8rem; color: var(--color-text-muted); letter-spacing: 0.06em; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: rgba(6, 5, 14, 0.95); backdrop-filter: blur(20px);
    padding: 20px; border-bottom: 1px solid var(--color-border); gap: 4px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; text-align: center; padding: 14px; }
  .nav-toggle { display: block; }
  .hero { min-height: 40vh; padding: 60px 20px 40px; }
  .articles-grid { grid-template-columns: 1fr; gap: 20px; }
  .site-logo span { display: none; }
  .article-content, .about-content { padding: 24px 20px 60px; }
  .article-nav a { font-size: 0.7rem; padding: 8px 14px; }
  .search-box { display: none; }
  .search-box input { width: 100%; }
}
@media (max-width: 480px) {
  html { font-size: 16px; }
  .header-inner { padding: 12px 16px; }
  .site-logo img { height: 40px; }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { opacity: 0; animation: fadeInUp 0.7s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes twinkle { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.stars-canvas { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* Image caption */
.article-content .img-caption {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: -1.2em;
  margin-bottom: 2.5em;
  font-style: italic;
  letter-spacing: 0.03em;
}

/* Header Tools (Search + Translate) */
.header-tools {
  display: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.search-box {
  position: relative;
}

.search-box input {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  padding: 8px 14px;
  width: 260px;
  background: rgba(12, 10, 30, 0.6);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-text-bright);
  outline: none;
  transition: all var(--transition);
}

.search-box input::placeholder {
  color: var(--color-text-muted);
}

.search-box input:focus {
  border-color: var(--color-accent);
  width: 320px;
}

.search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: rgba(12, 10, 30, 0.95);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
  min-width: 280px;
}

.search-results.active { display: block; }

.search-results a {
  display: block;
  padding: 10px 14px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition);
}

.search-results a:last-child { border-bottom: none; }
.search-results a:hover {
  background: rgba(201, 160, 255, 0.08);
  color: var(--color-accent);
}

.search-results .no-results {
  padding: 14px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Google Translate styling */
#google_translate_element {
  line-height: 1;
}

.goog-te-gadget {
  font-size: 0 !important;
}

.goog-te-gadget .goog-te-combo {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  padding: 6px 10px;
  background: rgba(12, 10, 30, 0.6);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-text-bright);
  outline: none;
  cursor: pointer;
}

/* Hide Google Translate bar at top */
.skiptranslate iframe { display: none !important; }
body { top: 0 !important; }

@media (max-width: 768px) {
  .header-tools { display: none; }
  .main-nav.open .header-tools-mobile { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
  .search-box input { width: 100%; }
}

/* Nav right section (search + translate in nav bar) */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Contact Dropdown */
.contact-dropdown { text-align: center; }
.contact-dropdown summary {
  cursor: pointer; list-style: none;
  user-select: none; transition: color var(--transition);
}
.contact-dropdown summary::-webkit-details-marker { display: none; }
.contact-dropdown summary:hover { color: var(--color-accent); }
.contact-dropdown[open] summary { margin-bottom: 10px; }

/* Google Translate Widget - In header */
#google_translate_element {
  margin-top: 6px;
  opacity: 0.5; transition: opacity 0.3s ease;
  transform: scale(0.85); transform-origin: left center;
}
#google_translate_element:hover { opacity: 1; }

/* Suppress Google Translate original-text tooltips */
font[style] { pointer-events: auto; }
.goog-text-highlight { box-shadow: none !important; background: none !important; }
body.translated-ltr font, body.translated-rtl font { title: none; }
.VIpgJd-ZVi9od-l4eHX-hSRGPd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf {
  display: none !important;
}

/* Hide Google Translate top bar (not the widget dropdown) */
body > .skiptranslate { display: none !important; }
body { top: 0 !important; }
