/* =========================================================
   RomaScienza – style.css
   Elegant Classic: timeless elegance, muted colors, refined spacing
   Responsive, Flexbox-only, Mobile menu & Cookie consent
   ========================================================= */

/* ======= CSS RESET & 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;
  height: 100%;
}
body {
  min-height: 100vh;
  background: #f4faff;
  color: #232946;
  font-family: 'Roboto', serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
}

*, *:before, *:after {
  box-sizing: inherit;
}

img, svg {
  display: inline-block;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}
ul, ol {
  list-style: none;
}

/* Selection highlight */
::selection {
  background: #eebc6a66;
}

/* ======= TYPOGRAPHY ======= */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Titillium Web', 'Times New Roman', serif;
  color: #232946;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 18px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}
h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}
h4 {
  font-size: 1.125rem;
  margin-bottom: 6px;
}

p, li, address {
  color: #232946;
  font-size: 1rem;
  margin-bottom: 10px;
}
p:last-child,
li:last-child {
  margin-bottom: 0;
}
strong {
  font-weight: 700;
  color: #232946;
}

/* Emphasized with muted accent for a classic touch */
em, i {
  color: #525573;
}

/* ======= LAYOUT CONTAINERS ======= */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(35,41,70,0.05);
}
@media (max-width: 768px) {
  .section {
    padding: 28px 8px;
    margin-bottom: 36px;
    border-radius: 12px;
  }
}

/* ======= HERO SECTION ======= */
.hero {
  background: #f9fafc;
  padding: 56px 0 40px 0;
  margin-bottom: 44px;
  border-bottom: 1px solid #e6e6e6;
}
.hero .container {
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px) {
  .hero {
    padding-top: 28px;
    margin-bottom: 24px;
  }
}
.hero h1 {
  font-size: 2.75rem;
  color: #232946;
  letter-spacing: 0.015em;
}
.hero p {
  font-size: 1.15rem;
  color: #525573;
  margin-bottom: 24px;
  max-width: 600px;
}


/* ======= NAVIGATION & HEADER ======= */
header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(35,41,70,0.06);
  padding: 0;
  border-bottom: 1px solid #ececec;
  position: relative;
  z-index: 1001;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 78px;
}
header img {
  height: 44px;
}
nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
header nav a {
  font-family: 'Titillium Web', serif;
  font-weight: 500;
  font-size: 1.05rem;
  color: #232946;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
  position: relative;
}
header nav a:hover,
header nav a:focus {
  color: #eebc6a;
  background: #23294607;
}
.cta-primary {
  display: inline-block;
  font-family: 'Titillium Web', serif;
  font-size: 1.1rem;
  font-weight: 700;
  background: #232946;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 12px 36px;
  margin-left: 14px;
  box-shadow: 0 2px 8px rgba(35,41,70,0.11);
  transition: background 0.22s, color 0.22s, box-shadow 0.18s;
  cursor: pointer;
  outline: none;
  text-align: center;
}
.cta-primary:hover, .cta-primary:focus {
  background: #eebc6a;
  color: #232946;
  box-shadow: 0 4px 14px rgba(238,188,106,0.23);
}

@media (max-width: 950px) {
  header .container {
    flex-wrap: wrap;
    gap: 12px;
  }
  nav {
    gap: 14px;
  }
  .cta-primary {
    padding: 11px 26px;
    font-size: 1rem;
  }
}
@media (max-width: 768px) {
  header .container, header nav {
    flex-direction: row;
    justify-content: space-between;
  }
  header nav {
    display: none;
  }
  .cta-primary {
    display: none;
  }
}

