/* Cyber Threat Monitor Enhancement for controlsystemssecurity.com
 * Child theme addition – complements Astra theme
 * Based on web-design & responsive-design skills
 */

:root {
  /* === Cyber Threat Color Palette === */
  --ctm-critical: #ff4757;      /* Critical severity */
  --ctm-high: #ff7f50;          /* High severity */
  --ctm-medium: #ffa502;        /* Medium severity */
  --ctm-low: #2ed573;           /* Low severity */
  --ctm-info: #1e90ff;          /* Informational */
  --ctm-dark: #0a1929;          /* Dark background */
  --ctm-darker: #061220;        /* Darker background */
  --ctm-card: #1a365d;          /* Card background */
  --ctm-border: #2f3542;        /* Border color */
  --ctm-text: #f1f2f6;          /* Primary text */
  --ctm-text-secondary: #a4b0be; /* Secondary text */
  --ctm-accent: #00d4ff;        /* Accent (cyan) */
  --ctm-accent-alt: #9d4edd;    /* Alternate accent (purple) */

  /* === Fluid Typography Scale === */
  --fluid-text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --fluid-text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --fluid-text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --fluid-text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --fluid-text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --fluid-text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --fluid-text-3xl: clamp(1.875rem, 1.4rem + 2.375vw, 2.5rem);
  --fluid-text-4xl: clamp(2.25rem, 1.5rem + 3.75vw, 3.5rem);

  /* === Fluid Spacing === */
  --fluid-space-xs: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --fluid-space-sm: clamp(0.75rem, 0.6rem + 0.75vw, 1rem);
  --fluid-space-md: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --fluid-space-lg: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --fluid-space-xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --fluid-space-2xl: clamp(3rem, 2rem + 5vw, 5rem);
}

/* === Base Typography Improvements === */
body {
  font-size: var(--fluid-text-base);
  line-height: 1.6;
  color: var(--ctm-text);
  background-color: var(--ctm-dark);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.widget-title,
.section-title {
  font-weight: 700;
  line-height: 1.2;
  color: var(--ctm-text);
  margin-bottom: var(--fluid-space-md);
}

h1 { font-size: var(--fluid-text-3xl); }
h2 { font-size: var(--fluid-text-2xl); }
h3 { font-size: var(--fluid-text-xl); }
h4 { font-size: var(--fluid-text-lg); }
h5 { font-size: var(--fluid-text-base); }
h6 { font-size: var(--fluid-text-sm); }

/* === Threat Feed Items === */
/* Assuming feed items are wrapped in .entry-content or .post-class */
.entry-content > ul,
.entry-content > ol,
.widget ul,
.widget ol {
  padding-left: 0;
  list-style: none;
}

.entry-content > ul > li,
.entry-content > ol > li,
.widget ul > li,
.widget ol > li {
  background: var(--ctm-card);
  border-left: 4px solid var(--ctm-info);
  border-radius: 8px;
  padding: var(--fluid-space-md);
  margin-bottom: var(--fluid-space-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.entry-content > ul > li:hover,
.entry-content > ol > li:hover,
.widget ul > li:hover,
.widget ol > li:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-left-color: var(--ctm-accent);
}

/* Severity Badges (utility classes) */
.ctm-severity {
  display: inline-block;
  padding: 0.25em 0.75em;
  border-radius: 999px;
  font-size: var(--fluid-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: var(--fluid-space-xs);
}

.ctm-severity-critical { background-color: var(--ctm-critical); color: white; }
.ctm-severity-high     { background-color: var(--ctm-high); color: white; }
.ctm-severity-medium   { background-color: var(--ctm-medium); color: #333; }
.ctm-severity-low      { background-color: var(--ctm-low); color: #333; }
.ctm-severity-info     { background-color: var(--ctm-info); color: white; }

/* === Card Layout for Feed === */
@media (min-width: 768px) {
  .entry-content > ul,
  .entry-content > ol,
  .widget ul,
  .widget ol {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: var(--fluid-space-md);
  }
  
  .entry-content > ul > li,
  .entry-content > ol > li,
  .widget ul > li,
  .widget ol > li {
    margin-bottom: 0;
  }
}

/* === Link Styling === */
a {
  color: var(--ctm-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--ctm-accent-alt);
  text-decoration: underline;
}

/* === Button Enhancements === */
.wp-block-button__link,
.button,
button,
input[type="submit"],
input[type="button"] {
  background-color: var(--ctm-accent);
  color: var(--ctm-dark);
  border: none;
  border-radius: 6px;
  padding: var(--fluid-space-sm) var(--fluid-space-md);
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.wp-block-button__link:hover,
.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background-color: var(--ctm-accent-alt);
  color: white;
  transform: translateY(-2px);
}

/* === Header/Footer Polish === */
.site-header,
.site-footer {
  background-color: var(--ctm-darker);
  border-bottom: 1px solid var(--ctm-border);
}

/* === Responsive Breakpoints (beyond Astra defaults) === */
@media (min-width: 1200px) {
  .ast-container {
    max-width: min(100% - 4rem, 1400px);
  }
}

@media (min-width: 1600px) {
  .ast-container {
    max-width: min(100% - 6rem, 1600px);
  }
}

/* === Print Styles === */
@media print {
  .site-header,
  .site-footer,
  .wp-block-button,
  button {
    display: none !important;
  }
  
  body {
    color: #000;
    background: #fff;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}