/*
Theme Name: EPT Theme
Theme URI: https://eranpars.ir
Author: Eran Pars Tabarestan Institute
Author URI: https://eranpars.ir
Description: Official theme for Eran Pars Tabarestan Scientific & Educational Institute
Version: 5.11.0
License: GNU General Public License v2 or later
Text Domain: ept-theme
*/

@font-face {
  font-family: 'Iran Nastaliq';
  src: url('https://eranpars.ir/wp-content/themes/ept-theme/fonts/IranNastaliq.woff2') format('woff2'),
       url('https://eranpars.ir/wp-content/themes/ept-theme/fonts/IranNastaliq.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --jade: #2D6A4F;
  --jade-light: #40916C;
  --jade-pale: #D8F3DC;
  --gold: #C9A84C;
  --gold-light: #E0C068;
  --gold-muted: #F0DFA0;
  --cream: #FAF6EF;
  --cream-dark: #F0E8D8;
  --ink: #1C1C1C;
  --ink-soft: #4A4A4A;
  --white: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--cream);
  color: var(--ink);
  direction: rtl;
}

/* ── ENGLISH MODE ── */
body.lang-en { direction: ltr; }

/* ── LANGUAGE TOGGLE ── */
[data-en] { display: none !important; }
body.lang-en [data-fa] { display: none !important; }
body.lang-en [data-en] { display: revert !important; }

/* ── SECTION LABEL ── */
.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}
.section-label::before, .section-label::after {
  content: '';
  display: inline-block;
  width: 30px; height: 1px;
  background: var(--gold);
}

/* ── NAVBAR ── */
nav {
  position: fixed; top: 0; right: 0; left: 0; z-index: 1000;
  background: rgba(250, 246, 239, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cream-dark);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 0.5rem;
}

.nav-logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; flex-shrink: 0; }
.nav-logo img, .nav-logo-img, .custom-logo { height: 38px !important; width: 38px !important; object-fit: contain !important; flex-shrink: 0; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; flex-shrink: 0; }
.nav-logo-name { font-size: 0.85rem; font-weight: 700; color: var(--jade); white-space: nowrap; font-family: 'Vazirmatn', sans-serif; }
.nav-logo .nav-sub { font-size: 0.58rem; color: var(--gold); letter-spacing: 0.05em; font-family: 'Vazirmatn', sans-serif; white-space: nowrap; }

.nav-links { display: flex; gap: 0; list-style: none; align-items: center; flex-shrink: 1; min-width: 0; }
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: block; padding: 0 0.6rem; height: 68px;
  line-height: 68px;
  font-size: 0.85rem; color: var(--ink-soft); text-decoration: none;
  transition: color 0.2s; white-space: nowrap;
  font-family: 'Vazirmatn', sans-serif;
}
.nav-links > li:hover > a { color: var(--jade); }
.nav-links > li > a.has-sub::after { content: ' ▾'; font-size: 0.65rem; opacity: 0.6; }

.nav-links li:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown {
  position: absolute; top: 68px; right: 0;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-top: 2px solid var(--gold);
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s; z-index: 1100;
}
body.lang-en .dropdown { right: auto; left: 0; }
.dropdown a {
  display: block; padding: 0.7rem 1.2rem;
  font-size: 0.8rem; color: var(--ink-soft);
  text-decoration: none; border-bottom: 1px solid var(--cream-dark);
  transition: background 0.15s, color 0.15s;
  font-family: 'Vazirmatn', sans-serif;
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: var(--cream); color: var(--jade); }