/* ======= MOBILE MENU ======= */
.mobile-menu-toggle {
  display: none;
  font-size: 2rem;
  color: #232946;
  background: #fff;
  border: none;
  border-radius: 8px;
  position: fixed;
  top: 20px;
  right: 18px;
  z-index: 1100;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(35,41,70,0.08);
  transition: background 0.18s;
  cursor: pointer;
}
.mobile-menu-toggle:active, .mobile-menu-toggle:focus {
  background: #f9fafc;
}
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  position: fixed;
  top: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 32px rgba(35,41,70,0.16);
  z-index: 1400;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.51,0.64,0.23,0.95);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  align-self: flex-end;
  margin: 22px 16px 12px 0;
  background: none;
  border: none;
  color: #232946;
  font-size: 2.3rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.18s;
  width: 48px;
  height: 48px;
}
.mobile-menu-close:focus,
.mobile-menu-close:hover {
  background: #f4faff;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: flex-start;
  padding: 0 36px;
  gap: 17px;
}
.mobile-nav a {
  font-family: 'Titillium Web', serif;
  color: #232946;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 13px 0;
  border-radius: 5px;
  transition: background 0.1s, color 0.2s;
  width: 100%;
  display: block;
}
.mobile-nav a:focus, .mobile-nav a:hover {
  color: #eebc6a;
  background: #f4faff;
}
@media (min-width: 769px) {
  .mobile-menu, .mobile-menu-toggle {
    display: none !important;
  }
}

/* ======= FLEXBOX PATTERNS ======= */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  flex: 1 1 260px;
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 2px 10px rgba(35,41,70,0.09);
  padding: 28px 24px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (max-width: 700px) {
  .card-container {
    flex-direction: column;
    gap: 16px;
  }
  .card {
    padding: 20px 10px;
    gap: 12px;
  }
}

.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;
    gap: 18px;
    align-items: flex-start;
  }
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #f8f8fa;
  border-radius: 14px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(35,41,70,0.04);
  border-left: 5px solid #eebc6a;
  transition: box-shadow 0.18s;
}
.testimonial-card p {
  color: #232946;
  font-size: 1.13rem;
  margin-bottom: 0;
  font-style: italic;
}
.testimonial-card strong {
  color: #232946;
  font-weight: 700;
}
.testimonial-card:hover {
  box-shadow: 0 6px 18px rgba(35,41,70,0.14);
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: #fff;
}

.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-bottom: 18px;
}
.feature-grid li {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(35,41,70,0.07);
  flex: 1 1 210px;
  min-width: 170px;
  max-width: 300px;
  padding: 28px 22px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.16s, border 0.17s;
  gap: 12px;
  border: 1.5px solid #f6ebdc;
  margin-bottom: 12px;
}
.feature-grid li:hover {
  box-shadow: 0 6px 18px rgba(35,41,70,0.13);
  border-color: #eebc6a;
}
.feature-grid h3 {
  color: #232946;
  font-family: 'Titillium Web', serif;
  font-size: 1.15rem;
}
.feature-grid p {
  color: #525573;
  font-size: 1rem;
}
.feature-grid img {
  width: 40px;
  margin-bottom: 6px;
}
@media (max-width:768px) {
  .feature-grid {
    flex-direction: column;
    gap: 12px;
  }
  .feature-grid li {
    max-width: 100%;
    min-width: 100%;
    padding: 20px 14px 18px 14px;
  }
}

