/* =======================
   CSS RESET & BASE STYLES
==========================*/
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;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *::before, *::after {
  box-sizing: inherit;
}
body {
  font-family: 'Open Sans', Arial, sans-serif;
  background: #fff;
  color: #222;
  min-height: 100vh;
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea {
  font-family: inherit;
  font-size: 1em;
}

/* =======================
    BRAND COLOR PALETTE
=========================*/
:root {
  --color-primary: #1A237E;
  --color-secondary: #FFD600;
  --color-accent: #FFFFFF;
  --color-body: #222;
  --color-muted: #f1f3fa;
  --color-focus: #ec407a; /* playful accent - pink */
  --color-fun: #00C2D4;  /* playful accent - cyan */
  --radius-main: 16px;
  --radius-btn: 32px;
  --shadow-1: 0 2px 12px 0 rgba(26,35,126,0.11);
  --shadow-2: 0 2px 20px 0 rgba(26,35,126,.14);
  --transition-base: 0.25s cubic-bezier(.55, .04, .65, .73);
}

/* =======================
        TYPOGRAPHY
=========================*/
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--color-primary);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.18;
}
h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.375rem;
  color: var(--color-focus);
}
h4, h5, h6 {
  font-size: 1.05rem;
  color: var(--color-body);
}
.subheadline {
  font-size: 1.125rem;
  margin-bottom: 20px;
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--color-focus);
  font-weight: 600;
  letter-spacing: -0.01em;
}
p {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--color-body);
}
strong {
  font-weight: 700;
}

/* Playful font styles for accents */
.cta-btn, nav a, .mobile-nav a, ul li strong, h3 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* =======================
        LAYOUT CONTAINERS