.nav-lang {
  font-size: 0.75rem; color: var(--gold);
  cursor: pointer; border: 1px solid var(--gold);
  padding: 4px 10px; border-radius: 2px;
  letter-spacing: 0.05em; margin-right: 1rem;
  font-family: 'Vazirmatn', sans-serif;
  transition: all 0.2s; user-select: none;
}
body.lang-en .nav-lang { margin-right: 0; margin-left: 1rem; }
.nav-lang:hover { background: var(--gold); color: var(--white); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  background: var(--jade);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding-top: 68px;
}
.hero-pattern {
  position: absolute; inset: 0; opacity: 0.07;
  background-image:
    radial-gradient(circle at 20% 50%, var(--gold-light) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, var(--gold-light) 0%, transparent 40%);
}
.hero-arabesque {
  position: absolute; inset: 0; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 5 L55 30 L30 55 L5 30 Z' fill='none' stroke='%23C9A84C' stroke-width='0.8'/%3E%3Ccircle cx='30' cy='30' r='8' fill='none' stroke='%23C9A84C' stroke-width='0.5'/%3E%3Cpath d='M30 5 L30 22 M55 30 L38 30 M30 55 L30 38 M5 30 L22 30' stroke='%23C9A84C' stroke-width='0.5'/%3E%3C/svg%3E");
}
.hero-content {
  position: relative; z-index: 1;
  text-align: center; padding: 2rem; max-width: 850px;
}
.hero-eyebrow {
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.9rem; letter-spacing: 0.15em;
  color: var(--gold-light); margin-bottom: 1.5rem;
}
.hero-title {
  font-family: 'Vazirmatn', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700; line-height: 1.4;
  color: var(--white); margin-bottom: 0.5rem;
  white-space: normal;
}
.hero-title-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  font-weight: 300; font-style: italic;
  color: var(--gold-light); margin-bottom: 2rem; letter-spacing: 0.05em;
}
.hero-verse {
  font-family: 'Iran Nastaliq', serif;
  font-size: 1.6rem; color: rgba(255,255,255,0.75);
  line-height: 2.2; margin-bottom: 2.5rem;
  border-right: 2px solid var(--gold);
  padding-right: 1rem; text-align: right;
  max-width: 420px; margin-right: auto; margin-left: auto;
}
.hero-verse span,
.hero-verse * {
  font-family: 'Iran Nastaliq', serif !important;
}
body.lang-en .hero-verse {
  border-right: none; border-left: 2px solid var(--gold);
  padding-right: 0; padding-left: 1rem; text-align: left;
}
.hero-cta {
  display: inline-block; padding: 0.85rem 2.5rem;
  background: transparent; border: 1.5px solid var(--gold);
  color: var(--gold); text-decoration: none; font-size: 0.85rem;
  letter-spacing: 0.1em; transition: all 0.3s;
  font-family: 'Vazirmatn', sans-serif !important;
}
.hero-cta:hover { background: var(--gold); color: var(--jade); }

/* ── SECTIONS COMMON ── */
section { padding: 5rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700; color: var(--jade);
  margin-bottom: 0.5rem; line-height: 1.3;
  font-family: 'Vazirmatn', sans-serif;
}
.section-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem; color: var(--gold);
  font-style: italic; margin-bottom: 1.5rem;
}

/* ── ABOUT ── */
#about { background: var(--white); border-top: 3px solid var(--gold); }
.about-inner { display: grid; grid-template-columns: 1fr 1.6fr; gap: 4rem; align-items: center; }
.about-deco { position: relative; display: flex; align-items: center; justify-content: center; }
.about-deco-box { width: 320px; height: 320px; border: 4px solid var(--gold); position: relative; }
.about-deco-inner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 5rem; opacity: 0.15; color: var(--jade); }
.about-text p { font-size: 0.95rem; line-height: 2; color: var(--ink-soft); margin-bottom: 1rem; text-align: justify; }
.about-stats { display: flex; gap: 2rem; margin-top: 2rem; border-top: 1px solid var(--cream-dark); padding-top: 1.5rem; }
.stat { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--jade); line-height: 1; font-family: 'Vazirmatn', sans-serif; }
.stat-label { font-size: 0.75rem; color: var(--gold); margin-top: 4px; font-family: 'Vazirmatn', sans-serif; }

/* ── EDUCATION ── */
#education { background: var(--cream); }
.dept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.dept-card {
  background: var(--white); border: 1px solid var(--cream-dark);
  border-top: 3px solid var(--jade); padding: 2rem 1.5rem;
  transition: box-shadow 0.25s, transform 0.25s; cursor: pointer;
}
.dept-card:hover { box-shadow: 0 8px 32px rgba(45,106,79,0.12); transform: translateY(-4px); }
.dept-icon { font-size: 2rem; margin-bottom: 1rem; }
.dept-title { font-size: 1.05rem; font-weight: 700; color: var(--jade); margin-bottom: 0.5rem; font-family: 'Vazirmatn', sans-serif; }
.dept-title-en { font-size: 0.8rem; color: var(--gold); font-family: 'Cormorant Garamond', serif; font-style: italic; margin-bottom: 0.8rem; }
.dept-desc { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.8; text-align: justify; font-family: 'Vazirmatn', sans-serif; }

