/* OnRadar Dogs — Design System (Similar to thisdogiscute.com but distinct) */

:root {
  --primary: #046bd2;
  --primary-dark: #045cb4;
  --accent: #c96a3a;
  --accent-light: #e0865a;
  --dark: #1e293b;
  --dark-sec: #334155;
  --light-bg: #f9fafb;
  --border: #e2e8f0;
  --text: #475569;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text);
  line-height: 1.65;
  background: white;
  position: relative;
}

/* Grain Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 50%, var(--accent) 100%);
  background-size: 200% 100%;
  z-index: 1000;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

/* Custom Paw Cursor */
body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='6' fill='%23c96a3a'/%3E%3Ccircle cx='8' cy='6' r='4' fill='%23c96a3a'/%3E%3Ccircle cx='24' cy='6' r='4' fill='%23c96a3a'/%3E%3Ccircle cx='4' cy='12' r='3.5' fill='%23c96a3a'/%3E%3Ccircle cx='28' cy='12' r='3.5' fill='%23c96a3a'/%3E%3C/svg%3E") 16 16, auto;
}

a {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='6' fill='%23046bd2'/%3E%3Ccircle cx='8' cy='6' r='4' fill='%23046bd2'/%3E%3Ccircle cx='24' cy='6' r='4' fill='%23046bd2'/%3E%3Ccircle cx='4' cy='12' r='3.5' fill='%23046bd2'/%3E%3Ccircle cx='28' cy='12' r='3.5' fill='%23046bd2'/%3E%3C/svg%3E") 16 16, pointer;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 16px 0;
  position: sticky;
  top: 4px;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(4, 107, 210, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

header .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

header nav a {
  color: white;
  text-decoration: none;
  margin-left: 30px;
  font-weight: 500;
  transition: opacity 0.2s;
}

header nav a:hover {
  opacity: 0.8;
}

/* Main Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Two Column Layout for Posts */
.post-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.post-content-main {
  min-width: 0;
}

.post-sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
}

/* Typography */
h1 {
  color: var(--dark);
  font-size: 40px;
  font-weight: 600;
  margin: 48px 0 20px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

h2 {
  color: var(--dark);
  font-size: 28px;
  font-weight: 600;
  margin: 48px 0 20px;
  padding-bottom: 12px;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

h3 {
  color: var(--dark);
  font-size: 20px;
  font-weight: 600;
  margin: 30px 0 15px;
  line-height: 1.3;
}

p {
  margin: 20px 0;
  color: var(--text);
  line-height: 1.8;
}

strong {
  color: var(--dark);
  font-weight: 600;
}

em {
  font-style: italic;
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin: 20px 0 20px 40px;
  line-height: 1.8;
}

li {
  margin: 10px 0;
  color: var(--text);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 6px;
  overflow: hidden;
}

thead {
  background: var(--primary);
  color: white;
}

th {
  padding: 15px;
  text-align: left;
  border-bottom: 2px solid var(--primary-dark);
  font-weight: 600;
}

td {
  padding: 15px;
  border-bottom: 1px solid var(--border);
}

tbody tr:nth-child(even) {
  background: var(--light-bg);
}

tbody tr:hover {
  background: #f0f6ff;
}

/* Email Widget */
.email-widget {
  border-radius: 8px;
  padding: 30px;
  margin: 30px 0;
  color: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.email-widget h3 {
  color: white;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 20px;
}

.email-widget p {
  color: white;
  margin-bottom: 15px;
  line-height: 1.6;
}

.email-widget form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.email-widget input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 12px 15px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.email-widget button {
  padding: 12px 25px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.email-widget button:hover {
  opacity: 0.9;
}

.email-widget small {
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  margin-top: 10px;
}

/* Accordion/Details */
details {
  margin-bottom: 16px;
  padding: 20px;
  background: white;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

details:hover {
  background: var(--light-bg);
}

summary {
  font-weight: 600;
  color: var(--primary);
  font-size: 16px;
  outline: none;
  user-select: none;
  cursor: pointer;
}

details[open] summary {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

details p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
}

/* FAQ Section */
.faq-section {
  margin: 40px 0;
  padding: 30px;
  background: var(--light-bg);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

/* Glass Effect Cards */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 25px;
  margin: 20px 0;
  box-shadow: 0 8px 32px rgba(4, 107, 210, 0.1);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(4, 107, 210, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(4, 107, 210, 0.4);
}

.faq-section h2 {
  color: var(--dark);
  margin-top: 0;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

/* Article Layout */
.post {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.post-meta {
  font-size: 14px;
  color: #999;
  margin-bottom: 30px;
}

.post-meta time {
  color: var(--primary);
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 40px 0;
  margin-top: 80px;
}

footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

footer h3 {
  color: white;
  margin-bottom: 15px;
}

footer a {
  color: #cbd5e1;
  display: block;
  margin: 10px 0;
}

footer a:hover {
  color: white;
}

footer .bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  margin-top: 30px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

/* Sidebar Content */
.sidebar-widget {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.sidebar-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
}

.sidebar-widget h3 {
  margin-top: 0;
  padding-left: 12px;
}

.sidebar-widget p {
  font-size: 14px;
  color: #64748b;
  margin: 12px 0;
  padding-left: 12px;
}

.sidebar-widget a {
  display: block;
  padding: 8px 0 8px 12px;
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
}

.sidebar-widget a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.sidebar-widget a:last-child {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .post-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .post-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    gap: 20px;
  }

  header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
  }

  header nav a {
    margin-left: 0;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 18px;
  }

  .email-widget form {
    flex-direction: column;
  }

  .email-widget input[type="email"],
  .email-widget button {
    width: 100%;
  }

  table {
    font-size: 14px;
  }

  th, td {
    padding: 12px;
  }

  .container {
    padding: 0 16px;
  }

  .post-wrapper {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 16px;
  }

  p {
    font-size: 14px;
  }
}

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

.reveal {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.reveal.active {
  animation: fadeInUp 0.6s ease-out;
}

/* Print Styles */
@media print {
  header, footer, .email-widget, .back-to-top, .progress-bar {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.6;
  }

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