/*
Theme Name: OAlearn Press - Educational PDF Theme
Theme URI: https://example.com/edupdf-press
Author: OAlearn Educational Themes
Author URI: https://example.com
Description: High-speed, modern WordPress theme designed specifically for educational PDF notes, chapter syllabi, previous year question papers, and study material downloads. Features dedicated PDF custom post type, external cloud download links, clean straight-edge cards, light gradient header, fast responsive navigation, built-in demo content importer, and zero viewer bloat.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: edupdf-press
Tags: education, custom-post-type, custom-fields, grid-layout, mobile-friendly, two-columns, translation-ready
*/

/* EduPDF Press Core Stylesheet - Modern Educational UI */
:root {
  --edupdf-primary: #1e3a8a;
  --edupdf-primary-hover: #1e40af;
  --edupdf-accent: #2563eb;
  --edupdf-accent-light: #eff6ff;
  --edupdf-success: #16a34a;
  --edupdf-success-hover: #15803d;
  --edupdf-bg: #f8fafc;
  --edupdf-card-bg: #ffffff;
  --edupdf-text-main: #0f172a;
  --edupdf-text-muted: #64748b;
  --edupdf-border: #e2e8f0;
  --edupdf-radius: 0px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--edupdf-bg);
  color: var(--edupdf-text-main);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  width: 100%;
  overflow-x: hidden;
}

a {
  color: var(--edupdf-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--edupdf-primary-hover);
}

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

/* Full Width & Centered Responsive Container */
.edupdf-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 640px) {
  .edupdf-container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Header with Light Gradient & Vibrant Elements */
.edupdf-site-header {
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 45%, #faf5ff 100%);
  border-bottom: 1px solid rgba(191, 219, 254, 0.7);
  position: relative;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.edupdf-top-bar {
  background: #0f172a;
  color: #cbd5e1;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #1e293b;
}

.edupdf-top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.edupdf-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}

.edupdf-logo {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.edupdf-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.edupdf-search-form {
  display: flex;
  flex: 1;
  max-width: 520px;
  position: relative;
}

.edupdf-search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid #bfdbfe;
  border-radius: 0px;
  font-size: 14px;
  font-weight: 500;
  background: #ffffff;
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.edupdf-search-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.edupdf-search-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #2563eb;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* Category Nav Bar */
.edupdf-category-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--edupdf-border);
  padding: 10px 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.edupdf-category-bar::-webkit-scrollbar {
  display: none;
}

.edupdf-category-list {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.edupdf-category-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.edupdf-category-chip:hover,
.edupdf-category-chip.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* PDF Card Grid */
.edupdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.edupdf-card {
  background: #ffffff;
  border: 1px solid var(--edupdf-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.edupdf-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  border-color: #93c5fd;
}

.edupdf-card-cover-wrap {
  position: relative;
  height: 220px;
  background: #0f172a;
  overflow: hidden;
}

.edupdf-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.edupdf-card:hover .edupdf-card-cover {
  transform: scale(1.03);
}

.edupdf-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.edupdf-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.edupdf-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.edupdf-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 16px;
}

.edupdf-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  padding: 3px 8px;
  border: 1px solid #e2e8f0;
}

.edupdf-card-btn {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid #bfdbfe;
  text-align: center;
  transition: all 0.2s;
}

.edupdf-card-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* ===================================================
   SINGLE PDF FULL-WIDTH GORGEOUS LAYOUT (FIXED & EXPANDED)
   =================================================== */
.edupdf-single-wrapper {
  margin: 28px auto 64px auto;
  width: 100%;
}

.edupdf-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.edupdf-breadcrumbs a {
  color: #64748b;
  font-weight: 500;
}

.edupdf-breadcrumbs a:hover {
  color: #2563eb;
}

.edupdf-single-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 36px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  width: 100%;
}

.edupdf-single-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

@media (max-width: 960px) {
  .edupdf-single-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .edupdf-single-card {
    padding: 20px;
  }
}

.edupdf-single-cover-wrap {
  position: relative;
  background: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.edupdf-single-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

.edupdf-cover-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #2563eb;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.edupdf-single-title {
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 16px 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

@media (max-width: 640px) {
  .edupdf-single-title {
    font-size: 22px;
  }
}

.edupdf-info-pill-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.edupdf-info-pill {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edupdf-info-divider {
  color: #cbd5e1;
}

.edupdf-author-box {
  padding: 12px 16px;
  background: #eff6ff;
  border-left: 3px solid #2563eb;
  font-size: 14px;
  color: #1e3a8a;
  margin-bottom: 24px;
}

.edupdf-description-box {
  margin: 24px 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.75;
}

.edupdf-description-box h2,
.edupdf-description-box h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 20px 0 10px 0;
}

.edupdf-syllabus-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 20px;
  margin: 24px 0;
}

.edupdf-syllabus-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.edupdf-syllabus-list {
  margin: 0;
  padding-left: 20px;
  color: #475569;
  font-size: 14px;
}

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

.edupdf-download-action-area {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.edupdf-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #16a34a;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  padding: 16px 36px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  width: 100%;
  max-width: 420px;
}

.edupdf-download-btn:hover {
  background: #15803d;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45);
}

.edupdf-external-notice {
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Related PDFs Section */
.edupdf-related-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid #f1f5f9;
}

.edupdf-section-heading {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

/* Footer */
.edupdf-footer {
  background: #0f172a;
  color: #94a3b8;
  border-top: 1px solid #1e293b;
  padding: 56px 0 28px 0;
  margin-top: 64px;
}

.edupdf-footer a {
  color: #cbd5e1;
}

.edupdf-footer a:hover {
  color: #60a5fa;
}

.edupdf-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .edupdf-footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.edupdf-footer-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.edupdf-footer-bottom {
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}

/* Header Upload Button */
.edupdf-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.edupdf-header-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2563eb;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 13px;
  padding: 8px 18px;
  border: 1px solid #1d4ed8;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.edupdf-header-upload-btn:hover {
  background: #1d4ed8;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

/* Frontend Upload Form Styling */
.edupdf-upload-wrapper {
  max-width: 900px;
  margin: 30px auto 60px auto;
  padding: 0 20px;
}

.edupdf-upload-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 36px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.edupdf-form-group {
  margin-bottom: 24px;
}

.edupdf-form-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.edupdf-form-label span.required {
  color: #dc2626;
}

.edupdf-form-control {
  width: 100%;
  padding: 11px 16px;
  font-size: 14px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s, background-color 0.2s;
}

.edupdf-form-control:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.edupdf-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.edupdf-form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

@media (max-width: 640px) {
  .edupdf-form-grid-2,
  .edupdf-form-grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.edupdf-submit-btn {
  background: #2563eb;
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s ease;
}

.edupdf-submit-btn:hover {
  background: #1d4ed8;
}

.edupdf-alert-success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
}

.edupdf-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
}