/* ── RESEARCH ── */
#research { background: var(--jade); }
#research .section-title { color: var(--white); }
#research .section-subtitle { color: var(--gold-light); }
#research .section-label { color: var(--gold-light); }
#research .section-label::before, #research .section-label::after { background: var(--gold-light); }
.workshop-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.workshop-item {
  display: flex; align-items: flex-start; gap: 1.5rem;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(201,168,76,0.3);
  padding: 1.5rem; transition: background 0.2s; cursor: pointer;
}
.workshop-item:hover { background: rgba(255,255,255,0.12); }
.workshop-num { font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: var(--gold); line-height: 1; min-width: 40px; font-style: italic; }
.workshop-info h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 4px; font-family: 'Vazirmatn', sans-serif; }
.workshop-info p { color: rgba(255,255,255,0.55); font-size: 0.8rem; line-height: 1.7; text-align: justify; font-family: 'Vazirmatn', sans-serif; }
.workshop-badge { margin-right: auto; padding: 3px 10px; border: 1px solid var(--gold); color: var(--gold); font-size: 0.7rem; white-space: nowrap; align-self: flex-start; margin-top: 2px; font-family: 'Cormorant Garamond', serif; }
body.lang-en .workshop-badge { margin-right: 0; margin-left: auto; }

/* ── CULTURE ── */
#culture { background: var(--cream-dark); }
.culture-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.culture-card { background: var(--white); padding: 2.5rem 2rem; border-bottom: 3px solid var(--gold); position: relative; overflow: hidden; }
.culture-card::before { content: ''; position: absolute; top: -20px; left: -20px; width: 100px; height: 100px; border: 1px solid var(--jade-pale); border-radius: 50%; opacity: 0.5; }
.culture-card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.culture-card h3 { font-size: 1.3rem; color: var(--jade); margin-bottom: 0.4rem; font-family: 'Vazirmatn', sans-serif; }
.culture-card h3 small { display: block; font-family: 'Cormorant Garamond', serif; font-size: 0.85rem; color: var(--gold); font-weight: 400; font-style: italic; }
.culture-card p { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.9; margin-top: 0.8rem; text-align: justify; font-family: 'Vazirmatn', sans-serif; }
.culture-verse {
  margin-top: 1.2rem; padding: 1rem;
  background: var(--cream); border-right: 2px solid var(--gold);
  font-family: 'Iran Nastaliq', serif;
  font-size: 1rem; color: var(--jade); line-height: 2.2;
}
.culture-verse * { font-family: 'Iran Nastaliq', serif !important; }
body.lang-en .culture-verse { border-right: none; border-left: 2px solid var(--gold); }
.culture-link { display: inline-block; margin-top: 1.2rem; color: var(--jade); font-size: 0.8rem; border-bottom: 1px solid var(--jade-pale); padding-bottom: 2px; text-decoration: none; transition: border-color 0.2s; font-family: 'Vazirmatn', sans-serif; }
.culture-link:hover { border-color: var(--jade); }

/* ── NEWSLETTER ── */
#newsletter { background: var(--gold); text-align: center; padding: 4rem 2rem; }
#newsletter .section-title { color: var(--jade); }
#newsletter .section-subtitle { color: var(--jade-light); }
#newsletter .section-label { color: var(--jade); justify-content: center; }
#newsletter .section-label::before, #newsletter .section-label::after { background: var(--jade); }
#newsletter > .container > p { color: var(--jade); font-size: 0.9rem; margin-bottom: 2rem; }
.newsletter-form { display: flex; max-width: 480px; margin: 0 auto; gap: 0; }
.newsletter-form input { flex: 1; padding: 0.85rem 1rem; border: 2px solid var(--jade); border-left: none; background: var(--white); font-family: 'Vazirmatn', sans-serif; font-size: 0.85rem; outline: none; direction: rtl; }
body.lang-en .newsletter-form input { direction: ltr; border-left: 2px solid var(--jade); border-right: none; }
.newsletter-form button { padding: 0.85rem 1.5rem; background: var(--jade); color: var(--white); border: 2px solid var(--jade); cursor: pointer; font-family: 'Vazirmatn', sans-serif; font-size: 0.85rem; white-space: nowrap; transition: background 0.2s; }
.newsletter-form button:hover { background: var(--jade-light); border-color: var(--jade-light); }

/* ── COLLABORATE ── */
#collaborate { background: var(--white); }
.collab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.collab-item { padding: 1.8rem 1.5rem; border: 1px solid var(--cream-dark); text-align: center; transition: border-color 0.2s; }
.collab-item:hover { border-color: var(--jade); }
.collab-item .icon { font-size: 2rem; margin-bottom: 0.8rem; }
.collab-item h4 { font-size: 0.95rem; color: var(--jade); margin-bottom: 0.5rem; font-family: 'Vazirmatn', sans-serif; }
.collab-item p { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.8; text-align: justify; font-family: 'Vazirmatn', sans-serif; }

