/* --- 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;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  line-height: 1.5;
  background: #F7F5F2;
  color: #254153;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  min-height: 100vh;
}

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

img {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* --- BRANDING COLOR VARIABLES (with fallback) --- */
:root {
  --brand-primary: #254153;
  --brand-secondary: #86A789;
  --brand-accent: #F7F5F2;
  --gold: #C7AA6A;
  --gold-hover: #B8964B;
  --heading-font: 'Montserrat', Arial, sans-serif;
  --body-font: 'Roboto', Arial, Helvetica, sans-serif;
  --text-dark: #254153;
  --text-medium: #406176;
  --text-light: #f7f5f2;
  --shadow-lg: 0 12px 32px rgba(37, 65, 83, 0.09);
  --shadow-md: 0 4px 16px rgba(37,65,83,0.08);
  --shadow-card: 0 1px 8px rgba(199,170,106, 0.13);
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  color: var(--text-dark);
  letter-spacing: 0.02em;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.15;
}
h1 { font-size: 2.5rem; margin-bottom: 20px; }
h2 { font-size: 2rem; margin-bottom: 18px; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.15rem; font-weight: 600; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }
.brand-tagline {
  font-size: 1.25rem;
  color: var(--gold);
  font-style: italic;
  font-weight: 600;
  margin: 24px 0 0;
}

p, li, ul, ol, dl, dd, dt {
  font-family: var(--body-font);
  font-size: 1rem;
  color: var(--text-medium);
}

strong, b {
  color: var(--brand-primary);
  font-weight: bold;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.18s;
}
a:hover, a:focus {
  color: var(--gold);
}

ul, ol {
  margin-left: 1.4em;
  margin-bottom: 16px;
}
ul li, ol li {
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
dl { margin-bottom: 16px; }
dt { font-weight: 600; color: var(--brand-primary); margin-top: 14px; }
dd { margin-bottom: 8px; margin-left: 1.2em; }

/* --- CONTAINERS & SECTIONS --- */
.container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- HEADER --- */
header {
  background: #fff;
  box-shadow: 0 2px 12px rgba(37,65,83, 0.07);
  position: relative;
  z-index: 100;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}
header nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
header nav a {
  color: var(--brand-primary);
  font-family: var(--heading-font);
  font-weight: 500;
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  transition: background 0.16s, color 0.15s;
}
header nav a:hover, header nav a:focus {
  background: var(--brand-secondary);
  color: #fff;
}
header a.btn-primary {
  margin-left: 12px;
}

header img[alt="Scapi Lúcido"] {
  height: 48px;
  width: auto;
  transition: transform 0.17s;
}
header img[alt="Scapi Lúcido"]:hover {
  transform: scale(1.05) rotate(-2deg);
}

/* --- BUTTONS --- */
.btn-primary, .btn-secondary {
  display: inline-block;
  font-family: var(--heading-font);
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  padding: 13px 38px;
  cursor: pointer;
  text-align: center;
  transition: background 0.17s, color 0.17s, box-shadow 0.17s;
  box-shadow: var(--shadow-md);
  outline: none;
  border: none;
}
.btn-primary {
  background: var(--gold);
  color: #fff;
  border: 2px solid var(--gold);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--brand-primary);
  border-color: var(--gold-hover);
  color: var(--gold);
}
.btn-secondary {
  background: #fff;
  color: var(--brand-primary);
  border: 2px solid var(--gold);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold-hover);
}

/* --- FLEX CONTAINERS and MANDATORY PATTERNS --- */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-card);
  padding: 32px 26px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.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;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow-md);
  border-radius: var(--border-radius-md);
  border-left: 6px solid var(--gold);
  margin-bottom: 20px;
  min-width: 240px;
  max-width: 640px;
  transition: box-shadow 0.15s, border-color 0.13s;
}
.testimonial-card:hover {
  box-shadow: 0 8px 24px rgba(37,65,83,0.14);
  border-color: var(--brand-secondary);
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* --- CUSTOM GRIDS FOR FEATURES --- */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 24px;
  margin-bottom: 12px;
  justify-content: flex-start;
}
.feature-grid > div {
  background: #fff;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-card);
  padding: 24px 18px 32px 22px;
  min-width: 250px;
  flex: 1 1 240px;
  max-width: 330px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-left: 3.5px solid var(--gold);
  transition: box-shadow 0.13s, border-color 0.13s;
}
.feature-grid > div:hover {
  box-shadow: 0 7px 24px rgba(199,170,106,0.12);
  border-color: var(--brand-primary);
}
.feature-grid img {
  height: 40px;
  width: 40px;
}

