@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,700&display=swap');

:root {
  /* Exact Website Light Theme Colors */
  --bg-color: #f7f3eb;
  --text-color: #1b0d0c;
  --text-muted: #3a3f47;
  --border-color: rgba(27, 13, 12, 0.12);
  --primary-color: #1ba1e2;
  --primary-hover: #1585be;
  --card-bg: #ffffff;
  --card-hover: #fcfbfa;
  --ticker-bg: #1b0d0c; /* dark ticker */
  --header-bg: rgba(247, 243, 235, 0.85);
  --footer-bg: #eeebe5;
  --shadow: 0 1px 3px rgba(27, 13, 12, 0.04);
  --input-bg: #ffffff;
  --input-border: rgba(27, 13, 12, 0.12);
  --badge-bg: #eeebe5;
  --badge-text: #1b0d0c;
}

body.dark-theme {
  /* Exact Website Dark Theme Colors */
  --bg-color: #020618;
  --text-color: #f8fafc;
  --text-muted: #90a1b9;
  --border-color: rgba(255, 255, 255, 0.1);
  --primary-color: #38bdf8;
  --primary-hover: #0ea5e9;
  --card-bg: #0f172b;
  --card-hover: #1e293b;
  --ticker-bg: #020618;
  --header-bg: rgba(2, 6, 24, 0.85);
  --footer-bg: #0f172b;
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  --input-bg: #0f172b;
  --input-border: rgba(255, 255, 255, 0.15);
  --badge-bg: #1d293d;
  --badge-text: #f8fafc;
}

/* Smooth globally applied variables mapping */
body {
  background-color: var(--bg-color) !important;
  color: var(--text-color) !important;
  font-family: 'Inter', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Custom continuous news ticker ticker animation */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  display: flex;
  width: max-content;
  animation: marquee 35s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

/* Dynamic view transition animation */
.fade-in-view {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Editorial display font declarations */
.font-display {
  font-family: 'Playfair Display', serif !important;
}

.font-caps-header {
  font-family: 'Montserrat', sans-serif !important;
  letter-spacing: 0.25em !important;
  text-transform: uppercase !important;
}

/* Theme variables helper classes */
.custom-border {
  border-color: var(--border-color) !important;
}

.custom-card {
  background-color: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--shadow);
  overflow: hidden !important;
}

.custom-card > div:first-child {
  margin-top: -1rem !important;
  margin-left: -1rem !important;
  margin-right: -1rem !important;
  width: calc(100% + 2rem) !important;
  max-width: calc(100% + 2rem) !important;
  border: none !important;
  border-radius: 0 !important;
}

.custom-card-hover {
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.custom-card-hover:hover {
  background-color: var(--card-hover) !important;
  border-color: var(--text-muted) !important;
  transform: translateY(-2px);
}

.custom-text-muted {
  color: var(--text-muted) !important;
}

.custom-input {
  background-color: var(--input-bg) !important;
  border-color: var(--input-border) !important;
  color: var(--text-color) !important;
}

.custom-input:focus {
  border-color: var(--primary-color) !important;
}

.custom-badge {
  background-color: var(--badge-bg) !important;
  color: var(--badge-text) !important;
}

/* Glassmorphism details for header */
header {
  background-color: var(--header-bg) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Custom interactive UI buttons */
.btn-primary {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background-color: var(--primary-hover) !important;
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Underline link indicators on hover */
.link-hover-underline {
  position: relative;
}

.link-hover-underline::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary-color);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.link-hover-underline:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Explicit Footer Styling (Matches Lovable dark footer) */
footer {
  background-color: #0b0f19 !important;
  color: #f8fafc !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

footer p, 
footer span, 
footer ul, 
footer li {
  color: #94a3b8 !important;
}

footer a {
  color: #cbd5e1 !important;
  transition: color 0.15s ease;
}

footer a:hover {
  color: #ef4444 !important;
}

footer h4 {
  color: #ffffff !important;
}

footer .border-t {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Explicit Newsletter Sidebar Card Styling (Matches Lovable site exactly) */
.newsletter-card {
  background-color: #faf6ee !important; /* warm light cream matching screenshot */
  border: 1px solid #f5d5d5 !important; /* thin soft pink-tinted border */
  border-radius: 0px !important; /* sharp corners */
}

body.dark-theme .newsletter-card {
  background-color: #0f172b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.newsletter-card h3 {
  color: #1b0d0c !important;
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 26px !important; /* aligned larger size */
  font-weight: 700 !important;
}

body.dark-theme .newsletter-card h3 {
  color: #ffffff !important;
}

.newsletter-card p {
  color: #5d646f !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-size: 11.5px !important;
  letter-spacing: 0.05em !important;
  line-height: 1.6 !important;
}

body.dark-theme .newsletter-card p {
  color: #90a1b9 !important;
}

.newsletter-card input {
  background-color: transparent !important;
  border-bottom: 1px solid rgba(27, 13, 12, 0.15) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0px !important;
  color: #1b0d0c !important;
  padding: 8px 8px !important; /* padding-left/right 8px for the requested space */
  font-size: 13.5px !important;
}

body.dark-theme .newsletter-card input {
  background-color: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

.newsletter-card button {
  background-color: #0b0f19 !important; /* solid black button */
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 0px !important;
  letter-spacing: 0.1em !important;
  font-size: 13px !important;
}

/* Explicit Opinions Sidebar Card Styling */
.opinions-card h3 {
  font-size: 13.5px !important;
  letter-spacing: 0.1em !important;
}

.opinions-card h4 {
  font-size: 16.5px !important;
  line-height: 1.4 !important;
}

.opinions-card p {
  font-size: 12.5px !important;
  line-height: 1.6 !important;
}

.opinions-card .author-meta {
  font-size: 11.5px !important;
}

.opinions-card .author-badge {
  font-size: 9.5px !important;
}

.newsletter-card button:hover {
  background-color: #1a233a !important;
}

body.dark-theme .newsletter-card button {
  background-color: #e2e8f0 !important;
  color: #0f172b !important;
  border-radius: 0px !important;
}

body.dark-theme .newsletter-card button:hover {
  background-color: #ffffff !important;
}

/* Explicit Mission Statement Sidebar Card Styling */
.mission-card {
  background-color: #0b0f19 !important;
  color: #ffffff !important;
  border-left: 6px solid transparent !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
  border-radius: 0px !important;
  transition: border-color 0.3s ease !important;
}

.mission-card:hover {
  border-left-color: var(--primary-color) !important;
}

.mission-card h3 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  font-style: italic !important;
  color: #ffffff !important;
}

.mission-card p {
  color: #cbd5e1 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
}

.mission-card a {
  color: var(--primary-color) !important;
  border-bottom-color: var(--primary-color) !important;
  font-weight: 700 !important;
  font-size: 10px !important;
}

.mission-card a:hover {
  color: #ffffff !important;
  border-bottom-color: #ffffff !important;
}

/* Premium Sliding Underline Navigation Hover Effect */
.nav-link-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}

.nav-link-underline::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary-color) !important; /* brand blue */
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.nav-link-underline:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Explicit Search Panel Styling */
.search-form-panel {
  background-color: transparent !important;
}

.search-form-panel input,
.search-form-panel select,
.search-form-panel button,
.search-form-panel a {
  background-color: transparent !important;
}

/* Redefine font-light in light theme to be regular weight for better readability */
body:not(.dark-theme) .font-light {
  font-weight: 400 !important;
}

