/*
Theme Name: Matrix Square Education
Theme URI: https://matrixsquare.edu
Author: Matrix Square
Description: Custom theme for Matrix Square Learning Centre - Building Strong Foundations in Math & Science
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: matrixsquare
*/

/* ============================================
   CSS RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-200: #99f6e4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #009689;
  --teal-700: #0f766e;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-500: #ff6900;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --gray-100: #f3f4f6;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --edfcfa: #edfcfa;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  text-align: center;
}

.btn-orange {
  background: var(--orange-500);
  color: var(--white);
  border-color: var(--orange-500);
}
.btn-orange:hover {
  background: var(--orange-600);
  border-color: var(--orange-600);
}

.btn-teal-outline {
  background: transparent;
  color: var(--teal-600);
  border-color: var(--teal-600);
}
.btn-teal-outline:hover {
  background: var(--teal-50);
}

.btn-white {
  background: var(--white);
  color: var(--orange-600);
  border-color: var(--white);
}
.btn-white:hover {
  background: var(--gray-100);
}

.btn-teal {
  background: var(--teal-600);
  color: var(--white);
  border-color: var(--teal-600);
}
.btn-teal:hover {
  background: var(--teal-700);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.site-logo img {
  height: 64px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  color: var(--teal-600);
  font-weight: 600;
  font-size: 1.125rem;
  transition: color 0.3s;
}
.main-nav a:hover {
  color: var(--orange-500);
}

.header-cta {
  display: flex;
  gap: 0.75rem;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

.mobile-menu {
  display: none;
  padding: 1rem 0;
}
.mobile-menu.active {
  display: block;
}
.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  color: var(--teal-600);
  font-weight: 600;
  font-size: 1.125rem;
}
.mobile-menu a:hover {
  color: var(--orange-500);
}
.mobile-menu .btn {
  width: 100%;
  margin-top: 0.5rem;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--teal-50), var(--white), var(--orange-50));
  padding: 5rem 0;
  overflow: hidden;
}

.hero-blob-1 {
  position: absolute;
  top: 5rem;
  left: 5rem;
  width: 16rem;
  height: 16rem;
  background: var(--teal-400);
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.1;
}

.hero-blob-2 {
  position: absolute;
  bottom: 5rem;
  right: 5rem;
  width: 20rem;
  height: 20rem;
  background: var(--orange-500);
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--orange-100);
  color: var(--orange-700);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--gray-900);
  margin: 1.5rem 0;
}

.hero h1 span {
  color: var(--teal-600);
}

.hero-description {
  font-size: 1.25rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-image-wrapper {
  position: relative;
}

.hero-image-glow {
  position: absolute;
  inset: 0;
  background: var(--teal-400);
  border-radius: 1.5rem;
  filter: blur(32px);
  opacity: 0.2;
}

.hero-image-wrapper img {
  position: relative;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  width: 100%;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.section-title p {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 42rem;
  margin: 0 auto;
}

/* ============================================
   PROGRAMS SECTION
   ============================================ */
.programs {
  padding: 5rem 0;
  background: var(--white);
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.program-card {
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  background: var(--white);
}
.program-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
  border-color: var(--teal-400);
}

.program-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
  transition: transform 0.3s;
}
.program-card:hover .program-icon {
  transform: scale(1.1);
}
.program-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--white);
}

.bg-teal-600 { background: var(--teal-600); }
.bg-teal-500 { background: var(--teal-500); }
.bg-teal-700 { background: var(--teal-700); }
.bg-orange-500 { background: var(--orange-500); }
.bg-orange-600 { background: var(--orange-600); }

.program-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.program-card p {
  color: var(--gray-600);
  font-size: 0.9375rem;
}

/* ============================================
   WHY US SECTION
   ============================================ */
.why-us {
  padding: 5rem 0;
  background: var(--teal-50);
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.why-us-card {
  text-align: center;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s;
}
.why-us-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.why-us-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.why-us-icon svg {
  width: 2rem;
  height: 2rem;
  color: var(--white);
}

.why-us-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.why-us-card p {
  color: var(--gray-600);
}

/* ============================================
   LEARNING PATH SECTION
   ============================================ */
.learning-path {
  padding: 5rem 0;
  background: var(--white);
}

.learning-path-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.path-card {
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s;
  background: var(--white);
}
.path-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
  border-color: var(--teal-400);
}

.path-card-bar {
  height: 0.5rem;
}

.path-card-content {
  padding: 1.5rem;
}

