/* ============================================================
   World Tamil Research Center — Stylesheet
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans Tamil', 'Inter', sans-serif;
  background: #fdf8f2;
  color: #2c1a0e;
  line-height: 1.8;
}

/* --- Utility --- */
.hidden { display: none !important; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: linear-gradient(135deg, #7b1c1c 0%, #a0321e 50%, #c0541e 100%);
  padding: 18px 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  font-size: 3rem;
  color: #f5c842;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  line-height: 1;
}

.title-ta, .title-en {
  font-family: 'Noto Serif Tamil', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  line-height: 1.3;
}

.tagline-ta, .tagline-en {
  font-size: 0.85rem;
  color: #f5c842;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* Language Toggle */
.lang-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-label {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  cursor: pointer;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  inset: 0;
  background: #c0541e;
  border-radius: 28px;
  transition: background 0.3s;
  border: 2px solid rgba(255,255,255,0.4);
}

.slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  left: 2px;
  top: 2px;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .slider { background: #f5c842; }
.toggle-switch input:checked + .slider::before { transform: translateX(24px); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-nav {
  background: #2c1a0e;
  padding: 0 24px;
}

.main-nav ul {
  max-width: 1100px;
  margin: 0 auto;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.main-nav ul li a {
  display: block;
  padding: 14px 20px;
  color: #f5c842;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  border-bottom: 3px solid transparent;
}

.main-nav ul li a:hover {
  background: #7b1c1c;
  color: #fff;
  border-bottom-color: #f5c842;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(160deg, #f5e6c8 0%, #fdf8f2 60%, #f5c842 100%);
  padding: 72px 24px;
  text-align: center;
  border-bottom: 4px solid #a0321e;
}

.hero-content {
  max-width: 760px;
  margin: 0 auto;
}

.hero-content h2 {
  font-family: 'Noto Serif Tamil', serif;
  font-size: 2rem;
  color: #7b1c1c;
  margin-bottom: 20px;
  line-height: 1.4;
}

.hero-content p {
  font-size: 1.05rem;
  color: #4a2c10;
  margin-bottom: 32px;
  line-height: 1.9;
}

.hero-btn {
  display: inline-block;
  background: #a0321e;
  color: #fff;
  padding: 14px 36px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 14px rgba(160,50,30,0.35);
}

.hero-btn:hover {
  background: #7b1c1c;
  transform: translateY(-2px);
}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.content-section {
  padding: 56px 0;
  border-bottom: 1px solid #e8d5b8;
}

.content-section.alt {
  background: linear-gradient(90deg, #fff8ee 0%, #fdf8f2 100%);
  margin: 0 -24px;
  padding: 56px 24px;
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-icon {
  font-size: 2rem;
  background: #a0321e;
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(160,50,30,0.3);
}

.section-header h2 {
  font-family: 'Noto Serif Tamil', serif;
  font-size: 1.7rem;
  color: #7b1c1c;
  font-weight: 700;
}

.content-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border-left: 4px solid #f5c842;
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  font-size: 1rem;
  color: #2c1a0e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
  line-height: 1.9;
}

.content-list li:hover {
  box-shadow: 0 4px 16px rgba(160,50,30,0.15);
  transform: translateX(4px);
}

.content-list li::before {
  content: '✦';
  color: #a0321e;
  font-size: 0.9rem;
  margin-top: 4px;
  flex-shrink: 0;
}

/* Register CTA */
.register-cta {
  margin-top: 32px;
  text-align: center;
}

.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, #a0321e, #c0541e);
  color: #fff;
  padding: 16px 48px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 20px rgba(160,50,30,0.35);
  transition: background 0.2s, transform 0.2s;
}

.cta-btn:hover {
  background: linear-gradient(135deg, #7b1c1c, #a0321e);
  transform: translateY(-3px);
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-section {
  background: linear-gradient(135deg, #7b1c1c 0%, #a0321e 100%);
  padding: 64px 24px;
  color: #fff;
}

.contact-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.contact-inner h2 {
  font-family: 'Noto Serif Tamil', serif;
  font-size: 1.9rem;
  color: #f5c842;
  margin-bottom: 40px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.contact-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  padding: 28px 20px;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(6px);
}

.contact-card:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-4px);
}

.contact-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 12px;
}

.contact-card h3 {
  font-size: 0.9rem;
  color: #f5c842;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 600;
}

.contact-card p {
  font-size: 1rem;
  color: #fff;
  line-height: 1.6;
}

.contact-card a {
  color: #f5e6a0;
  text-decoration: none;
  word-break: break-all;
}

.contact-card a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #1a0a05;
  color: #c0a080;
  text-align: center;
  padding: 20px 24px;
  font-size: 0.88rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .title-ta, .title-en { font-size: 1.15rem; }
  .tagline-ta, .tagline-en { font-size: 0.78rem; }
  .logo-icon { font-size: 2.2rem; }

  .main-nav ul li a { padding: 11px 13px; font-size: 0.85rem; }

  .hero-content h2 { font-size: 1.4rem; }
  .hero-content p { font-size: 0.95rem; }

  .section-header h2 { font-size: 1.35rem; }
  .content-list li { font-size: 0.92rem; }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .lang-toggle-wrap { align-self: flex-end; }
  .hero { padding: 48px 16px; }
  .content-section, .content-section.alt { padding: 40px 16px; }
}

/* ============================================================
   KNOWLEDGE SECTIONS — Tamil Culture, Literature, Legacy
   ============================================================ */

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  overflow-x: auto;
}

.knowledge-wrapper {
  background: #fdf8f2;
}

.knowledge-section {
  padding: 64px 24px;
  border-bottom: 3px solid #e8d5b8;
}

.knowledge-section.alt-bg {
  background: linear-gradient(160deg, #1a0a05 0%, #3a1a0a 100%);
  color: #f5e6c8;
}

.knowledge-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* Section Header */
.know-section-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 2px solid rgba(160,50,30,0.2);
}

.alt-bg .know-section-head {
  border-bottom-color: rgba(245,200,66,0.3);
}

.know-icon {
  font-size: 3rem;
  background: linear-gradient(135deg, #a0321e, #c0541e);
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(160,50,30,0.4);
}

.know-section-head h2 {
  font-family: 'Noto Serif Tamil', serif;
  font-size: 2rem;
  color: #7b1c1c;
  font-weight: 700;
  line-height: 1.2;
}

.alt-bg .know-section-head h2 {
  color: #f5c842;
}

.know-subtitle {
  font-size: 1rem;
  color: #8a5a30;
  margin-top: 6px;
}

.alt-bg .know-subtitle {
  color: #d4a96a;
}

/* ---- CULTURE GRID ---- */
.know-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.know-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  border-top: 4px solid #a0321e;
  transition: transform 0.2s, box-shadow 0.2s;
}

.know-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(160,50,30,0.18);
}

.know-card-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 14px;
}

.know-card h3 {
  font-family: 'Noto Serif Tamil', serif;
  font-size: 1.15rem;
  color: #7b1c1c;
  margin-bottom: 12px;
  font-weight: 700;
}

.know-card p {
  font-size: 0.95rem;
  color: #3a2010;
  line-height: 1.9;
}

/* ---- LITERATURE TIMELINE ---- */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #f5c842, #a0321e, #f5c842);
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -34px;
  top: 6px;
  width: 18px;
  height: 18px;
  background: #f5c842;
  border: 3px solid #a0321e;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(245,200,66,0.25);
}

