/* ===== CSS RESET & NORMALIZATION ===== */
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;
  vertical-align: baseline;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: #F5F7FA;
}
body {
  font-family: 'Georgia', 'Times New Roman', Times, serif;
  background: #F5F7FA;
  color: #1A2733;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
a {
  color: #1F487E;
  text-decoration: none;
  transition: color .2s;
}
a:hover,
a:focus {
  color: #38A37D;
}
ul, ol {
  margin-left: 1.5em;
}
li {
  margin-bottom: 8px;
}

/* ===== TYPOGRAPHY: elegant_classic ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Georgia', 'Times New Roman', Times, serif;
  margin-bottom: 16px;
  color: #1F487E;
  font-weight: 500;
}
h1 {
  font-size: 2.5rem;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}
h3 {
  font-size: 1.375rem;
}
h4, h5, h6 {
  font-size: 1.125rem;
}

p, blockquote, ul, ol, address {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  color: #2D3845;
  margin-bottom: 12px;
  max-width: 730px;
}
blockquote {
  font-style: italic;
  background: #fff;
  border-left: 4px solid #38A37D;
  padding: 20px 28px 20px 24px;
  margin-bottom: 12px;
  border-radius: 8px;
  color: #1A2733;
  box-shadow: 0 2px 12px 0 rgba(29,45,75,0.06);
  font-family: 'Georgia', serif;
}
strong, b {
  font-weight: 700;
}

/* ===== MAIN CONTAINER ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ===== HEADER, NAV, CTA ===== */
header {
  background: #fff;
  border-bottom: 1px solid #E7EBF0;
  box-shadow: 0 3px 24px 0 rgba(19,40,90,0.03);
  position: sticky;
  top: 0;
  z-index: 100;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 32px;
}
nav {
  display: flex;
  gap: 22px;
  align-items: center;
}
nav a {
  font-family: 'Georgia', serif;
  font-size: 1.06rem;
  letter-spacing: .01em;
  color: #1F487E;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.18s, border-bottom 0.2s;
}
nav a:hover, nav a:focus {
  color: #38A37D;
  border-bottom: 2px solid #55C09B;
}
.cta-btn {
  font-family: 'Georgia', serif;
  font-weight: 600;
  color: #fff;
  background: #1F487E;
  padding: 10px 28px;
  margin-left: 10px;
  border: none;
  border-radius: 26px;
  font-size: 1rem;
  line-height: 1.6;
  box-shadow: 0 2px 12px 0 rgba(31,72,126,0.08);
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
  letter-spacing: 0.01em;
  outline: none;
  display: inline-block;
}
.cta-btn:hover, .cta-btn:focus {
  background: #38A37D;
  color: #fff;
  box-shadow: 0 4px 18px 0 rgba(56,163,125,0.18);
}

/* Hamburger (mobile) menu */
.mobile-menu-toggle {
  display: none;
  position: absolute;
  right: 14px;
  top: 22px;
  background: none;
  border: none;
  font-size: 2.1rem;
  color: #1F487E;
  cursor: pointer;
  z-index: 302;
  transition: color .18s;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  color: #38A37D;
}
.mobile-menu {
  position: fixed;
  background: #fff;
  top: 0; left: 0;
  bottom: 0; right: 0;
  z-index: 300;
  box-shadow: 0 8px 16px 0 rgba(31,72,126,0.18);
  padding: 0;
  transform: translateX(-100%);
  transition: transform 0.38s cubic-bezier(.55,0,.1,1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  background: none;
  border: none;
  color: #1F487E;
  font-size: 2.1rem;
  position: absolute;
  right: 20px;
  top: 20px;
  cursor: pointer;
  z-index: 305;
  transition: color .18s;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  color: #38A37D;
}
.mobile-nav {
  margin-top: 70px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  padding: 0 32px;
}
.mobile-nav a {
  font-family: 'Georgia', serif;
  font-size: 1.18rem;
  color: #1F487E;
  border: none;
  padding: 12px 0;
  background: none;
  transition: color 0.18s, background .18s;
  width: 100%;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: #38A37D;
  background: #ECF4FE;
}

/* Show/hide menu buttons on mobile */
@media (max-width: 980px) {
  header .container nav {
    display: none;
  }
  .cta-btn {
    margin-left: 0;
  }
  .mobile-menu-toggle {
    display: block;
  }
}
@media (max-width: 650px) {
  header .container {
    gap: 3px;
  }
}

/* ===== LAYOUT SECTIONS & FLEXBOX ===== */
section {
  background: #fff;
  border-radius: 20px;
  padding: 40px 20px;
  margin-bottom: 60px;
  box-shadow: 0 2px 20px 0 rgba(56,163,125,0.05);
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.content-wrapper, .content-grid, .features, .services, .products, .guides, .tips-grid, .faq, .testimonials {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 12px;
  align-items: flex-start;
  width: 100%;
}

.content-grid {
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .content-wrapper, .content-grid, .features, .services, .products, .guides, .tips-grid, .faq, .testimonials, .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: stretch !important;
  }
}

/* ===== CARDS & FEATURE ITEMS ===== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px 24px 24px;
  margin-bottom: 20px;
  position: relative;
  box-shadow: 0 2px 18px 0 rgba(31,72,126,0.06);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 260px;
  flex: 1 1 260px;
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Service, product, guide, feature items */
.service-item, .product-item, .guide-item, .feature-item {
  background: #FAFBFC;
  border-radius: 15px;
  padding: 28px 22px 18px 22px;
  box-shadow: 0 1px 8px 0 rgba(31,72,126,0.04);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  flex: 1 1 260px;
  min-width: 260px;
  max-width: 310px;
}
.service-item h3, .product-item h3, .guide-item h3, .feature-item h3 {
  margin-top: 0;
}
.price {
  font-family: 'Georgia', serif;
  color: #38A37D;
  font-weight: 600;
  font-size: 1.03rem;
  margin-top: 5px;
}

.features ul {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.features ul li {
  flex: 1 1 230px;
  min-width: 230px;
  list-style: none;
  display: flex;
  flex-direction: column;
  background: #FAFBFC;
  border-radius: 15px;
  align-items: flex-start;
  gap: 10px;
  padding: 25px 19px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px 0 rgba(56,163,125,0.07);
}
.features ul li img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin-bottom: 10px;
}

/* Product list as flex for Echipamente page */
.products {
  gap: 22px;
}
.product-item {
  min-width: 240px;
  flex: 1 1 240px;
  max-width: 320px;
}

.guide-item {
  min-width: 220px;
  max-width: 375px;
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonials {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 28px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 18px 0 rgba(31,72,126,0.07);
  min-width: 260px;
  flex: 1 1 320px;
  margin-bottom: 20px;
}
.testimonial-card blockquote {
  background: none;
  border-left: 4px solid #1F487E;
  padding: 0 0 0 16px;
  margin: 0 0 10px 0;
  color: #222a32;
  box-shadow: none;
}
.testimonial-card p {
  color: #38577C;
  margin-bottom: 0;
  font-size: 1rem;
}
.star-rating {
  color: #FFD700;
  font-size: 1.06rem;
  font-family: 'Georgia', serif;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

/* CRITICAL COLOR CONTRAST FOR TESTIMONIALS */
.testimonial-card,
.testimonial-card blockquote {
  background-color: #fff;
  color: #232b37;
}

/* ===== BUTTONS & INTERACTION ===== */
button, .cta-btn, .mobile-menu-close, .mobile-menu-toggle {
  transition: background .18s, color .18s, box-shadow .18s, border .18s, transform .18s;
}
button:focus, .cta-btn:focus {
  outline: 2px solid #1F487E;
  outline-offset: 2px;
}

/* ===== FOOTER ===== */
footer {
  background: #1F487E;
  color: #fff;
  padding: 32px 0 16px 0;
}
footer .container {
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
footer nav a {
  color: #fff;
  font-family: 'Georgia', serif;
  opacity: 0.82;
  font-size: 1rem;
}
footer nav a:hover, footer nav a:focus {
  color: #38A37D;
  opacity: 1;
  border-bottom: 1.5px solid #55C09B;
}
footer p {
  color: #c8d6eb;
}
footer address{
  color: #D4EDFB;
  font-style: normal;
  font-size: 0.98rem;
  line-height: 1.4;
  text-align: center;
}
footer img {
  height: 46px;
  width: auto;
}

/* ======= TEXT SECTIONS ====== */
.text-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 12px;
}
.text-section ul {
  margin-bottom: 8px;
}
.text-section a {
  color: #1F487E;
}

/* ======= FAQ, TIPS, GUIDES FLEX ======= */
.faq, .tips-grid, .guides {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.faq ul, .tips-grid ul {
  margin-left: 14px;
  margin-bottom: 0;
}
.faq li, .tips-grid li {
  margin-bottom: 8px;
}

/* ======= RESPONSIVE ADJUSTMENTS ======= */
@media (max-width: 1024px) {
  .container {
    padding: 0 10px;
  }
}
@media (max-width: 899px) {
  .features ul {
    gap: 10px;
  }
  .service-item, .product-item, .feature-item {
    min-width: 160px;
    max-width: 100%;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  section, .section {
    padding: 28px 7px;
    border-radius: 10px;
    margin-bottom: 36px;
  }
  .card, .testimonial-card {
    padding: 16px 10px;
    border-radius: 10px;
    min-width: 140px;
  }
  .card-container {
    gap: 12px;
  }
  .content-wrapper, .features ul, .services, .products, .guides, .content-grid, .faq, .testimonials {
    gap: 10px;
  }
  .cta-btn {
    padding: 9px 18px;
    font-size: 1rem;
  }
}
@media (max-width: 560px) {
  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.1rem; }
  header .container{
    min-height: 54px;
    padding: 6px 6px 6px 9px;
  }
  .section {
    padding: 19px 2px;
    margin-bottom: 24px;
  }
  section {
    border-radius: 5px;
    margin-bottom: 19px;
  }
  .card, .testimonial-card {
    font-size: 0.96rem;
    padding: 7px 4px 13px 8px;
    border-radius: 6px;
  }
  .cta-btn {
    padding: 7px 10px;
    font-size: 0.98rem;
  }
  .mobile-menu {
    padding-top: 0;
  }
}

/* ===== HOVER/FOCUS ANIMATIONS & MICRO-INTERACTIONS */
.card, .service-item, .feature-item, .testimonial-card, .product-item {
  transition: box-shadow .21s, transform .22s;
}
.card:hover, .service-item:hover, .feature-item:hover, .testimonial-card:hover, .product-item:hover {
  box-shadow: 0 6px 20px 0 rgba(31,72,126,0.10);
  transform: translateY(-2px) scale(1.019);
}
.cta-btn:active, .cta-btn:focus {
  box-shadow: 0 5px 30px 0 rgba(56,163,125,0.24);
}

/* ====== COOKIE CONSENT BANNER ====== */
#cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 2px solid #1F487E;
  box-shadow: 0 -2px 16px 0 rgba(19,40,90,0.09);
  padding: 24px 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  z-index: 4000;
  font-size: 1rem;
  transition: transform .38s;
}
#cookie-banner.hide {
  transform: translateY(200%);
}
#cookie-banner .cookie-text {
  flex: 2 1 380px;
  color: #1F487E;
  font-family: 'Georgia', serif;
  margin-right: 14px;
}
#cookie-banner .cookie-actions {
  flex: 1 1 222px;
  display: flex;
  flex-direction: row;
  gap: 10px;
}
.cookie-btn, .cookie-settings-btn {
  font-family: 'Georgia', serif;
  font-size: 1.03rem;
  border: none;
  border-radius: 25px;
  padding: 7px 19px;
  transition: background .19s, color .19s, box-shadow .16s;
  cursor: pointer;
}
.cookie-btn {
  background: #38A37D;
  color: #fff;
}
.cookie-btn:hover, .cookie-btn:focus {
  background: #1F487E;
  color: #fff;
}
.cookie-settings-btn {
  background: #f7f7fb;
  color: #1F487E;
  border: 1.5px solid #1F487E;
}
.cookie-settings-btn:hover, .cookie-settings-btn:focus {
  background: #ECF4FE;
}
@media (max-width: 768px) {
  #cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 6px 18px 6px;
    font-size: 0.97rem;
  }
  #cookie-banner .cookie-actions { gap: 6px; }
}