.path-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.path-card .path-grades {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.text-orange-600 { color: var(--orange-600); }
.text-orange-700 { color: var(--orange-700); }
.text-teal-600 { color: var(--teal-600); }
.text-teal-700 { color: var(--teal-700); }

.path-card .path-focus {
  color: var(--gray-600);
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats {
  padding: 5rem 0;
  background: var(--edfcfa);
  position: relative;
  overflow: hidden;
}

.stats-blob-1 {
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 500px;
  background: rgba(153, 246, 228, 0.4);
  border-radius: 50%;
  margin-right: -12rem;
  margin-top: -12rem;
  filter: blur(100px);
}

.stats-blob-2 {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 500px;
  height: 500px;
  background: rgba(255, 237, 213, 0.3);
  border-radius: 50%;
  margin-left: -12rem;
  margin-bottom: -12rem;
  filter: blur(100px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.stat-card {
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 15px 40px rgba(0,0,0,0.04);
  transition: all 0.5s;
}
.stat-card:hover {
  box-shadow: 0 20px 60px rgba(32,178,170,0.12);
  background: rgba(255,255,255,0.6);
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  background: var(--teal-600);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px rgba(0,150,137,0.1);
  transition: transform 0.5s;
}
.stat-card:hover .stat-icon {
  transform: scale(1.1);
}
.stat-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--white);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--teal-600);
  letter-spacing: -0.025em;
}

.stat-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-top: 0.5rem;
}

.stat-description {
  color: var(--gray-600);
  font-size: 1rem;
  margin-top: 0.25rem;
}

/* ============================================
   EXPERTS SECTION
   ============================================ */
.experts {
  padding: 4rem 0;
  background: var(--edfcfa);
}

.experts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.expert-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.3s;
}
.expert-card:hover {
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.expert-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.expert-icon-wrapper {
  width: 3rem;
  height: 3rem;
  background: var(--teal-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.expert-icon-wrapper svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--teal-600);
}

.expert-photo {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--teal-50);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  flex-shrink: 0;
}
.expert-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.expert-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #001f3f;
  margin-bottom: 0.25rem;
}

.expert-specialty {
  color: var(--teal-600);
  font-size: 0.875rem;
  font-weight: 600;
}

.expert-qualification {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */
.testimonials {
  padding: 4rem 0;
  background: var(--white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: rgba(240, 253, 250, 0.5);
  border: 1px solid rgba(204, 251, 241, 0.5);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.testimonial-card:hover {
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.testimonial-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-photo {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  flex-shrink: 0;
}
.testimonial-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.testimonial-role {
  color: var(--teal-600);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.testimonial-quote-icon {
  color: var(--teal-200);
  opacity: 0.6;
  transform: rotate(180deg);
}
.testimonial-card:hover .testimonial-quote-icon {
  color: var(--teal-400);
}
.testimonial-quote-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.testimonial-text {
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.7;
  font-style: italic;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  padding: 5rem 0;
  background: var(--teal-600);
  color: var(--white);
  text-align: center;
}

.cta-section h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.cta-section p {
  font-size: 1.25rem;
  max-width: 42rem;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn-cta-outline {
  background: var(--teal-700);
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-cta-outline:hover {
  background: var(--orange-500);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--gray-900);
  color: var(--white);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  color: var(--gray-400);
  margin-top: 1rem;
}
.footer-brand img {
  height: 4rem;
  width: auto;
}

.footer-column h4 {
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.5rem;
}

.footer-column ul li a {
  font-size: 0.875rem;
  color: var(--gray-400);
  transition: color 0.3s;
}
.footer-column ul li a:hover {
  color: var(--teal-400);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}
.contact-item svg {
  width: 1rem;
  height: 1rem;
  color: var(--teal-400);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-link {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.social-link:hover {
  background: var(--teal-600);
}
.social-link svg {
  width: 1rem;
  height: 1rem;
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-400);
}

/* ============================================
   FLOATING WIDGET
   ============================================ */
.floating-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  background: var(--orange-500);
  color: var(--white);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 15px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.floating-btn:hover {
  background: var(--orange-600);
  transform: scale(1.05);
}
.floating-btn svg {
  width: 1.75rem;
  height: 1.75rem;
}

.floating-panel {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  background: var(--white);
  border-radius: 1rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
  border: 2px solid var(--teal-500);
  width: 20rem;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.floating-panel-header {
  background: var(--teal-600);
  color: var(--white);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.floating-panel-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.floating-panel-header h3 {
  font-weight: 600;
}

.floating-panel-close {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: background 0.3s;
}
.floating-panel-close:hover {
  background: rgba(255,255,255,0.2);
}

.floating-panel-body {
  padding: 1rem;
}

.floating-panel-image {
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 1rem;
}
.floating-panel-image img {
  width: 100%;
  height: 8rem;
  object-fit: cover;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.benefit-dot {
  margin-top: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.benefit-dot-teal {
  background: var(--teal-100);
}
.benefit-dot-orange {
  background: var(--orange-100);
}
.benefit-dot-inner {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}
.benefit-dot-teal .benefit-dot-inner {
  background: var(--teal-600);
}
.benefit-dot-orange .benefit-dot-inner {
  background: var(--orange-600);
}

.benefit-item p {
  font-size: 0.875rem;
  color: var(--gray-600);
}
.benefit-item p.font-medium {
  font-weight: 500;
}

.floating-panel-cta {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.floating-panel-cta .btn {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .main-nav, .header-cta {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-buttons {
    justify-content: center;
  }
  
  .programs-grid,
  .why-us-grid,
  .learning-path-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .programs-grid,
  .why-us-grid,
  .learning-path-grid,
  .stats-grid,
  .experts-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-section h2 {
    font-size: 2rem;
  }
  
  .site-logo img {
    height: 48px;
  }
}
