/* --- CSS RESET & NORMALIZE --- */
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}
body, h1, h2, h3, h4, h5, h6, p, ul, li, a, table, th, td {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
}
ul, ol {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
html {
  font-size: 16px;
}

/* --- BRAND COLORS & FONTS --- */
:root {
  --primary: #1B3764;
  --secondary: #57A773;
  --accent: #F4F4F4;
  --bg: #fff;
  --text-main: #171b24;
  --electric-1: #6C63FF;
  --electric-2: #FF4E74;
  --electric-3: #FFD600;
  --electric-4: #39D4FF;
  --font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-body: 'Roboto', Arial, Helvetica, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 1rem;
  min-height: 100vh;
  position: relative;
}

.container {
  width: 100%;
  max-width: 1112px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* --- TYPOGRAPHY --- */
h1, .h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
  letter-spacing: -1px;
  line-height: 1.14;
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--electric-1);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  line-height: 1.18;
}
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  color: var(--electric-2);
  margin-bottom: 12px;
}
h4, .h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--primary);
}
p, li, span {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-main);
}
p {
  margin-bottom: 16px;
}
strong {
  font-weight: 700;
  color: var(--primary);
}

/* --- HEADER & NAVIGATION --- */
header {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(27, 55, 100, 0.04);
  position: relative;
  z-index: 50;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 0;
}
header a img {
  max-height: 44px;
  margin-right: 30px;
}
.main-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 22px;
}
.main-nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  padding: 7px 0 7px 0;
  border-bottom: 2px solid transparent;
  transition: border-bottom 0.18s, color 0.18s;
}
.main-nav a:hover,
.main-nav a:focus {
  color: var(--electric-3);
  border-bottom: 2px solid var(--electric-3);
}
.main-nav .btn-primary {
  margin-left: 18px;
}
.mobile-menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--electric-3);
  cursor: pointer;
  transition: color 0.2s;
  margin-left: 28px;
}
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  color: var(--electric-4);
}

/* --- MOBILE NAVIGATION --- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 92vw;
  max-width: 380px;
  height: 100vh;
  background: var(--primary);
  color: #fff;
  box-shadow: -4px 0 24px rgba(27, 55, 100, 0.15);
  z-index: 120;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.6,0,0.42,1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 28px;
  padding-left: 30px;
  padding-right: 30px;
  gap: 32px;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--electric-3);
  font-size: 2.1rem;
  cursor: pointer;
  margin-bottom: 18px;
  transition: color 0.2s;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  color: var(--electric-2);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  align-items: flex-start;
}
.mobile-nav a {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 700;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.16s, border-bottom 0.16s;
  width: 100%;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  color: var(--electric-3);
  border-bottom: 2px solid var(--electric-3);
}

/* --- BUTTONS --- */
.btn-primary {
  background: var(--electric-1);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  padding: 13px 32px;
  border: none;
  border-radius: 40px;
  box-shadow: 0 4px 16px 0 rgba(108,99,255,0.10);
  margin-top: 18px;
  margin-bottom: 8px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: inline-block;
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--electric-2);
  color: #fff;
  box-shadow: 0 6px 24px 0 rgba(255, 78, 116, 0.16);
}
.btn-secondary {
  background: var(--electric-3);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  padding: 13px 32px;
  border: none;
  border-radius: 40px;
  box-shadow: 0 4px 16px 0 rgba(255,214,0,0.08);
  margin-top: 18px;
  transition: background 0.18s, color 0.18s;
  cursor: pointer;
  display: inline-block;
}
.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--electric-4);
  color: var(--primary);
}
.btn-tertiary {
  background: #fff;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  padding: 13px 32px;
  border: 2px solid var(--secondary);
  border-radius: 40px;
  margin-top: 18px;
  transition: background 0.18s, color 0.18s;
  cursor: pointer;
  display: inline-block;
}
.btn-tertiary:hover,
.btn-tertiary:focus {
  background: var(--secondary);
  color: #fff;
}

/* --- SECTION/CONTENT LAYOUTS --- */
section {
  background: var(--accent);
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.text-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 3px 14px 0 rgba(108,99,255,0.09);
  padding: 30px 28px;
  position: relative;
  margin-bottom: 20px;
  transition: box-shadow 0.22s, transform 0.2s;
  flex: 1 1 285px;
  min-width: 250px;
  max-width: 100%;
}
.card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 8px 36px 0 rgba(39,212,255,0.14);
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px 0 rgba(255,214,0,0.08);
  padding: 18px 20px;
  min-width: 200px;
  margin-bottom: 20px;
}

