/* ============================================
   K.V. Institute – Clean & Professional Theme
   Simple • Neat • Easy to use
============================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #0ea5e9;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --dark: #1e293b;
  --text: #334155;
  --text-light: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

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

a:hover {
  text-decoration: underline;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== HEADER ========== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo-area img {
  height: 52px;
  width: auto;
  border-radius: 8px;
}

.logo-text h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

.btn-nav-login {
  background: var(--primary) !important;
  color: white !important;
  padding: 8px 18px !important;
}

.btn-nav-login:hover {
  background: var(--primary-dark) !important;
  color: white !important;
}

/* ========== HERO ========== */
.hero {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: white;
  padding: 50px 20px 60px;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}

.hero-text h2 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

.hero-text .tagline {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 16px;
  font-weight: 500;
}

.hero-text p {
  opacity: 0.92;
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.feature-pill {
  background: rgba(255,255,255,0.18);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-flicker {
  display: inline-block;
  background: #fbbf24;
  color: #1e293b;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-flicker:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  text-decoration: none;
  color: #1e293b;
}

/* ========== CARDS & FORMS ========== */
.register-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
}

.register-card h3 {
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 4px;
  text-align: center;
}

.register-card .subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 5px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--white);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  display: inline-block;
  padding: 10px 22px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}

.btn-secondary:hover {
  background: var(--primary-dark);
  text-decoration: none;
  color: white;
}

.btn-gold {
  background: #f59e0b;
  color: #1e293b;
}

.btn-gold:hover {
  background: #d97706;
  color: #1e293b;
}

.login-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ========== SECTIONS ========== */
.section {
  padding: 50px 20px;
}

.section-title {
  text-align: center;
  margin-bottom: 36px;
}

.section-title h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.section-title p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ========== FEATURES ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
}

.feature-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
  background: var(--primary-light);
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--dark);
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.icon-purple, .icon-green, .icon-red, .icon-blue, .icon-gold, .icon-pink {
  background: var(--primary-light) !important;
}

/* ========== FOUNDER ========== */
.founder-section {
  background: var(--dark);
  color: white;
  padding: 50px 20px;
}

.founder-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.founder-photo {
  width: 220px;
  height: 220px;
  border-radius: 16px;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.2);
}

.founder-info h2 {
  font-size: 1.6rem;
  margin-bottom: 4px;
  color: white;
}

.founder-info .role {
  color: #93c5fd;
  font-weight: 500;
  margin-bottom: 14px;
}

.founder-info p {
  opacity: 0.9;
  margin-bottom: 10px;
}

.contact-info {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ========== SUBJECTS ========== */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.subject-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.subject-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  text-decoration: none;
  color: inherit;
}

.subject-card .emoji {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.subject-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--dark);
}

.subject-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.subject-card.coming-soon {
  opacity: 0.7;
  position: relative;
}

.subject-card.coming-soon::after {
  content: 'COMING SOON';
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--warning);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

/* ========== CHAPTER LIST ========== */
.chapter-list {
  display: grid;
  gap: 10px;
}

.chapter-item {
  background: var(--white);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chapter-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--text);
}

.chapter-item .num {
  background: var(--primary);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 14px;
  flex-shrink: 0;
}

.chapter-item .title {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
}

.chapter-item .play {
  background: var(--primary-light);
  color: var(--primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* ========== VIDEO ========== */
.video-container {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.video-container iframe {
  width: 100%;
  height: 420px;
  border: none;
  display: block;
}

.video-info {
  padding: 20px;
}

.video-info h2 {
  font-size: 1.35rem;
  margin-bottom: 6px;
  color: var(--dark);
}

/* ========== DASHBOARD ========== */
.dash-header {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  padding: 36px 20px;
  color: white;
  text-align: center;
}

.dash-header h1 {
  font-size: 1.7rem;
  margin-bottom: 6px;
}

.year-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

.year-btn {
  background: var(--white);
  color: var(--primary);
  padding: 24px 40px;
  border-radius: var(--radius);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s, box-shadow 0.15s;
  min-width: 200px;
  text-align: center;
  border: 2px solid transparent;
}

.year-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  text-decoration: none;
  border-color: var(--primary);
}

.year-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
  background: #e2e8f0;
  color: #94a3b8;
}

.access-pending {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  max-width: 520px;
  margin: 40px auto;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.access-pending h2 {
  color: var(--dark);
  margin-bottom: 12px;
}

/* ========== PREMIUM ========== */
.premium-box {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  color: white;
}

.premium-box h2 {
  font-size: 1.7rem;
  margin-bottom: 10px;
}

.premium-price {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 16px 0;
}

.premium-price small {
  font-size: 1.1rem;
  font-weight: 600;
}

/* ========== ALERTS ========== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 0.95rem;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-info {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--dark);
  color: #cbd5e1;
  padding: 40px 20px 20px;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand img {
  height: 48px;
  border-radius: 8px;
  background: white;
  padding: 3px;
  margin-bottom: 12px;
}

.footer-brand h3 {
  color: white;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: white;
  margin-bottom: 14px;
  font-size: 1rem;
}

.footer-col p,
.footer-col a {
  color: #94a3b8;
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #334155;
  font-size: 0.85rem;
  color: #64748b;
}

/* ========== ADMIN ========== */
.admin-sidebar {
  width: 240px;
  background: var(--dark);
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  padding: 20px 0;
  color: white;
}

.admin-sidebar .logo {
  padding: 0 20px 24px;
  border-bottom: 1px solid #334155;
  margin-bottom: 16px;
}

.admin-sidebar .logo h2 {
  color: white;
  font-size: 1.2rem;
}

.admin-nav a {
  display: block;
  padding: 12px 20px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(37, 99, 235, 0.15);
  color: white;
  border-left-color: var(--primary);
}

.admin-main {
  margin-left: 240px;
  padding: 28px;
  background: var(--bg);
  min-height: 100vh;
}

.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.admin-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.85rem;
}

.admin-table tr:hover {
  background: #f8fafc;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-paid { background: #dcfce7; color: #166534; }
.badge-activated { background: #dbeafe; color: #1e40af; }
.badge-yes { background: #dcfce7; color: #166534; }
.badge-no { background: #fee2e2; color: #991b1b; }

.btn-sm {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin: 2px;
}

.btn-activate {
  background: var(--success);
  color: white;
}

.btn-activate:hover {
  background: #15803d;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.stat-card .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-card .label {
  color: var(--text-light);
  font-weight: 500;
  margin-top: 4px;
  font-size: 0.9rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
  .founder-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .founder-photo {
    margin: 0 auto;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    width: 100%;
    position: relative;
    min-height: auto;
  }
  .admin-main {
    margin-left: 0;
  }
  .logo-area img {
    height: 44px;
  }
  .logo-text h1 {
    font-size: 1.15rem;
  }
  .hero-text h2 {
    font-size: 1.7rem;
  }
}

@media (max-width: 600px) {
  .nav-links a:not(.btn-nav-login) {
    display: none;
  }
  .year-btn {
    min-width: 100%;
    padding: 20px;
  }
  .video-container iframe {
    height: 240px;
  }
  .header-inner {
    padding: 10px 16px;
  }
}
