/* Music Admin Theme - Custom Styles */

/* ===========================
   Custom Variables
   =========================== */
:root {
  --primary: #5B7FE8;
  --primary-dark: #4F6FD8;
  --cream: #F5F1E8;
  
  /* Ghost Custom Font Support */
  --gh-font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  --gh-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* Apply Ghost Custom Fonts */
body {
  font-family: var(--gh-font-body);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--gh-font-heading);
}

/* ===========================
   Base Overrides
   =========================== */
html {
  scroll-behavior: smooth;
}

/* Container max-width constraint for better readability */
.container,
.max-w-7xl,
.max-w-6xl,
.max-w-5xl {
  max-width: 1400px !important;
}

@media (min-width: 1536px) {
  .container,
  .max-w-7xl,
  .max-w-6xl,
  .max-w-5xl {
    max-width: 1400px !important;
  }
}

/* Typography - Default medium weight */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
}

button, .button {
  font-weight: 500;
}

label {
  font-weight: 500;
}

/* Allow font-bold to work properly */
.font-bold {
  font-weight: 700 !important;
}

.font-semibold {
  font-weight: 600 !important;
}

/* ===========================
   Header Backdrop Blur Support
   =========================== */
header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ===========================
   Consultation Section Background Overlay
   =========================== */
section.py-24.relative.overflow-hidden.text-white .absolute.inset-0 {
  position: absolute !important;
}

section.py-24.relative.overflow-hidden.text-white .absolute.inset-0.bg-gradient-to-br {
  background: linear-gradient(to bottom right, rgba(61, 79, 153, 0.92), rgba(74, 95, 184, 0.88), rgba(45, 60, 115, 0.92)) !important;
}

/* Ensure backdrop blur works */
.backdrop-blur-sm {
  backdrop-filter: blur(0.125rem) !important;
  -webkit-backdrop-filter: blur(0.125rem) !important;
}

/* ===========================
   Prose Styles for Blog Content
   =========================== */
.prose {
  max-width: 65ch;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  line-height: 1.75;
}

.prose h1 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-size: 2.25em;
  font-weight: 700;
}

.prose h2 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-size: 1.875em;
  font-weight: 700;
}

.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  font-size: 1.5em;
  font-weight: 600;
}

.prose h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-size: 1.25em;
  font-weight: 600;
}

.prose ul, .prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose img {
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 0.5rem;
}

.prose blockquote {
  font-style: italic;
  border-left: 4px solid var(--primary);
  padding-left: 1em;
  margin: 1.6em 0;
  color: #4b5563;
}

.prose code {
  background-color: #f3f4f6;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background-color: #1f2937;
  color: #f3f4f6;
  padding: 1em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.71em 0;
}

.prose pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
}

.prose a:hover {
  color: var(--primary-dark);
}

/* ===========================
   Ghost Pagination
   =========================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a,
.pagination .page-number {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  color: #374151;
  transition: all 0.2s;
  text-decoration: none;
}

.pagination a:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination .page-number.current {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===========================
   Custom Scrollbar
   =========================== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border-radius: 5px;
}

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

/* ===========================
   Focus States
   =========================== */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===========================
   Screen Reader Only (SEO)
   =========================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===========================
   Newsletter Form
   =========================== */
#newsletter-email:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 127, 232, 0.1);
}

/* ===========================
   Loading Spinner
   =========================== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(91, 127, 232, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===========================
   Reading Progress Bar
   =========================== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--primary);
  z-index: 9999;
  transition: width 0.1s;
}

/* ===========================
   Code Copy Button
   =========================== */
.copy-code-button {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 4px 8px;
  font-size: 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-code-button:hover {
  background: rgba(255,255,255,0.2);
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

/* ===========================
   Page Transitions
   =========================== */
@keyframes pageTransitionOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

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

.page-transition-out {
  animation: pageTransitionOut 0.3s ease-in-out forwards;
}

.page-transition-in {
  animation: pageTransitionIn 0.3s ease-in-out forwards;
}

main {
  animation: pageTransitionIn 0.3s ease-in-out;
}

/* Keep warm background consistent */
.bg-\[#F5F1E8\] {
  background-color: #F5F1E8 !important;
}

.text-\[#F5F1E8\] {
  color: #F5F1E8 !important;
}

.bg-\[#F5F1E8\]\/50 {
  background-color: rgba(245, 241, 232, 0.5) !important;
}

.bg-\[#F5F1E8\]\/80 {
  background-color: rgba(245, 241, 232, 0.8) !important;
}

.bg-\[#F5F1E8\]\/95 {
  background-color: rgba(245, 241, 232, 0.95) !important;
}

/* ===========================
   Smooth Vinyl CD Rotation
   =========================== */
@keyframes vinyl-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.cd-player-rotation {
  animation: vinyl-spin 20s linear infinite;
}

.shine-effect {
  transform-origin: center;
}

/* ===========================
   Matte Image Styling
   =========================== */
img:not(.no-matte) {
  filter: saturate(0.85) contrast(0.92) brightness(0.98);
  opacity: 0.96;
}

img:not(.no-matte):hover {
  filter: saturate(1) contrast(1) brightness(1);
  opacity: 1;
  transition: all 0.3s ease;
}

/* Preserve logo and icon clarity */
header img,
.logo img,
svg,
.icon img {
  filter: none !important;
  opacity: 1 !important;
}


/* ===========================
   Ghost Koenig Editor Styles (Required)
   =========================== */
.kg-width-wide {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.kg-width-full {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.kg-image {
  max-width: 100%;
  height: auto;
}

.kg-image-card {
  margin: 2rem 0;
}

.kg-gallery-container {
  display: flex;
  flex-direction: column;
  margin: 2rem 0;
}

.kg-gallery-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kg-bookmark-card {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin: 2rem 0;
  overflow: hidden;
}

.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.kg-bookmark-content {
  flex-grow: 1;
  padding: 1.5rem;
}

.kg-bookmark-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.kg-bookmark-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  color: #9ca3af;
}

.kg-bookmark-thumbnail {
  min-width: 200px;
  max-width: 200px;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===========================
   Print Styles
   =========================== */
@media print {
  .no-print, header, footer {
    display: none;
  }
  
  body {
    padding-top: 0 !important;
  }
}