/* ── CONTACT ── */
#contact { background: var(--cream); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; margin-top: 2rem; }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item-icon { width: 40px; height: 40px; min-width: 40px; background: var(--jade); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.contact-item-text h5 { font-size: 0.8rem; color: var(--gold); margin-bottom: 3px; font-family: 'Vazirmatn', sans-serif; }
.contact-item-text p { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.6; font-family: 'Vazirmatn', sans-serif; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form input, .contact-form textarea { padding: 0.8rem 1rem; border: 1px solid var(--cream-dark); background: var(--white); font-family: 'Vazirmatn', sans-serif; font-size: 0.85rem; outline: none; direction: rtl; transition: border-color 0.2s; }
body.lang-en .contact-form input, body.lang-en .contact-form textarea { direction: ltr; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--jade); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form button { padding: 0.9rem; background: var(--jade); color: var(--white); border: none; cursor: pointer; font-family: 'Vazirmatn', sans-serif; font-size: 0.9rem; font-weight: 500; transition: background 0.2s; }
.contact-form button:hover { background: var(--jade-light); }

/* ── PAYMENT ── */
#payment { background: var(--jade); text-align: center; padding: 5rem 2rem; }
#payment .section-title { color: var(--white); }
#payment .section-subtitle { color: var(--gold-light); }
#payment .section-label { color: var(--gold-light); justify-content: center; }
#payment .section-label::before, #payment .section-label::after { background: var(--gold-light); }
#payment > .container > p { color: rgba(255,255,255,0.7); font-size: 0.9rem; max-width: 500px; margin: 0 auto 2rem; line-height: 2; }
.payment-options { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.payment-opt { background: rgba(255,255,255,0.08); border: 1px solid rgba(201,168,76,0.4); padding: 1.2rem 2rem; text-align: center; min-width: 150px; cursor: pointer; transition: background 0.2s; }
.payment-opt:hover { background: rgba(255,255,255,0.15); }
.payment-opt .p-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.payment-opt p { color: var(--white); font-size: 0.8rem; margin: 0; }
.payment-cta { display: inline-block; padding: 1rem 3rem; background: var(--gold); color: var(--jade); font-weight: 700; text-decoration: none; font-size: 0.95rem; transition: background 0.2s; border: none; cursor: pointer; font-family: 'Vazirmatn', sans-serif; }
.payment-cta:hover { background: var(--gold-light); }

/* ── FOOTER ── */
footer { background: #0F2018; color: rgba(255,255,255,0.5); padding: 2.5rem 2rem; text-align: center; font-size: 0.78rem; line-height: 2; }
footer .footer-logo { color: var(--gold); font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; font-family: 'Vazirmatn', sans-serif; }
footer .footer-en { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 0.85rem; color: rgba(255,255,255,0.3); }

/* ── HAMBURGER ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  cursor: pointer;
  padding: 4px;
  margin-right: 0.5rem;
  border: none; background: none;
}
body.lang-en .nav-hamburger { margin-right: 0; margin-left: 0.5rem; }
.nav-hamburger span {
  display: block; width: 100%; height: 2px;
  background: var(--jade);
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE DRAWER ── */
.nav-mobile-drawer {
  display: none;
  position: fixed;
  top: 68px; right: 0; left: 0;
  background: var(--white);
  border-bottom: 2px solid var(--gold);
  z-index: 999;
  max-height: calc(100vh - 68px);
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.nav-mobile-drawer.open { display: block; }
body.lang-en .nav-mobile-drawer { direction: ltr; }
.nav-mobile-drawer a {
  display: block; padding: 0.9rem 1.5rem;
  font-size: 0.9rem; color: var(--ink-soft);
  text-decoration: none; border-bottom: 1px solid var(--cream-dark);
  transition: background 0.15s, color 0.15s;
  font-family: 'Vazirmatn', sans-serif;
}
.nav-mobile-drawer a:hover { background: var(--cream); color: var(--jade); }
.nav-mobile-drawer .mobile-section-header {
  padding: 0.9rem 1.5rem;
  font-size: 0.75rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--gold);
  background: var(--cream); border-bottom: 1px solid var(--cream-dark);
  font-family: 'Cormorant Garamond', serif;
}
.nav-mobile-drawer .mobile-sub a { padding-right: 2.5rem; font-size: 0.82rem; }
body.lang-en .nav-mobile-drawer .mobile-sub a { padding-right: 1.5rem; padding-left: 2.5rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .about-inner, .culture-grid, .contact-grid { grid-template-columns: 1fr; }
  .dept-grid, .collab-grid { grid-template-columns: 1fr; }
  .about-deco { display: none; }
  .hero-title { white-space: normal; }
}
.about-deco-box .custom-logo-link { display:block; width:100%; height:100%; }
.about-deco-box .custom-logo { width:100% !important; height:100% !important; object-fit:cover !important; display:block; }