/* =========================================
   FOOTER STYLES
   ========================================= */
:root {
  --footer-bg: #1e1348;
  --footer-title: #91ffcf;
  --footer-text: #ffffff;
  --footer-btn-bg: #91ffcf;
  --footer-btn-text: #1e1348;
  --social-bg: #5d4d9b;
}

.c-footer {
  z-index: 1;
  background-color: var(--footer-bg);
  color: var(--footer-text);
  border-top-right-radius: 200px;
  font-family: var(--font-family);
  padding-top: 4rem;
  position: relative;
  overflow: hidden;
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

.c-footer__main {
  padding-left: var(--grid-margin);
  padding-right: var(--grid-margin);
  width: 100%;
}

/* --- CABECERA (Logo + Social) --- */
.c-footer__header {
  padding-right: 8%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.c-footer__social {
  display: flex;
  gap: 1rem;
}

.c-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--social-bg);
  border-radius: 50%;
  transition: transform 0.2s, background-color 0.2s;
}

.c-footer__social a:hover {
  transform: scale(1.1);
}

/* --- CONTENIDO PRINCIPAL --- */
.c-footer__content {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 4rem;
}

.c-footer__nav {
  display: flex;
  gap: 5rem;
  flex-grow: 1;
}

@media (max-width: 1230px) {
  .c-footer__nav {
    gap: 3rem;
  }
}

.c-footer__col {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.c-footer__title {
  color: var(--footer-title);
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
}

.c-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.c-footer__col a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  transition: opacity 0.2s;
}

.c-footer__col a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* NEWSLETTER */
.c-footer__newsletter {
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.c-footer__newsletter p {
  font-size: 16px;
  font-weight: 400;
  margin: 0;
}

.c-footer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--footer-btn-bg);
  color: var(--footer-btn-text);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  width: fit-content;
  transition: transform 0.2s;
}

.c-footer__btn:hover {
  transform: scale(1.02);
}

/* =========================================
   BOTTOM BAR (Capas Separadas)
   ========================================= */
.c-footer__bottom {
  position: relative;
  z-index: 1;
  height: 47.5px;
  margin-top: auto;
  width: 100%;
}

/* --- CAPA 1: SVGs de Fondo --- */
.c-footer__shapes-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.c-footer__shapes-desktop,
.c-footer__shapes-mobile {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100%;
}

.c-footer__shapes-mobile {
  display: none;
}

.c-footer__shape-box {
  position: relative;
  height: 100%;
}

.c-footer__shape-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.c-footer__shape-box--left {
  flex: 1.5 1 auto; 
  overflow: hidden; 
}

.c-footer__shape-img--left {
  object-fit: cover;
  object-position: right top; 
}

.c-footer__shape-box--mid,
.c-footer__shape-box--circle {
  flex: 0 0 auto;
}

.c-footer__shape-box--mid {
  max-width: 289px;
}

.c-footer__shape-box--circle {
  max-width: 95px;
}

.c-footer__shape-img--mid,
.c-footer__shape-img--circle {
  position: relative;
  height: 100%;
  width: auto;
  display: block;
}

.c-footer__shape-box--right {
  flex: 0.8 1 auto; 
  overflow: hidden;
}

.c-footer__shape-img--right {
  object-fit: cover;
  object-position: left top; 
}

.c-footer__legal-bar {
  position: relative;
  z-index: 2; 
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
  padding-left: var(--grid-margin);
  padding-right: var(--grid-margin);
  font-size: 0.85rem;
  color: #ffffff;
}

.c-footer__legal-links {
  display: flex;
  gap: 2rem;
  white-space: nowrap; 
}

.c-footer__copyright {
  font-size: 12px;
  line-height: 24px;
  font-weight: 700;
  color: #B2A4D2;
  white-space: nowrap; 
}

.c-footer__legal-links a {
  font-size: 12px;
  line-height: 24px;
  font-weight: 700;
  color: #B2A4D2;
  text-decoration: none;
}

.c-footer__legal-links a:hover {
  text-decoration: underline;
}

/* =========================================
   RESPONSIVE BASE (TABLET Y MÓVIL < 992px)
   ========================================= */
@media (max-width: 992px) {
  .c-footer {
    padding-top: 3rem;
    border-top-right-radius: 150px;
  }
  
  .c-footer__bottom::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #2a1f59;
    z-index: -1;
    pointer-events: none;
  }

  .c-footer__header,
  .c-footer__content { display: contents; }
  .c-footer__main { display: flex; flex-direction: column; }

  /* Logo */
  .c-footer__brand { order: 1; margin-bottom: 2rem; }
  .c-footer__brand img { width: 163px; height: 63px; }

  /* Enlaces */
  .c-footer__nav {
    order: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1rem;
    margin-bottom: 3rem;
  }

  .c-footer__col:nth-child(1) { order: 1; }
  .c-footer__col:nth-child(3) { order: 2; }
  .c-footer__col:nth-child(2) { order: 3; }
  .c-footer__col:nth-child(4) { order: 4; }
  .c-footer__col { gap: 0; }
  .c-footer__title { font-size: 1.1rem; margin-bottom: 0.5rem; }

  /* Social */
  .c-footer__social {
    order: 3;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 1.5rem;
  }
  .c-footer__social a {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.15);
  }

  /* Newsletter */
  .c-footer__newsletter {
    order: 4;
    max-width: 100%;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
  }
  .c-footer__btn { width: fit-content; max-width: 240px; height: 50px; }

  /* --- BOTTOM BAR MOBILE --- */
  .c-footer__bottom {
    height: auto; 
  }

  .c-footer__shapes-desktop {
    display: none;
  }

  .c-footer__shapes-mobile {
    display: flex;
  }

  .c-footer__shapes-bg {
    height: 34px;
    inset: auto;
    bottom: 0;
  }

  .c-footer__shape-box--left-resp {
    flex: 0 0 120px; 
    overflow: hidden;
  }
  .c-footer__shape-box--circle-resp {
    flex: 0 0 68px; 
  }
  .c-footer__shape-box--right-resp {
    flex: 1; 
    overflow: hidden;
  }

  .c-footer__shape-img--left-resp {
    object-fit: cover;
    object-position: right top;
  }
  .c-footer__shape-img--right-resp {
    object-fit: cover;
    object-position: left top;
  }

  .c-footer__shape-img--circle-resp {
    position: relative;
    height: 100%;
    width: auto;
    display: block;
  }

  /* Textos apilados en móvil */
  .c-footer__legal-bar {
    flex-direction: column;
    height: auto;
    gap: 1.5rem;
    text-align: center;
    padding-bottom: 34px;
    padding-top: 8px;
  }

  .c-footer__legal-links {
    align-items: center;
    gap: 1rem;
    white-space: normal; 
    margin-bottom: 1rem;
  }
  
  .c-footer__copyright {
    position: absolute;
    bottom: 0;
    left: 188px;
    width: calc(100% - 188px);
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    white-space: nowrap; 
    box-sizing: border-box;
    font-size: 11px; 
  }

  @media (max-width: 768px) {
    .c-footer__shape-box--left-resp {
      flex: 0 0 60px;
    }
    .c-footer__copyright {
      left: 128px;
      width: calc(100% - 128px);
    }
  }
}

@media (max-width: 600px) {
  .c-footer__newsletter { gap: 0.5rem; }
  .c-footer__newsletter p { margin-bottom: 0.5rem; }
  .c-footer__nav { padding: 0; }
}