/*
Theme Name: GeneratePress Child
Template: generatepress
Version: 1.0.0
*/

:root {
  --primary: #4F46E5;
  --secondary: #7C3AED;
  --gradient: linear-gradient(135deg, #4F46E5, #7C3AED);
  --gradient-hover: linear-gradient(135deg, #4338CA, #6D28D9);
  --bg-soft: #F5F3FF;
  --bg-card: #ffffff;
  --text: #1F2937;
  --text-light: #6B7280;
  --text-muted: #9CA3AF;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(79, 70, 229, 0.10);
  --shadow-hover: 0 8px 32px rgba(79, 70, 229, 0.18);
  --border: #E5E7EB;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ─── FORMS & INPUTS ─── */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}

/* ─── BUTTONS ─── */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
.wp-block-button .wp-block-button__link,
.wpcf7-submit {
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  display: inline-block;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover,
.wp-block-button .wp-block-button__link:hover,
.wpcf7-submit:hover {
  background: var(--gradient-hover);
  transform: scale(1.02);
  color: #fff;
}

button:active,
input[type="button"]:active,
input[type="reset"]:active,
input[type="submit"]:active,
.button:active,
.wp-block-button .wp-block-button__link:active,
.wpcf7-submit:active {
  transform: scale(0.98);
}

/* ─── PROGRESS BAR ─── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient);
  z-index: 99999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ─── SINGLE POST HERO ─── */
.single-post .site-content {
  padding-top: 0;
}

.single-post .inside-article {
  background: transparent;
  padding: 0;
}

.post-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  margin: 0 0 40px;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

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

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.92) 0%,
    rgba(15, 23, 42, 0.6) 50%,
    rgba(15, 23, 42, 0.3) 100%
  );
}

.post-hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 48px 48px;
  width: 100%;
  max-width: 800px;
}

.post-hero-content .entry-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin: 0 0 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.post-hero-meta .avatar {
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
}

.post-hero-meta a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

.post-hero-meta a:hover {
  color: #fff;
  text-decoration: underline;
}

.post-hero-meta .posted-on,
.post-hero-meta .byline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-hero-meta .cat-links a {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.post-hero-meta .cat-links a:hover {
  background: rgba(255,255,255,0.3);
}

.post-hero-noimg {
  background: var(--gradient);
  min-height: 280px;
}

/* ─── ENTRY CONTENT (POSTS + PAGES) ─── */
.single-post .entry-content,
.page .entry-content {
  max-width: 740px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text);
  padding: 0 24px;
}

.single-post .entry-content p,
.page .entry-content p {
  margin-bottom: 1.5em;
}

.single-post .entry-content h2,
.page .entry-content h2 {
  font-size: 1.75rem;
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  scroll-margin-top: 100px;
  color: var(--text);
}

.single-post .entry-content h3,
.page .entry-content h3 {
  font-size: 1.35rem;
  margin-top: 1.8em;
  margin-bottom: 0.5em;
  scroll-margin-top: 100px;
  color: var(--text);
}

.single-post .entry-content blockquote,
.page .entry-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--bg-soft);
  margin: 2em 0;
  padding: 1.2em 1.5em;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

.single-post .entry-content code,
.page .entry-content code {
  background: #F3F4F6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.single-post .entry-content pre,
.page .entry-content pre {
  background: #1F2937;
  color: #F9FAFB;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.9rem;
}

.single-post .entry-content pre code,
.page .entry-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.single-post .entry-content img,
.page .entry-content img {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

/* ─── TABLE OF CONTENTS ─── */
.toc-container {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 auto 32px;
  max-width: 740px;
}

.toc-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  margin-bottom: 6px;
}

.toc-list a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.toc-list a:hover {
  background: rgba(79, 70, 229, 0.08);
}

.toc-list .toc-h3 {
  padding-left: 24px;
  font-size: 0.88rem;
}

.toc-list .toc-active {
  background: rgba(79, 70, 229, 0.12);
  font-weight: 600;
}

/* ─── AUTHOR CARD ─── */
.author-card {
  max-width: 740px;
  margin: 48px auto;
  padding: 32px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  gap: 20px;
  border: 1px solid var(--border);
}

.author-card-img img {
  border-radius: 50%;
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.author-card-body {
  flex: 1;
}

.author-card-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text);
}

.author-card-name a {
  color: var(--primary);
  text-decoration: none;
}

.author-card-bio {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0 0 8px;
}

.author-card-link {
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.author-card-link:hover {
  text-decoration: underline;
}

/* ─── RELATED POSTS ─── */
.related-posts {
  max-width: 740px;
  margin: 48px auto;
}

.related-posts-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: block;
}

.related-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.related-post-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.related-post-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
}

.related-post-info {
  padding: 12px 14px;
}

.related-post-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text);
  line-height: 1.35;
}

.related-post-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── POST NAVIGATION ─── */
.post-navigation-cards {
  max-width: 740px;
  margin: 48px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.post-nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.post-nav-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.post-nav-card.next {
  text-align: right;
}

.post-nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.post-nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

/* ─── SIDEBAR ─── */
.single-post .inside-right-sidebar,
.blog .inside-right-sidebar,
.archive .inside-right-sidebar {
  position: sticky;
  top: 24px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s;
}

.sidebar-widget:hover {
  box-shadow: var(--shadow);
}

.sidebar-widget-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg-soft);
}

.gpa-quick-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gpa-quick-form select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s;
}

