/* ============================================================
   Ajay Rajak Tutorials — main.css
   Extracted from index.php for browser caching & CSP compliance
   ============================================================ */

/* ── Custom properties ────────────────────────────────────── */
:root {
  --primary:          #0077b6;
  --secondary:        #00b4d8;
  --dark:             #1b1f3b;
  --light:            #f5f7fa;
  --accent:           #ff9e00;
  --success:          #28a745;
  --text-heading:     #343a40;
  --text-body:        #495057;
  --border-radius-md: 8px;
  --border-radius-lg: 10px;
  --shadow-light:     0 2px 8px rgba(0,0,0,.07);
  --shadow-medium:    0 3px 15px rgba(0,0,0,.1);
  --primary-rgb:      0, 119, 182;
}

/* ── Reset / base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background: var(--light);
  color: #333;
  line-height: 1.6;
}

/* ── Header ───────────────────────────────────────────────── */
header {
  background: var(--dark);
  color: #fff;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

.logo-link { display: flex; align-items: center; text-decoration: none; }
.logo      { height: 50px; transition: transform .3s ease; margin-right: 10px; }
.logo:hover { transform: scale(1.05); }

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  letter-spacing: -.5px;
}

nav { display: flex; align-items: center; }

nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  padding: 5px 0;
  transition: color .3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--accent);
  transition: width .3s ease;
}
nav a:hover::after,
nav a.active-nav::after { width: 100%; }

.mobile-menu { display: none; font-size: 24px; cursor: pointer; color: white; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 100px 30px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 550px;
}

.hero-background-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,.3);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 660px;
  background: white;
  padding: 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-medium);
  text-align: left;
}

.hero h2 {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-heading);
}

.hero p {
  font-size: 18px;
  margin-bottom: 30px;
  line-height: 1.7;
  color: var(--text-body);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 12px 28px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
  border: 2px solid transparent;
  transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,.15);
  background-color: var(--secondary);
}

