/* CaseyMedia LLC - Custom Tailwind CSS Theme */
/* Orange and Purple Theme with Background Image */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  /* Brand Colors - Orange & Purple Theme */
  --primary-orange: #FF6B35;
  --primary-orange-dark: #E55A2B;
  --primary-orange-light: #FF8C61;

  --primary-purple: #6B2BFF;
  --primary-purple-dark: #5A1FE6;
  --primary-purple-light: #8C5AFF;

  --accent-orange: #FFB703;
  --accent-purple: #A67CFF;

  /* Neutral Colors */
  --bg-dark: #1a1a2e;
  --bg-light: #16213e;
  --text-light: #ffffff;
  --text-muted: #c7c7c7;
  --border-color: rgba(255, 107, 53, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

body.modal-open {
  overflow: hidden;
}

/* Fixed Background Image */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://sx.nafcfur.com/r/GXKvvM.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -1;
  opacity: 0.15;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-sm {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header Styles */
header {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-orange) 100%);
  padding: 2rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.site-logo {
  max-height: 80px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* Navigation */
nav { margin-top: 1.5rem; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--text-light);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 80%;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
  padding: 3rem 0;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section Title */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary-orange);
}

/* Cards */
.card {
  background: rgba(26, 26, 46, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(255, 107, 53, 0.2);
  border-color: var(--primary-orange);
}

.card-header {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary-orange);
}

.card-content {
  color: var(--text-muted);
  line-height: 1.8;
}

/* Pills (RMT) */
.pill {
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid;
}
.pill-orange {
  background: rgba(255, 107, 53, 0.1);
  border-left-color: var(--primary-orange);
}
.pill-purple {
  background: rgba(107, 43, 255, 0.1);
  border-left-color: var(--primary-purple);
}

/* Info Box */
.info-box {
  background: linear-gradient(135deg, rgba(107, 43, 255, 0.15) 0%, rgba(255, 107, 53, 0.15) 100%);
  border-left: 4px solid var(--primary-orange);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

.info-box p {
  margin: 0;
  font-style: italic;
  color: var(--text-light);
}

/* Station Cards */
.station-card {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.station-card:hover {
  border-color: var(--primary-orange);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.2);
}

.station-callsign {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-orange);
  margin-bottom: 0.5rem;
}

.station-frequency {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-purple);
}

.station-info {
  margin-top: 1rem;
  line-height: 1.8;
}

.station-info strong { color: var(--primary-orange); }

.station-logo {
  max-height: 100px;
  width: auto;
  float: right;
  margin-left: 1rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* RDS Display */
.rds {
  background: rgba(107, 43, 255, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: var(--accent-purple);
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-small {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-purple) 100%);
  color: var(--text-light);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border: 1px solid var(--primary-orange);
}

.btn-secondary:hover { background: rgba(255, 107, 53, 0.2); }

/* Forms */
.form-group { margin-bottom: 1.5rem; }

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--primary-orange);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Links */
a { color: var(--primary-orange); transition: all 0.2s ease; }
a:hover { color: var(--primary-orange-light); text-decoration: underline; }

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tab {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 107, 53, 0.25);
  color: var(--text-light);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.tab:hover {
  transform: translateY(-1px);
  border-color: var(--primary-orange);
}

.tab.active {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.25), rgba(107, 43, 255, 0.25));
  border-color: var(--primary-orange);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Collapsible Sections */
.collapsible-trigger {
  cursor: pointer;
  color: var(--primary-purple);
  font-weight: 600;
  display: inline-block;
  margin: 1rem 0;
  transition: all 0.2s ease;
}

.collapsible-trigger:hover {
  color: var(--primary-purple-light);
  transform: translateX(4px);
}

.collapsible-content {
  display: none;
  margin-top: 0.75rem;
  line-height: 1.8;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 107, 53, 0.15);
}

.collapsible-content.is-open { display: block; }

/* Frequency background rich content */
.frequency-background img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 0.5rem 0;
  cursor: zoom-in;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.frequency-background blockquote {
  margin: 1rem 0;
  padding: 1rem 1rem;
  border-left: 4px solid rgba(107, 43, 255, 0.6);
  background: rgba(107, 43, 255, 0.08);
  border-radius: 10px;
}

.frequency-background table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: rgba(26, 26, 46, 0.65);
  border-radius: 12px;
  overflow: hidden;
}

.frequency-background td,
.frequency-background th {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 107, 53, 0.1);
}

/* TV Subchannels */
.subchannel-list {
  margin-top: 0.75rem;
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.subchannel-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 107, 53, 0.18);
  background: rgba(26, 26, 46, 0.75);
}

.subchannel-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  padding: 6px;
}

.subchannel-body { flex: 1; }

.subchannel-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}

.subchannel-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 53, 0.12);
}

.subchannel-actions {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.subchannel-actions a {
  color: var(--primary-orange);
  font-weight: 700;
}

/* Providers */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.provider-card {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.provider-card:hover {
  border-color: var(--primary-orange);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.2);
  transform: translateY(-2px);
}

.provider-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.provider-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-orange);
}

.provider-website {
  margin-top: 0.25rem;
  color: var(--text-muted);
  word-break: break-all;
}

.provider-logo {
  max-height: 60px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  padding: 6px;
}

.provider-block {
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 107, 53, 0.12);
  padding-top: 1rem;
}

.provider-block-title {
  font-weight: 800;
  color: var(--primary-purple);
  margin-bottom: 0.5rem;
}

.provider-lines {
  color: var(--text-muted);
  line-height: 1.7;
}

.provider-areas {
  margin-top: 0.75rem;
  margin-left: 1.25rem;
  color: var(--text-light);
}

/* Loading Spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-orange);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

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

/* Footer */
footer {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-orange) 100%);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-orange);
  transform: translateY(-2px);
}

.footer-copyright {
  text-align: center;
  padding: 1rem 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Image Overlay Viewer */
#img-overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
}

#img-overlay.open { display: block; }

.img-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
}

.img-overlay-panel {
  position: absolute;
  inset: 6vh 5vw;
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 16px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.img-overlay-toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 107, 53, 0.2);
  justify-content: flex-end;
}

.img-overlay-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 1rem;
}

.img-overlay-stage img {
  max-width: 100%;
  max-height: 100%;
  transform-origin: center center;
  transition: transform 0.08s linear;
  cursor: zoom-out;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container { padding: 0 1rem; }

  .page-title { font-size: 2rem; }

  .nav-links { flex-direction: column; gap: 0.5rem; }

  .station-logo {
    float: none;
    display: block;
    margin: 1rem auto;
  }

  .card { padding: 1.5rem; }

  .img-overlay-panel { inset: 6vh 3vw; }
}

@media (max-width: 480px) {
  .page-title { font-size: 1.5rem; }
  .card { padding: 1rem; }

  .station-callsign { font-size: 1.4rem; }
  .station-frequency { font-size: 1.2rem; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none; }

/* Print Styles */
@media print {
  body::before { display: none; }
  header, footer, nav, .tabs, .tab-panel .card:first-child { display: none; }
  .card, .station-card, .provider-card { border: 1px solid #000; page-break-inside: avoid; }
}
