/* ============================================
   StudyInUA — Global Stylesheet
   Design: Editorial / Premium Academic
   Fonts: Playfair Display + DM Sans
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --navy:    #0A1628;
  --blue:    #1B4FD8;
  --gold:    #E8A020;
  --cream:   #FAF7F2;
  --white:   #FFFFFF;
  --gray:    #6B7280;
  --light:   #F0F4FF;
  --border:  #E5E7EB;
  --success: #16A34A;
  --wa-green:#25D366;
  --shadow:  0 4px 24px rgba(10,22,40,0.10);
  --shadow-lg: 0 12px 48px rgba(10,22,40,0.16);
  --radius:  12px;
  --radius-lg:20px;
  --transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- TYPOGRAPHY ---- */
h1,h2,h3,h4 { font-family: 'Playfair Display', serif; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { color: #374151; font-size: 1.05rem; }
a  { color: var(--blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }

/* ---- LAYOUT ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--bg { background: var(--cream); }
.section--navy { background: var(--navy); color: var(--white); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* ---- TOPBAR ---- */
.topbar {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  padding: 8px 0;
}
.topbar a { color: var(--gold); font-weight: 600; }
.topbar .topbar-inner { display: flex; justify-content: space-between; align-items: center; }
.lang-switcher { display: flex; gap: 10px; }
.lang-switcher a {
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: var(--transition);
}
.lang-switcher a:hover, .lang-switcher a.active {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

/* ---- HEADER / NAV ---- */
.header {
  background: var(--white);
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(10,22,40,0.06);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.2rem; font-family: 'Playfair Display', serif; font-weight: 900;
}
.logo-text { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.3rem; color: var(--navy); }
.logo-text span { color: var(--blue); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: var(--navy); font-size: 0.92rem; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; transition: var(--transition);
}
.nav-links a:hover { background: var(--light); color: var(--blue); }
.nav-links .dropdown { position: relative; }
.nav-links .dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 220px; padding: 8px; display: none; z-index: 100;
}
.nav-links .dropdown:hover .dropdown-menu { display: block; }
.nav-links .dropdown-menu a { display: block; padding: 9px 14px; border-radius: 8px; font-size: 0.88rem; }
.nav-cta {
  background: var(--wa-green); color: white !important;
  padding: 10px 20px !important; border-radius: 50px !important;
  font-weight: 600 !important; display: flex; align-items: center; gap: 6px;
}
.nav-cta:hover { background: #1ebe5a !important; transform: translateY(-1px); }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: var(--transition); }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #162040 40%, #1a3a6e 100%);
  color: var(--white);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: var(--gold); font-size: 0.85rem; font-weight: 600;
  padding: 6px 16px; border-radius: 50px; margin-bottom: 24px;
  backdrop-filter: blur(8px);
}
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,0.8); max-width: 560px; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 40px; margin-top: 56px; padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.15);
  flex-wrap: wrap;
}
.hero-stat-num { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 900; color: var(--gold); }
.hero-stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.65); margin-top: 2px; }
.hero-image-col {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.hero-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%; max-width: 380px;
}
.hero-card h3 { color: white; margin-bottom: 20px; font-size: 1.2rem; }
.hero-card-field {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 12px;
  color: rgba(255,255,255,0.7); font-size: 0.9rem; cursor: default;
  display: flex; align-items: center; gap: 10px;
}
.hero-card-field span { font-size: 1.1rem; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 50px;
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: none; transition: var(--transition); text-decoration: none;
}
.btn-primary {
  background: var(--blue); color: white;
}
.btn-primary:hover { background: #1440b0; color: white; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(27,79,216,0.35); }
.btn-gold {
  background: var(--gold); color: var(--navy);
}
.btn-gold:hover { background: #d48f0e; color: var(--navy); transform: translateY(-2px); }
.btn-outline {
  background: transparent; color: white;
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); color: white; border-color: white; }
.btn-wa {
  background: var(--wa-green); color: white;
}
.btn-wa:hover { background: #1ebe5a; color: white; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,0.35); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ---- SECTION HEADINGS ---- */
.section-label {
  display: inline-block;
  background: var(--light); color: var(--blue);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 50px; margin-bottom: 14px;
}
.section-title { margin-bottom: 16px; }
.section-subtitle { color: var(--gray); font-size: 1.05rem; max-width: 560px; }

/* ---- CARDS ---- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  height: 100%;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--blue); }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--light); display: flex; align-items: center;
  justify-content: center; font-size: 1.5rem; margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.card p { font-size: 0.92rem; color: var(--gray); }

/* ---- UNIVERSITY CARD ---- */
.uni-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.uni-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.uni-card-top {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  padding: 24px; color: white;
  display: flex; align-items: center; gap: 16px;
}
.uni-logo {
  width: 56px; height: 56px; border-radius: 12px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.uni-card-top h3 { font-size: 1rem; margin-bottom: 4px; }
.uni-card-top p { font-size: 0.82rem; opacity: 0.75; }
.uni-card-body { padding: 20px; }
.uni-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag {
  background: var(--light); color: var(--blue);
  font-size: 0.75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 50px;
}
.uni-meta { display: flex; justify-content: space-between; align-items: center; }
.uni-fee { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.uni-fee small { font-family: 'DM Sans', sans-serif; font-size: 0.75rem; color: var(--gray); font-weight: 400; }

/* ---- PROGRAM CARD ---- */
.prog-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  display: flex; gap: 18px; align-items: flex-start;
  transition: var(--transition);
}
.prog-card:hover { box-shadow: var(--shadow); border-color: var(--blue); }
.prog-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--light); display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.prog-card h4 { margin-bottom: 4px; }
.prog-card p { font-size: 0.88rem; color: var(--gray); }
.prog-card-meta { display: flex; gap: 12px; margin-top: 10px; }
.prog-meta-item { font-size: 0.78rem; color: var(--gray); display: flex; align-items: center; gap: 4px; }

/* ---- CITY CARD ---- */
.city-card {
  border-radius: var(--radius-lg); overflow: hidden;
  position: relative; cursor: pointer;
  transition: var(--transition); min-height: 200px;
  display: flex; align-items: flex-end;
}
.city-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.city-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.city-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,22,40,0.85) 0%, rgba(10,22,40,0.1) 60%);
}
.city-info { position: relative; z-index: 1; padding: 20px; color: white; width: 100%; }
.city-info h3 { font-size: 1.2rem; margin-bottom: 4px; }
.city-info p { font-size: 0.82rem; opacity: 0.8; }

