/* =============================================================
   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;
}
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
  background: #F0F4F9;
  color: #23476A;
}
ol, ul {
  list-style: none;
}
a {
  background: transparent;
  text-decoration: none;
  color: inherit;
}
img {
  border: 0;
  max-width: 100%;
  display: block;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  margin: 0;
  outline: none;
}

/* Montserrat & Lato from Google Fonts (for fallback/robustness): */
@import url('https://fonts.googleapis.com/css?family=Montserrat:700,600,500,400&display=swap');
@import url('https://fonts.googleapis.com/css?family=Lato:400,400italic,700&display=swap');


/* =============================================================
   DESIGN TOKENS: Colors & Fonts
   ============================================================= */
:root {
  --color-primary: #23476A;
  --color-secondary: #7FB5A8;
  --color-accent: #F0F4F9;
  --color-dark: #1B2F48;
  --color-light: #fff;
  --color-gray: #8692A6;
  --color-border: #CED6E3;
  --color-contrast: #1B2F48;

  --font-display: 'Montserrat', 'Georgia', serif;
  --font-body: 'Lato', 'Georgia', 'Times New Roman', serif;
}

/* =============================================================
   TYPOGRAPHY: Elegant, Classic Scale
   ============================================================= */
html {
  font-size: 16px;
  font-family: var(--font-body);
  background-color: var(--color-accent);
  color: var(--color-primary);
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.01em;
  background: var(--color-accent);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-dark);
  font-weight: 700;
}
h1 {
  font-size: 2.5rem; /* 40px */
  margin-bottom: 20px;
  line-height: 1.1;
}
h2 {
  font-size: 2rem; /* 32px */
  margin-bottom: 18px;
  line-height: 1.2;
}
h3 {
  font-size: 1.5rem; /* 24px */
  margin-bottom: 14px;
  line-height: 1.18;
}
h4 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}
p, ul, ol, li, .footer-contact, .testimonial-author {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-primary);
}
p {
  margin-bottom: 14px;
}
ul, ol {
  margin-bottom: 15px;
  padding-left: 28px;
}
li {
  margin-bottom: 6px;
}

small {
  font-size: 0.875rem;
  color: var(--color-gray);
}
.b, b, strong {
  font-weight: 700;
  color: var(--color-dark);
}

/* Elegant link style */
a {
  color: var(--color-primary);
  transition: color .2s;
}
a:hover,
a:focus {
  color: var(--color-secondary);
}

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

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}

.content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}

.text-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  padding: 0;
}

.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.feature-grid > div {
  flex: 1 1 230px;
  min-width: 220px;
  background: var(--color-light);
  padding: 24px 20px 18px 20px;
  border-radius: 14px;
  box-shadow: 0 2px 18px rgba(35,71,106,0.07);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-start;
  border: 1px solid var(--color-border);
  transition: box-shadow .2s, border-color .2s;
}
.feature-grid > div:hover {
  box-shadow: 0 4px 32px rgba(35,71,106,0.12);
  border-color: var(--color-secondary);
}
.feature-grid img {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  opacity: 0.95;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-light);
  border-radius: 12px;
  box-shadow: 0 1px 10px rgba(35,71,106,0.06);
  margin-bottom: 20px;
  position: relative;
  border: 1px solid var(--color-border);
  padding: 24px 24px 18px 24px;
  transition: box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  box-shadow: 0 6px 24px rgba(35,71,106,0.18);
  border-color: var(--color-secondary);
}

.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;
  flex-direction: column;
  align-items: flex-start;
  background: var(--color-light);
  gap: 20px;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1.5px 14px rgba(35,71,106,0.09);
  border: 1px solid var(--color-border);
  margin-bottom: 20px;
  min-width: 0;
  max-width: 570px;
  transition: box-shadow .2s, border-color .2s;
}
.testimonial-card p {
  font-family: var(--font-body);
  color: #223553;
  font-size: 1.13rem;
  line-height: 1.6;
}
.testimonial-author {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-primary);
  font-size: 0.97rem;
  margin-left: 2px;
  margin-top: -3px;
}
.testimonial-card:hover {
  border-color: var(--color-secondary);
  box-shadow: 0 7px 21px rgba(35,71,106,0.14);
}

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

.blog-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
}
.blog-list li {
  background: var(--color-light);
  border-radius: 10px;
  box-shadow: 0 1px 10px rgba(35,71,106,0.06);
  border: 1px solid var(--color-border);
  padding: 18px 20px;
  transition: box-shadow .2s, border-color .2s;
}
.blog-list li:hover {
  box-shadow: 0 5px 18px rgba(35,71,106,0.13);
  border-color: var(--color-secondary);
}
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.blog-tags span {
  background: var(--color-accent);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  padding: 4px 14px;
  font-size: 0.97rem;
  border-radius: 6px;
  font-family: var(--font-body);
  transition: background .2s, color .2s;
}
.blog-tags span:hover {
  background: var(--color-secondary);
  color: var(--color-light);
}


/* =============================================================
   BUTTONS - Elegant, Classic
   ============================================================= */
