/**
 * Footer Styles
 * Basado en el diseño SBAP con montañas y elementos decorativos
 */

/* Sticky Footer - Asegura que el footer siempre esté al final */
html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

header {
  flex-shrink: 0;
}

#sections {
  flex: 1 0 auto;
}

.bg-footer-top,
.footer {
  flex-shrink: 0;
}

/* Background superior del footer */
.bg-footer-top {
  margin: 0;
  padding: 0;
  padding-top: 75px;
  line-height: 0;
  position: relative;
  z-index: 10;
  margin-bottom: -1px;
}

.bg-footer-top img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Footer principal */
.footer {
  background: #3e5749;
  color: #fff;
  position: relative;
  padding: 60px 0 0;
  overflow: visible;
  margin-top: 0;
}

/* Botón volver arriba */
.footer .flecha-top {
  position: absolute;
  top: -120px;
  right: 30px;
  background: #99ae2f;
  color: #3e5749;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.footer .flecha-top a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #3e5749;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer .flecha-top:hover {
  background: #a4c639;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.footer .flecha-top em {
  font-size: 24px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.footer .flecha-top:hover em {
  transform: translateY(-2px);
}

/* Container del footer */
.footer .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 35px;
  padding-bottom: 93px;
  position: relative;
  z-index: 2;
}

.footer .row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.footer .col-md-4,
.footer .col-md-8 {
  padding: 0 15px;
}

.footer .col-md-4 {
  width: 100%;
}

.footer .col-md-8 {
  width: 100%;
}

@media (min-width: 768px) {
  .footer .col-md-4 {
    width: 33.333%;
    margin-bottom: 0;
  }
  
  .footer .col-md-8 {
    width: 66.667%;
  }
}

/* Logo */
.footer .logo {
  display: inline-block;
  margin-bottom: 40px;
}

@media only screen and (max-width: 991px) {
  .footer .logo {
    margin-bottom: 20px;
  }
}

.footer .logo img {
  width: 119px;
}



/* Redes sociales */
.footer .rrss {
  margin-bottom: 35px;
}

.footer .rrss p {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: none;
  letter-spacing: 0.3px;
  color: #fff;
}

.footer .rrss a {
  color: #fff;
  margin-right: 8px;
  font-size: 30px;
}

.footer .rrss.mobile {
  display: block;
}

.footer .rrss.desktop {
  display: none;
}

@media (min-width: 768px) {
  .footer .rrss.mobile {
    display: none;
  }
  
  .footer .rrss.desktop {
    display: block;
  }
}

/* Marca Chile */
.footer .marca-chile {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.footer .marca-chile img {
  max-width: 70px;
  height: auto;
  flex-shrink: 0;
  margin: 0;
  margin-top: 2px;
}

.footer .marca-chile p {
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  opacity: 0.85;
  color: white;
}

.footer .marca-chile.desktop {
  display: none;
}

@media (min-width: 768px) {
  .footer .marca-chile.mobile {
    display: none;
  }
  
  .footer .marca-chile.desktop {
    display: flex;
    margin-bottom: 45px;
  }
}

/* Navegación del footer */
.footer .nav-footer {
  margin-bottom: 35px;
}

.footer .nav-footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 768px) {
  .footer .nav-footer {
    display: flex;
    gap: 50px;
  }
  
  .footer .nav-footer ul {
    margin: 0;
    flex: 1;
    gap: 8px;
  }
}

.footer .nav-footer li {
  margin: 0;
}

.footer .nav-footer a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.2s ease;
  display: inline-block;
  position: relative;
  font-weight: 600;
}

.footer .nav-footer a:hover {
  color: #99ae2f;
  padding-left: 0;
}

.footer .nav-footer a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: #99ae2f;
  transition: width 0.2s ease;
}

.footer .nav-footer a:hover::after {
  width: 100%;
}

/* Imágenes decorativas del footer */
.footer .img-footer-tree,
.footer .img-footer-branch,
.footer .img-footer-leaf,
.footer .img-footer-fishes,
.footer .img-footer-fish {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

/* Tree - Árbol */
.footer .img-footer-tree {
  position: absolute;
  bottom: 0;
  left: 5%;
  width: 180px;
  max-height: 130px;
  display: none;
}

@media (min-width: 768px) {
  .footer .img-footer-tree {
    display: block;
  }
}

@media (min-width: 992px) {
  .footer .img-footer-tree {
    left: -210px;
    max-height: initial;
    display: none;
  }
}

@media (min-width: 1600px) {
  .footer .img-footer-tree {
    display: block;
  }
}

/* Branch - Rama */
.footer .img-footer-branch {
  position: absolute;
  bottom: 0;
  left: 5%;
  max-height: 80px;
  max-width: 26px;
}

@media (min-width: 992px) {
  .footer .img-footer-branch {
    left: 20%;
    max-height: 130px;
  }
}

/* Leaf - Hoja */
.footer .img-footer-leaf {
  position: absolute;
  bottom: 0;
  left: 20%;
  max-height: 60px;
  max-width: 26px;
}

@media (min-width: 992px) {
  .footer .img-footer-leaf {
    left: 50%;
    max-height: 80px;
  }
}

/* Fishes - Peces (grupo) */
.footer .img-footer-fishes {
  position: absolute;
  bottom: 40px;
  right: 20%;
  width: 120px;
  max-height: 30px;
}

@media (min-width: 992px) {
  .footer .img-footer-fishes {
    right: 7%;
    max-height: 80px;
  }
}

@media (min-width: 1200px) {
  .footer .img-footer-fishes {
    right: 10%;
  }
}

@media (min-width: 1650px) {
  .footer .img-footer-fishes {
    right: 18%;
  }
}

/* Fish - Pez individual */
.footer .img-footer-fish {
  position: absolute;
  bottom: 30px;
  right: 2%;
  width: 130px;
  max-height: 100px;
}

@media (min-width: 992px) {
  .footer .img-footer-fish {
    bottom: 100px;
    max-height: initial;
    display: none;
  }
}

@media (min-width: 1200px) {
  .footer .img-footer-fish {
    right: 0px;
    display: block;
  }
}

@media (min-width: 1600px) {
  .footer .img-footer-fish {
    right: -100px;
  }
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .footer {
    padding: 40px 0 0;
  }
  
  .footer .flecha-top {
    right: 15px;
    top: -110px;
    width: 56px;
    height: 56px;
  }
  
  .footer .flecha-top em {
    font-size: 20px;
  }
  
  .footer .col-md-4,
  .footer .col-md-8 {
    padding: 0;
  }
  
  .footer .logo {
    margin-bottom: 30px;
  }
  
  .footer .rrss {
    margin-bottom: 25px;
  }
  
  .footer .marca-chile {
    padding: 12px;
  }
  
  .footer .nav-footer {
    margin-bottom: 30px;
  }
}