/* ---- STEPS ---- */
.step {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 24px; background: var(--white);
  border-radius: var(--radius-lg); border: 1px solid var(--border);
}
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700;
  flex-shrink: 0;
}
.step h4 { margin-bottom: 6px; }
.step p { font-size: 0.9rem; color: var(--gray); }

/* ---- TESTIMONIALS ---- */
.testimonial {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
}
.testimonial-text { font-size: 0.95rem; color: #374151; line-height: 1.7; margin-bottom: 20px; font-style: italic; }
.testimonial-text::before { content: '"'; font-size: 2rem; color: var(--blue); line-height: 0; vertical-align: -0.5rem; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
}
.testimonial-name { font-weight: 600; font-size: 0.9rem; }
.testimonial-country { font-size: 0.8rem; color: var(--gray); }
.stars { color: var(--gold); font-size: 0.85rem; letter-spacing: 2px; margin-bottom: 12px; }

/* ---- FAQ ---- */
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 12px;
}
.faq-q {
  padding: 18px 22px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 0.95rem;
  background: var(--white); transition: var(--transition);
}
.faq-q:hover { background: var(--light); }
.faq-q.open { background: var(--light); color: var(--blue); }
.faq-a {
  padding: 0 22px; max-height: 0; overflow: hidden;
  transition: all 0.3s ease; font-size: 0.92rem; color: var(--gray);
}
.faq-a.open { padding: 16px 22px; max-height: 300px; }
.faq-icon { font-size: 1.2rem; transition: var(--transition); }
.faq-q.open .faq-icon { transform: rotate(45deg); }