/* --- HERO SECTION --- */
main section:first-of-type {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 8px 32px rgba(37,65,83,0.09);
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  padding-top: 56px;
}
main section:first-of-type h1, main section:first-of-type p {
  color: #fff;
}
main section:first-of-type .btn-primary {
  background: #fff;
  color: var(--brand-primary);
  border-color: #fff;
  font-weight: bold;
}
main section:first-of-type .btn-primary:hover {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

/* --- TESTIMONIAL SLIDER (index only, flex stacked) --- */
.testimonial-slider {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  margin-top: 10px;
}
.testimonial-slider .testimonial-card {
  min-width: 260px;
  flex: 1 1 290px;
  max-width: 400px;
}
/* Testimonial readable text color (no matter bg) */
.testimonial-card p, .testimonial-card strong {
  color: var(--text-dark);
  font-size: 1.08rem;
}

/* --- SERVICES & VALUES LIST (icons) --- */
ul li img,
.footer-contact img {
  height: 22px;
  width: 22px;
  margin-right: 7px;
  opacity: 0.96;
  vertical-align: middle;
}
ul li {
  font-size: 1.08rem;
  padding-left: 0;
}

/* --- CTA Final Section --- */
main section:last-of-type {
  background: var(--brand-secondary);
  color: #fff;
  text-align: center;
  box-shadow: 0 2px 16px rgba(134,167,137,0.09);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}
main section:last-of-type h2 {
  color: #fff;
}
main section:last-of-type p {
  color: #f7f5f2;
}
main section:last-of-type .btn-primary {
  margin: 8px auto 0;
}

/* --- FOOTER --- */
footer {
  background: var(--brand-primary);
  color: #fff;
  padding: 38px 0 22px;
  box-shadow: 0 -2px 24px rgba(37,65,83,0.15);
}
footer .container {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
footer nav a {
  color: #fff;
  font-family: var(--heading-font);
  font-size: 1rem;
  opacity: 0.93;
  transition: color 0.2s, opacity 0.13s;
}
footer nav a:hover, footer nav a:focus {
  color: var(--gold);
  opacity: 1;
}
footer img[alt="Scapi Lúcido"] {
  height: 42px;
}
.footer-contact {
  color: #FFF4E1;
  font-size: 1rem;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-contact strong {
  color: #fff1b5;
  font-weight: 600;
}

/* --- MOBILE NAVIGATION --- */
.mobile-menu-toggle {
  display: inline-block;
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: var(--border-radius-lg);
  font-size: 2.3rem;
  width: 48px;
  height: 48px;
  cursor: pointer;
  margin-left: 10px;
  position: absolute;
  right: 18px;
  top: 16px;
  z-index: 510;
  box-shadow: 0 2px 8px rgba(37,65,83,0.12);
  transition: background 0.15s, color 0.15s;
}
.mobile-menu-toggle:active, .mobile-menu-toggle:focus {
  background: var(--gold);
  color: var(--brand-primary);
  outline: 2px solid var(--gold);
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(37,65,83, 0.97);
  color: #fff;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(.64,.04,.35,1), opacity 0.25s;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 46px;
  opacity: 0.99;
}
.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
}
.mobile-menu-close {
  background: var(--gold);
  color: var(--brand-primary);
  border-radius: var(--border-radius-lg);
  font-size: 2rem;
  width: 46px;
  height: 46px;
  top: 12px; right: 20px;
  position: absolute;
  cursor: pointer;
  z-index: 10001;
  transition: background 0.14s, color 0.14s;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  background: var(--brand-primary);
  color: #fff;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 80px 0 0 36px;
}
.mobile-nav a {
  color: #fff;
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: 600;
  transition: color 0.15s, background 0.12s;
  border-radius: var(--border-radius-md);
  padding: 8px 4px;
  min-width: 170px;
}
.mobile-nav a:active, .mobile-nav a:focus {
  color: var(--gold);
  background: #fff1b50d;
}

/* Hide normal nav on mobile */
@media (max-width: 1024px) {
  header nav {
    display: none;
  }
  header .btn-primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-block;
  }
}
@media (min-width: 1025px) {
  .mobile-menu, .mobile-menu-toggle {
    display: none !important;
  }
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(50px);
  opacity: 0;
  background: #fff;
  color: var(--brand-primary);
  box-shadow: 0 6px 32px rgba(37,65,83,0.13);
  border-radius: var(--border-radius-lg);
  padding: 30px 32px 24px 32px;
  min-width: 320px;
  max-width: 96vw;
  z-index: 15000;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 1rem;
  line-height: 1.6;
  border: 1.5px solid var(--gold);
  transition: transform 0.28s cubic-bezier(.67,.08,.29,1), opacity 0.25s;
  pointer-events: none;
}
.cookie-banner.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px;
}
.cookie-banner button {
  font-size: 1rem;
  font-family: var(--heading-font);
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  padding: 9px 20px;
  cursor: pointer;
  border: 2px solid var(--gold);
  background: #fff;
  color: var(--brand-primary);
  transition: background 0.16s, color 0.13s;
}
.cookie-banner button.accept {
  background: var(--gold);
  color: #fff;
}
.cookie-banner button.accept:hover {
  background: var(--brand-primary);
  color: var(--gold);
}
.cookie-banner button.reject {
  background: #fff;
  color: var(--brand-primary);
  border: 2px solid #ccc;
}
.cookie-banner button.reject:hover {
  background: #f9f7f2;
  color: var(--brand-primary);
  border-color: var(--brand-secondary);
}
.cookie-banner button.settings {
  background: #fff;
  color: var(--gold);
  border-color: var(--gold);
}
.cookie-banner button.settings:hover {
  background: var(--brand-secondary);
  color: #fff;
  border-color: var(--brand-secondary);
}

