/* ===================
   Crystal Quest Viaggi CSS: Luxury Premium Style
   By request: mobile-first, flexbox only, fully responsive
   =================== */

/*--- 0. CSS RESET / NORMALIZE ---*/
html { box-sizing: border-box; }
*,*::before,*::after { box-sizing: inherit; margin: 0; padding: 0; border: 0; font: inherit; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
ul,ol { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color .2s cubic-bezier(.4,0,.2,1); }
button,input,select,textarea { font: inherit; background: none; border: none; outline: none; }

/*--- 1. ROOT/VARIABLES ---*/
:root {
  --cq-primary: #23456c;
  --cq-secondary: #e7b746;
  --cq-accent: #f2f5f9;
  --cq-dark: #1a283a;
  --cq-light: #ffffff;
  --cq-grey: #8192a7;
  --cq-shadow: 0 2px 16px 0 rgba(25,47,79,0.09);
  --cq-border: #e5e8ee;
  --cq-radius: 16px;
  --cq-radius-sm: 9px;
}

/*--- 2. TYPOGRAPHY ---*/
@import url('https://fonts.googleapis.com/css?family=Montserrat:700,400&display=swap');
@import url('https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap');

body {
  font-family: "Roboto", Arial, sans-serif;
  background: var(--cq-accent);
  color: var(--cq-dark);
  font-size: 16px;
  letter-spacing: 0.01em;
  min-height: 100vh;
}
h1, h2, h3, h4, h5, h6 {
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 700;
  color: var(--cq-primary);
  letter-spacing: 0.01em;
  margin-bottom: .6em;
}
h1 { font-size: 2.3rem; line-height:1.16; }
h2 { font-size: 1.6rem; line-height:1.25; }
h3 { font-size: 1.22rem; line-height:1.38; }
h4 { font-size: 1.1rem; line-height:1.4; }
.lead {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1.16rem;
  font-weight: 400;
  color: var(--cq-grey);
  margin-bottom: 24px;
}
p,ul,li { font-size: 1rem; color: var(--cq-dark); margin-bottom: 12px; }
b, strong { font-weight: 700; color: var(--cq-primary); }
small { font-size: .89rem; color: var(--cq-grey); }

/* Visual hierarchy */
h1 + .lead, h2 + .lead { margin-top: -6px; }

/*--- 3. LAYOUT ---*/
.container {
  width: 100%;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  max-width: 1190px;
  box-sizing: border-box;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--cq-light);
  border-radius: var(--cq-radius);
  box-shadow: var(--cq-shadow);
}
@media (max-width: 768px) {
  .section { padding: 28px 6px; margin-bottom: 44px; }
  .container { padding-left: 9px; padding-right: 9px; }
}

/*--- 4. HEADER & NAVIGATION ---*/
header {
  background: var(--cq-light);
  box-shadow: 0 2px 14px 0 rgba(33,56,92,0.08);
  padding: 12px 0;
  position: sticky;
  top: 0; z-index: 1040;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 14px;
}
header > a img { height: 42px; max-height: 52px; margin-right: 14px; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: 8px;
}
.main-nav a {
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 500;
  font-size: 1.06rem;
  color: var(--cq-primary);
  position: relative;
  padding: 6px 7px;
  border-radius: var(--cq-radius-sm);
  transition: background .18s, color .18s;
}
.main-nav a:hover,
.main-nav a:focus {
  color: var(--cq-secondary);
  background: rgba(231,183,70,0.12);
}
.button.primary {
  margin-left: auto;
}
.button.primary {
  font-family: "Montserrat", Arial, sans-serif;
  background: var(--cq-secondary);
  color: var(--cq-dark);
  padding: 10px 30px;
  border-radius: var(--cq-radius-sm);
  box-shadow: 0 2px 6px rgba(234,183,70,0.17);
  font-weight: 700;
  font-size: 1.09rem;
  letter-spacing: .02em;
  transition: background .2s, box-shadow .2s, color .2s;
  position: relative;
  border: none;
  cursor: pointer;
  outline: none;
}
.button.primary:hover,
.button.primary:focus {
  background: #f5d88b;
  color: var(--cq-primary);
  box-shadow: 0 4px 11px rgba(234,183,70,0.21);
}