=========================*/
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.text-section {
  align-items: flex-start;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Mandatory flex spacing classes */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  flex: 1 1 285px;
  background: var(--color-accent);
  border-radius: var(--radius-main);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.card:hover {
  transform: translateY(-4px) scale(1.03) rotate(-1deg);
  box-shadow: var(--shadow-2);
}
.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: #fffbe9;
  color: #222;
  border-radius: var(--radius-main);
  box-shadow: var(--shadow-2);
  margin-bottom: 24px;
  min-width: 260px;
  max-width: 650px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* Responsive spacing for content cards & sections */
section ul, section ol {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
section li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.07rem;
  color: var(--color-primary);
  background: none;
}
section li img {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

/* =======================
        HEADER & NAV
=========================*/
header {
  background: var(--color-primary);
  width: 100%;
  box-shadow: 0 3px 12px 0 rgba(26,35,126,0.05);
  padding: 0 0 4px 0;
  position: relative;
  z-index: 1000;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
}
header img[alt^='Ritmo Vivo'] {
  height: 58px;
  transition: transform var(--transition-base);
}
header img[alt^='Ritmo Vivo']:hover {
  transform: scale(1.04) rotate(-1deg);
}
header nav {
  display: flex;
  gap: 18px;
}
header nav a {
  font-size: 1.075rem;
  padding: 7px 18px;
  color: var(--color-secondary);
  border-radius: var(--radius-btn);
  background: transparent;
  position: relative;
  transition: color .18s, background .18s;
  font-weight: 700;
}
header nav a:hover, header nav a:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.cta-btn {
  background: linear-gradient(90deg, var(--color-secondary) 70%, var(--color-fun) 100%);
  color: var(--color-primary);
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 1.17rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 16px 0 rgba(255,214,0,0.13);
  margin-left: 18px;
  transition: background var(--transition-base), color var(--transition-base), transform .14s;
  outline: none;
  position: relative;
}
.cta-btn:hover, .cta-btn:focus {
  background: linear-gradient(90deg, var(--color-fun) 70%, var(--color-focus) 100%);
  color: #fff;
  transform: scale(1.04) rotate(-2deg);
  box-shadow: 0 6px 20px 0 rgba(26,35,126,0.11);
}

/* Hamburger Menu Button (Mobile) */
.mobile-menu-toggle {
  display: none;
  background: var(--color-secondary);
  color: var(--color-primary);
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 2rem;
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 1003;
  box-shadow: 0 4px 18px 0 rgba(255,214,0,.09);
  cursor: pointer;
  transition: background .2s, transform .16s;
}
.mobile-menu-toggle:active {
  transform: scale(0.97) rotate(2deg);
}

/* =======================
     MOBILE NAV OVERLAY
=========================*/
.mobile-menu {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(26,35,126,0.92);
  z-index: 1104;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transform: translateX(100vw);
  transition: transform .43s cubic-bezier(.69,.05,.38,1.21);
  padding: 0;
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.active {
  transform: translateX(0);
  pointer-events: all;
  opacity: 1;
  transition-delay: 0s;
}
.mobile-menu-close {
  background: var(--color-secondary);
  color: var(--color-primary);
  border: none;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.6rem;
  align-self: flex-end;
  margin: 28px 22px 0 0;
  cursor: pointer;
  transition: background .22s;
  z-index: 1201;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  background: var(--color-focus);
  color: #fff;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 40px 0 0 32px;
  width: 88%;
}
.mobile-nav a {
  font-size: 1.3rem;
  color: var(--color-secondary);
  background: none;
  padding: 16px 0;
  border-radius: 0 36px 36px 0;
  transition: background .18s, color .18s;
  font-weight: 900;
  letter-spacing: 0.01em;
  outline: none;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-fun);
  color: #fff;
}

/* =======================
         SECTIONS
=========================*/
section {
  width: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-main);
  margin-bottom: 60px;
  padding: 40px 20px;
  box-shadow: 0 2px 16px 0 rgba(26,35,126,0.043);
  transition: box-shadow .19s;
  position: relative;
}
section:last-of-type {
  margin-bottom: 0;
}

/* =======================
         HERO SECTIONS
=========================*/
main section:first-of-type {
  background: linear-gradient(98deg, var(--color-secondary) 80%, var(--color-fun) 100%);
  color: var(--color-primary);
  box-shadow: var(--shadow-2);
}
main section:first-of-type h1, main section:first-of-type .subheadline {
  color: var(--color-primary);
}

/* =======================
         CARDS
=========================*/
.card {
  background: #fff;
  border: 2px solid var(--color-focus);
  border-radius: var(--radius-main);
  padding: 28px 22px;
  box-shadow: var(--shadow-1);
  margin-bottom: 20px;
  min-width: 240px;
  transition: box-shadow .19s, border-color .16s;
}
.card:hover, .card:focus-within {
  border-color: var(--color-fun);
  box-shadow: var(--shadow-2);
}

/* =======================
      TESTIMONIALS
=========================*/
.testimonial-card {
  border: 2.5px solid var(--color-secondary);
  background: #fffbe9;
  color: #1a237e;
  font-family: 'Montserrat', Arial, sans-serif;
  margin-bottom: 24px;
  min-width: 260px;
  max-width: 600px;
  box-shadow: var(--shadow-2);
  border-radius: var(--radius-main);
  padding: 20px 24px 24px 24px;
  animation: testibounce 1.6s cubic-bezier(.27,.81,.5,1.1) 1;
}
.testimonial-card p {
  font-size: 1.13rem;
  font-weight: 600;
  color: #1a237e;
}
.testimonial-card span {
  color: var(--color-focus);
  font-size: 1em;
  font-weight: 700;
}
@keyframes testibounce {
  0%   { transform: scale(0.90) translateY(40px);
         opacity: 0; }
  55%  { transform: scale(1.03) translateY(-14px);
         opacity: 1; }
  75%  { transform: scale(0.98) translateY(4px); }
  100% { transform: scale(1) translateY(0); }
}

/* =======================
         FOOTER
=========================*/
footer {
  background: var(--color-primary);
  color: var(--color-secondary);
  box-shadow: 0 -2px 12px 0 rgba(26,35,126,0.09);
  padding: 0 0 10px 0;
}
footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 32px 20px 8px 20px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 10px;
}
footer nav a {
  color: var(--color-secondary);
  font-size: 1rem;
  padding: 4px 14px;
  border-radius: var(--radius-btn);
  background: none;
  font-weight: 700;
  transition: background .16s, color .16s;
}
footer nav a:hover {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.footer-cta {
  margin: 12px 0 2px 0;
}
.footer-social {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 3px 0 0 0;
}
.footer-social img {
  width: 34px;
  height: 34px;
  transition: transform .17s cubic-bezier(.47,.91,.51,1.12);
  cursor: pointer;
}
.footer-social img:hover {
  transform: scale(1.13) rotate(-7deg);
  box-shadow: 0 3px 18px 0 rgba(255,214,0,0.19);
}
footer small {
  margin-top: 22px;
  color: #ffeb83;
  font-size: 0.97rem;
  text-align: center;
}

/* =======================
         LISTS
=========================*/
ul, ol {
  padding-left: 0;
  margin-left: 0;
}
ul li, ol li {
  margin-bottom: 6px;
  line-height: 1.47;
  word-break: break-word;
}
section ul li img, section ol li img {
  margin-right: 9px;
}

/* =======================
      RESPONSIVE DESIGN
=========================*/
@media (max-width: 900px) {
  header .container,
  footer .container {
    flex-direction: column;
    align-items: center;
    padding: 18px 3vw;
    gap: 18px;
  }
  header nav {
    gap: 12px;
  }
  .footer-cta { margin: 0; }
}
@media (max-width: 768px) {
  /* burger menu appears */
  .mobile-menu-toggle {
    display: block;
  }
  header nav,
  .cta-btn {
    display: none;
  }
  header .container { gap: 12px; }
  main {
    margin-top: 0;
  }
  .container { padding: 0 6vw; }
  section, .section {
    padding: 32px 10px;
    margin-bottom: 36px;
  }
  .content-wrapper, .text-section {
    gap: 12px;
  }
  .text-image-section,
  .content-grid {
    flex-direction: column !important;
    gap: 22px;
  }
  .card-container {
    gap: 16px;
  }
}
@media (max-width: 545px) {
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.12rem; }
  .cta-btn {
    font-size: 1rem;
    padding: 12px 18px;
  }
  footer .container, header .container { padding: 10px 3vw 8px 3vw; }
}