.timeline-content {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(245,200,66,0.2);
  border-left: 4px solid #f5c842;
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  transition: background 0.2s;
}

.timeline-content:hover {
  background: rgba(255,255,255,0.12);
}

.timeline-era {
  display: inline-block;
  background: #a0321e;
  color: #f5c842;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.timeline-content h3 {
  font-family: 'Noto Serif Tamil', serif;
  font-size: 1.25rem;
  color: #f5c842;
  margin-bottom: 10px;
  font-weight: 700;
}

.timeline-content p {
  font-size: 0.95rem;
  color: #e8d5b8;
  line-height: 1.9;
}

/* ---- LEGACY GRID ---- */
.legacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.legacy-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.legacy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #a0321e, #f5c842);
}

.legacy-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(160,50,30,0.18);
}

.legacy-num {
  font-size: 3rem;
  font-weight: 900;
  color: rgba(160,50,30,0.1);
  position: absolute;
  top: 10px;
  right: 16px;
  line-height: 1;
  font-family: 'Inter', sans-serif;
}

.legacy-card h3 {
  font-family: 'Noto Serif Tamil', serif;
  font-size: 1.1rem;
  color: #7b1c1c;
  margin-bottom: 12px;
  font-weight: 700;
  line-height: 1.4;
  padding-right: 40px;
}

.legacy-card p {
  font-size: 0.95rem;
  color: #3a2010;
  line-height: 1.9;
}

/* Sources footer */
.sources {
  margin-top: 10px;
  font-size: 0.78rem;
  color: #8a6040;
}

.sources a {
  color: #c0a080;
  text-decoration: none;
}

.sources a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .know-section-head h2 { font-size: 1.5rem; }
  .know-grid, .legacy-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 28px; }
  .timeline-dot { left: -22px; }
  .knowledge-section { padding: 44px 16px; }
}

/* ============================================================
   TAB SYSTEM
   ============================================================ */

/* Hide all panels by default */
.tab-panel {
  display: none;
}

/* Show only the active panel */
.tab-panel.tab-active {
  display: block;
}

/* Active nav tab style */
.main-nav a.nav-active {
  background: #7b1c1c;
  color: #fff !important;
  border-bottom-color: #f5c842 !important;
}

/* Ensure org sections fill properly when shown as tabs */
.tab-panel.content-section {
  padding: 56px 24px;
  max-width: 100%;
}

.tab-panel.content-section .section-inner {
  max-width: 900px;
  margin: 0 auto;
}

/* Contact panel when shown as tab */
.tab-panel.contact-section {
  display: none;
}
.tab-panel.contact-section.tab-active {
  display: block;
}
