/*
Theme Name: KFU PhD Direct
Theme URI: https://kfu.edu.sa
Author: جامعة الملك فيصل
Description: موقع برنامج الدكتوراه المباشر بعد البكالوريوس - جامعة الملك فيصل
Version: 1.0
Text Domain: kfu-phd
*/

/* =============================================
   المتغيرات الأساسية
============================================= */
:root {
  --primary: #006B3F;
  --primary-dark: #004D2C;
  --primary-light: #008C52;
  --gold: #C8972B;
  --gold-light: #E5B84A;
  --white: #FFFFFF;
  --off-white: #F8F6F1;
  --text-dark: #1A1A2E;
  --text-mid: #3D3D5C;
  --text-light: #6B6B8A;
  --border: #E2DDD5;
  --shadow: 0 4px 24px rgba(0,107,63,0.10);
  --shadow-lg: 0 12px 48px rgba(0,107,63,0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s 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: 'Tajawal', 'Segoe UI', Arial, sans-serif;
  background: var(--white);
  color: var(--text-dark);
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; display: block; }

ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding: 80px 0;
}

/* =============================================
   الخطوط
============================================= */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* =============================================
   البانر العلوي - آخر يوم للتقديم
============================================= */
.urgent-banner {
  background: linear-gradient(135deg, var(--gold) 0%, #A67820 100%);
  color: var(--white);
  text-align: center;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  position: relative;
  z-index: 1000;
  letter-spacing: 0.3px;
}

.urgent-banner .pulse {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  margin-left: 8px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* =============================================
   الهيدر
============================================= */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-emblem {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-emblem svg {
  width: 30px;
  height: 30px;
  fill: var(--white);
}

.logo-text .university-name {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
  line-height: 1.2;
}

.logo-text .program-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
}

.main-nav ul {
  display: flex;
  gap: 32px;
  align-items: center;
}

.main-nav a {
  color: var(--text-mid);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 0;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.main-nav a:hover::after { width: 100%; }
.main-nav a:hover { color: var(--primary); }

.header-cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 10px 24px !important;
  border-radius: 8px;
  font-weight: 700 !important;
  transition: var(--transition);
}

.header-cta:hover {
  background: var(--primary-dark) !important;
  color: var(--white) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.header-cta::after { display: none !important; }

/* موبايل ناف */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* =============================================
   القسم الرئيسي (Hero)
============================================= */
.hero {
  background: linear-gradient(150deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
  color: var(--white);
}

.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.04'%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::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--white);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--gold-light);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 20px;
  color: var(--white);
}

.hero h1 .highlight {
  color: var(--gold-light);
  display: block;
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  line-height: 1.8;
}

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

.btn-primary {
  background: var(--gold);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

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

.btn-outline {
  background: transparent;
  color: var(--white);
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.5);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  color: var(--white);
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

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

.stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

/* =============================================
   شريط المزايا السريعة
============================================= */
.quick-features {
  background: var(--off-white);
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white);
  font-size: 1.3rem;
}

.feature-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.feature-text span {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* =============================================
   قسم البرنامج
============================================= */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  background: rgba(0,107,63,0.1);
  color: var(--primary);
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 14px;
  line-height: 1.3;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.8;
}

/* =============================================
   التخصصات
============================================= */
.specializations {
  background: var(--white);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.spec-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.spec-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 0;
  background: var(--primary);
  transition: var(--transition);
}

.spec-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.spec-card:hover::before { height: 100%; }

.spec-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.spec-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.spec-card p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 20px;
}

.spec-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--off-white);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* =============================================
   طريقة الدراسة
============================================= */
.study-method {
  background: var(--off-white);
}

.method-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.method-visual {
  position: relative;
}

.timeline {
  position: relative;
  padding-right: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  right: 11px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--gold));
}

.timeline-item {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  align-items: flex-start;
  position: relative;
}

.timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  margin-top: 2px;
}

.timeline-item:last-child .timeline-dot {
  background: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}

.timeline-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  flex: 1;
  box-shadow: var(--shadow);
}

.timeline-content .phase {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.timeline-content p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
}

.method-info h3 {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.method-info p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 28px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info-item .check {
  width: 28px;
  height: 28px;
  background: rgba(0,107,63,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 900;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.info-item div strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.info-item div span {
  font-size: 0.83rem;
  color: var(--text-light);
}

/* =============================================
   الرسوم الدراسية
============================================= */
.fees {
  background: var(--white);
}

.fees-card {
  max-width: 700px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.fees-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(200,151,43,0.15) 0%, transparent 60%);
}

.fees-card .label {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
  position: relative;
}

.fees-card .price {
  font-size: 4rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 8px;
  position: relative;
}

.fees-card .price-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 36px;
  position: relative;
}

.fees-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
  position: relative;
}

.fees-breakdown-item {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.15);
}

.fees-breakdown-item .num {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 4px;
}

.fees-breakdown-item .desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

.fees-card .btn-primary {
  background: var(--gold);
  font-size: 1.05rem;
  padding: 16px 40px;
  position: relative;
}

/* =============================================
   الأسئلة الشائعة
============================================= */
.faq {
  background: var(--off-white);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover { border-color: var(--primary); }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  transition: var(--transition);
}

.faq-question:hover { color: var(--primary); }

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  transition: var(--transition);
  color: var(--primary);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  background: var(--primary);
  color: var(--white);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 28px;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 28px 22px;
}

.faq-answer p {
  color: var(--text-light);
  line-height: 1.8;
  font-size: 0.93rem;
}

/* =============================================
   قسم التقديم
============================================= */
.apply-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 80px 0;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.apply-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M20 0L40 20L20 40L0 20z'/%3E%3C/g%3E%3C/svg%3E");
}

.apply-section .container { position: relative; z-index: 1; }

.apply-section h2 {
  font-size: 2.4rem;
  font-weight: 900;
  margin-bottom: 16px;
}

.apply-section p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  max-width: 500px;
  margin-right: auto;
  margin-left: auto;
}

.apply-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =============================================
   الفوتر
============================================= */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo-text .university-name { color: rgba(255,255,255,0.5); }
.footer-brand .logo-text .program-name { color: var(--white); }

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.8;
  margin-top: 16px;
  color: rgba(255,255,255,0.55);
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: rgba(255,255,255,0.55);
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-col a:hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.83rem;
}

.footer-bottom a { color: var(--gold-light); }

/* =============================================
   ريسبونسف
============================================= */
@media (max-width: 1024px) {
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 2.2rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .method-layout { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .fees-breakdown { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .main-nav { display: none; }
  .main-nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; right: 0; left: 0; background: var(--white); padding: 24px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .nav-toggle { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .features-grid { grid-template-columns: 1fr; }
  .section-padding { padding: 56px 0; }
  .hero { padding: 60px 0 60px; }
  .fees-card { padding: 36px 24px; }
  .fees-card .price { font-size: 3rem; }
}
