/* ==== CSS RESET AND NORMALIZE ==== */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
  line-height: 1.5;
  background: #F4F9FB;
  color: #232942;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
article, aside, details, figcaption, figure, 
footer, header, hgroup, main, menu, nav, section {
  display: block;
}
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
}

/* ==== BRAND COLORS (FALLBACKS FOR CSS VARS) ==== */
:root {
  --primary: #004A99;
  --secondary: #48C774;
  --accent: #F4F9FB;
  --electric-blue: #1B9CFC;
  --hot-pink: #EF436B;
  --sun-yellow: #F7B731;
  --dark: #232942;
  --white: #FFFFFF;
  --shadow: rgba(0, 74, 153, 0.06);
}

/* ==== TYPOGRAPHY ==== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}
h1 {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 18px;
  line-height: 1.15;
}
h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--hot-pink);
  margin-bottom: 14px;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}
h4, h5, h6 {
  font-size: 1rem;
  color: var(--primary);
}
p, ul, ol, li {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  margin-bottom: 12px;
}
p:last-child, li:last-child { margin-bottom: 0; }
strong { font-weight: bold; color: var(--secondary); }
em { color: var(--primary); font-style: italic; }

/* ==== CONTAINERS AND LAYOUT ==== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.content-wrapper {
  background: var(--white);
  box-shadow: 0 4px 20px var(--shadow);
  border-radius: 18px;
  padding: 32px 28px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.text-section {
  background: var(--accent);
  box-shadow: 0 2px 14px rgba(30,150,252,0.06);
}

/* ==== FLEXBOX GRIDS AND CARD CONTAINERS ==== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}
.card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(235,67,107,0.07);
  margin-bottom: 20px;
  position: relative;
  transition: box-shadow .2s, transform .2s;
  padding: 24px 20px;
}
.card:hover {
  box-shadow: 0 7px 26px rgba(0,74,153,0.17);
  transform: translateY(-4px) scale(1.02);
  z-index: 2;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: flex-start; }
}

/* ==== HERO SECTION ==== */
.hero {
  background: linear-gradient(90deg, var(--electric-blue) 0%, var(--primary) 70%, var(--sun-yellow) 100%);
  box-shadow: 0 4px 36px rgba(0,74,153,0.13);
  border-radius: 0 0 40px 40px;
  padding-top: 60px;
  padding-bottom: 48px;
  margin-bottom: 60px;
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero .content-wrapper {
  background: transparent;
  box-shadow: none;
  color: var(--white);
  padding: 12px 0;
  max-width: 700px;
}
.hero h1, .hero h2, .hero h3, .hero h4, .hero h5, .hero h6 {
  color: #fff;
}
.hero p {
  color: #f4f9fb;
  font-size: 1.18rem;
  font-weight: 500;
  margin-bottom: 28px;
}
@media (max-width: 768px) {
  .hero {
    padding-top: 32px;
    padding-bottom: 24px;
    border-radius: 0 0 24px 24px;
    margin-bottom: 32px;
  }
}

/* ==== NAVIGATION - DESKTOP ==== */
header {
  background: var(--white);
  box-shadow: 0 5px 32px 0 rgba(0,74,153,0.08);
  position: relative;
  z-index: 20;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
}
header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
header nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
  position: relative;
  padding: 6px 12px;
  transition: color .15s;
  border-radius: 6px;
}
header nav a:hover, header nav a:focus {
  color: var(--hot-pink);
  background: var(--accent);
}
.cta-primary {
  background: linear-gradient(90deg, var(--secondary) 0%, var(--hot-pink) 120%);
  color: var(--white);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 12px 32px;
  margin-left: 16px;
  transition: background .2s, transform .13s, box-shadow .15s;
  box-shadow: 0 2px 10px rgba(72,199,116,0.09);
  display: inline-block;
  cursor: pointer;
}
.cta-primary:hover, .cta-primary:focus {
  background: linear-gradient(90deg, var(--hot-pink) 10%, var(--secondary) 90%);
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 5px 22px rgba(239,67,107,0.21);
  color: #fff;
}

