/* ============================================================
   Vantrashell - Scholarly Quest Podcast
   Custom Stylesheet
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Primary palette - academic blues/purples */
  --color-primary: #2c3e7a;
  --color-primary-light: #4a5fa8;
  --color-primary-dark: #1a2650;
  --color-secondary: #6c5ce7;
  --color-secondary-light: #a29bfe;

  /* Accent - playful pops */
  --color-accent: #00b894;
  --color-accent-warm: #fd79a8;
  --color-accent-gold: #f0c040;

  /* Neutrals */
  --color-bg: #f8f9fc;
  --color-surface: #ffffff;
  --color-border: #e2e6ef;
  --color-text: #2d3748;
  --color-text-muted: #718096;
  --color-text-light: #a0aec0;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 50px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(44, 62, 122, 0.08);
  --shadow-md: 0 4px 12px rgba(44, 62, 122, 0.1);
  --shadow-lg: 0 8px 30px rgba(44, 62, 122, 0.12);
  --shadow-hover: 0 8px 25px rgba(108, 92, 231, 0.18);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ---------- Base & Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-primary-dark);
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary-light);
}

/* ---------- Navbar ---------- */
.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color-surface) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand img {
  height: 38px;
  width: 38px;
  border-radius: 50%;
}

.navbar-vantrashell {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  padding: 0.6rem 0;
  box-shadow: var(--shadow-md);
}

.navbar-vantrashell .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  font-size: 0.95rem;
}

.navbar-vantrashell .nav-link:hover,
.navbar-vantrashell .nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.15);
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ---------- Hero Section ---------- */
.hero-section {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
  color: #fff;
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
  animation: heroShimmer 8s ease-in-out infinite alternate;
}

@keyframes heroShimmer {
  0% { transform: translateX(-10%) translateY(-5%); }
  100% { transform: translateX(10%) translateY(5%); }
}

.hero-section h1 {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.hero-section p {
  font-size: 1.15rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.hero-section .hero-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.3);
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

/* ---------- Search / Filter Bar ---------- */
.search-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  box-shadow: var(--shadow-md);
  margin-top: -2rem;
  position: relative;
  z-index: 10;
}

.search-section .form-control,
.search-section .form-select {
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-border);
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-section .form-control:focus,
.search-section .form-select:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.btn-clear-filters {
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
}

/* ---------- Podcast Cards ---------- */
.podcast-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.podcast-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.podcast-avatar {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 3px solid var(--color-border);
  flex-shrink: 0;
}

.podcast-card .podcast-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-xs);
}

.podcast-meta {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.podcast-meta .badge {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.3em 0.7em;
}

.badge-category {
  background-color: var(--color-secondary-light) !important;
  color: var(--color-primary-dark) !important;
}

.badge-year {
  background-color: var(--color-accent) !important;
  color: #fff !important;
}

/* Audio player */
.podcast-audio audio {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-pill);
}

.podcast-audio audio::-webkit-media-controls-panel {
  background: linear-gradient(135deg, #f0f2f8, #e8eaf6);
  border-radius: var(--radius-pill);
}

/* Summary toggle */
.btn-summary {
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  transition: all var(--transition-fast);
}

.podcast-summary-content {
  background: linear-gradient(135deg, #f8f9fc, #eef0f7);
  border-left: 4px solid var(--color-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-md);
  font-size: 0.93rem;
  line-height: 1.8;
}

/* ---------- No Results ---------- */
.no-results {
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  color: var(--color-text-muted);
}

.no-results i {
  font-size: 3rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

/* ---------- Contact Form ---------- */
.contact-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
}

.contact-section .form-control,
.contact-section .form-select {
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  padding: 0.7rem 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.contact-section .form-control:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.contact-info-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.contact-info-card h4 {
  color: #fff;
}

.contact-info-card a {
  color: var(--color-accent-gold);
}

.contact-info-card a:hover {
  color: #fff;
}

/* ---------- About Page ---------- */
.about-hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-secondary) 100%);
  color: #fff;
  padding: var(--space-2xl) 0;
  text-align: center;
}

.about-hero h1 {
  color: #fff;
}

.about-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base);
}

.about-card:hover {
  transform: translateY(-4px);
}

.about-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* ---------- Admin CRM ---------- */
.admin-header {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #1e1e3f 50%, var(--color-secondary) 100%);
  color: #fff;
  padding: var(--space-xl) 0;
}

.admin-header h1 {
  color: #fff;
}

.action-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  border: 2px solid var(--color-border);
  transition: all var(--transition-base);
  cursor: pointer;
  height: 100%;
}

.action-card:hover {
  border-color: var(--color-secondary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.action-card i {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.action-card h5 {
  font-weight: 600;
}

.action-card-add { color: var(--color-accent); }
.action-card-multi { color: var(--color-secondary); }
.action-card-remove { color: var(--color-accent-warm); }
.action-card-search { color: var(--color-primary); }

/* CRM table */
.crm-table {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.crm-table thead {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
}

.crm-table thead th {
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.75rem;
  border: none;
}

.crm-table tbody tr {
  transition: background var(--transition-fast);
}

.crm-table tbody tr:hover {
  background-color: #f0f2ff;
}

/* ---------- Footer ---------- */
.footer-vantrashell {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #1a1a3e 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}

.footer-vantrashell h5 {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: var(--space-md);
}

.footer-vantrashell a {
  color: var(--color-accent-gold);
  transition: color var(--transition-fast);
}

.footer-vantrashell a:hover {
  color: #fff;
}

.footer-vantrashell hr {
  border-color: rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ---------- Buttons ---------- */
.btn-primary-vt {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: none;
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-primary-vt:hover {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary-light));
  color: #fff;
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.btn-accent-vt {
  background: var(--color-accent);
  border: none;
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-accent-vt:hover {
  background: #00a884;
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- Utilities ---------- */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-lg);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
  border-radius: 2px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Modal Enhancements ---------- */
.modal-header {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.modal-header .modal-title {
  font-family: var(--font-heading);
  font-weight: 600;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
}

.modal-content {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* ---------- Toast / Alert Styles ---------- */
.alert-floating {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  min-width: 300px;
  max-width: 450px;
  animation: slideInRight 0.4s ease;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---------- Loading Spinner ---------- */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .podcast-card {
    padding: var(--space-md);
  }

  .podcast-avatar {
    width: 80px;
    height: 80px;
  }

  .search-section {
    margin-top: -1rem;
    padding: var(--space-md);
  }
}

@media (max-width: 575.98px) {
  .hero-section {
    padding: var(--space-xl) 0;
  }

  .hero-section h1 {
    font-size: 1.6rem;
  }

  .podcast-avatar {
    width: 64px;
    height: 64px;
  }

  .podcast-card .podcast-title {
    font-size: 1rem;
  }

  .action-card {
    padding: var(--space-md);
  }

  .action-card i {
    font-size: 1.8rem;
  }
}

/* ---------- Scrollbar Styling ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-secondary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}
