/* learnAIfter50 - Main Stylesheet */
:root {
  --primary: #1a365d;
  --primary-light: #2a4a7f;
  --accent: #d4a017;
  --accent-light: #e8b820;
  --text: #2d3748;
  --text-light: #718096;
  --bg: #ffffff;
  --bg-light: #f7f9fc;
  --bg-warm: #fffdf5;
  --border: #e2e8f0;
  --success: #38a169;
  --error: #e53e3e;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

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

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

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Arial', 'Helvetica', sans-serif;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: #b8860b; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }

/* Navigation */
.navbar {
  background: var(--primary);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.nav-logo {
  font-family: Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-logo:hover { text-decoration: none; color: var(--accent-light); }
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.15);
  color: var(--accent);
  text-decoration: none;
}
.nav-links .btn-nav {
  background: var(--accent);
  color: var(--primary) !important;
  font-weight: 700;
  padding: 0.5rem 1rem;
}
.nav-links .btn-nav:hover { background: var(--accent-light); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  min-height: 48px;
  border-radius: var(--radius);
  font-family: Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  line-height: 1.4;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: var(--primary);
}
.btn-primary:hover {
  background: var(--accent-light);
  text-decoration: none;
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212,160,23,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}
.btn-white {
  background: white;
  color: var(--primary);
}
.btn-white:hover {
  background: var(--bg-light);
  text-decoration: none;
  color: var(--primary);
}
.btn-large { font-size: 1.1rem; padding: 1rem 2rem; }
.btn-full { width: 100%; display: block; }
.btn-danger {
  background: var(--error);
  color: white;
}
.btn-danger:hover { background: #c53030; }
.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { background: #2f855a; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #3a5a9f 100%);
  color: white;
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(212,160,23,0.1) 0%, transparent 60%);
  pointer-events: none;
}
.hero h1 {
  font-size: 2.8rem;
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.hero .subtitle {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: 4rem 1.5rem;
}
.section-alt {
  background: var(--bg-light);
}
.section-warm {
  background: var(--bg-warm);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.card-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.card-text {
  color: var(--text-light);
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 1rem;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.badge {
  background: var(--bg-light);
  color: var(--text-light);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: Arial, sans-serif;
}
.badge-accent {
  background: rgba(212,160,23,0.15);
  color: #8a6400;
}
.price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  font-family: Arial, sans-serif;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: Arial, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: Georgia, serif;
  color: var(--text);
  background: white;
  transition: border-color 0.2s;
  min-height: 48px;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.2);
}
textarea.form-control {
  min-height: 150px;
  resize: vertical;
}
.form-text {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}
.form-error {
  color: var(--error);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-family: Arial, sans-serif;
}
.alert-success {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  color: #276749;
}
.alert-error {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
}
.alert-info {
  background: #ebf8ff;
  border: 1px solid #90cdf4;
  color: #2b6cb0;
}

/* Auth pages */
.auth-page {
  min-height: calc(100vh - 70px);
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.auth-card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 3rem;
  width: 100%;
  max-width: 480px;
}
.auth-title {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-title h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.auth-title p {
  color: var(--text-light);
  font-size: 1rem;
}
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-light);
}

/* Dashboard */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 70px);
}
.sidebar {
  background: var(--primary);
  color: white;
  padding: 2rem 0;
}
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(255,255,255,0.1);
  color: var(--accent);
  text-decoration: none;
}
.sidebar-section {
  padding: 1rem 1.5rem 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  font-family: Arial, sans-serif;
}
.main-content {
  padding: 2.5rem;
  background: var(--bg-light);
}
.content-header {
  margin-bottom: 2rem;
}
.content-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}
.content-header p {
  color: var(--text-light);
  font-size: 1rem;
}

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  font-family: Arial, sans-serif;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  color: var(--text-light);
  font-size: 0.9rem;
  font-family: Arial, sans-serif;
}

/* Tables */
.table-container {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 2rem;
}
.table-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.table-header h3 {
  margin: 0;
  font-size: 1.1rem;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  background: var(--bg-light);
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-light); }

