/* ==========================================================================
   Mac Education Design System Overrides
   Enterprise-grade CSS layer on top of Educavo theme
   ========================================================================== */

/* --- Skip to content (accessibility) --- */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 0;
  background: #005f9e;
  color: #fff;
  padding: 12px 24px;
  z-index: 100000;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  transition: top 0.2s ease;
}
.skip-to-content:focus {
  top: 0;
  outline: 3px solid #ffc107;
}

/* --- Focus states (accessibility) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #005f9e;
  outline-offset: 2px;
}

/* --- Reduced motion (accessibility) --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .wow {
    visibility: visible !important;
    animation: none !important;
  }
}

/* --- Typography refinements --- */
body {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 767px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

/* --- Section spacing refinements --- */
.rs-about,
.rs-degree,
.rs-team,
.rs-cta,
#rs-popular-courses,
.contact-page-section {
  padding-top: 80px;
  padding-bottom: 80px;
}

@media (max-width: 767px) {
  .rs-about,
  .rs-degree,
  .rs-team,
  .rs-cta,
  #rs-popular-courses,
  .contact-page-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

/* --- Button refinements --- */
.readon2,
.readon,
.apply-btn,
.btn-send {
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
  min-height: 44px;
  min-width: 44px;
  padding: 12px 28px;
}

.readon2:hover,
.readon:hover,
.apply-btn:hover,
.btn-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.readon2:active,
.readon:active {
  transform: translateY(0);
}

/* --- Card refinements --- */
.degree-wrap,
.courses-item,
.team-item {
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.degree-wrap:hover,
.courses-item:hover,
.team-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* --- Form improvements --- */
.from-control,
.form-control {
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 44px;
}

.from-control:focus,
.form-control:focus {
  border-color: #005f9e;
  box-shadow: 0 0 0 3px rgba(0, 95, 158, 0.15);
  outline: none;
}

/* --- Form feedback states --- */
#form-messages {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-weight: 500;
}
#form-messages:empty {
  display: none;
}
#form-messages.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
#form-messages.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* --- Contact info cards --- */
.contact-info {
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  transition: transform 0.2s ease;
}
.contact-info:hover {
  transform: translateY(-2px);
}

/* --- Footer refinements --- */
.rs-footer .footer-top {
  padding: 64px 0 40px;
}
.rs-footer .widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.rs-footer .site-map li {
  margin-bottom: 8px;
}
.rs-footer .site-map li a {
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.rs-footer .site-map li a:hover {
  padding-left: 4px;
}

/* --- Breadcrumb improvements --- */
.rs-breadcrumbs .breadcrumbs-text .page-title {
  font-size: 2rem;
  font-weight: 700;
}
.rs-breadcrumbs .breadcrumbs-text ul li a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- 404 page improvements --- */
#rs-page-error {
  padding: 100px 0;
  text-align: center;
}
#rs-page-error .error-code {
  font-size: 6rem;
  font-weight: 800;
  color: #005f9e;
  line-height: 1;
  margin-bottom: 16px;
}
#rs-page-error .error-message {
  font-size: 1.5rem;
  color: #444;
  margin-bottom: 32px;
}
#rs-page-error .readon {
  display: inline-block;
  margin-top: 16px;
}

/* --- Counter refinements --- */
.counter-item {
  padding: 24px;
}

/* --- Legal page improvements --- */
.css-147ntli-PrivacyWrapper,
.legal-content {
  max-width: 800px;
  line-height: 1.8;
  font-size: 1rem;
}
.css-147ntli-PrivacyWrapper h2,
.legal-content h2 {
  font-size: 1.75rem;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}
.css-147ntli-PrivacyWrapper h5,
.legal-content h5 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 24px;
}
.css-147ntli-PrivacyWrapper p,
.legal-content p {
  margin-bottom: 16px;
}

/* --- Hero slider refinements --- */
.rs-slider .slider-content {
  display: flex;
  align-items: center;
  min-height: 500px;
}
@media (max-width: 767px) {
  .rs-slider .slider-content {
    min-height: 350px;
    padding: 24px 0;
  }
  .rs-slider .sl-title {
    font-size: 1.75rem !important;
  }
  .rs-slider .sl-sub-title {
    font-size: 0.9rem;
  }
}

/* --- Navigation improvements --- */
.topbar-area {
  padding: 8px 0;
  font-size: 0.875rem;
}
.topbar-contact li a:hover {
  text-decoration: underline;
}

/* --- Image loading fallback --- */
img:not(.no-bg) {
  background-color: #f5f5f5;
}

/* --- Responsive iframe --- */
iframe {
  max-width: 100%;
  border: 0;
  border-radius: 8px;
}

/* --- Newsletter section improvements --- */
.rs-newsletter.style1.mb--124 {
  margin-bottom: 40px; /* neutralize theme's negative margin that overlaps footer */
}
@media (max-width: 767px) {
  .rs-newsletter.style1.mb--124 {
    margin-bottom: 24px;
  }
}
.rs-newsletter .newsletter-form input[type="email"] {
  border-radius: 6px;
  padding: 12px 16px;
  min-height: 44px;
}
.rs-newsletter .newsletter-form button {
  border-radius: 6px;
  min-height: 44px;
  font-weight: 600;
}

/* --- Admission CTA section --- */
.rs-cta .content .sec-title .title {
  font-size: 1.75rem;
}
.rs-cta .content .desc {
  font-size: 1rem;
  line-height: 1.7;
  color: #555;
}

/* --- Filter buttons (courses page) --- */
.gridFilter button {
  border-radius: 6px;
  padding: 8px 20px;
  margin: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
  min-height: 44px;
}

/* --- Testimonial section --- */
.testi-item {
  border-radius: 8px;
}

/* --- Why Choose Us feature cards --- */
#rs-why-choose .degree-wrap {
  padding: 30px;
  text-align: center;
  background: #fff;
  border-radius: 8px;
}
#rs-why-choose .degree-wrap .fa {
  font-size: 2.5rem;
  color: #ff5421;
  margin-bottom: 16px;
  display: block;
}

/* --- Print styles --- */
@media print {
  .topbar-area,
  .menu-sticky,
  #scrollUp,
  .rs-newsletter,
  .offcanvas-gallery,
  .loader {
    display: none !important;
  }
  body {
    font-size: 12pt;
    color: #000;
  }
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}