/* --- TESTIMONIALS --- */
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 5px 24px 0 rgba(108,99,255,0.12);
  margin-bottom: 24px;
  border-left: 6px solid var(--electric-1);
  max-width: 600px;
  transition: transform 0.19s, box-shadow 0.19s;
}
.testimonial-card p {
  font-size: 1.18rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--primary);
}
.testimonial-card span {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--secondary);
  font-weight: 500;
}
.testimonial-card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 42px 0 rgba(87,167,115,0.14);
}

/* --- ARTICLES, TABLES, SEARCH --- */
.articles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  margin-bottom: 20px;
}
.articles-grid article {
  background: #fff;
  box-shadow: 0 2px 13px 0 rgba(255, 78, 116, 0.08);
  border-radius: 14px;
  flex: 1 1 300px;
  min-width: 235px;
  max-width: 100%;
  padding: 22px 20px;
  transition: box-shadow 0.16s, transform 0.18s;
}
.articles-grid article:hover {
  box-shadow: 0 7px 26px 0 rgba(255, 78, 116, 0.16);
  transform: translateY(-4px) scale(1.02);
}
.search-field {
  width: 100%;
  margin-bottom: 20px;
}
.search-field input[type='text'] {
  width: 100%;
  padding: 13px 20px;
  border-radius: 24px;
  border: 2px solid var(--electric-1);
  font-size: 1.06rem;
  background: #fff;
  color: var(--primary);
  transition: border-color 0.14s;
  outline: none;
}
.search-field input[type='text']:focus {
  border-color: var(--electric-2);
}
.categories {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--primary);
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.categories span {
  background: var(--electric-4);
  color: var(--primary);
  border-radius: 8px;
  padding: 2px 12px;
  margin-right: 3px;
  font-weight: 600;
}

/* --- TABLES --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px 0 rgba(27,55,100,0.07);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
thead {
  background: var(--secondary);
  color: #fff;
}
th, td {
  padding: 14px 14px;
  font-size: 1rem;
  text-align: left;
}
th {
  font-weight: 700;
  font-family: var(--font-display);
}
tbody tr:nth-child(even) {
  background: var(--accent);
}
tbody tr:hover {
  background: var(--electric-4);
  transition: background 0.17s;
}

/* --- FOOTER --- */
footer {
  background: var(--primary);
  color: #fff;
  padding: 38px 0 0 0;
  font-family: var(--font-body);
  margin-top: 60px;
}
footer .container {
  flex-direction: column;
  gap: 0;
}
.footer-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}
.footer-top img {
  max-height: 38px;
 }
.footer-nav {
  display: flex;
  flex-direction: row;
  gap: 18px;
}
.footer-nav a {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  opacity: .86;
  transition: color .19s, opacity .17s;
}
.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--electric-4);
  opacity: 1;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.09);
  padding: 18px 0 12px 0;
  text-align: center;
  font-size: .96em;
  color: #fff;
  opacity: 0.89;
}

