/* MSR English Medium School - Modern Professional Theme */
:root {
  --primary: #1a365d;
  --primary-dark: #0f2744;
  --primary-light: #2c5282;
  --accent: #d69e2e;
  --accent-hover: #b7791f;
  --text: #2d3748;
  --text-light: #718096;
  --bg: #f7fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --success: #38a169;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 8px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
}

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

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== HEADER ========== */
.top-bar {
  background: var(--primary-dark);
  color: var(--white);
  font-size: 0.875rem;
  padding: 8px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar a {
  color: var(--white);
  opacity: 0.9;
}

.top-bar a:hover {
  opacity: 1;
  color: var(--accent);
}

.top-bar-right {
  display: flex;
  gap: 20px;
  align-items: center;
}

.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

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

.logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.logo-text h1 {
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav > li {
  position: relative;
}

.nav > li > a {
  display: block;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
}

.nav > li > a:hover,
.nav > li.active > a {
  color: var(--primary);
  background: rgba(26, 54, 93, 0.06);
}

.nav > li > a .arrow {
  font-size: 0.7rem;
  margin-left: 4px;
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition);
  z-index: 100;
  padding: 8px 0;
}

.nav > li:hover > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 10px 18px;
  font-size: 0.9rem;
  color: var(--text);
}

.dropdown li a:hover {
  background: rgba(26, 54, 93, 0.06);
  color: var(--primary);
}

/* Nested dropdown */
.dropdown .has-sub {
  position: relative;
}

.dropdown .sub-dropdown {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 200px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: var(--transition);
  padding: 8px 0;
}

.dropdown .has-sub:hover > .sub-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-secondary {
  background: var(--primary);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--primary-dark);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
  padding: 8px;
}

/* ========== HERO ========== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(214, 158, 46, 0.08);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  background: rgba(214, 158, 46, 0.2);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h2 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 560px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ========== SECTIONS ========== */
.section {
  padding: 70px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header .label {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: 2.1rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Stats */
.stats {
  background: var(--white);
  margin-top: -50px;
  position: relative;
  z-index: 10;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.2rem;
  color: var(--primary);
  font-weight: 700;
}

.stat-item p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 3rem;
}

.card-body {
  padding: 24px;
}

.card-body h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.card-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.card-body a {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.card-body a:hover {
  color: var(--accent-hover);
}

/* About / Two column */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.two-col img,
.img-placeholder {
  border-radius: var(--radius);
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.img-placeholder {
  background: linear-gradient(135deg, #2c5282, #1a365d);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  text-align: center;
  padding: 20px;
}

.content-block h2 {
  font-size: 1.9rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.content-block p {
  color: var(--text-light);
  margin-bottom: 14px;
}

.content-block ul {
  margin: 16px 0;
}

.content-block ul li {
  padding: 6px 0 6px 24px;
  position: relative;
  color: var(--text);
}

.content-block ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Vision Mission */
.vm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.vm-card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--accent);
}

.vm-card h3 {
  color: var(--primary);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.vm-card p {
  color: var(--text-light);
}

/* Activities sub */
.activity-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

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

.activity-icon {
  width: 48px;
  height: 48px;
  background: rgba(26, 54, 93, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.activity-item h4 {
  color: var(--primary);
  margin-bottom: 6px;
}

.activity-item p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Table */
.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(26, 54, 93, 0.03);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* Blog */
.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.blog-card .date {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}

.contact-info {
  background: var(--primary);
  color: var(--white);
  padding: 36px;
  border-radius: var(--radius);
}

.contact-info h3 {
  font-size: 1.4rem;
  margin-bottom: 24px;
}

.contact-item {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.contact-item .icon {
  font-size: 1.3rem;
  margin-top: 2px;
}

.contact-form {
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 0;
}

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

.footer h4 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 18px;
}

.footer p {
  font-size: 0.9rem;
  margin-bottom: 12px;
  line-height: 1.7;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* Page Banner */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 50px 0;
  text-align: center;
}

.page-banner h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.page-banner .breadcrumb {
  font-size: 0.9rem;
  opacity: 0.85;
}

.page-banner .breadcrumb a {
  color: var(--accent);
}

/* Disclosure list */
.disclosure-list {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.disclosure-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.disclosure-item:last-child {
  border-bottom: none;
}

.disclosure-item a {
  color: var(--primary);
  font-weight: 500;
}

.disclosure-item a:hover {
  color: var(--accent);
}

.badge {
  background: rgba(56, 161, 105, 0.12);
  color: var(--success);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    gap: 4px;
  }

  .nav.active .dropdown,
  .nav.active .sub-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 16px;
    display: none;
  }

  .nav.active li.open > .dropdown,
  .nav.active li.open > .sub-dropdown {
    display: block;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col,
  .vm-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 576px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .hero {
    padding: 50px 0 80px;
  }

  .section {
    padding: 50px 0;
  }

  .top-bar .container {
    justify-content: center;
    text-align: center;
  }
}