.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  flex-direction: row;
}
.service-list li {
  background: #fff;
  border-radius: 11px;
  box-shadow: 0 1px 8px rgba(35,41,70,0.07);
  padding: 22px 14px 18px 18px;
  font-family: 'Roboto', serif;
  font-size: 1.09rem;
  flex: 1 1 260px;
  max-width: 300px;
  min-width: 170px;
  margin-bottom: 0;
  border: 1.5px solid #f6ebdc;
  transition: box-shadow 0.16s, border 0.18s;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-list li strong {
  color: #232946;
}
.service-list li:hover {
  box-shadow: 0 5px 16px rgba(238,188,106,0.12);
  border-color: #eebc6a;
}
@media (max-width: 768px) {
  .service-list {
    flex-direction: column;
    gap: 12px;
  }
  .service-list li {
    max-width: 100%;
    min-width: 100%;
    padding: 16px 9px 12px 9px;
  }
}

.team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.team-member {
  flex: 1 1 210px;
  background: #fcfbfa;
  border-radius: 11px;
  box-shadow: 0 1px 8px rgba(35,41,70,0.06);
  padding: 18px 18px 14px 18px;
  min-width: 170px;
  max-width: 260px;
  margin-bottom: 0;
  margin-right: 0;
}
@media (max-width:768px) {
  .team-list {
    flex-direction: column;
    gap: 14px;
  }
  .team-member {
    min-width: 100%;
    max-width: 100%;
    padding: 14px 9px 7px 9px;
  }
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-left: 0;
  list-style: none;
  padding-left: 0;
}
.timeline li {
  padding-left: 0;
  position: relative;
  font-size: 1rem;
  color: #232946;
  margin-bottom: 0;
}
.timeline li strong {
  color: #eebc6a;
}

/* ====== CONTENT STYLES & LIST RESET ====== */
ul {
  list-style: none;
  margin-left: 0;
}
li {
  margin-bottom: 8px;
}
ul li:last-child {
  margin-bottom: 0;
}
/* For bullet-style list in policy pages */
.section ul li:before {
  content: '•';
  color: #eebc6a;
  font-weight: bold;
  display: inline-block; 
  width: 1em;
  margin-left: -1em;
}
.section ul.feature-grid li:before, .service-list li:before, .timeline li:before {
  content: none !important;
}

/* ======= FOOTER ======= */
footer {
  background: #232946;
  color: #fff;
  padding: 42px 0 18px 0;
  margin-top: 60px;
  border-top: 1.5px solid #ececec;
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
footer .content-wrapper {
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
}
footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
footer nav a {
  color: #fff;
  font-weight: 500;
  font-family: 'Titillium Web', serif;
  font-size: 1rem;
  letter-spacing: 0.03em;
  transition: color 0.17s;
}
footer nav a:hover, footer nav a:focus {
  color: #eebc6a;
}
footer address {
  font-style: normal;
  font-size: 0.98rem;
  color: #f4faff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  margin-top: 0px;
}
footer address img {
  width: 18px;
  margin-right: 7px;
  vertical-align: middle;
}
footer span {
  color: #f4faffcc;
  font-size: 0.93rem;
  margin-top: 2px;
}
footer p {
  color: #fff;
  font-size: 0.92rem;
  margin-top: 4px;
  opacity: 0.9;
}
@media (max-width: 820px) {
  footer .content-wrapper {
    flex-direction: column;
    gap: 20px;
  }
  footer address {
    min-width: 0;
  }
}
@media (max-width: 520px) {
  footer .container {
    gap: 10px;
  }
}

/* ======= BUTTON, LINK & INTERACTIVE ======= */
button, .cta-primary {
  font-family: inherit;
  outline: none;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
button:focus, .cta-primary:focus {
  outline: 2px dashed #eebc6a;
  outline-offset: 2px;
}
button[disabled], .cta-primary[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

input, textarea {
  font-family: 'Roboto', serif;
  border-radius: 7px;
  padding: 10px 12px;
  border: 1.5px solid #dedede;
  font-size: 1rem;
  width: 100%;
  margin-bottom: 14px;
  background: #fff;
  transition: border 0.13s;
}
input:focus, textarea:focus {
  border-color: #eebc6a;
}

/* ======= ANIMATIONS & MICRO-INTERACTIONS ======= */
.card, .testimonial-card, .feature-grid li, .service-list li, .team-member {
  transition: box-shadow 0.18s, border 0.18s, transform 0.20s;
}
.card:hover, .feature-grid li:hover, .service-list li:hover, .team-member:hover {
  box-shadow: 0 6px 18px rgba(35,41,70,0.13);
  transform: translateY(-2px) scale(1.018);
}
.cta-primary {
  transition: background 0.19s, color 0.19s, box-shadow 0.17s, transform 0.16s;
}
.cta-primary:active {
  transform: scale(0.97);
  box-shadow: 0 1px 6px rgba(35,41,70,0.07);
}

/* Hover underline for nav links (classic touch) */
header nav a:after {
  content: '';
  display: block;
  border-bottom: 2px solid #eebc6a;
  width: 0;
  transition: width 0.18s;
}
header nav a:hover:after, header nav a:focus:after {
  width: 80%;
}

/* ======= COOKIE CONSENT BANNER ======= */
#cookie-banner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: #fff;
  color: #232946;
  padding: 26px 20px;
  box-shadow: 0 -2px 14px rgba(35,41,70,0.10);
  z-index: 1600;
  gap: 24px;
  transition: opacity 0.32s, transform 0.26s;
  opacity: 1;
  pointer-events: auto;
}
#cookie-banner.hide {
  opacity: 0;
  transform: translateY(80px);
  pointer-events: none;
}
#cookie-banner p {
  font-size: 1.05rem;
  flex: 1 1 120px;
  margin-bottom: 0;
}
#cookie-banner .cookie-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
#cookie-banner button {
  font-size: 1rem;
  padding: 10px 26px;
  margin: 0;
  border-radius: 8px;
  border: none;
  margin-right: 0;
  background: #232946;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 1px 6px rgba(35,41,70,0.07);
  transition: background 0.15s, color 0.15s;
}
#cookie-banner button.settings {
  background: none;
  color: #232946;
  text-decoration: underline;
  padding: 10px 14px;
}
#cookie-banner button.accept {
  background: #eebc6a;
  color: #232946;
}
#cookie-banner button.reject {
  background: #f4faff;
  color: #232946;
  border: 1.5px solid #dedede;
}
#cookie-banner button:hover, #cookie-banner button:focus {
  opacity: 0.92;
}
@media (max-width:600px) {
  #cookie-banner {
    flex-direction: column;
    gap: 14px;
    padding: 20px 7px 22px 7px;
    align-items: flex-start;
  }
  #cookie-banner .cookie-buttons {
    gap: 9px;
  }
}