/*--- Mobile menu ---*/
.mobile-menu-toggle {
  background: var(--cq-secondary);
  color: var(--cq-dark);
  font-size: 2.2rem;
  border-radius: var(--cq-radius-sm);
  padding: 7px 16px;
  margin-left: 10px;
  margin-right: 2px;
  display: none;
  cursor: pointer;
  transition: background .15s, color .15s;
  z-index: 1110;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: #f5d88b;
}
/* Mobile menu off-canvas */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background: rgba(25,36,54,0.73);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  /* Hidden by default */
  pointer-events: none;
  opacity: 0;
  transition: opacity .28s cubic-bezier(.9,0,.3,1);
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
.mobile-nav {
  background: var(--cq-light);
  box-shadow: 0 6px 29px 0 rgba(17,27,41,0.13);
  width: 88vw;
  max-width: 370px;
  height: 100vh;
  padding: 36px 20px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(110%);
  transition: transform .36s cubic-bezier(.8,0,.25,1);
}
.mobile-menu.open .mobile-nav{
  transform: translateX(0);
}
.mobile-menu-close {
  background: none;
  color: var(--cq-primary);
  font-size: 2rem;
  margin: 18px 21px 0 0;
  align-self: flex-end;
  border-radius: var(--cq-radius-sm);
  padding: 2px 9px;
  cursor: pointer;
  transition: background .12s;
  z-index: 1250;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  background: #e7b74633;
}
.mobile-nav a {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1.12rem;
  color: var(--cq-primary);
  border-radius: var(--cq-radius-sm);
  padding: 11px 9px 10px 0;
  margin: 0;
  transition: background .19s, color .19s;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  color: var(--cq-secondary);
  background: rgba(231,183,70, 0.10);
}

@media (max-width: 1025px) {
  .main-nav, .button.primary { display: none; }
  .mobile-menu-toggle { display: block; margin-left: auto; }
}
@media (min-width: 1026px) {
  .mobile-menu { display: none !important; }
}

/*--- 5. FLEXBOX UTILITY & CONTENT GRIDS ---*/
.card-container,
.card-grid,
.feature-grid,
.content-grid,
.features {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card-grid,
.feature-grid {
  justify-content: flex-start;
  align-items: stretch;
}
@media (max-width: 900px) {
  .card-container, .card-grid, .feature-grid, .content-grid, .features {
    gap: 16px;
  }
}

.card {
  background: var(--cq-light);
  border-radius: var(--cq-radius);
  box-shadow: var(--cq-shadow);
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
  transition: box-shadow .19s;
  min-width: 210px;
  min-height: 208px;
}
.card:hover,
.card:focus-within {
  box-shadow: 0 9px 38px -14px rgba(67,47,23,0.17);
}

/* Text-image section */
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; gap: 20px; }
}

/* Testimonials & review card */
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  background: var(--cq-accent);
  border-radius: var(--cq-radius-sm);
  box-shadow: 0 3px 17px -6px rgba(35,69,108,0.11);
  padding: 20px;
  margin-bottom: 20px;
  border-left: 5px solid var(--cq-secondary);
  position: relative;
  min-width: 0;
  max-width: 623px;
}
.testimonial-card p {
  color: #232c3c;
  font-size: 1.07rem;
  font-style: italic;
  margin-bottom: 0;
}
.testimonial-card span strong {
  color: var(--cq-primary);
  font-weight: 700;
}
.testimonial-card span {
  color: var(--cq-dark);
  font-size: .99rem;
}
.testimonial-card:last-child { margin-bottom: 0; }

/*--- 6. FEATURE ITEMS ---*/
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/*--- 7. BUTTONS & LINKS ---*/
.button,
.button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat", Arial, sans-serif;
  border-radius: var(--cq-radius-sm);
  font-size: 1.12rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
  min-width: 120px;
  min-height: 45px;
  box-shadow: 0 2px 7px rgba(35,69,108,0.09);
  padding: 10px 30px;
  letter-spacing: .025em;
  border: none;
  outline: none;
}
.button.secondary {
  background: var(--cq-light);
  color: var(--cq-primary);
  border: 2px solid var(--cq-secondary);
}
.button.secondary:hover {
  background: var(--cq-secondary);
  color: var(--cq-primary);
  border-color: var(--cq-primary);
}
.button[disabled], .button.disabled {
  opacity: .65;
  cursor: not-allowed;
}

/*--- 8. SECTION, CARDS, GRIDS, GENERAL SPACING ---*/
section {
  margin-bottom: 60px;
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  background: none;
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 768px) {
  section { margin-bottom: 38px; padding: 30px 0; }
}
.card-container, .card-grid, .feature-grid, .content-grid {
  gap: 20px;
}
.card, .testimonial-card {
  margin-bottom: 20px;
}

