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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f4f8;
  color: #1e2a3e;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1300px;
  margin: auto;
}

/* Header */
header {
  background: #003366;
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo h1 {
  font-size: 1.6rem;
}

.logo span {
  color: #ffcc00;
}

.tagline {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Language Switch */
.lang-switch {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  background: transparent;
  border: 1px solid #ffcc00;
  color: #ffcc00;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: 0.3s;
}

.lang-btn.active {
  background: #ffcc00;
  color: #003366;
}

.lang-btn:hover {
  background: #ffcc00;
  color: #003366;
}

/* Navigation */
nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
}

nav ul li a:hover, nav ul li a.active {
  color: #ffcc00;
  border-bottom: 2px solid #ffcc00;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0055a5, #002244);
  color: white;
  text-align: center;
  padding: 2.5rem 0;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

/* Section Header - Title + Button on same line */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 1.5rem;
}

.section-header .section-title {
  margin: 0;
  flex: 1;
}

.explore-link {
  display: inline-block;
  background: transparent;
  color: #003366;
  padding: 0.5rem 1.2rem;
  border-radius: 40px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  transition: 0.3s;
  white-space: nowrap;
  border: 2px solid #003366;
}

.explore-link:hover {
  background: #003366;
  color: white;
  transform: scale(1.02);
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #003366, #001a33);
  color: white;
  text-align: center;
  padding: 2rem 0;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Section Title */
.section-title {
  font-size: 1.8rem;
  margin: 2rem 0 1.5rem;
  padding-left: 1rem;
  color: #003366;
}

[dir="rtl"] .section-title {
  border-left: none;
  border-right: 5px solid #ffcc00;
  padding-left: 0;
  padding-right: 1rem;
}

[dir="ltr"] .section-title {
  border-left: 5px solid #ffcc00;
}

/* RTL support for section header */
[dir="rtl"] .section-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .explore-link {
  border: 2px solid #003366;
}

[dir="rtl"] .explore-link:hover {
  background: #003366;
  color: white;
}

/* About Us Section */
.about-us {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.about-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: #444;
}

.about-features {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f0f4f8;
  padding: 0.5rem 1rem;
  border-radius: 40px;
  font-size: 0.9rem;
}

.about-feature span:first-child {
  background: #003366;
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

[dir="rtl"] .about-feature span:first-child {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* University Grid */
.uni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.uni-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.uni-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.uni-header {
  background: #003366;
  color: white;
  padding: 1rem;
}

.uni-header h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.uni-type {
  background: #ffcc00;
  color: #003366;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: bold;
  display: inline-block;
}

.uni-body {
  padding: 1rem;
}

.college-list {
  font-size: 0.85rem;
  margin: 0.8rem 0;
  padding-top: 0.5rem;
  border-top: 1px solid #eee;
}

.uni-link {
  display: inline-block;
  background: #0055a5;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.3s;
}

.uni-link:hover {
  background: #003366;
}

/* Filter Section */
.filter-section {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.filter-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group input, .filter-group select, .filter-group button {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.filter-group input {
  flex: 2;
  min-width: 200px;
}

.filter-group select {
  flex: 1;
  min-width: 150px;
}

.filter-group button {
  background: #003366;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.filter-group button:hover {
  background: #0055a5;
}

/* Services Section */
.services {
  margin: 2rem 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

/* Service Icons */
.service-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.service-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.service-card h3 {
  color: #003366;
  margin-bottom: 0.8rem;
}

.service-card.highlight {
  background: linear-gradient(135deg, #003366, #0055a5);
  color: white;
}

.service-card.highlight h3 {
  color: #ffcc00;
}

.service-card.highlight .service-icon {
  color: #ffcc00;
}

/* Stats Section */
.stats {
  margin: 3rem 0;
  padding: 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #003366;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: #555;
}

/* Service Banner */
.service-banner {
  background: linear-gradient(135deg, #003366, #0055a5);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  text-align: center;
}

.service-banner h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.service-banner p {
  opacity: 0.95;
}

/* Contact Banner */
.contact-banner {
  background: #ffcc00;
  color: #003366;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  margin: 2rem 0;
  font-weight: bold;
}

.contact-banner a {
  color: #003366;
  text-decoration: none;
}

.contact-banner a:hover {
  text-decoration: underline;
}

/* Contact Page */
.contact-page {
  margin: 2rem auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.contact-info {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.contact-info h2 {
  color: #003366;
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
}

.contact-info p {
  margin: 0.8rem 0;
}

.contact-info a {
  color: #0055a5;
  text-decoration: none;
  direction: ltr;
  display: inline-block;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Fix for phone numbers - keep LTR */
.phone-number, [dir="rtl"] .phone-number, .contact-info a {
  direction: ltr !important;
  unicode-bidi: embed;
}

.ltr-number {
  direction: ltr !important;
  display: inline-block;
  unicode-bidi: embed;
}

.contact-form-box {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.contact-form-box h2 {
  color: #003366;
  margin-bottom: 1rem;
}

.contact-form-box input, 
.contact-form-box select, 
.contact-form-box textarea {
  width: 100%;
  padding: 0.8rem;
  margin: 0.5rem 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

.contact-form-box button {
  background: #003366;
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  width: 100%;
  transition: 0.3s;
}

.contact-form-box button:hover {
  background: #0055a5;
}

/* Footer */
footer {
  background: #1e2a3e;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
}

/* RTL Specific Fixes */
[dir="rtl"] .filter-group {
  flex-direction: row;
}

[dir="rtl"] .uni-link {
  display: inline-block;
}

/* Responsive */
@media (max-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .header-flex {
    flex-direction: column;
    text-align: center;
  }
  
  nav ul {
    margin-top: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .filter-group {
    flex-direction: column;
  }
  
  .filter-group input, 
  .filter-group select, 
  .filter-group button {
    width: 100%;
  }
  
  .hero h2 {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  .about-us {
    padding: 1.5rem;
  }
  
  .about-features {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .about-feature {
    width: fit-content;
  }
}

@media (max-width: 600px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  [dir="rtl"] .section-header {
    flex-direction: column;
    align-items: flex-end;
  }
  
  .explore-link {
    white-space: normal;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .service-grid {
    grid-template-columns: 1fr;
  }
  
  .uni-grid {
    grid-template-columns: 1fr;
  }
  
  .lang-switch {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    width: 95%;
  }
  
  .hero h2 {
    font-size: 1.3rem;
  }
  
  .hero p {
    font-size: 0.9rem;
  }
  
  .section-title {
    font-size: 1.2rem;
  }
  
  .contact-banner {
    font-size: 0.85rem;
  }
  
  .contact-banner p {
    word-break: break-word;
  }
  
  .logo h1 {
    font-size: 1.3rem;
  }
  
  .tagline {
    font-size: 0.7rem;
  }
  
  nav ul {
    gap: 0.8rem;
  }
  
  nav ul li a {
    font-size: 0.9rem;
  }
}