/* 
 * Google Stitch Design System for Islahi English Medium School
 * Clean, Neat, Modular & Responsive Web Architecture
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --stitch-primary: #0b2545;
  --stitch-primary-light: #134074;
  --stitch-accent: #0077b6;
  --stitch-accent-teal: #0d9488;
  --stitch-accent-amber: #d97706;
  --stitch-bg-light: #f8fafc;
  --stitch-bg-card: #ffffff;
  --stitch-text-main: #1e293b;
  --stitch-text-muted: #64748b;
  --stitch-border: #e2e8f0;
  --stitch-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --stitch-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --stitch-shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --stitch-radius-sm: 6px;
  --stitch-radius-md: 10px;
  --stitch-radius-lg: 16px;
  --stitch-font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --stitch-font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  font-family: var(--stitch-font-body);
  color: var(--stitch-text-main);
  background-color: var(--stitch-bg-light);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .stitch-heading {
  font-family: var(--stitch-font-heading);
  color: var(--stitch-primary);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Top Header Bar & Stitch Navigation
   ========================================================================== */

.stitch-topbar {
  background-color: var(--stitch-primary);
  color: #ffffff;
  font-size: 13.5px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stitch-topbar a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s;
}

.stitch-topbar a:hover {
  color: #38bdf8;
}

.stitch-topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 18px;
}

/* Branding Row (Separate top row for logo & title) */
.stitch-branding-row {
  background: var(--stitch-bg-card);
  border-bottom: 1px solid var(--stitch-border);
  padding: 10px 0;
}

.stitch-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none !important;
}

.stitch-brand-logo {
  width: 200px;
  height: 153px;
  object-fit: contain;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.stitch-brand-title {
  font-family: var(--stitch-font-heading);
  font-weight: 800;
  font-size: 22px;
  color: var(--stitch-primary);
  line-height: 1.2;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}

.stitch-brand-subtitle {
  font-size: 13.5px;
  color: var(--stitch-accent-teal);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Sticky Navigation Bar Row */
.stitch-navbar-row {
  background: var(--stitch-bg-card);
  border-bottom: 1px solid var(--stitch-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--stitch-shadow-sm);
}

.stitch-nav {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stitch-nav-item {
  position: relative;
}

.stitch-nav-link {
  display: block;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--stitch-text-main);
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
}

.stitch-nav-link:hover,
.stitch-nav-link.active {
  color: var(--stitch-accent);
  border-bottom-color: var(--stitch-accent);
  background-color: rgba(0, 119, 182, 0.03);
}

.stitch-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--stitch-bg-card);
  border: 1px solid var(--stitch-border);
  border-radius: var(--stitch-radius-md);
  box-shadow: var(--stitch-shadow-lg);
  padding: 8px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 1050;
}

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

.stitch-dropdown-item {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--stitch-text-main);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.stitch-dropdown-item:hover {
  background-color: var(--stitch-bg-light);
  color: var(--stitch-accent);
}

/* Mobile Toggle */
.stitch-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--stitch-primary);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 991px) {
  .stitch-branding-row {
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: var(--stitch-shadow-sm);
  }

  .stitch-mobile-toggle {
    display: block !important;
    background: transparent;
    border: none;
    font-size: 26px;
    color: var(--stitch-primary);
    cursor: pointer;
    padding: 8px 12px;
  }
  
  .stitch-brand-logo {
    width: 200px;
    height: 153px;
    zoom: 50%;
  }

  .stitch-brand-title {
    font-size: 16px;
  }

  .stitch-brand-subtitle {
    font-size: 11px;
  }

  .stitch-navbar-row {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--stitch-bg-card);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    padding: 70px 20px 20px;
    transition: right 0.3s ease;
    z-index: 1100;
    overflow-y: auto;
    border: none;
  }
  
  .stitch-navbar-row.open {
    display: block !important;
    right: 0 !important;
  }
  
  .stitch-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .stitch-nav-link {
    padding: 14px 0;
    border-bottom: 1px solid var(--stitch-border);
    font-size: 15px;
  }

  .stitch-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    padding-left: 15px;
    display: none;
  }

  .stitch-nav-item.open > .stitch-dropdown {
    display: block;
  }
}

/* ==========================================================================
   Hero & Page Headers
   ========================================================================== */

.stitch-page-header {
  background: linear-gradient(135deg, var(--stitch-primary) 0%, var(--stitch-primary-light) 100%);
  color: #ffffff;
  padding: 48px 0;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.stitch-page-header::after {
  content: '';
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
}

.stitch-page-title {
  color: #ffffff;
  font-size: 32px;
  margin-bottom: 8px;
}

.stitch-breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  list-style: none;
  padding: 0;
  margin: 0;
}

