/* ================= RESET ================= */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family:'Cairo',sans-serif;
  direction:rtl;
  background:#f5f6f8;
  color:#333;
  font-size:28px;
  line-height:1.8;
  overflow-x:hidden;
}

a{
  color:#2d6a4f;
}

/* ================= CONTAINER ================= */
.container{
  width:92%;
  margin:auto;
}

/* ================= HEADER ================= */
.main-header{
  background:#fff;
  padding:18px 0;
  border-bottom:3px solid #c9a94a;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.main-header.hidden{
  transform: translateY(-100%);
}

body{
  padding-top: 80px;
}

.header-container{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
}

/* ================= LOGO ================= */
.logo-link{
  display:flex;
  align-items:center;
  gap:15px;
  text-decoration:none;
  color:#2d6a4f;
}

.logo{
  width:110px;
  transition:0.3s;
}

.logo:hover{
  transform:scale(1.1);
}

/* ================= TITLE ================= */
.site-title{
  font-size:32px;
  font-weight:800;
  color:#2d6a4f;
}

.highlight{
  font-size:44px;
  font-weight:900;
  color:#2d6a4f;
}

/* ================= NAV ================= */
.left-section{
  display:flex;
  align-items:center;
  gap:20px;
}

.nav-menu ul{
  display:flex;
  list-style:none;
  gap:12px;
}

.nav-menu a{
  padding:12px 22px;
  background:#eee;
  border-radius:12px;
  text-decoration:none;
  color:#333;
  font-size:20px;
  transition:0.3s;
}

.nav-menu a:hover{
  background:#2d6a4f;
  color:#fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(45,106,79,0.3);
}

/* ================= SOCIAL ================= */
.social-icons{
  display:flex;
  gap:10px;
}

.social-icons a{
  width:45px;
  height:45px;
  font-size:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  color:#fff;
}