/* COOKIE PREFERENCES MODAL */
#cookie-modal {
  display: none;
  flex-direction: column;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%,40vh);
  z-index: 1800;
  width: 97vw;
  max-width: 410px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(35,41,70,0.20);
  border-radius: 18px 18px 0 0;
  padding: 28px 20px 22px 20px;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.21s, opacity 0.15s;
}
#cookie-modal.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%,0);
}
#cookie-modal h2 {
  font-size: 1.32rem;
  color: #232946;
  margin-bottom: 9px;
}
#cookie-modal .modal-close {
  position: absolute;
  top: 10px;
  right: 18px;
  border: none;
  background: none;
  color: #525573;
  font-size: 2rem;
  cursor: pointer;
}
#cookie-modal ul {
  margin-left: 0;
  list-style: none;
  gap: 15px;
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
#cookie-modal li {
  display: flex;
  align-items: center;
  font-size: 1rem;
  gap: 14px;
  margin-bottom: 0;
}
#cookie-modal label {
  flex: 1;
}
#cookie-modal input[type='checkbox'] {
  accent-color: #eebc6a;
  width: 20px;
  height: 20px;
  margin-right: 0;
}
#cookie-modal .cookie-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-end;
}
#cookie-modal button {
  border-radius: 7px;
  font-size: 1rem;
  padding: 9px 24px;
  font-weight: 700;
  border: none;
  background: #232946;
  color: #fff;
  transition: background 0.13s, color 0.13s;
}
#cookie-modal button.save {
  background: #eebc6a;
  color: #232946;
}
#cookie-modal button.cancel {
  background: #f4faff;
  color: #232946;
  border: 1.5px solid #dedede;
}
#cookie-modal button:focus, #cookie-modal button:hover {
  opacity: 0.93;
}

@media (max-width:600px) {
  #cookie-modal {
    max-width: 98vw;
    border-radius: 13px 13px 0 0;
    padding: 20px 7px 18px 7px;
  }
}

/* ======= RESPONSIVE =========== */
@media (max-width: 700px) {
  h1 {
    font-size: 1.6rem;
  }
  h2 {
    font-size: 1.25rem;
  }
  .card, .feature-grid li, .service-list li, .team-member {
    font-size: 0.99rem;
  }
}

/* ======= PRINT STYLES ======= */
@media print {
  * {
    box-shadow: none !important;
    background: #fff !important;
    color: #232946 !important;
  }
  .mobile-menu, .mobile-menu-toggle, #cookie-banner, #cookie-modal {
    display: none !important;
  }
}

/* ======= ACCESSIBILITY ======= */
@media (forced-colors: active) {
  body, .section, header, footer {
    forced-color-adjust: auto;
  }
}

/* ======= ADDITIONAL UTILITIES ======= */
.hide { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ======= END ======= */