/* ---- WHATSAPP FLOAT ---- */
.wa-float {
  position: fixed; bottom: 28px; right: 28px;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa-green);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  z-index: 9999; cursor: pointer; transition: var(--transition);
  animation: wa-pulse 2.5s infinite;
}
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 32px; height: 32px; fill: white; }
@keyframes wa-pulse {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,0.5); }
  50% { box-shadow: 0 4px 32px rgba(37,211,102,0.8), 0 0 0 12px rgba(37,211,102,0.1); }
}
.wa-float-label {
  position: absolute; right: 72px; top: 50%; transform: translateY(-50%);
  background: var(--navy); color: white; font-size: 0.82rem; font-weight: 600;
  padding: 6px 12px; border-radius: 8px; white-space: nowrap;
  opacity: 0; transition: var(--transition); pointer-events: none;
}
.wa-float:hover .wa-float-label { opacity: 1; }

/* ---- CTA BANNER ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
  border-radius: var(--radius-lg); padding: 60px 48px;
  color: white; position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ''; position: absolute; top: -50px; right: -50px;
  width: 250px; height: 250px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.cta-banner h2 { color: white; margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,0.8); margin-bottom: 28px; }
.cta-banner .flex { gap: 16px; flex-wrap: wrap; }

/* ---- BREADCRUMB ---- */
.breadcrumb {
  background: var(--light); padding: 14px 0;
  font-size: 0.85rem;
}
.breadcrumb a { color: var(--blue); }
.breadcrumb span { color: var(--gray); margin: 0 8px; }

/* ---- FOOTER ---- */
.footer { background: var(--navy); color: rgba(255,255,255,0.75); padding: 64px 0 0; }
.footer h4 { color: white; font-size: 0.95rem; margin-bottom: 18px; font-family: 'DM Sans', sans-serif; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.65); font-size: 0.88rem; transition: var(--transition); }
.footer-links a:hover { color: var(--gold); padding-left: 4px; }
.footer-logo { margin-bottom: 16px; }
.footer-desc { font-size: 0.88rem; line-height: 1.7; max-width: 280px; margin-bottom: 20px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0; margin-top: 48px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: var(--gold); }
.social-links { display: flex; gap: 12px; }
.social-link {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.65); font-size: 0.9rem; transition: var(--transition);
}
.social-link:hover { background: var(--blue); color: white; border-color: var(--blue); }

/* ---- SEARCH BAR ---- */
.search-bar {
  display: flex; background: white; border-radius: 50px;
  padding: 6px 6px 6px 20px; gap: 8px;
  box-shadow: var(--shadow-lg); max-width: 560px; margin: 0 auto;
  border: 2px solid transparent;
  transition: var(--transition);
}
.search-bar:focus-within { border-color: var(--blue); }
.search-bar input {
  flex: 1; border: none; outline: none; font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; color: var(--navy);
}
.search-bar select {
  border: none; outline: none; background: var(--light);
  padding: 6px 12px; border-radius: 50px; font-size: 0.85rem;
  color: var(--navy); cursor: pointer;
}
.search-bar button { border-radius: 50px; flex-shrink: 0; }

/* ---- STATS BAR ---- */
.stats-bar {
  background: var(--navy); padding: 32px 0;
}
.stats-bar .stat { text-align: center; }
.stats-bar .stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem; font-weight: 900; color: var(--gold);
  display: block;
}
.stats-bar .stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.65); }

/* ---- TABLE ---- */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  background: var(--navy); color: white; padding: 14px 18px;
  text-align: left; font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em;
}
.data-table td { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: var(--light); }

/* ---- MOBILE ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: white; padding: 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); gap: 4px; }
  .hamburger { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 48px; }
  .hero-image-col { display: none; }
  .cta-banner { padding: 36px 24px; }
  .section { padding: 56px 0; }
  .topbar .topbar-inner { flex-direction: column; gap: 6px; text-align: center; }
  .hero-stats { gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .container { padding: 0 16px; }
  .btn { padding: 11px 20px; font-size: 0.88rem; }
  .wa-float { bottom: 18px; right: 18px; width: 52px; height: 52px; }
}

/* ---- RTL SUPPORT (Arabic) ---- */
[dir="rtl"] {
  text-align: right;
}
[dir="rtl"] .nav { flex-direction: row-reverse; }
[dir="rtl"] .footer-links a:hover { padding-left: 0; padding-right: 4px; }
[dir="rtl"] .step { flex-direction: row-reverse; }

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

/* ---- PRINT / MISC ---- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 700;
}
.badge-blue { background: var(--light); color: var(--blue); }
.badge-gold { background: #FEF3C7; color: #92400E; }
.badge-green { background: #D1FAE5; color: #065F46; }
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }
