/* Global Styles */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

body {
  padding-top: 50px; /* Offset for the fixed header */
  font-family: "Nunito", "Open Sans", Helvetica, Arial, sans-serif;
  color: #FFFFFF;
  background-color: #31473A;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Ensures minimum height is full viewport */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #31473A;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

#loader.hidden {
  opacity: 0;
  pointer-events: none;
  display: none; 
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #A3C1AD;
  border-top: 6px solid #5F9E8D;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Main Content Container */
#main-content {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto; /* This makes it take all available space */
  width: 100%;
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
}

/* Logo Styles */
#logo {
  cursor: pointer;
  transition: transform 0.3s ease;
  margin: 1rem 0; /* Consistent margin top and bottom */
}

#logo:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  #logo {
    width: 70%;
  }
}

/* Button Styles */
.btn-sib {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  color: #FFFFFF;
  background: linear-gradient(135deg, #A3C1AD 0%, #5F9E8D 100%);
  border: none;
  border-radius: 8px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  width: 100%;
}

.btn-sib:hover {
  background: linear-gradient(135deg, #507C67 0%, #3C6454 100%);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
}

.btn-sib:active {
  background: linear-gradient(135deg, #3C6454 0%, #2B4B42 100%);
  transform: translateY(0);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Pronto Button Styles */
.btn-sib.pronto {
  position: relative;
  background: linear-gradient(135deg, #628350 30%, #C6B784 100%) !important;
  color: black !important;
  border: none !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
  font-size: 16px !important;
}

.btn-sib.pronto:hover {
  background: linear-gradient(135deg, #51753e 0%, #46762c 100%) !important;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2) !important;
  transform: translateY(-3px) !important;
  color: rgb(255, 255, 255) !important;
}

.btn-sib.pronto:active {
  background: linear-gradient(135deg, #c03c03 0%, #b93c07 100%) !important;
  transform: translateY(0) !important;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Paragraph Styles */
p {
  font-size: 18px;
  line-height: 1.8;
  text-align: center;
  margin: 20px 0;
}

@media (max-width: 480px) {
  p {
    font-size: 14px;
    line-height: 1.6;
    padding: 10px;
  }
}

/* Footer Styles */
.footer-container {
  margin-top: auto; /* Push to bottom when content is short */
  padding: 20px 0;
  text-align: center;
  font-family: "Nunito", sans-serif;
  position: relative;
  width: 100%;
  clear: both;
}

.instagram-container {
  margin-bottom: 5px;
}

.instagram-link {
  text-decoration: none;
  color: #fff;
}

.instagram-link:hover {
  color: #fff;
}

.instagram-link i {
  transition: transform 0.3s ease;
}

.instagram-link:hover i {
  transform: scale(1.2);
}

.developer-credit {
  color: #A3C1AD;
  margin-bottom: 10px;
  font-size: 0.75rem; /* 12px in rem units */
  font-family: "Nunito", sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
}

.footer-divider {
  width: 50%;
  margin: 2px auto;
  border-color: rgba(163, 193, 173, 0.153);
}

.copyright {
  color: #A3C1AD;
}

.copyright-text {
  font-weight: 400;
  font-style: normal;
  font-size: 0.75rem;
}

.copyright-text a {
  color: inherit; /* Takes the same color as parent text */
  font-family: inherit; /* Inherits font family */
  font-weight: inherit; /* Inherits font weight */
  font-size: inherit; /* Inherits font size */
  text-decoration: none; /* Removes underline */
  transition: color 0.3s ease; /* Smooth color transition */
}

.copyright-text a:hover {
  color: #ffffff; /* Changes to this color on hover */
}

/* Glossary Styles */
.glossary-container {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
  color: white;
}

.glossary-square {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin: 0 8px;
  background: linear-gradient(135deg, #628350 0%, #C6B784 100%);
  border-radius: 4px;
}

@media (max-width: 768px) {
  .glossary-container {
    font-size: 16px;
  }

  .glossary-square {
    width: 16px;
    height: 16px;
  }
}

/* Carousel Styles */
#rvw_carousel {
  width: 100%;
  margin: auto;
}

.rvw_carousel_item {
  text-align: center;
}

.rvw_carousel_card {
  width: 18rem;
  margin: auto;
}

.rvw_carousel_card_body {
  padding: 1rem;
}

.rvw_carousel_card_title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #333;
}

.rvw_carousel_card_text {
  font-size: 1rem;
  color: #666;
}

.rvw_carousel_btn {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
  text-transform: uppercase;
}

.rvw_carousel_btn:hover {
  background-color: #0056b3;
  border-color: #004085;
}

/* Carousel Controls */
.rvw_carousel_control_prev_icon,
.rvw_carousel_control_next_icon {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
}

.rvw_carousel_visually_hidden {
  display: none;
}

/* Instagram Link Styles */
.instagram-link {
  text-decoration: none;
  color: #fff;
}

.instagram-link:hover {
  color: #fff;
}

.instagram-link i {
  transition: transform 0.3s ease;
}

.instagram-link:hover i {
  transform: scale(1.2);
}

/* Button Grid Container */
.btn-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

@media (max-width: 768px) {
  .btn-grid-container {
    grid-template-columns: 1fr;
  }
}

/* Location Info Styles */
/* Container with white background */
.location-container {
  background-color: #FFFFFF;
  padding: 0.25rem 0; /* Add some vertical padding */
  border-radius: 0.2rem; /* Optional: rounded corners */
  max-width: 80%;
  margin: 0 auto;
}

/* Location Info Styles */
.localizacion-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem; /* 8px in rem */
  background-color: transparent; /* No background here anymore */
  border: none;
  margin: 0 auto;
  cursor: pointer;
  position: relative;
  width: fit-content;
  text-align: center;
}

.localizacion-info .icon {
  color: #31473A; /* Dark green color */
  font-size: 1.125rem; /* 18px in rem */
}

.localizacion-info .localizacion {
  margin: 0;
  font-family: "poplar-std", sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.0625rem; /* 1px in rem */
  font-size: 1.8rem; /* 42px for larger screens */
  color: #31473A; /* Dark green color */
}

/* Responsive font size */
@media (max-width: 768px) {
  .localizacion-info .localizacion {
    font-size: 2rem; /* 32px for smaller screens */
  }
  
  .localizacion-info .icon {
    font-size: 1rem;
  }
}


/* Impressive Mapas Button */
.btn-mapas {
  position: relative;
  background-color: transparent;
  color: #FFFFFF;
  font-weight: bold;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 30px;
  padding: 12px 40px;
  width: auto;
  display: inline-block;
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 2px;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
}

.btn-mapas:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.4s ease;
  z-index: -1;
}

.btn-mapas:hover {
  border-color: #FFFFFF;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
  transform: translateY(-6px) scale(1.05);
  letter-spacing: 3px;
}

.btn-mapas:hover:before {
  left: 100%;
  animation: shine 1.5s infinite;
}

.btn-mapas:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

@keyframes shine {
  0% {
    left: -100%;
    opacity: 0.6;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* Header styles */
.main-header {
  color: white;
  background:  #31473A; /* Color to match the background */
  position: fixed; 
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 50px; /* Fixed height for desktop */
}

.wrapper-header {
  display: flex;
  align-items: center;
  position: relative;
  height: 100%;
  padding: 0 1.5rem;
  width: 100%;
}

.site-branding {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  text-align: center;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  user-select: none;
  color: #31473A;
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE10+/Edge */
}

.site-branding a {
  text-decoration: none;
  color: #31473A;
  font-style: italic;
}

.menu-button {
  background: none;
  border: none;
  cursor: pointer;
  color: #FFFFFF;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  z-index: 10;
  position: absolute;
  right: 0.8rem;
}

.menu-button:hover {
  color: #13241a;
}

.menu-button[aria-expanded="true"] {
  color: #FFFFFF;
}

.menu-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(38, 55, 48, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.15, 1, 0.3, 1);
  z-index: 5;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

/* Make the menu container follow Bootstrap 8-column layout */
.menu {
  width: 66.67%; /* 8/12 columns */
  max-width: 800px; /* Prevent getting too wide on large screens */
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

/* Adjust list to fill the 8-column container */
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  width: 100%; /* Take full width of the menu container */
}

/* Menu items - ensure text doesn't wrap and stays centered */
.menu-list li {
  text-align: center;
  width: 100%;
}

.menu-list a {
  font-size: 1.5rem;
  color: #A3C1AD;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.15, 1, 0.3, 1);
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid #A3C1AD;
  border-radius: 44px;
  padding: 0.7rem 1.5rem;
  display: block;
  margin: 0 auto; /* Centers each button */
  white-space: nowrap; /* Prevents text from wrapping */
}

.menu-list a:hover {
  background-color: #FFFFFF;
  color: #31473A;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: #FFFFFF;
}
.menu-lightbox[aria-hidden="false"] {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}


/* Responsive styles */
@media (max-width: 768px) {
  .main-header {
    height: 45px; /* Slightly smaller for tablets */
  }
  
  .site-branding {
    width: 75%;
    font-size: 11px;
  }
  
  .menu-button {
    font-size: 1.2rem;
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .main-header {
    height: 40px; /* Even smaller for mobile */
  }
  
  .site-branding {
    width: 70%;
    font-size: 10px;
  }
  
  .menu-button {
    font-size: 1rem;
    width: 30px;
    height: 30px;
  }
  
  .menu-list a {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
  }
}

/* Scrolling announcement styles */
.announcement-ticker {
  width: 100%;
  overflow: hidden;
  position: relative;
  height: 2.5rem;
  display: flex;
  align-items: center;
}

.announcement-content {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 100s linear infinite;
  padding-left: 100%; /* Start from outside the view */
}

.announcement-content span {
  display: inline-block;
  padding-right: 5rem;
  font-family: "poplar-std", sans-serif;
  font-weight: 400;
  font-style: normal;
  color: #FFFFFF;
  text-transform: uppercase;
  font-size: 1.5rem; /* .5rem (24px) */
  word-spacing: 0.4rem;
}

@keyframes ticker {
  0% {
      transform: translateX(0);
  }
  100% {
      transform: translateX(-100%); /* Move enough to show all three spans */
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .announcement-ticker {
      height: 2.5rem;
  }
  
  .announcement-content span {
    font-size: 1.375rem; /* Increased from 1rem to 1.375rem (22px) */
    padding-right: 8rem; /* Adjusted spacing for tablets */
  }
}

@media (max-width: 480px) {
  .announcement-ticker {
    height: 2.25rem;
  }
  
  .announcement-content span {
      font-size: 1.25rem; /* Increased from 0.875rem to 1.25rem (20px) */
      padding-right: 6rem;
  }
}

.responsive-lead {
  margin-top: 0.9375rem; /* 15px in rem */
  margin-bottom: 0.9375rem; /* 15px in rem */
  font-size: 0.975rem !important;
}

/* Apply left/right margins ONLY on small screens */
@media (max-width: 767.98px) {
  .responsive-lead {
    padding-left: 5%; /* 1 column margin */
    padding-right: 5%; /* 1 column margin */
  }
}

/* Madrid Map Background Section */
.map-section-container {
  width: 100%;
  margin: 2rem 0;
}

.map-background {
  position: relative;
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 304px;
  border-radius: 8px;
  overflow: hidden;
}

.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.map-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.btn-mapas-new {
  background-color: transparent;
  color: #FFFFFF;
  font-weight: bold;
  border: 2px solid #FFFFFF;
  border-radius: 30px;
  padding: 12px 40px;
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-mapas-new:hover {
  background-color: #FFFFFF;
  color: #31473A;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive styles */
@media (min-width: 768px) {
  .map-background {
    width: 375px;
    margin: 0 auto;
  }
}

/* Action Grid Layout */
.action-grid {
  display: grid;
  grid-template-columns: 1fr; /* Full width for small devices */
  gap: 0; /* No gap between items */
  width: 100%;
  margin: 0;
}

/* Item container */
.action-item {
  width: 100%;
  margin: 0; /* Remove margin */
  padding: 0; /* Remove padding */
}

/* Background image container */
.action-background {
  position: relative;
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 300px;
  overflow: hidden;
  transform: translateZ(0); /* Prevents flickering on Safari */
}

/* Darkening overlay */
.action-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* 60% black overlay */
}

/* Content positioning */
.action-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

/* Button styling */
.btn-action {
  background-color: transparent;
  color: #FFFFFF;
  font-weight: bold;
  border: 2px solid #FFFFFF;
  border-radius: 30px;
  padding: 10px 30px;
  text-transform: uppercase;
  font-size: 16px;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-action:hover {
  background-color: #FFFFFF;
  color: #31473A;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive styles */
@media (min-width: 768px) {
  .action-grid {
    grid-template-columns: repeat(2, 1fr); /* Two items per row on tablets */
  }
  
  .action-background {
    height: 250px; /* Slightly taller on tablets */
  }
}

@media (min-width: 992px) {
  .action-background {
    height: 300px; /* Even taller on desktops */
  }
  
  .btn-action {
    font-size: 18px;
    padding: 12px 35px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 45px; /* Match header height for tablets */
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 40px; /* Match header height for mobile */
  }
}