/* ====== COOKIE PREFERENCES MODAL ====== */
#cookie-modal {
  position: fixed;
  z-index: 5000;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(31,72,126,0.22);
  display: none;
  align-items: center;
  justify-content: center;
}
#cookie-modal.open {
  display: flex;
  animation: fadeModalIn .23s;
}
@keyframes fadeModalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal-content {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 7px 36px 0 rgba(31,72,126,0.16);
  min-width: 320px;
  max-width: 97vw;
  padding: 36px 32px 28px 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: animModalSlide .23s;
}
@keyframes animModalSlide {
  from { transform: translateY(-40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-modal-content h2 {
  margin-top: 0;
  margin-bottom: 9px;
}
.cookie-modal-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 13px 0;
}
.cookie-modal-content li {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 10px;
  font-size: 1rem;
}
.cookie-toggle {
  width: 38px;
  height: 22px;
  border-radius: 13px;
  background: #E9EEF8;
  position: relative;
  margin-left: 6px;
  transition: background .18s;
  cursor: pointer;
  border: none;
}
.cookie-toggle[aria-checked="true"] {
  background: #38A37D;
}
.cookie-toggle::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px 0 rgba(0,0,0,0.05);
  transition: left .18s;
}
.cookie-toggle[aria-checked="true"]::after {
  left: 19px;
}
.cookie-modal-actions {
  display: flex;
  flex-direction: row;
  gap: 14px;
  justify-content: flex-end;
}
.cookie-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: #1F487E;
  font-size: 1.65rem;
  cursor: pointer;
  transition: color .18s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: #38A37D;
}
@media (max-width: 540px) {
  .cookie-modal-content {
    min-width: 90vw;
    padding: 15px 6px 13px 11px;
    gap: 8px;
  }
}

/* ======= UTILITY & MISC ======= */
::-webkit-input-placeholder { color: #A0B3CF; }
::-moz-placeholder { color: #A0B3CF; }
:-ms-input-placeholder { color: #A0B3CF; }
::placeholder { color: #A0B3CF; }

hr {
  border: 0;
  height: 1px;
  background: #ECF4FE;
  margin: 24px 0;
}

.hide { display: none !important; }

/* ===== SELECTION COLOR ===== */
::selection {
  background: #E9EEF8;
  color: #1F487E;
}

/* ===== PRINT FRIENDLY ===== */
@media print {
  header, footer, #cookie-banner, #cookie-modal { display: none !important; }
  section, .section {
    box-shadow: none !important;
    background: #fff !important;
  }
}