.footer-bottom p {
  color: white;
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  z-index: 10020;
  background: #fff;
  border-top: 4px solid var(--electric-1);
  box-shadow: 0 -6px 22px rgba(87,167,115,0.13);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  gap: 20px;
  animation: bannerIn 0.44s cubic-bezier(.8,.01,.4,1) 1;
  font-family: var(--font-body);
}
@keyframes bannerIn {
  from { transform: translateY(80%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  font-size: 1rem;
  color: var(--primary);
  margin: 0;
  flex: 2 1 320px;
}
.cookie-banner .cookie-btns {
  display: flex;
  flex-direction: row;
  gap: 14px;
}
.cookie-banner .btn-primary,
.cookie-banner .btn-secondary {
  font-size: 1rem;
  padding: 10px 24px;
  border-radius: 28px;
  box-shadow: none;
  margin: 0;
}
.cookie-banner .btn-tertiary {
  font-size: 1rem;
  border: 1.5px solid var(--secondary);
  background: #fff;
  color: var(--secondary);
  margin: 0;
  padding: 10px 18px;
  border-radius: 24px;
}
.cookie-banner .btn-tertiary:hover {
  background: var(--electric-4);
}

/* COOKIE PREFERENCES MODAL */
.cookie-modal {
  position: fixed;
  z-index: 20010;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(27,55,100,0.21);
  animation: modalIn 0.22s cubic-bezier(.8,.01,.4,1) 1;
}
@keyframes modalIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cookie-modal-content {
  background: #fff;
  border-radius: 24px;
  padding: 36px 30px 26px 30px;
  min-width: 308px;
  max-width: 95vw;
  box-shadow: 0 8px 44px 0 rgba(27,55,100,0.16);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cookie-modal-content h3 {
  color: var(--electric-1);
  margin-bottom: 8px;
}
.cookie-category {
  padding: 14px 0;
  border-bottom: 1px solid var(--accent);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cookie-category:last-child {
  border-bottom: none;
}
.cookie-category label {
  font-weight: 600;
  color: var(--primary);
  font-size: 1rem;
}
.cookie-toggle {
  accent-color: var(--electric-1);
  width: 22px;
  height: 22px;
}
.cookie-modal-actions {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.cookie-modal-close {
  background: none;
  border: none;
  color: var(--electric-2);
  font-size: 1.26rem;
  position: absolute;
  top: 24px;
  right: 34px;
  cursor: pointer;
}
.cookie-modal-close:hover {
  color: var(--electric-3);
}

/* --- LINKS --- */
a {
  text-decoration: none;
  color: var(--primary);
  transition: color 0.16s;
}
a:hover, a:focus {
  color: var(--electric-2);
}
.btn-primary, .btn-secondary, .btn-tertiary {
  outline: none;
}
.btn-primary:focus,
.btn-secondary:focus,
.btn-tertiary:focus {
  box-shadow: 0 0 0 2px var(--electric-1) inset;
}

/* --- SPACING BETWEEN ELEMENTS --- */
section, .section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card, .feature-item, .testimonial-card, .articles-grid article {
  margin-bottom: 20px;
}
.card-container, .articles-grid, .content-grid {
  gap: 24px;
}
.content-grid, .features {
  gap: 20px;
}
.text-image-section {
  gap: 30px;
}
.feature-item {
  gap: 15px;
}
.testimonial-card {
  gap: 20px;
  padding: 20px;
}

/* --- RESPONSIVE (MOBILE-FIRST) --- */
@media (max-width: 1100px) {
  .container {
    max-width: 920px;
  }
}
@media (max-width: 900px) {
  .container {
    max-width: 700px;
  }
}
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  .container {
    max-width: 98vw;
    padding-left: 12px;
    padding-right: 12px;
  }
  header .container {
    flex-direction: row;
    gap: 0;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 19px;
  }
  .section, section {
    padding: 30px 8px;
    margin-bottom: 40px;
  }
  h1, .h1 {
    font-size: 2.1rem;
  }
  h2, .h2 {
    font-size: 1.5rem;
  }
  .card-content {
    gap: 8px;
  }
  .content-wrapper {
    gap: 16px;
  }
  .footer-nav {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 12px;
  }
  .cookie-banner p {
    font-size: .96rem;
  }
  .mobile-menu {
    width: 97vw;
    padding-left: 18px;
    padding-right: 18px;
  }
  .articles-grid {
    gap: 14px;
  }
  .testimonial-card {
    padding: 14px;
    font-size: 1rem;
    gap: 13px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 16px;
  }
  .content-grid {
    flex-direction: column;
    gap: 16px;
  }
}
@media (max-width: 500px) {
  h1, .h1 { font-size: 1.58rem; }
  h2, .h2 { font-size: 1.11rem; }
  .btn-primary,
  .btn-secondary,
  .btn-tertiary {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  .cookie-modal-content {
    min-width: 0;
    padding: 16px 8px 14px 8px;
  }
}

/* --- ANIMATIONS & MICRO-INTERACTIONS --- */
.btn-primary, .btn-secondary, .btn-tertiary, .main-nav a, .mobile-nav a {
  transition: background 0.18s, color 0.18s, box-shadow 0.19s, border-bottom 0.16s;
}
.card, .feature-item, .testimonial-card, .articles-grid article {
  transition: box-shadow 0.19s, transform 0.19s;
}

/* --- MISC --- */
::-webkit-scrollbar {
  width: 8px;
  background: var(--accent);
}
::-webkit-scrollbar-thumb {
  background: var(--electric-1);
  border-radius: 6px;
}
::-webkit-selection {
  background: var(--electric-2);
  color: #fff;
}
::selection {
  background: var(--electric-2);
  color: #fff;
}