/*--- 9. ICONS & FIGURES ---*/
.feature-grid > div img,
.text-section ul li img,
address div img {
  height: 32px;
  width: 32px;
  margin-right: 12px;
  vertical-align: middle;
}

/*--- 10. TEXT SECTIONS & LISTS ---*/
.text-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.text-section ul {
  padding-left: 0px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.text-section ul li {
  display: flex;
  align-items: center;
  font-size: 1rem;
  color: var(--cq-dark);
  padding-left: 0px;
}
.text-section h3 {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1.09rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--cq-primary);
}
@media (max-width: 768px) {
  .text-section { gap: 10px; }
}

/*--- 11. FOOTER ---*/
footer {
  background: var(--cq-primary);
  color: var(--cq-accent);
  padding: 46px 0 19px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border-top-left-radius: var(--cq-radius);
  border-top-right-radius: var(--cq-radius);
  box-shadow: 0 -2px 24px rgba(35,69,108,0.15);
  z-index: 10;
  width: 100%;
}
footer > a img {
  height: 37px; margin-bottom: 6px;
}
footer nav {
  display: flex;
  flex-direction: row;
  gap: 18px;
  margin-bottom: 10px;
}
footer nav a {
  color: var(--cq-secondary);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .98rem;
  font-weight: 500;
  transition: color .16s;
}
footer nav a:hover, footer nav a:focus { color: #f5d88b; }
footer address {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 4px;
  color: var(--cq-accent);
  font-style: normal;
  font-size: .96rem;
  line-height: 1.6;
  margin-bottom: 4px;
}
footer address div {
  display: flex;
  align-items: center;
  gap: 10px;
}
footer small {
  color: #f7e8c9;
  letter-spacing:0.01em;
}

/*--- 12. RESPONSIVENESS ---*/
@media (max-width: 900px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.23rem; }
  .main-nav { gap: 12px; }
}
@media (max-width: 768px) {
  h1, h2 { text-align: left; }
  .feature-grid { flex-direction: column; }
  .content-wrapper { gap: 12px; }
  .card, .testimonial-card { min-width: 0; padding: 18px 12px; }
  .feature-item { gap: 7px; }
  footer { padding: 30px 0 16px 0; }
}

@media (max-width: 530px) {
  .container { padding-left: 4px; padding-right: 4px; }
  .content-wrapper { padding-left: 0; padding-right: 0; }
  .button.primary, .button { font-size: .99rem; padding: 8px 14px; }
  header > a img, footer > a img { height:30px; }
}

/*--- 13. INTERACTIONS & ANIMATION ---*/
a, .button, .main-nav a, .mobile-nav a {
  transition: color .18s, background .19s, box-shadow .16s;
}
.button, .button.primary:active { transform: translateY(1px); }
.button:active { box-shadow: 0 1px 2px rgba(35,69,108,0.10); }
.feature-grid > div {
  transition: box-shadow .18s, background .19s;
  border-radius: var(--cq-radius-sm);
  background: var(--cq-light);
  box-shadow: 0 2px 8px rgba(35,69,108,0.07);
  padding: 18px 14px;
  flex: 1 1 210px;
  min-width: 180px;
}
.feature-grid > div:hover,
.feature-grid > div:focus-within {
  background: #fff8ec;
  box-shadow: 0 8px 18px -7px rgba(231,183,70,0.15);
}

/*--- 14. COOKIE BANNER & MODAL ---*/
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff8ec;
  box-shadow: 0 -4px 22px rgba(35,69,108,0.13);
  border-top: 2px solid var(--cq-secondary);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 38px;
  z-index: 1600;
  font-size: .99rem;
  font-family: "Roboto", Arial, sans-serif;
  animation: cookie-bounce-in .64s cubic-bezier(.41,1.55,.59,1) 1;
}
@keyframes cookie-bounce-in {
  0% { transform: translateY(100%); opacity: 0; }
  80% { transform: translateY(-8%); }
  100% { transform: translateY(0); opacity: 1; }
}
.cookie-banner__text {
  color: var(--cq-dark);
  max-width: 600px;
}
.cookie-banner__actions {
  display: flex;
  gap: 13px;
  align-items: center;
}
.cookie-banner .button {
  font-size: .98rem;
  font-weight: 600;
  box-shadow: none;
  padding: 7px 19px;
  min-width: 0;
}
.cookie-banner .button.primary {
  background: var(--cq-secondary);
  color: var(--cq-dark);
}
.cookie-banner .button.primary:hover{
  background: #eed076;
}
.cookie-banner .button.reject {
  background: var(--cq-light);
  border: 2px solid var(--cq-secondary);
  color: var(--cq-primary);
}
.cookie-banner .button.reject:hover{
  background: #f2f5f9;
}
.cookie-banner .button.settings {
  background: var(--cq-accent);
  color: var(--cq-primary);
  border: 1.3px solid #ded4b2;
}
.cookie-banner .button.settings:hover {
  background: #fbf6ec;
  border-color: var(--cq-secondary);
}

