/* ============================================
   FortiNet Events — Cybersecurity Events Aggregator
   ============================================ */

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

:root {
  --navy: #0B1426;
  --white: #FFFFFF;
  --amber: #F59E0B;
  --blue: #3B82F6;
  --gray: #F1F5F9;
  --text: #334155;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --radius: 6px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}

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

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

ul, ol {
  list-style: none;
}

/* --- Utility --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--gray {
  background: var(--gray);
}

.section--navy {
  background: var(--navy);
  color: var(--white);
}

.section--navy h2,
.section--navy h3 {
  color: var(--white);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.text-center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn--amber {
  background: var(--amber);
  color: var(--navy);
}

.btn--amber:hover {
  background: #D97706;
  color: var(--navy);
}

.btn--outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn--outline:hover {
  background: var(--white);
  color: var(--navy);
}

.btn--blue {
  background: var(--blue);
  color: var(--white);
}

.btn--blue:hover {
  background: #2563EB;
  color: var(--white);
}

.btn--sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* --- Header --- */
.header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--amber);
}

.logo:hover {
  color: var(--white);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--amber);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: all 0.3s;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background: var(--navy);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero h1 {
  font-size: 2.8rem;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero h1 em {
  color: var(--amber);
  font-style: normal;
}

.hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1.15rem;
  margin-bottom: 28px;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 32px 0;
}

.stats-bar__inner {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat__number {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--amber);
}

.stat__label {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* --- Section Headers --- */
.section__header {
  margin-bottom: 40px;
}

.section__header h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.section__header p {
  color: var(--text-light);
  font-size: 1.05rem;
}

.section--navy .section__header p {
  color: rgba(255,255,255,0.6);
}

/* --- Event Cards --- */
.event-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.15s;
}

.event-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.event-card__date {
  display: inline-block;
  background: var(--navy);
  color: var(--amber);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.event-card__title {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.event-card__title a {
  color: var(--navy);
}

.event-card__title a:hover {
  color: var(--blue);
}

.event-card__meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.event-card__type {
  display: inline-block;
  background: var(--gray);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Article Cards --- */
.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s;
}

.article-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.article-card__img {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--navy);
}

.article-card__body {
  padding: 24px;
}

.article-card__date {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.article-card__title {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.article-card__title a {
  color: var(--navy);
}

.article-card__title a:hover {
  color: var(--blue);
}

.article-card__excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.6;
}

.article-card__link {
  font-size: 0.85rem;
  font-weight: 600;
}

/* --- Newsletter Section --- */
.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form .form-row {
  margin-bottom: 16px;
}

.newsletter-form input,
.newsletter-form select {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Roboto', sans-serif;
  background: var(--white);
  color: var(--text);
}

.newsletter-form input:focus,
.newsletter-form select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.newsletter-form .btn {
  width: 100%;
  margin-top: 8px;
}

.form-msg {
  text-align: center;
  margin-top: 12px;
  font-size: 0.9rem;
  display: none;
}

.form-msg--success {
  color: #10B981;
  display: block;
}

.form-msg--error {
  color: #EF4444;
  display: block;
}

/* --- Events Table --- */
.events-month {
  margin-bottom: 48px;
}

.events-month h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--amber);
  display: inline-block;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-row {
  display: grid;
  grid-template-columns: 140px 1fr 180px 120px auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s;
}

.event-row:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.event-row__date {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
}

.event-row__name {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}

.event-row__location {
  color: var(--text-light);
  font-size: 0.85rem;
}

.event-row__type {
  display: inline-block;
  background: var(--gray);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

/* --- Blog / Article --- */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.article__meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.article h1 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.article h2 {
  font-size: 1.5rem;
  margin: 40px 0 16px;
}

.article h3 {
  font-size: 1.2rem;
  margin: 32px 0 12px;
}

.article p {
  margin-bottom: 18px;
  line-height: 1.8;
}

.article ul, .article ol {
  margin: 16px 0 24px 24px;
}

.article ul {
  list-style: disc;
}

.article ol {
  list-style: decimal;
}

.article li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.article a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article__hero {
  width: 100%;
  height: 360px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  margin-bottom: 32px;
}

/* --- Image Band --- */
.image-band {
  height: 320px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.image-band::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11,20,38,0.3), rgba(11,20,38,0.6));
}

/* --- Footer --- */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  padding: 48px 0 32px;
  font-size: 0.85rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.footer a {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 8px;
}

.footer a:hover {
  color: var(--amber);
}

.footer__about p {
  line-height: 1.7;
  margin-top: 12px;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__bottom a {
  display: inline;
  margin: 0;
}

/* --- Page Header --- */
.page-header {
  background: var(--navy);
  padding: 48px 0;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.page-header p {
  color: rgba(255,255,255,0.6);
  font-size: 1.05rem;
}

/* --- 404 --- */
.four-oh-four {
  text-align: center;
  padding: 120px 24px;
}

.four-oh-four h1 {
  font-size: 6rem;
  color: var(--amber);
  margin-bottom: 8px;
}

.four-oh-four p {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 32px;
}

/* --- Legal --- */
.legal {
  padding: 60px 24px 80px;
}

.legal h1 {
  font-size: 2rem;
  margin-bottom: 24px;
}

.legal h2 {
  font-size: 1.3rem;
  margin: 32px 0 12px;
}

.legal p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.legal ul {
  margin: 12px 0 20px 24px;
  list-style: disc;
}

.legal li {
  margin-bottom: 6px;
  line-height: 1.7;
}

/* --- Blog Index --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

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

  .event-row {
    grid-template-columns: 120px 1fr 140px auto;
  }

  .event-row__type {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    transform: translateY(-120%);
    transition: transform 0.3s;
    z-index: 99;
  }

  .nav.open {
    transform: translateY(0);
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero {
    min-height: 420px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .stats-bar__inner {
    gap: 32px;
  }

  .event-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .event-row__date {
    color: var(--amber);
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .section {
    padding: 56px 0;
  }

  .article h1 {
    font-size: 1.7rem;
  }

  .article__hero {
    height: 220px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
}