.social-icons a:nth-child(1){background:#1877f2;}
.social-icons a:nth-child(2){background:#ff0000;}
.social-icons a:nth-child(3){background:#25d366;}

.social-icons a:hover{
  transform:scale(1.2) translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* ================= HERO ================= */
.hero-box{
  background:#fff;
  padding:90px;
  border-radius:30px;
  text-align:center;
  margin:50px 0;
}

.hero-box h1{
   font-size:60px;
   color:#2d6a4f;
 }

.hero-box p{
  font-size:26px;
  color:#666;
}

/* ================= FEATURES ================= */
.features{
  display:flex;
  justify-content:center;
  gap:60px;
  flex-wrap:wrap;
}

.icon-box{
  width:160px;
  height:160px;
  background:linear-gradient(135deg,#c9a94a,#2d6a4f);
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:65px;
  color:#fff;
  margin:auto;
  margin-bottom:30px;
  animation: float 3s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.icon-box:hover{
  animation: none;
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 15px 40px rgba(45,106,79,0.4);
}

.feature-card{
  width:420px;
  background:#fff;
  padding:70px 35px;
  border-radius:35px;
  text-align:center;
  box-shadow:0 25px 50px rgba(0,0,0,0.1);
}

.feature-card h3{
  font-size:36px;
}

.feature-card p{
  font-size:24px;
}

/* ================= WHY ================= */
.why{
  background:#fff;
  padding:90px;
  border-radius:30px;
  margin-top:70px;
  text-align:center;
}

.why h2{
  font-size:48px;
  color:#2d6a4f;
}

.why-grid{
  display:flex;
  justify-content:center;
  gap:50px;
  flex-wrap:wrap;
}

.why-card{
  width:340px;
  padding:40px;
  border-radius:30px;
  background:#f9f9f9;
}

.why-card p{
  font-size:24px;
}

.why-card i{
  width:130px;
  height:130px;
  background:#2d6a4f;
  color:#fff;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:auto;
  margin-bottom:20px;
  font-size:45px;
  animation: float 3s ease-in-out infinite;
  transition: transform 0.3s, box-shadow 0.3s;
}

.why-card i:hover{
  animation: none;
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 15px 40px rgba(45,106,79,0.4);
}

/* ================= GALLERY FIX ================= */

.gallery{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(300px,1fr));
  gap:30px;
  margin:60px 0;
}

.gallery .img-box{
  width:100%;
  min-height: 250px;
  overflow:hidden;
  border-radius:15px;
  background:#fff;
  box-shadow:0 10px 25px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.gallery .img-box img{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  display:block;
  cursor:pointer;
  transition: transform 0.5s ease-in-out;
}

.gallery .img-box:hover img{
  animation: none;
  transform: scale(1.1);
}

.gallery .img-box img.error{
  display: none;
}

@keyframes slideLeftRight {
  0%, 100% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
}

/* ================= POPUP ================= */
#popup{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.95);
  display: none;
  justify-content:center;
  align-items:center;
  z-index: 10000;
  cursor: pointer;
}

#popup.show{
  display: flex;
  animation: fadeIn 0.3s ease;
}

#popup img{
  max-width:90%;
  max-height:90%;
  border-radius:15px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

#popup:empty{
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ================= FOOTER ================= */
.main-footer {
  background: #fff;
  border-top: 5px solid #1D9E75 !important;
  text-align: center;
  padding: 12px;
  margin-top: 25px;
}
.main-footer p {
  font-size: 14px;
}

/* ================= HEADER ================= */
.main-header {
  background: #ffffff;
  padding: 12px 0;
  border-bottom: 5px solid #1D9E75 !important;
  font-family: 'Cairo', sans-serif;
}

.footer-text span {
  font-size: 12px;
  color: #888;
  display: block;
  margin-top: 5px;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.fade-in {
  animation: fadeInUp 1s ease-out forwards;
  opacity: 0;
}

.hero-box.fade-in {
  animation-delay: 0.2s;
}

.feature-card.fade-in {
  animation-delay: 0.4s;
}

.feature-card.fade-in:nth-child(2) {
  animation-delay: 0.6s;
}

.feature-card.fade-in:nth-child(3) {
  animation-delay: 0.8s;
}

.why.fade-in {
  animation-delay: 1s;
}

.why-card {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: calc(1.2s + var(--delay, 0s));
}

.why-card:nth-child(1) { --delay: 0s; }
.why-card:nth-child(2) { --delay: 0.15s; }
.why-card:nth-child(3) { --delay: 0.3s; }
.why-card:nth-child(4) { --delay: 0.45s; }

.icon-box {
  animation: float 3s ease-in-out infinite;
}

.hero-box h1 {
  animation: fadeInDown 1s ease-out forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.hero-box p {
  animation: fadeInUp 1s ease-out forwards;
  animation-delay: 0.6s;
  opacity: 0;
}

.hero-section {
  padding: 60px 30px;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 25px;
  text-align: center;
  margin: 30px 0 50px;
  box-shadow: 0 15px 50px rgba(45,106,79,0.1);
}

.hero-section h1 {
  font-size: 42px;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease;
}

.hero-desc {
  font-size: 24px;
  color: #555;
  max-width: 800px;
  margin: 0 auto 30px;
  line-height: 1.8;
}

.hero-btn {
  display: inline-block;
  padding: 18px 45px;
  background: linear-gradient(45deg, #2d6a4f, #3d8b6f);
  color: #fff;
  font-size: 22px;
  border-radius: 50px;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 10px 30px rgba(45,106,79,0.3);
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(45,106,79,0.4);
}

.about-section, .features-section, .teachers-section {
  background: #fff;
  padding: 50px 40px;
  border-radius: 25px;
  margin: 50px 0;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.about-section h2, .features-section h2, .programs-section h2, .teachers-section h2 {
  font-size: 38px;
  text-align: center;
  margin-bottom: 25px;
}

.about-section p {
  font-size: 22px;
  text-align: center;
  line-height: 2;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature-item {
  padding: 35px 25px;
  background: linear-gradient(135deg, #f8f9fa, #fff);
  border-radius: 20px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 2px solid transparent;
}

.feature-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(45,106,79,0.15);
  border-color: #2d6a4f;
}

.feature-item i {
  font-size: 50px;
  margin-bottom: 20px;
}

.feature-item h3 {
  font-size: 26px;
  margin-bottom: 15px;
}

.feature-item p {
  font-size: 20px;
}

.programs-section {
  background: linear-gradient(135deg, #2d6a4f, #1d5a3f);
  padding: 50px 40px;
  border-radius: 25px;
  margin: 50px 0;
}

.programs-section h2 {
  color: #fff;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.program-card {
  background: rgba(255,255,255,0.1);
  padding: 35px;
  border-radius: 20px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: transform 0.3s;
}

.program-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.15);
}

.program-card h3 {
  font-size: 28px;
  margin-bottom: 15px;
  color: #fff;
}

.program-card p {
  font-size: 20px;
  color: #eee;
}

.teachers-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.teacher-card {
  text-align: center;
  padding: 30px;
}

.teacher-card i {
  font-size: 80px;
  margin-bottom: 20px;
}

.teacher-card h3 {
  font-size: 24px;
}

.stats-section {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  padding: 50px 40px;
  background: linear-gradient(135deg, #2d6a4f, #3d8b6f);
  border-radius: 25px;
  margin: 50px 0;
}

.stat-item {
  text-align: center;
}

.stat-item i {
  font-size: 60px;
  margin-bottom: 15px;
  color: #2d6a4f;
}

.stat-number {
  font-size: 50px;
  font-weight: bold;
}

.stat-item p {
  font-size: 22px;
  font-weight: bold;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.about-section.fade-in { animation-delay: 0.1s; }
.features-section.fade-in { animation-delay: 0.2s; }
.programs-section.fade-in { animation-delay: 0.3s; }
.teachers-section.fade-in { animation-delay: 0.4s; }
.stats-section.fade-in { animation-delay: 0.5s; }

/* ================= RESPONSIVE ================= */
@media(max-width:768px){
  .hero-section h1 { font-size: 32px; }
  .hero-desc { font-size: 20px; }
  .about-section h2, .features-section h2, .programs-section h2, .teachers-section h2 { font-size: 30px; }
  .stats-section { gap: 40px; }
  .stat-number { font-size: 36px; }
  .feature-card, .why-card { width: 100%; }
}