.cta-button {
  font-family: var(--font-display);
  background: var(--color-primary);
  color: var(--color-light);
  padding: 12px 32px;
  border: none;
  border-radius: 25px;
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 8px;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(35,71,106,0.10);
  transition: background 0.19s, color 0.19s, box-shadow 0.19s;
  display: inline-block;
  outline: none;
}
.cta-button:hover, .cta-button:focus {
  background: var(--color-secondary);
  color: var(--color-dark);
  box-shadow: 0 6px 16px rgba(127,181,168,0.20);
}
.cta-button.secondary {
  background: var(--color-light);
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  margin-left: 12px;
}
.cta-button.secondary:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-light);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

/* =============================================================
   HEADER & NAVIGATION
   ============================================================= */
header {
  background: var(--color-light);
  border-bottom: 1px solid var(--color-border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
header .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 18px 24px;
}
header nav {
  display: flex;
  flex-direction: row;
  gap: 22px;
  align-items: center;
}
header nav a {
  font-family: var(--font-body);
  color: var(--color-dark);
  font-weight: 500;
  font-size: 1.05rem;
  padding: 6px 8px 6px 8px;
  border-radius: 3px;
  transition: background .17s, color .17s;
}
header nav a:hover, header nav a:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}
header img {
  height: 38px;
  width: auto;
}

/* =============================================================
   MOBILE BURGER MENU
   ============================================================= */
.mobile-menu-toggle {
  display: none;
  background: var(--color-primary);
  color: var(--color-light);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  box-shadow: 0 2px 10px rgba(35,71,106,0.12);
  position: relative;
  z-index: 120;
  transition: background .17s, color .17s;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: var(--color-secondary);
  color: var(--color-light);
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: var(--color-light);
  z-index: 120;
  padding: 28px 32px 32px 32px;
  transform: translateX(-100%);
  transition: transform 0.36s cubic-bezier(.7,.2,.4,1);
  box-shadow: 0 8px 32px rgba(35,71,106,0.16);
  visibility: hidden;
}
.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.37s cubic-bezier(.7,.4,.2,1);
}
.mobile-menu-close {
  margin-left: auto;
  background: none;
  color: var(--color-dark);
  font-size: 2.16rem;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  display: flex;
  transition: background .2s, color .2s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding-top: 20px;
}
.mobile-nav a {
  font-family: var(--font-display);
  color: var(--color-primary);
  font-size: 1.28rem;
  font-weight: 600;
  padding: 14px 0 10px 8px;
  border-radius: 3px;
  transition: background .19s, color .19s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}

/* Hide main nav and show burger on mobile */
@media (max-width: 1050px) {
  header .container nav {
    display: none;
  }
  .cta-button {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
}
@media (max-width: 700px) {
  .mobile-menu {
    padding: 22px 15px 24px 15px;
  }
  .mobile-nav a {
    font-size: 1.07rem;
  }
}

/* Prevent mobile background scroll when menu open */
body.mobile-menu-open {
  overflow: hidden !important;
}

/* =============================================================
   HERO SECTION & CALLS TO ACTION
   ============================================================= */
.hero {
  background: var(--color-light);
  border-bottom: 1px solid var(--color-border);
  padding: 54px 0 54px 0;
  margin-bottom: 38px;
}
.hero .container {
  min-height: 290px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.hero h1 {
  color: var(--color-primary);
  margin-bottom: 14px;
  font-family: var(--font-display);
}
.hero p {
  color: var(--color-dark);
  font-size: 1.17rem;
  line-height: 1.6;
  margin-bottom: 18px;
}
.hero .cta-button {
  margin-top: 14px;
}

/* =============================================================
   FOOTER
   ============================================================= */
footer {
  background: var(--color-light);
  border-top: 1px solid var(--color-border);
  padding: 0;
}
footer .container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 35px 24px 32px 24px;
  margin-bottom: 0;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
footer nav a {
  font-family: var(--font-body);
  color: var(--color-gray);
  font-size: 1.02rem;
  padding: 4px 0;
  transition: color .16s;
}
footer nav a:hover {
  color: var(--color-secondary);
}
.footer-contact {
  font-family: var(--font-body);
  color: var(--color-dark);
  font-size: 1.01rem;
  margin-left: auto;
  text-align: right;
}
footer img {
  height: 42px;
  width: auto;
  margin-bottom: 12px;
}

/* =============================================================
   COOKIE CONSENT BANNER & MODAL
   ============================================================= */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  width: 100%;
  background: var(--color-light);
  color: var(--color-primary);
  box-shadow: 0 -4px 32px rgba(35,71,106,0.11);
  border-top: 2px solid var(--color-border);
  padding: 18px 18px 15px 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  z-index: 130;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.cookie-banner.visible {
  opacity: 1;
  pointer-events: auto;
}
.cookie-banner-text {
  flex: 1 1 480px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-dark);
}
.cookie-banner-buttons {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}
.cookie-btn {
  font-family: var(--font-display);
  border-radius: 20px;
  padding: 8px 23px;
  font-size: 1rem;
  background: var(--color-secondary);
  color: var(--color-light);
  border: none;
  cursor: pointer;
  margin-right: 0;
  transition: background .15s, color .15s;
  min-width: 117px;
  font-weight: 600;
  margin-top: 2px;
}
.cookie-btn.settings {
  background: var(--color-accent);
  color: var(--color-primary);
  border: 1px solid var(--color-secondary);
}
.cookie-btn:hover, .cookie-btn:focus {
  background: var(--color-primary);
  color: var(--color-light);
}
.cookie-btn.settings:hover {
  background: var(--color-secondary);
  color: var(--color-light);
}

/* Cookie Modal Prefs */
.cookie-modal {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  z-index: 170;
  background: rgba(35,71,106,0.19);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity .37s;
}
.cookie-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.cookie-modal-content {
  background: var(--color-light);
  border-radius: 19px;
  padding: 34px 24px 24px 28px;
  box-shadow: 0 8px 56px rgba(35,71,106,0.15);
  width: 98%;
  max-width: 410px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  border: 1.5px solid var(--color-border);
}
.cookie-modal-content h2 {
  font-size: 1.32rem;
  margin-bottom: 6px;
}
.cookie-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
}
.cookie-category label {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-primary);
  flex: 1;
}
.cookie-category input[type="checkbox"] {
  accent-color: var(--color-secondary);
  width: 19px;
  height: 19px;
  margin-right: 2px;
}
.cookie-modal-close {
  position: absolute;
  right: 20px;
  top: 14px;
  background: none;
  color: var(--color-primary);
  border: none;
  font-size: 1.9rem;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
.cookie-modal-close:hover {
  background: var(--color-accent);
  color: var(--color-secondary);
}

/* Cookie Banner Responsive */
@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 10px 15px 10px;
  }
  .cookie-banner-text {
    font-size: 1rem;
    flex: 1 1 auto;
  }
  .cookie-banner-buttons {
    gap: 8px;
  }
}