.stitch-breadcrumb a {
  color: #38bdf8;
  text-decoration: none;
}

/* ==========================================================================
   Stitch Cards & Layout Components
   ========================================================================== */

.stitch-card {
  background: var(--stitch-bg-card);
  border: 1px solid var(--stitch-border);
  border-radius: var(--stitch-radius-md);
  box-shadow: var(--stitch-shadow-sm);
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.stitch-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--stitch-shadow-md);
}

.stitch-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--stitch-radius-sm);
  background: rgba(13, 148, 136, 0.1);
  color: var(--stitch-accent-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.stitch-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  background: rgba(0, 119, 182, 0.1);
  color: var(--stitch-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.stitch-section-tag {
  color: var(--stitch-accent-teal);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: block;
}

/* ==========================================================================
   IMAGE PLACEHOLDER COMPONENTS (Clean spaces for future images)
   ========================================================================== */

.img-space {
  position: relative;
  width: 100%;
  background-color: #e2e8f0;
  border: 2px dashed #cbd5e1;
  border-radius: var(--stitch-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  min-height: 220px;
  transition: all 0.3s ease;
}

.img-space:hover {
  border-color: var(--stitch-accent);
  background-color: #f1f5f9;
}

.img-space img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: var(--stitch-radius-md);
}

.img-space-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  color: #475569;
  gap: 8px;
}

.img-space-icon {
  font-size: 36px;
  color: var(--stitch-accent-teal);
  margin-bottom: 4px;
}

.img-space-title {
  font-family: var(--stitch-font-heading);
  font-weight: 700;
  font-size: 16px;
  color: var(--stitch-primary);
  margin: 0;
}

.img-space-desc {
  font-size: 12px;
  color: var(--stitch-text-muted);
  margin: 0;
}

.img-space-badge {
  background: var(--stitch-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

/* Aspect ratio helpers */
.ratio-16-9 {
  aspect-ratio: 16/9;
  min-height: 200px;
}

.ratio-4-3 {
  aspect-ratio: 4/3;
  min-height: 220px;
}

.ratio-1-1 {
  aspect-ratio: 1/1;
  min-height: 200px;
}

/* ==========================================================================
   Tables & Data Boxes
   ========================================================================== */

.stitch-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--stitch-border);
  border-radius: var(--stitch-radius-md);
  overflow: hidden;
  background: var(--stitch-bg-card);
  margin-bottom: 24px;
}

.stitch-table th {
  background: var(--stitch-primary);
  color: #ffffff;
  font-family: var(--stitch-font-heading);
  font-weight: 600;
  text-align: left;
  padding: 14px 18px;
  font-size: 14.5px;
}

.stitch-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--stitch-border);
  font-size: 14px;
  color: var(--stitch-text-main);
}

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

.stitch-table tr:nth-child(even) td {
  background-color: var(--stitch-bg-light);
}

/* Buttons */
.stitch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 14.5px;
  border-radius: var(--stitch-radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.stitch-btn-primary {
  background: var(--stitch-accent);
  color: #ffffff;
}

.stitch-btn-primary:hover {
  background: var(--stitch-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

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

.stitch-btn-outline:hover {
  background: var(--stitch-accent);
  color: #ffffff;
}

/* Footer Styling */
.stitch-footer {
  background: var(--stitch-primary);
  color: rgba(255, 255, 255, 0.85);
  padding: 50px 0 20px;
  margin-top: 60px;
  border-top: 4px solid var(--stitch-accent-teal);
}

.stitch-footer-title {
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

.stitch-footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 3px;
  background: var(--stitch-accent-teal);
  border-radius: 2px;
}

.stitch-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.stitch-footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.stitch-footer-links a:hover {
  color: #38bdf8;
  padding-left: 4px;
}

.stitch-copyright {
  background: #061528;
  color: rgba(255, 255, 255, 0.6);
  padding: 16px 0;
  font-size: 13.5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Facilities Slider Styling */
.facilities-carousel {
  position: relative;
}

.facilities-carousel .owl-nav button {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50% !important;
  background: var(--stitch-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.facilities-carousel .owl-nav button:hover {
  background: var(--stitch-accent-teal) !important;
  transform: translateY(-50%) scale(1.1);
}

.facilities-carousel .owl-nav button.owl-prev {
  left: -20px;
}

.facilities-carousel .owl-nav button.owl-next {
  right: -20px;
}

.facilities-carousel .owl-dots {
  margin-top: 15px;
  text-align: center;
}