/* =======================
       BUTTONS & FORMS
=========================*/
button, .cta-btn {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  border: none;
  outline: none;
}
button:focus, .cta-btn:focus {
  outline: 3px solid var(--color-fun);
  outline-offset: 2px;
}

/* =======================
      ANIMATION EFFECTS
=========================*/
.cta-btn, .footer-cta .cta-btn {
  transition: background .18s, color .18s, box-shadow .22s, transform .18s;
}
.card, .testimonial-card {
  transition: box-shadow .19s, transform .21s;
}
.card:hover, .card:focus-within,
section:hover, section:focus-within {
  box-shadow: 0 6px 32px 0 rgba(26,35,126,0.13);
  transform: translateY(-2px) scale(1.015);
}
section {
  animation: sectionfloat 1.1s cubic-bezier(.36,.01,.47,1.2);
}
@keyframes sectionfloat {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.96);
  }
  75% {
    opacity: 1;
    transform: translateY(-2px) scale(1.013);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* =======================
       COOKIE CONSENT
=========================*/
.cookie-banner {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: #fdffe1;
  color: #222;
  box-shadow: 0 -2px 24px 0 rgba(26,35,126,0.08);
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 1.01rem;
  animation: cookiebannerin .75s;
}
@keyframes cookiebannerin {
  0% { transform: translateY(70px); opacity: 0; }
  75% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.cookie-banner__btns {
  display: flex;
  gap: 14px;
}
.cookie-banner__btn, .cookie-banner__settings-btn {
  border-radius: 24px;
  padding: 10px 22px;
  margin: 0;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.025rem;
  border: none;
  box-shadow: 0 2px 8px 0 rgba(255,214,0,0.12);
  cursor: pointer;
  transition: background .19s, color .19s;
}
.cookie-banner__btn:hover, .cookie-banner__btn:focus,
.cookie-banner__settings-btn:hover, .cookie-banner__settings-btn:focus {
  background: var(--color-focus);
  color: #fff;
}

/* Hide banner when not shown */
.cookie-banner.hide { display: none; }

/* Cookie Modal */
.cookie-modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(26,35,126,0.83);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
}
.cookie-modal.active {
  opacity: 1;
  pointer-events: all;
}
.cookie-modal__content {
  background: #fffbe9;
  color: #222;
  border-radius: var(--radius-main);
  padding: 36px 38px 22px 38px;
  min-width: 285px;
  max-width: 92vw;
  box-shadow: 0 6px 32px 0 rgba(26,35,126,0.17);
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: relative;
  animation: modalbounce .33s;
}
@keyframes modalbounce {
  0% { transform: scale(0.89) translateY(38px); opacity: 0; }
  70% { transform: scale(1.04) translateY(-4px); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.cookie-modal__close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: var(--color-focus);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background .18s;
  z-index: 1;
}
.cookie-modal__close:hover, .cookie-modal__close:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.cookie-modal__title {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  font-size: 1.44rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}
.cookie-modal__categories {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cookie-modal__category {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cookie-modal__category-name {
  font-weight: 700;
  color: var(--color-body);
}
.cookie-modal__toggle {
  margin-left: 12px;
  accent-color: var(--color-focus);
}
.cookie-modal__category--essential .cookie-modal__toggle {
  display: none;
}
.cookie-modal__category--essential .cookie-modal__category-name::after {
  content: ' (Siempre habilitada)';
  font-size: 0.91em;
  color: #aaa;
  margin-left: 6px;
}
.cookie-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 9px;
}
.cookie-modal__btn {
  border-radius: 22px;
  padding: 10px 20px;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.04rem;
  border: none;
  box-shadow: 0 2px 8px 0 rgba(255,214,0,0.10);
  cursor: pointer;
  transition: background .19s, color .19s;
}
.cookie-modal__btn:hover, .cookie-modal__btn:focus {
  background: var(--color-focus);
  color: #fff;
}

/* =======================
   MISC: SCROLLBARS ETC.
=========================*/
::-webkit-scrollbar {
  width: 10px;
  background: #eee;
}
::-webkit-scrollbar-thumb {
  background: #ffd60077;
  border-radius: 8px;
}

/* =======================
     PLAYFUL DECORATIVE
=========================*/
section h2:after {
  content: '';
  display: inline-block;
  width: 38px;
  height: 8px;
  margin-left: 11px;
  background: var(--color-focus);
  border-radius: 11px;
  vertical-align: middle;
  animation: sectionline 1.5s infinite alternate cubic-bezier(.42,.93,.42,1.07);
}
@keyframes sectionline {
  0%   { width: 14px; background: var(--color-focus); }
  100% { width: 42px; background: var(--color-fun); }
}

section h3:before {
  content: '●';
  color: var(--color-fun);
  margin-right: 7px;
  font-size: 1.32em;
  animation: moveh3 1.8s infinite .2s alternate cubic-bezier(.64,.04,.42,1.07);
}
@keyframes moveh3 {
  0%   { color: var(--color-focus); }
  100% { color: var(--color-secondary); }
}

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