/* ==== MOBILE NAVIGATION ==== */
.mobile-menu-toggle {
  display: none;
  background: var(--electric-blue);
  color: #fff;
  font-size: 1.9rem;
  border-radius: 10px;
  padding: 7px 15px;
  margin-left: 10px;
  cursor: pointer;
  transition: background .13s, color .1s, box-shadow .2s;
  z-index: 30;
  border: none;
}
@media (max-width: 900px) {
  header nav { display: none; }
  .cta-primary { display: none; }
  .mobile-menu-toggle { display: block; }
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--primary);
  color: #fff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(-100vw);
  transition: transform .35s cubic-bezier(.9, .01, .27, 1);
  box-shadow: 0 0 32px rgba(0,74,153,0.32);
  padding: 0 28px;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  display: block;
  color: #fff;
  background: transparent;
  border: none;
  font-size: 2.5rem;
  margin: 22px 0 16px 0;
  align-self: flex-end;
  cursor: pointer;
  transition: color .12s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--sun-yellow);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-top: 18px;
}
.mobile-nav a {
  color: #fff;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.22rem;
  font-weight: 700;
  padding: 12px 0;
  border-radius: 7px;
  transition: background .17s, color .12s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--hot-pink);
  color: #fff;
}

/* ==== FLEXBOX ALIGNMENT PATTERNS ==== */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  margin: 20px 0 0 0;
}
.feature-grid > li, .feature-grid > div {
  flex: 1 1 225px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 2px 13px rgba(72,199,116,0.10);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  padding: 22px 18px 22px 18px;
  transition: box-shadow .14s, transform .13s;
  margin-bottom: 18px;
}
.feature-grid img {
  width: 40px;
  height: 40px;
  margin-bottom: 9px;
}
.feature-grid > li:hover, .feature-grid > div:hover {
  box-shadow: 0 6px 26px rgba(30,156,252,0.18);
  transform: translateY(-4px);
  z-index: 2;
}

/* ==== TESTIMONIALS ==== */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 3px 16px rgba(72,199,116,0.12);
  margin-bottom: 20px;
  border-left: 6px solid var(--secondary);
  transition: box-shadow .12s, border-color .14s;
}
.testimonial-card:hover {
  box-shadow: 0 9px 32px rgba(72,199,116,0.24);
  border-left-color: var(--hot-pink);
}
.testimonial-card p {
  color: var(--dark);
  font-size: 1.1rem;
  font-style: italic;
}
.testimonial-card strong {
  color: var(--primary);
  font-weight: 700;
}

/* ==== FOOTER ==== */
footer {
  background: var(--primary);
  color: #fff;
  margin-top: 48px;
  padding-top: 40px;
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.footer-main {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-main nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-main nav a {
  color: #fff;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  position: relative;
  padding: 6px 5px;
  border-radius: 7px;
  transition: color .15s, background .15s;
}
.footer-main nav a:hover {
  color: var(--sun-yellow);
  background: rgba(255,255,255,0.06);
}
.footer-contact ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-contact li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: #fff;
}
.footer-contact img {
  width: 20px; height: 20px;
}
.footer-copy {
  font-size: 0.98rem;
  color: #d8e5f9;
  margin-top: 10px;
  padding-bottom: 28px;
}
@media (max-width: 768px) {
  .footer-main, .footer-contact ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  footer .container { gap: 16px; }
}

/* ==== SECTIONS AND SPACING ==== */
section { margin-bottom: 60px; padding: 40px 20px; }

/* ==== CARDS, CARDS GRID ==== */
.card-container,
.brand-cards,
.topic-grid, .news-list, .review-list, .guide-categories, .popular-guides, .params-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 20px;
}
.brand-cards > div, .topic-grid > div, .news-list > li, .review-list > ul > li, .params-list > li, .guide-categories > li, .popular-guides > li {
  flex: 1 1 230px;
  background: var(--white);
  border-radius: 13px;
  box-shadow: 0 1px 9px rgba(0,74,153,0.07);
  padding: 20px 14px;
  margin-bottom: 20px;
  transition: box-shadow .12s, transform .12s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.brand-cards > div:hover, .topic-grid > div:hover, .news-list > li:hover, .review-list > ul > li:hover, .params-list > li:hover {
  box-shadow: 0 6px 18px rgba(239,67,107,0.13);
  transform: translateY(-4px) scale(1.01);
}
.topic-grid img, .params-list img, .news-list img {
  width: 40px; height: 40px; margin-bottom: 6px;
}

/* ==== FAQ ACCORDION ==== */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.faq-accordion h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--primary);
  cursor: pointer;
  transition: color .14s;
}
.faq-accordion h3:hover {
  color: var(--hot-pink);
}
.faq-accordion p {
  color: var(--dark);
  background: var(--accent);
  border-radius: 8px;
  padding: 9px 16px;
  margin-bottom: 12px;
}