@media (max-width: 650px) {
  .cookie-banner{
    padding: 12px 4px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* Cookie modal overlay & preferences */
.cookie-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1800;
  background: rgba(35, 46, 77, 0.64);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .29s;
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
.cookie-modal {
  background: var(--cq-light);
  border-radius: var(--cq-radius);
  box-shadow: 0 11px 39px rgba(35,69,108,.21);
  padding: 32px 28px;
  max-width: 442px;
  width: 95%;
  display: flex;
  flex-direction: column;
  gap: 17px;
  animation: modalPopIn .5s cubic-bezier(.82,.09,.44,1.78) 1;
}
@keyframes modalPopIn {
  from { transform: translateY(35px) scale(.89); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.cookie-modal h3 {
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--cq-primary);
  margin-bottom: 10px;
}
.cookie-modal .cookie-pref-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cookie-modal .cookie-pref-cat {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
}
.cookie-pref-cat label {
  font-size: 1.01rem;
  font-weight: 400;
  color: var(--cq-dark);
  flex: 1;
}
.cookie-pref-cat .toggle {
  position: relative;
  width: 38px;
  height: 20px;
  background: #ecf0f8;
  border-radius: 12px;
  transition: background .25s;
  margin-left: 8px;
  border: 1.5px solid #e7b74633;
}
.cookie-pref-cat .toggle[aria-checked="true"] {
  background: var(--cq-secondary);
  border-color: #e7b74666;
}
.cookie-pref-cat .toggle[aria-checked="true"]:after {
  left: 18px; background: var(--cq-primary);
}
.cookie-pref-cat .toggle:after {
  content: '';
  display: block;
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #bdbec7;
  border-radius: 50%;
  transition: left .17s, background .18s;
}

.cookie-pref-cat .required {
  font-size: .94em;
  color: var(--cq-secondary);
  margin-left: 4px;
}
.cookie-modal .modal-actions {
  margin-top: 17px;
  display: flex;
  flex-direction: row;
  gap: 11px;
  justify-content: flex-end;
}
.cookie-modal .button {
  font-size: .99rem;
  font-weight: 600;
  min-width: 80px;
  padding: 6px 16px;
  border-radius: var(--cq-radius-sm);
}

/*--- 15. FORM ---*/
input, textarea, select {
  background: #fbfbfd;
  border: 1.5px solid #e2e6ef;
  border-radius: var(--cq-radius-sm);
  padding: 10px;
  margin-bottom: 17px;
  font-size: 1rem;
  color: var(--cq-dark);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--cq-secondary);
  outline: none;
}
label { font-weight: 500; margin-bottom: 3px; color: var(--cq-primary); }

/*--- 16. UTILITIES ---*/
.d-none { display: none !important; }
.center { text-align: center; }
.text-gold { color: var(--cq-secondary) !important; }
.text-primary { color: var(--cq-primary) !important; }
.text-dark { color: var(--cq-dark) !important; }
.text-accent { color: var(--cq-accent) !important; }

/*--- 17. REFINEMENTS & PREMIUM ACCENTS ---*/
/* Gold border line */
hr.premium {
  border: none;
  border-bottom: 2.5px solid var(--cq-secondary);
  width: 80px;
  margin: 33px auto 24px auto;
}
.card, .testimonial-card, .feature-grid > div {
  border-radius: var(--cq-radius-sm);
  box-shadow: var(--cq-shadow);
  border: 1.1px solid var(--cq-border);
}
.feature-grid > div {
  border-left: 4px solid #e7b74633;
}

/* Gold highlight */
.gold-accent {
  color: var(--cq-secondary);
  font-weight: 700;
  letter-spacing: .025em;
}

/*--- 18. Z-INDEX CORRECTNESS ---*/
header        { z-index: 1040; }
.mobile-menu  { z-index: 1200 !important; }
.cookie-banner { z-index: 1600 !important; }
.cookie-modal-overlay { z-index: 1800 !important; }

/*--- END ---*/