.gpa-quick-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.gpa-quick-form .gpa-btn {
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.gpa-quick-form .gpa-btn:hover {
  background: var(--gradient-hover);
  transform: scale(1.02);
}

.gpa-quick-form .gpa-btn:active {
  transform: scale(0.98);
}

.gpa-result {
  margin-top: 16px;
}

.gpa-loading {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.gpa-error {
  font-size: 0.85rem;
  color: #dc2626;
  text-align: center;
  margin: 0;
}

.gpa-success {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--gradient);
  color: #fff;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.category-pill:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  color: #fff;
}

.popular-posts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.popular-post-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-soft);
}

.popular-post-item:last-child {
  border-bottom: none;
}

.popular-post-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.popular-post-thumb-placeholder {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: var(--gradient);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
}

.popular-post-info {
  flex: 1;
  min-width: 0;
}

.popular-post-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: block;
  line-height: 1.3;
  transition: color 0.2s;
}

.popular-post-title:hover {
  color: var(--primary);
}

.popular-post-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.study-tip {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  padding-left: 14px;
  border-left: 3px solid var(--primary);
  font-style: italic;
  margin: 0;
}

.sidebar-search-form {
  display: flex;
}

.sidebar-search-form input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 0.85rem;
  transition: border-color 0.2s;
}

.sidebar-search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.sidebar-search-form button {
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0 14px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.sidebar-search-form button:hover {
  background: var(--gradient-hover);
}

/* ─── HIDE DEFAULT META ON SINGLE ─── */
.single-post .entry-meta {
  display: none;
}

.single-post .site-main > footer {
  display: none;
}

/* ─── BLOG & ARCHIVE POST CARDS ─── */
.blog .page-header,
.archive .page-header {
  background: var(--gradient);
  color: #fff;
  padding: 48px 40px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  border: none;
}

.blog .page-header h1,
.archive .page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.blog .page-header p,
.archive .page-header p {
  color: rgba(255,255,255,0.85);
  margin: 8px 0 0;
  font-size: 1.05rem;
}

.blog .inside-article,
.archive .inside-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog .inside-article:hover,
.archive .inside-article:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.blog .inside-article .post-image,
.archive .inside-article .post-image {
  margin: 0;
}

.blog .inside-article .post-image img,
.archive .inside-article .post-image img {
  border-radius: 0;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.blog .inside-article .entry-header,
.archive .inside-article .entry-header {
  padding: 24px 24px 0;
}

.blog .inside-article .entry-title,
.archive .inside-article .entry-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
}

.blog .inside-article .entry-title a,
.archive .inside-article .entry-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.blog .inside-article .entry-title a:hover,
.archive .inside-article .entry-title a:hover {
  color: var(--primary);
}

.blog .inside-article .entry-meta,
.archive .inside-article .entry-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0 24px;
  margin: 8px 0 0;
}

.blog .inside-article .entry-meta a,
.archive .inside-article .entry-meta a {
  color: var(--text-light);
}

.blog .inside-article .entry-summary,
.archive .inside-article .entry-summary {
  padding: 16px 24px 24px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-light);
}

.blog .inside-article .entry-summary p:last-child,
.archive .inside-article .entry-summary p:last-child {
  margin-bottom: 0;
}

.blog .inside-article .read-more-container,
.archive .inside-article .read-more-container {
  padding: 0 24px 24px;
}

.blog .inside-article .read-more,
.archive .inside-article .read-more {
  display: inline-block;
  background: var(--gradient);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.blog .inside-article .read-more:hover,
.archive .inside-article .read-more:hover {
  background: var(--gradient-hover);
  transform: scale(1.03);
  color: #fff;
}

.blog .inside-article footer.entry-meta,
.archive .inside-article footer.entry-meta {
  display: none;
}

/* ─── ARCHIVE PAGINATION ─── */
.blog .paging-navigation,
.archive .paging-navigation {
  background: transparent;
  padding: 20px 0;
  border: none;
}

.blog .paging-navigation .nav-links,
.archive .paging-navigation .nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.blog .paging-navigation .page-numbers,
.archive .paging-navigation .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.blog .paging-navigation .page-numbers:hover,
.archive .paging-navigation .page-numbers:hover {
  border-color: var(--primary);
  background: var(--bg-soft);
}

.blog .paging-navigation .page-numbers.current,
.archive .paging-navigation .page-numbers.current {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}

/* ─── PAGES ─── */
.page.no-sidebar .site-content {
  display: block;
}

.page.no-sidebar .site-main {
  margin-left: 0;
  margin-right: 0;
}

.page .inside-article {
  background: transparent;
  border: none;
  padding: 0;
}

.page:not(.home) .entry-header {
  background: var(--gradient);
  color: #fff;
  padding: 48px 40px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  text-align: center;
}

.page:not(.home) .entry-header .entry-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .post-hero-content {
    padding: 40px 20px 28px;
  }

  .post-hero-content .entry-title {
    font-size: 1.6rem;
  }

  .single-post .entry-content,
  .page .entry-content {
    padding: 0 16px;
    font-size: 1rem;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
  }

  .post-navigation-cards {
    grid-template-columns: 1fr;
  }

  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
  }

  .sidebar-widget {
    padding: 18px;
  }

  .blog .page-header,
  .archive .page-header {
    padding: 32px 20px;
  }

  .blog .page-header h1,
  .archive .page-header h1 {
    font-size: 1.5rem;
  }

  .page:not(.home) .entry-header {
    padding: 32px 20px;
  }

  .page:not(.home) .entry-header .entry-title {
    font-size: 1.5rem;
  }
}