.btn-secondary { background: var(--accent); color: white; margin-left: 15px; }
.btn-secondary:hover { background: #e68a00; color: white; }

/* ── Sections ─────────────────────────────────────────────── */
.section {
  padding: 60px 30px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.section h3,
.section-title {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--dark);
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.section h3::after,
.section-title::after {
  content: '';
  display: block;
  width: 50%;
  height: 3px;
  background: var(--accent);
  margin: 10px auto 0;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-body);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Subjects ─────────────────────────────────────────────── */
.subjects {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.subject {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-medium);
  width: 220px;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
}
.subject:hover { transform: translateY(-5px); box-shadow: 0 5px 20px rgba(0,0,0,.15); }

.subject i {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 15px;
  display: inline-block;
  transition: transform .3s ease;
}
.subject:hover i { transform: scale(1.1); }

.subject h4 {
  margin: 10px 0;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 600;
}
.subject p { font-size: .9rem; color: #666; }

/* ── Course cards ─────────────────────────────────────────── */
.courses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
  text-align: left;
}

.course-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
}
.course-card:hover { transform: translateY(-8px); }

.course-img {
  height: 160px;
  background-color: #e9e9e9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.course-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.course-card:hover .course-img img { transform: scale(1.05); }

.course-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.course-card h4 { margin: 0 0 10px; color: var(--dark); font-size: 18px; }

.course-desc {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.6;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(14px * 1.6 * 3);
}

.course-price { font-weight: bold; color: var(--primary); margin: 10px 0; }

.btn-view-details {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
  border: none;
  margin-top: auto;
  background-color: transparent;
}
.btn-view-details i { margin-left: 5px; transition: transform .3s ease; }
.btn-view-details:hover { color: var(--secondary); }
.btn-view-details:hover i { transform: translateX(4px); }

.no-courses {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  background: #f8f9fa;
  border-radius: 10px;
  color: var(--text-body);
}
.no-courses i { font-size: 3rem; color: #ccc; margin-bottom: 1rem; }

/* ── Why / Features ───────────────────────────────────────── */
.why { background: #d0f4ff; padding: 80px 30px; }
.why-content { max-width: 1200px; margin: 0 auto; text-align: center; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature {
  background: white;
  padding: 30px 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,.05);
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
}
.feature:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }

.feature i { font-size: 40px; color: var(--accent); margin-bottom: 15px; display: block; }
.feature h4 { margin: 15px 0 10px; color: var(--dark); font-size: 1.2rem; font-weight: 600; }
.feature p  { font-size: .95rem; color: var(--text-body); }

/* ── Testimonials ─────────────────────────────────────────── */
.testimonials { background: white; padding: 80px 30px; }
.testimonial-container { max-width: 1200px; margin: 0 auto; }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.testimonial {
  background: var(--light);
  padding: 25px;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 3px 15px rgba(0,0,0,.05);
  text-align: left;
  display: flex;
  flex-direction: column;
}

.testimonial::before {
  content: "\201C";
  font-size: 80px;
  color: rgba(var(--primary-rgb), .1);
  position: absolute;
  top: 20px;
  left: 20px;
  line-height: 0;
}

.testimonial-content {
  margin-bottom: 20px;
  font-style: italic;
  position: relative;
  z-index: 1;
  color: var(--text-body);
  font-size: .95rem;
  flex-grow: 1;
}

.testimonial-author { display: flex; align-items: center; margin-top: auto; }

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #e9e9e9;
  margin-right: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial-avatar i   { color: #999; font-size: 20px; }

.author-details h5 { margin: 0; color: var(--dark); font-size: 1rem; font-weight: 600; }
.author-details p  { margin: 5px 0 0; font-size: 14px; color: #666; }

/* ── About ────────────────────────────────────────────────── */
.about { background: linear-gradient(135deg, #f8f9fa, #e9ecef); padding: 80px 30px; }

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-img {
  background-color: #e9e9e9;
  border-radius: 10px;
  width: 400px;
  height: 400px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-img img { width: 100%; height: 100%; object-fit: cover; }

.about-content { text-align: left; }
.about-content h3          { text-align: left; display: block; }
.about-content h3::after   { margin-left: 0; margin-right: auto; width: 60px; }
.about-content p { line-height: 1.8; margin-bottom: 20px; color: var(--text-body); font-size: 1rem; }

.read-more-btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 10px 25px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: background-color .3s ease, transform .3s ease;
}
.read-more-btn:hover { background: var(--secondary); color: white; transform: translateY(-2px); }

/* ── Contact ──────────────────────────────────────────────── */
.contact { background: white; padding: 60px 30px; }

.contact-container { max-width: 800px; margin: 0 auto; }
.contact-container h3,
.contact-container > p { text-align: center; }
.contact-container h3::after { margin-left: auto; margin-right: auto; }

/* Alert banners */
.form-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--border-radius-md);
  margin-bottom: 20px;
  font-weight: 500;
}
.form-alert--success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.form-alert--error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Honeypot — visually hidden but in DOM */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  visibility: hidden;
  pointer-events: none;
}

.contact-container form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}
.form-group.full { grid-column: span 2; }

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  text-align: left;
  color: var(--text-heading);
}

.required { color: #c0392b; }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: 'Poppins', sans-serif;
  font-size: .95rem;
  transition: border-color .3s ease, box-shadow .3s ease;
  background-color: #fdfdff;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .2);
  background-color: #fff;
}
.form-group textarea { min-height: 150px; resize: vertical; }

.contact-container form button[type="submit"] {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 25px;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: background-color .3s ease, transform .3s ease;
  grid-column: span 2;
  justify-self: center;
  min-width: 200px;
}
.contact-container form button[type="submit"]:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

/* ── Footer ───────────────────────────────────────────────── */
.footer { background: var(--dark); color: #aaa; padding: 40px 0 20px; font-size: .9rem; }

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  padding: 0 30px;
}

.footer-section h4 {
  color: white;
  margin-top: 0;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
}
.footer-section h4::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background: var(--accent);
  margin-top: 10px;
}

.footer-section ul  { list-style: none; padding: 0; margin: 0; }
.footer-section li  { margin-bottom: 10px; }
.footer-section a   { color: #aaa; text-decoration: none; transition: color .3s; }
.footer-section a:hover { color: white; }

.social-links { display: flex; margin-top: 15px; }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: white;
  margin-right: 10px;
  font-size: 1rem;
  transition: background-color .3s ease, transform .3s ease;
}
.social-links a:hover { background: var(--accent); color: var(--dark); transform: translateY(-3px); }

.copyright {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  color: #aaa;
  font-size: 14px;
}

/* ── Modal ────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  overflow: auto;
  background-color: rgba(0,0,0,.7);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fff;
  margin: auto;
  padding: 25px;
  width: 600px;
  max-width: 90%;
  border-radius: 10px;
  box-shadow: 0 5px 30px rgba(0,0,0,.3);
  position: relative;
  animation: modalOpen .4s ease-out;
}

@keyframes modalOpen {
  from { opacity: 0; transform: translateY(-30px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.close-modal {
  background: none;
  border: none;
  color: #aaa;
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  transition: color .2s ease;
  line-height: 1;
  padding: 0;
}
.close-modal:hover,
.close-modal:focus { color: #333; outline: 2px solid var(--primary); border-radius: 2px; }

.modal h3 { text-align: center; color: var(--text-heading); margin-bottom: 25px; font-size: 1.5rem; }

.modal .tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.modal .tab {
  padding: 10px 20px;
  cursor: pointer;
  color: var(--text-body);
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: color .3s ease, border-color .3s ease;
}
.modal .tab.active,
.modal .tab:hover { border-bottom-color: var(--primary); color: var(--primary); font-weight: bold; }

.modal .tab-content         { display: none; }
.modal .tab-content.active  { display: block; }

.modal button.btn {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  margin-top: 10px;
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: bold;
  border-radius: 5px;
}
.modal button.btn:hover { background-color: var(--secondary); border-color: var(--secondary); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 992px) {
  .about-container     { grid-template-columns: 1fr; }
  .about-img           { order: -1; margin: 0 auto 30px; max-width: 350px; }
  .about-content       { text-align: center; }
  .about-content h3::after { margin: 10px auto 0; }
}

@media (max-width: 768px) {
  .mobile-menu { display: block; }

  header nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0; right: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 10px 0;
    display: none;
    box-shadow: 0 5px 10px rgba(0,0,0,.1);
    border-top: 1px solid rgba(255,255,255,.1);
  }
  header nav.active { display: flex; }

  nav a { margin: 12px 0; width: 100%; text-align: center; }
  nav a::after { left: 50%; transform: translateX(-50%); }

  .hero          { padding: 60px 20px; justify-content: center; }
  .hero-content  { text-align: center; }
  .hero h2       { font-size: 2.5rem; }
  .hero p        { font-size: 1.1rem; }
  .btn-secondary { margin-left: 0; margin-top: 15px; }

  .section { padding: 50px 20px; }

  .courses, .features, .testimonial-grid { grid-template-columns: 1fr; }

  .contact-container form { grid-template-columns: 1fr; }
  .form-group.full,
  .contact-container form button[type="submit"] { grid-column: span 1; }

  .footer-container  { grid-template-columns: 1fr; text-align: center; }
  .footer-section h4::after { margin-left: auto; margin-right: auto; }
  .social-links      { justify-content: center; }
}

/* ── Reduced-motion preference ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