/* =============================================================
   RESPONSIVE DESIGN PATTERNS
   ============================================================= */
@media (max-width: 1050px) {
  .container,
  footer .container {
    padding-left: 12px; padding-right: 12px;
  }
}
@media (max-width: 900px) {
  footer .container {
    flex-direction: column;
    gap: 17px;
    align-items: flex-start;
  }
  .footer-contact {
    text-align: left;
    margin-left: 0;
    margin-top: 16px;
  }
}
@media (max-width: 820px) {
  .feature-grid, .content-grid, .card-container {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  .section {
    padding: 28px 7px;
    margin-bottom: 36px;
  }
  .hero {
    padding: 42px 0;
  }
}
@media (max-width: 699px) {
  .hero .container,
  .section .container,
  footer .container {
    padding-left: 7px;
    padding-right: 7px;
  }
  .feature-grid > div,
  .card {
    padding: 17px 11px 14px 13px;
    font-size: 0.98rem;
  }
}
@media (max-width: 700px) {
  .hero {
    padding: 16px 0 25px 0;
  }
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.24rem;
  }
  h3 {
    font-size: 1.06rem;
  }
  .testimonial-card {
    padding: 14px 8px 10px 9px;
    font-size: 0.98rem;
    gap: 13px;
  }
  .feature-grid > div {
    border-radius: 8px;
  }
  .card {
    border-radius: 8px;
  }
}
@media (max-width: 570px) {
  .footer-contact {
    font-size: 0.96rem;
  }
  .card, .testimonial-card {
    padding: 12px 6px 10px 10px;
  }
  .blog-tags span {
    padding: 3px 8px;
    font-size: 0.93rem;
  }
}
@media (max-width: 460px) {
  .blog-list li, .feature-grid > div, .testimonial-card {
    padding-left: 7px;
    padding-right: 7px;
  }
}

/* ======= FLEX-DIRECTION CONTROL FOR TEXT-IMAGE-SECTION ======= */
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

/* =============================================================
   FORM STYLES (For Potential Contact/Newsletter Forms)
   ============================================================= */
input, select, textarea {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 1rem;
  background: var(--color-light);
  color: var(--color-primary);
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-body);
  transition: border-color .18s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-secondary);
}
label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--color-primary);
}


/* =============================================================
   ANIMATIONS
   ============================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
.section, .hero, .card, .feature-grid > div, .testimonial-card, .blog-list li {
  animation: fadeInUp 0.7s cubic-bezier(.77,.12,.33,1.07) backwards;
}

/* =============================================================
   MISC STYLES, LISTS, AND UTILITIES
   ============================================================= */
.text-section ul, .text-section ol {
  padding-left: 23px;
  margin-bottom: 13px;
}
.text-section li {
  margin-bottom: 5px;
  list-style: disc inside;
}
.text-section ol li {
  list-style: decimal inside;
}

img[alt^="Telefono"], img[alt^="Email"] {
  width: 17px;
  margin-right: 6px;
  vertical-align: middle;
  display: inline;
}

/* Utility for visually hidden */
.visually-hidden { 
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

/* Card-Grid override for About/Team (in case of use) */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

/* =====================
   Print-friendly tweaks
   ===================== */
@media print {
  body, .container, .section {
    background: #fff !important;
    color: #1B2F48 !important;
  }
  nav, .cta-button, .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal {
    display: none !important;
  }
}
