/* ============================================================
   Neti Satyam ePaper - Main Stylesheet
   Design System + Shared Components
   ============================================================ */

/* ----- CSS Custom Properties (Design Tokens) ----- */
:root {
  /* Primary palette */
  --primary: #1a365d;
  --primary-light: #2563eb;
  --primary-dark: #0f172a;
  --accent: #b91c1c;
  --accent-gold: #d4a017;

  /* Functional colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* Borders */
  --border: #e2e8f0;
  --border-focus: #2563eb;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

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

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ----- Navbar (White, Clean) ----- */
.custom-navbar {
  background: var(--bg-primary) !important;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.custom-navbar .navbar-brand img {
  height: 45px;
  transition: transform var(--transition-fast);
}

.custom-navbar .navbar-brand img:hover {
  transform: scale(1.05);
}

.custom-navbar .navbar-nav .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.custom-navbar .navbar-nav .nav-link:hover {
  color: var(--primary) !important;
  background: var(--bg-tertiary);
}

.custom-navbar .navbar-nav .nav-link.active {
  color: var(--primary-light) !important;
  background: rgba(37, 99, 235, 0.08);
}

.custom-navbar .navbar-toggler {
  border-color: var(--border);
}

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

/* ----- Breaking News Bar ----- */
.breaking-news-bar {
  display: flex;
  align-items: center;
  background: #3f2175;
  color: white;
  height: 44px;
  overflow: hidden;
}

.breaking-label {
  background: var(--accent);
  padding: 0 16px;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.marquee-content {
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
  padding-left: 16px;
}

.marquee-text {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 25s linear infinite;
}

.marquee-text a {
  color: white;
  margin-right: 50px;
  text-decoration: none;
  font-size: 0.9rem;
}

.marquee-text a:hover {
  text-decoration: underline;
  color: #ffd700;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ----- Newspaper Cards ----- */
.newspaper-card {
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  box-shadow: var(--shadow-md);
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.newspaper-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.newspaper-card .card-img-top {
  height: 260px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.newspaper-card .card-body {
  padding: 1.25rem;
}

.newspaper-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ----- Buttons (shared) ----- */
.btn-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-modern:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-modern.primary {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
}

.btn-modern.primary:hover {
  background: #1d4ed8;
}

.btn-modern.success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.btn-modern.danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

/* ----- Footer ----- */
.site-footer {
  background: var(--primary-dark);
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.site-footer h5 {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.site-footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-footer a:hover {
  color: #e2e8f0;
  text-decoration: underline;
}

.site-footer .contact-link {
  color: var(--info);
}

.site-footer .contact-link:hover {
  color: #60a5fa;
}

/* ----- Page Sections (static pages) ----- */
.page-section {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.page-section h2 {
  color: var(--primary);
  margin-top: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.page-section .highlight {
  font-weight: 600;
  color: var(--primary-light);
}

/* ----- Loading States ----- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, #e2e8f0 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 340px;
  border-radius: var(--radius-lg);
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
  width: 80%;
}

.skeleton-text:last-child {
  width: 60%;
}

/* ----- Utility Classes ----- */
.text-primary-custom { color: var(--primary); }
.text-accent { color: var(--accent); }
.bg-soft-primary { background: rgba(37, 99, 235, 0.06); }

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .custom-navbar .navbar-brand img {
    height: 36px;
  }

  .breaking-news-bar {
    height: 38px;
  }

  .breaking-label {
    font-size: 0.75rem;
    padding: 0 10px;
  }

  .marquee-text a {
    font-size: 0.8rem;
    margin-right: 30px;
  }

  .newspaper-card .card-img-top {
    height: 200px;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .page-section {
    padding: 1.25rem;
  }

  .site-footer {
    margin-top: 2rem;
    padding: 2rem 0 1rem;
  }
}

@media (max-width: 576px) {
  .newspaper-card .card-img-top {
    height: 180px;
  }
}