/* FAQ Accordion */
.faq-item {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-family: Arial, sans-serif;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  line-height: 1.4;
}
.faq-question:hover { background: var(--bg-light); }
.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding: 0 1.5rem 1.5rem;
  color: var(--text);
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* Testimonials */
.testimonial {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
}
.testimonial::before {
  content: '"';
  font-size: 5rem;
  color: var(--accent);
  position: absolute;
  top: -0.5rem;
  left: 1.5rem;
  line-height: 1;
  font-family: Georgia, serif;
}
.testimonial-text {
  padding-top: 2rem;
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: Arial, sans-serif;
  flex-shrink: 0;
}
.testimonial-name {
  font-weight: 700;
  color: var(--primary);
  font-family: Arial, sans-serif;
  font-size: 1rem;
}
.testimonial-detail {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--accent) 0%, #e8b820 100%);
  padding: 4rem 1.5rem;
  text-align: center;
}
.cta-banner h2 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 1rem;
}
.cta-banner p {
  color: rgba(26,54,93,0.8);
  font-size: 1.15rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  padding: 3rem 1.5rem 1.5rem;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}
.footer-brand .nav-logo {
  display: block;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0;
}
.footer h4 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1rem;
  font-family: Arial, sans-serif;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer ul li { margin-bottom: 0.5rem; }
.footer ul a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer ul a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
}

/* Blog */
.blog-card .card-date {
  font-size: 0.85rem;
  color: var(--text-light);
  font-family: Arial, sans-serif;
  margin-bottom: 0.5rem;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
}
.article-body h2 { font-size: 1.6rem; margin-top: 2.5rem; margin-bottom: 1rem; }
.article-body h3 { font-size: 1.3rem; margin-top: 2rem; margin-bottom: 0.75rem; }
.article-body img { max-width: 100%; border-radius: var(--radius); margin: 1.5rem 0; }

/* Page hero (non-home) */
.page-hero {
  background: var(--primary);
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
}
.page-hero h1 { color: white; font-size: 2.2rem; margin-bottom: 0.5rem; }
.page-hero p { color: rgba(255,255,255,0.8); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* Breadcrumb */
.breadcrumb {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  font-family: Arial, sans-serif;
}
.breadcrumb a { color: var(--accent); }

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.two-col.reverse > :first-child { order: 2; }
.two-col.reverse > :last-child { order: 1; }

/* Checkout/payment */
.checkout-box {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  max-width: 540px;
  margin: 0 auto;
}
.checkout-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.checkout-item-icon {
  width: 60px;
  height: 60px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-family: Arial, sans-serif;
}
.checkout-total .amount {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

/* Page loading */
.loading {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-light);
  font-family: Arial, sans-serif;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success/Error pages */
.result-page {
  text-align: center;
  padding: 5rem 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}
.result-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
}

/* Reasons section */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}
.reason-card {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.reason-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

/* Admin specific */
.admin-header {
  background: var(--primary);
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-header h1 {
  color: var(--accent);
  font-size: 1.3rem;
  margin: 0;
}
.admin-badge {
  background: var(--accent);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: Arial, sans-serif;
}

/* Responsive */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .two-col.reverse > :first-child { order: unset; }
  .two-col.reverse > :last-child { order: unset; }
}

@media (max-width: 768px) {
  html { font-size: 16px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 3rem 1.5rem; }
  .section { padding: 3rem 1.5rem; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  .nav-toggle { display: flex; }
  .nav-container { position: relative; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .auth-card { padding: 2rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .checkout-box { padding: 1.5rem; }
  .main-content { padding: 1.5rem; }
}


/* Logo image styling */
.navbar { padding: 0.5rem 0; }
.nav-container { min-height: 130px; align-items: center; }
.nav-logo { display: flex; align-items: center; padding: 0; }
.nav-logo img {
  height: 120px;
  width: auto;
  display: block;
  transition: transform 0.2s;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.nav-logo:hover img {
  transform: scale(1.04);
}
.nav-logo.footer-logo img {
  height: 180px;
  width: auto;
  margin-bottom: 12px;
  filter: none;
}
@media (max-width: 900px) {
  .nav-container { min-height: 90px; }
  .nav-logo img { height: 80px; }
}
@media (max-width: 768px) {
  .nav-container { min-height: 80px; }
  .nav-logo img { height: 70px; }
  .nav-logo.footer-logo img { height: 140px; }
}
