/* RESET & BASE -------------------------------------------------- */
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 {
  box-sizing: border-box;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  background: #FAF8F6;
  color: #222;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
ul, ol {
  margin: 0 0 24px 20px;
}
a {
  color: #355C7D;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #E27D60;
  outline: none;
}
img {
  max-width: 100%;
  vertical-align: middle;
}
section {
  width: 100%;
}

/* BRAND & TYPOGRAPHY ---------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-weight: 600;
  color: #355C7D;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 24px; }
h2 { font-size: 2rem; margin-bottom: 20px; }
h3 { font-size: 1.3rem; margin-bottom: 16px; font-weight: 500; }
h4, h5, h6 {font-size: 1.1rem; margin-bottom: 12px;}
p, ul, ol, li, span, label, input, textarea {
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
}
p, ul, ol {
  margin-bottom: 16px;
  font-size: 1rem;
}
.subheadline {
  color: #6C5B7B;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 24px;
}
strong, b {
  font-weight: 700;
}

/* UTILS & LAYOUTS ------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  margin-top: 12px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 3px 18px rgba(51,92,125,0.07);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover, .card:focus-within {
  box-shadow: 0 6px 32px rgba(227,125,96,0.13);
  transform: translateY(-2px) scale(1.015);
}
.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: center;
  gap: 20px;
  background: #fff;
  color: #222;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(51,92,125,0.08);
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  min-width: 0;
  max-width: 620px;
  border-left: 6px solid #E27D60;
}
.testimonial-card h3 {
  color: #355C7D;
  margin-bottom: 6px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: #fff;
  border-radius: 14px;
  padding: 32px 24px;
  box-shadow: 0 2px 10px rgba(51,92,125,0.06);
  margin-bottom: 20px;
}
.features-list {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  list-style: none;
  margin-bottom: 0;
  justify-content: space-between;
}
.features-list li {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 12px;
  padding: 28px 20px 20px;
  box-shadow: 0 1px 6px rgba(51,92,125,0.07);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.18s, transform 0.18s;
}
.features-list li img {
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
}
.features-list li:hover, .features-list li:focus-within {
  box-shadow: 0 4px 20px rgba(248,177,149,0.13);
  transform: translateY(-2px) scale(1.01);
}

/* HEADER & NAV ---------------------------------------------------- */
header {
  background: #fff;
  border-bottom: 1px solid #ECE9F0;
  padding: 0;
  position: sticky;
  top:0;
  z-index: 50;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  gap: 16px;
  min-height: 64px;
}
header img[alt="Corazón Atento"] {
  height: 46px;
  width: auto;
  margin-right: 24px;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
nav a {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  color: #355C7D;
  position: relative;
}
nav a:hover:not(.cta-btn), nav a:focus:not(.cta-btn) {
  background: #F9E7E2;
  color: #E27D60;
}
.cta-btn {
  background: #F8B195;
  color: #fff !important;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 22px;
  padding: 9px 28px;
  margin-left: 12px;
  transition: background 0.17s, box-shadow 0.17s, transform 0.18s;
  box-shadow: 0 2px 8px rgba(248,177,149,0.05);
  border: none;
  outline: none;
  display: inline-block;
  cursor: pointer;
}
.cta-btn:hover, .cta-btn:focus {
  background: #E27D60;
  color: #fff;
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(227,125,96,0.13);
}

/* MOBILE MENU ----------------------------------------------------- */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2.1rem;
  color: #355C7D;
  margin-left: 12px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 7px;
  transition: background 0.18s, color 0.15s;
  z-index: 102;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: #F8B195;
  color: #fff;
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(250,248,246,0.96);
  box-shadow: 0 8px 28px rgba(53,92,125,0.12);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(-100vw);
  transition: transform 0.32s cubic-bezier(.69,.26,.63,1.31);
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.active {
  transform: translateX(0);
  pointer-events: all;
  opacity: 1;
}
.mobile-menu-close {
  align-self: flex-end;
  font-size: 2.1rem;
  background: none;
  border: none;
  color: #355C7D;
  margin: 22px 22px 0 0;
  cursor: pointer;
  padding: 6px;
  border-radius:8px;
  transition: background 0.17s, color 0.16s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: #F8B195;
  color: #fff;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  margin: 42px 0 0 28px;
}
.mobile-nav a {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #355C7D;
  padding: 10px 4px;
  border-radius: 6px;
  transition: background 0.18s, color 0.16s;
  display: block;
  min-width: 120px;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: #F8B195;
  color: #fff;
}

/* SECTIONS & CONTENT ---------------------------------------------- */
section {
  margin-bottom: 60px;
  padding: 40px 0;
  background: transparent;
}
section:last-child {
  margin-bottom: 0;
}
/* Overwrite with .container for consistent width */

/* Summary list, FAQ, feature and content lists */
ul, ol {
  padding-left: 24px;
}
ul li, ol li {
  margin-bottom: 14px;
}

/* Form elements (used in Cookie banner popup, but generic) */
input[type='checkbox'], input[type='radio'] {
  accent-color: #F8B195;
  margin-right: 7px;
}
label {
  cursor: pointer;
}

/* FOOTER ---------------------------------------------------------- */
footer {
  background: #fff;
  border-top: 1px solid #ECE9F0;
  font-size: 0.98rem;
  color: #466;
  margin-top: 48px;
  padding: 0;
  box-shadow: 0 3px 18px rgba(53,92,125,0.03);
}
footer .container {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 32px 20px 18px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 6px;
}
.footer-nav a {
  color: #355C7D;
  font-weight: 400;
  font-size: 1rem;
  padding: 5px 2px;
  border-radius: 7px;
  transition: background 0.15s, color 0.19s;
}
.footer-nav a:hover, .footer-nav a:focus {
  background: #F8B195;
  color: #fff;
}
.contact-info {
  color: #566;
  line-height: 1.6;
  margin: 6px 0 9px 0;
  font-size: 0.99rem;
}
.contact-info img {
  width: 18px;
  height: 18px;
  margin-right: 7px;
  vertical-align: middle;
}
.brand-footer {
  color: #999;
  font-size: 0.92rem;
  margin-top: 8px;
}

/* CARDS & CTA BUTTONS ----------------------------------------------*/
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
}

/* Buttons - Used for all call to action and form */
button, .cta-btn, input[type="submit"], .cookie-btn {
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 22px;
  padding: 10px 28px;
  background: #F8B195;
  color: #fff;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.17s, color 0.17s, transform 0.13s;
  outline: none;
  margin-right: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(248,177,149,0.04);
}
button:hover, .cta-btn:hover, .cookie-btn:hover, 
button:focus, .cta-btn:focus, .cookie-btn:focus {
  background: #E27D60;
  color: #fff;
  box-shadow: 0 4px 17px rgba(227,125,96,0.11);
  transform: scale(1.035);
}

/* COOKIES CONSENT BANNER & MODAL -----------------------------------*/
#cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.98);
  border-top: 1px solid #EDEAF2;
  box-shadow: 0 -3px 20px rgba(53,92,125,0.13);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 22px 22px 22px 26px;
  min-height: 76px;
  font-size: 1rem;
  color: #222;
  justify-content: space-between;
  transform: translateY(200%);
  transition: transform 0.35s cubic-bezier(.67,.04,.51,1.32), opacity 0.17s;
  opacity: 0;
  pointer-events: none;
}
#cookie-banner.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
#cookie-banner .cookie-btn {
  background: #F8B195;
  color: #fff;
  margin-bottom: 0;
  border-radius: 20px;
  padding: 8px 22px;
  font-size: 1rem;
}
#cookie-banner .cookie-btn.secondary {
  background: #fff0ed;
  color: #E27D60;
  border: 1px solid #F8B195;
}
#cookie-banner .cookie-btn.settings {
  background: #355C7D;
  color: #fff;
}
#cookie-banner .cookie-btn:focus {
  outline: 2px solid #E27D60;
}