/* --- COOKIE SETTINGS MODAL --- */
.cookie-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%) scale(0.96);
  opacity: 0;
  background: #fff;
  color: var(--brand-primary);
  box-shadow: 0 12px 42px rgba(37,65,83,0.22);
  border-radius: var(--border-radius-lg);
  min-width: 350px;
  max-width: 98vw;
  max-height: 88vh;
  z-index: 16000;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 32px 26px 24px 32px;
  font-size: 1rem;
  line-height: 1.62;
  border: 2px solid var(--gold);
  transition: opacity 0.16s, transform 0.22s cubic-bezier(.59,.08,.17,1);
  pointer-events: none;
}
.cookie-modal.active {
  opacity: 1;
  transform: translate(-50%,-50%) scale(1);
  pointer-events: auto;
}
.cookie-modal__close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 2rem;
  background: var(--gold);
  color: var(--brand-primary);
  border-radius: var(--border-radius-lg);
  border: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 11000;
  transition: background 0.1s, color 0.13s;
}
.cookie-modal__close:hover, .cookie-modal__close:focus {
  background: var(--brand-primary);
  color: #fff;
}
.cookie-modal__categories {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 14px;
}
.cookie-modal__category {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.05rem;
}
.cookie-modal__category label {
  font-weight: bold;
  margin-right: 10px;
}
.cookie-modal__category input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--gold);
  margin-right: 6px;
}
.cookie-modal__category.essential label {
  color: var(--gold);
  font-style: italic;
}
.cookie-modal__actions {
  display: flex;
  gap: 18px;
  margin-top: 6px;
}

/* --- PAGE UTILS: CARD, SPACING, SHADOWS --- */
.card {
  box-shadow: var(--shadow-card);
  border-radius: var(--border-radius-md);
  background: #fff;
  padding: 32px 26px;
  position: relative;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* --- ANIMATION & MICROINTERACTIONS --- */
.btn-primary, .btn-secondary,
.cookie-banner button, .mobile-menu-close, .mobile-menu-toggle {
  transition: background 0.19s, color 0.15s, box-shadow 0.17s;
}
li, .feature-grid > div, .testimonial-card, header img {
  transition: box-shadow 0.13s, border-color 0.13s, opacity 0.16s;
}
.card, .feature-grid > div, .testimonial-card {
  will-change: transform, box-shadow;
}

/* --- RESPONSIVE DESIGN (MOBILE FIRST) --- */
@media (max-width: 900px) {
  .container {
    max-width: 97vw;
    padding: 0 10px;
  }
  .section {
    padding: 32px 10px;
    margin-bottom: 48px;
  }
  .feature-grid {
    gap: 20px;
  }
  .feature-grid > div {
    min-width: 190px;
    max-width: 260px;
    padding: 16px 10px 22px 13px;
  }
  .testimonial-slider {
    gap: 16px;
    flex-direction: column;
  }
  .testimonial-card {
    max-width: 95vw;
    min-width: unset;
  }
  footer .container {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }
}
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  .container {
    padding: 0 4px;
    max-width: 99vw;
  }
  .section {
    padding: 20px 3px;
    margin-bottom: 32px;
    border-radius: var(--border-radius-md);
  }
  .content-wrapper {
    gap: 14px;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.06rem; }
  .card {
    padding: 17px 6px;
    border-radius: var(--border-radius-sm);
  }
  .feature-grid {
    flex-direction: column;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  .footer-contact {
    max-width: 99vw;
  }
  .cookie-banner {
    min-width: 90vw;
    padding: 18px 7px 14px 13px;
    font-size: 0.97rem;
  }
  .cookie-modal {
    min-width: 90vw;
    padding: 18px 7px 18px 13px;
    font-size: 0.97rem;
  }
}

/* --- ACCESSIBLE FOCUS STATES --- */
a:focus, .btn-primary:focus, .btn-secondary:focus, header nav a:focus,
.mobile-menu-close:focus, .mobile-menu-toggle:focus, .cookie-banner button:focus, .cookie-modal__close:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--gold);
}


/* --- MISC: BRAND LUXURY ACCENTS --- */
h1, h2, h3, h4, h5, h6 {
  text-shadow: 0 2px 6px rgba(39, 62, 77, 0.022);
}
.btn-primary, .btn-secondary, .cookie-banner button.accept {
  box-shadow: 0 2px 16px rgba(199,170,106, 0.09);
  letter-spacing: 0.01em;
}

/* --- SEPARATOR LINE, GOLD ACCENT --- */
.section:not(:first-child):not(:last-child):before {
  content: '';
  display: block;
  width: 58px;
  height: 4px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 18px;
  opacity: 0.22;
}
@media (max-width: 768px) {
  .section:not(:first-child):not(:last-child):before {
    width: 38px;
    height: 3px;
  }
}

/* --- UTIL: HIDE SHOW CLASSES FOR JS HOOK --- */
.hide { display: none !important; }
.show { display: block !important; }

/* --- END CSS --- */
