/* SchoolsGlobal - Modern Responsive CSS */
/* CSS Variables for consistent theming */
:root {
  --primary-color: #1845ad;
  --primary-hover: #0f2d7a;
  --secondary-color: #f39c12;
  --text-dark: #222;
  --text-light: #555;
  --bg-light: #f9f9f9;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
  --font-primary: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1200px;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Header Styles */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

header .logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

header img {
  height: 50px;
  width: auto;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

header nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

header nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
}

header nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Main Content Styles */
main {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 2rem;
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  min-height: 70vh;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  color: var(--text-dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary-color);
}

h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--text-light);
}

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

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Article Meta Information */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-light);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Category Tags */
.category-tag {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.category-tag:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* Featured Image */
.featured-image {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

/* Lazy Loading Images */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

img.loaded,
img[loading="lazy"] {
  opacity: 1;
}

/* AdSense Placeholder */
.adsense-placeholder {
  background: #f0f0f0;
  border: 2px dashed #ccc;
  padding: 3rem 1rem;
  margin: 2rem 0;
  text-align: center;
  border-radius: var(--border-radius);
  color: #888;
  font-weight: 500;
}

/* AdSense Container */
.adsense-container {
  margin: 2rem 0;
  text-align: center;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Related Articles Section */
.related-articles {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-light);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
}

.related-articles h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.related-articles ul {
  list-style: none;
  padding: 0;
}

.related-articles li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.related-articles li:last-child {
  border-bottom: none;
}

.related-articles a {
  font-weight: 500;
  font-size: 1.05rem;
}

/* Card Grid Layout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

.card h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--primary-color);
  margin: 0 0.5rem;
}

.breadcrumb a:first-child {
  margin-left: 0;
}

/* Footer Styles */
footer {
  background: #2c3e50;
  color: white;
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

footer .container {
  max-width: var(--max-width);
  margin: 0 auto;
}

footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

footer h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

footer ul {
  list-style: none;
  padding: 0;
}

footer li {
  margin-bottom: 0.5rem;
}

footer a {
  color: #ecf0f1;
  transition: var(--transition);
}

footer a:hover {
  color: var(--secondary-color);
  text-decoration: none;
}

footer .copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #95a5a6;
  font-size: 0.9rem;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  header nav {
    justify-content: center;
    gap: 1rem;
  }

  header nav a {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  main {
    margin: 1rem;
    padding: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .article-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  footer .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  header {
    padding: 1rem;
  }

  header img {
    height: 40px;
  }

  main {
    padding: 1rem;
  }
}

/* Print Styles */
@media print {
  header, footer, .adsense-placeholder, .related-articles, nav {
    display: none;
  }

  main {
    box-shadow: none;
    max-width: 100%;
  }

  body {
    background: white;
  }

  a {
    color: black;
    text-decoration: underline;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles for Keyboard Navigation */
a:focus, button:focus, input:focus, textarea:focus {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}