/* Cookie Modal */
#cookie-modal-backdrop {
  position: fixed; z-index: 2000;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(53,92,125,0.22);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center; justify-content: center;
  transition: opacity 0.23s;
}
#cookie-modal-backdrop.active {display: flex;}
#cookie-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 400px;
  width: 95vw;
  box-shadow: 0 6px 38px rgba(53,92,125,0.25);
  padding: 32px 22px 24px;
  transform: translateY(-60px) scale(0.95);
  opacity: 0;
  transition: opacity 0.21s, transform 0.22s;
}
#cookie-modal-backdrop.active #cookie-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}
#cookie-modal h2 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 1.23rem;
  color: #355C7D;
}
#cookie-modal form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
#cookie-modal .modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
#cookie-modal label {
  font-size: 1rem;
  color: #444;
  display: flex;
  align-items: center;
}
#cookie-modal label .always-on {
  color: #888;
  margin-left: 5px;
  font-size: 0.96em;
}
#cookie-modal .close-modal {
  background: none;
  border: none;
  color: #355C7D;
  font-size: 2rem;
  position: absolute;
  right: 18px;
  top: 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}
#cookie-modal .close-modal:hover {
  background: #F8B195;
  color: #fff;
}

/* ANIMATIONS ------------------------------------------------------ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cta-btn, button, .card, .testimonial-card {
  will-change: transform, box-shadow, opacity;
}

/* MEDIA QUERIES --------------------------------------------------- */
@media (max-width: 1200px) {
  .container { max-width: 920px; }
  .features-list li, .card {
    max-width: 325px;
  }
}
@media (max-width: 900px) {
  .container { max-width: 98vw; }
  .features-list {
    gap: 16px;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  .section, section { padding: 28px 0; }
  .container { padding: 0 10px; }
  .features-list {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  .features-list li { max-width: 100%; width: 100%; }
  .content-grid {
    flex-direction: column;
    gap: 18px;
  }
  .testimonial-card {
    max-width: none;
    width: 100%;
  }
}
/* --- MOBILE NAV --- */
@media (max-width: 1020px){
  header .container nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}
@media (min-width: 1021px){
  .mobile-menu,
  .mobile-menu-close {
    display: none !important;
  }
}
@media (max-width:550px){
  h1 { font-size: 1.5rem; }
  .features-list li, .feature-item, .testimonial-card {
    padding: 18px 8px;
  }
  #cookie-modal { padding: 18px 7px 17px; }
}
@media (max-width:600px){
  footer .container { padding: 20px 6px 14px; }
  #cookie-banner { padding: 14px 7px 10px 12px; }
}
@media (max-width: 750px) {
  .text-image-section { flex-direction: column; align-items: stretch; gap: 18px; }
  header .container { flex-direction: row; gap: 10px; min-height: 56px; }
  .card-container, .content-grid { gap: 13px; }
}

/* VISUAL DETAILS -------------------------------------------------- */
section, .card, .testimonial-card, .feature-item, .features-list li {
  box-shadow: 0 1px 8px rgba(53,92,125,0.04);
}
.card, .testimonial-card, .feature-item, .features-list li {
  border-radius: 14px;
}

/* ICONS */
img[alt^="Ubicación"], img[alt^="Teléfono"], img[alt^="Email"], img[alt^="Horario"] {
  margin-right: 7px;
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/* CUSTOM SCANDINAVIAN EFFECTS ------------------------------------- */
.card, .testimonial-card, .feature-item, .features-list li {
  background: #fff;
  border: 1px solid #F5ECE6;
}
section {
  background: transparent;
}

/* HIERARCHY SPACING ----------------------------------------------- */
section > .container > h1, section > .container > h2 {
  margin-bottom: 18px;
}
section .content-wrapper > h2, section .content-wrapper > h3 {
  margin-top: 18px;
}

/* ACCESSIBILITY --------------------------------------------------- */
:focus {
  outline: 2px solid #E27D60;
  outline-offset: 2px;
}

/* MISCELLANEOUS --------------------------------------------------- */
::-webkit-scrollbar {
  background: #FAF8F6;
  width: 10px;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: #F8B195;
  border-radius: 10px;
}

/* Print styles */
@media print {
  header, footer, #cookie-banner, #cookie-modal-backdrop { display: none !important; }
  body { background: #fff !important; }
}