/* ==== SPECIAL LISTS AND TABLES ==== */
.comparison-table, .comparison-filters, .sort-options, .highlights, .rating-system, .pros-cons, .brand-filters {
  background: var(--accent);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.comparison-table ul, .params-list {
  flex-direction: column;
  gap: 6px;
  padding-left: 0;
}
.comparison-table ul li, .params-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.06rem;
  color: var(--dark);
}

/* ==== BUTTONS & INTERACTIVE ==== */
button, .cta-primary, .mobile-menu-toggle, .mobile-menu-close {
  cursor: pointer;
  user-select: none;
  appearance: none;
}
button:active, .cta-primary:active {
  transform: scale(0.96);
}

/* ==== COOKIE CONSENT ==== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--primary);
  color: #fff;
  padding: 28px 20px 20px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  z-index: 3000;
  box-shadow: 0 0 32px rgba(0,40,90,0.23);
  animation: cookie-slide-in .55s cubic-bezier(.79,.01,.13,.98);
}
@keyframes cookie-slide-in {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  font-size: 1.04rem;
  color: #fff;
  margin-bottom: 0;
  max-width: 480px;
}
.cookie-banner-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin-left: 14px;
}
.cookie-btn {
  border-radius: 14px;
  font-size: 1rem;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  padding: 8px 22px;
  margin: 0 2px;
  border: none;
  background: var(--hot-pink);
  color: #fff;
  transition: background .18s, box-shadow .10s, transform .08s;
  box-shadow: 0 2px 8px rgba(239,67,107,0.12);
}
.cookie-btn.accept {
  background: var(--secondary);
}
.cookie-btn.settings {
  background: var(--primary);
  border: 2px solid #fff;
  color: #fff;
}
.cookie-btn:hover, .cookie-btn:focus {
  background: var(--sun-yellow);
  color: var(--dark);
  transform: scale(1.04);
}
/* Cookie modal */
.cookie-modal-overlay {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(35,41,66,0.56);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadein .27s cubic-bezier(.79,.01,.13,.98);
}
@keyframes fadein { from { opacity:0; } to { opacity:1; } }
.cookie-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 32px rgba(27,156,252,0.17);
  max-width: 430px;
  padding: 34px 28px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: modal-zoom .39s cubic-bezier(.42,1.64,.41,0.83);
}
@keyframes modal-zoom {
  from { transform: scale(.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.cookie-modal h2 {
  color: var(--primary);
  font-size: 1.22rem;
}
.cookie-options {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 7px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
}
.cookie-category input[type=checkbox] {
  accent-color: var(--secondary);
  width: 21px;
  height: 21px;
}
.cookie-category.required {
  color: var(--dark);
  font-weight: 600;
}
@media (max-width: 650px) {
  .cookie-banner {
    padding: 20px 10px 14px 10px;
    flex-direction: column;
    gap: 14px;
  }
  .cookie-banner-actions { margin-left: 0; }
  .cookie-modal { max-width: 94vw; padding: 22px 6vw 16px 6vw; }
}

/* ==== RESPONSIVENESS ==== */
@media (max-width: 1200px) {
  .container { max-width: 100vw; }
}
@media (max-width: 900px) {
  .feature-grid, .card-container, .brand-cards, .topic-grid, .params-list, .review-list, .news-list,
  .content-grid {
    flex-direction: column;
    gap: 19px;
  }
}
@media (max-width: 650px) {
  .content-wrapper, .section, section {
    padding: 18px 4vw;
    margin-bottom: 24px;
  }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.22rem; }
  .card, .feature-grid > *, .testimonial-card, .brand-cards > *, .topic-grid > *, .params-list > * {
    padding: 16px 9px;
  }
  .footer-main, .footer-contact ul, .footer-copy {
    padding-left: 4vw; padding-right: 4vw;
  }
}

/* ==== SCROLLBAR STYLES ==== */
::-webkit-scrollbar { width: 9px; background: var(--accent); }
::-webkit-scrollbar-thumb {
  background: var(--hot-pink);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

/* ==== MISC MICRO-INTERACTIONS ==== */
a, button, .cta-primary, .mobile-nav a, .faq-accordion h3, .cookie-btn {
  transition: color .14s, background .14s, transform .10s;
}
section:target, .content-wrapper:target {
  box-shadow: 0 0 0 5px var(--hot-pink) inset;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--primary);
  box-shadow: 0 0 0 2px var(--sun-yellow) inset;
}

/* ==== ACCESSIBILITY ==== */
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after {
    transition: none !important;
    animation: none !important;
  }
}
