/*** Color Variables ***/
:root {
  --bs-blue: #0d6efd;
  --bs-indigo: #6610f2;
  --bs-purple: #6f42c1;
  --bs-pink: #d63384;
  --bs-red: #dc3545;
  --bs-orange: #fd7e14;
  --bs-yellow: #ffc107;
  --bs-green: #198754;
  --bs-teal: #20c997;
  --bs-cyan: #0dcaf0;
  --bs-white: #fff;
  --bs-gray: #6c757d;
  --bs-gray-dark: #343a40;
  --bs-primary: #171717;
  --bs-secondary: #6c757d;
  --bs-success: #198754;
  --bs-info: #0dcaf0;
  --bs-warning: #ffc107;
  --bs-danger: #dc3545;
  --bs-light: #ece9df;
  --bs-dark: #1a1a1a;
}

/*** General Styles ***/
body {
  font-family: "Special Elite", system-ui;
  background: url("../img/Fondo_liso.jpg") no-repeat center center fixed;
  background-size: cover;
  padding-top: 70px; /* This is to make sure the navbar doesn't overlap the content */
  overflow-x: hidden;
}

/* html, body { overflow-x: hidden; } */

/* Scrollable container */
.container {
  max-width: 1320px;
  margin: 0 auto;
}

/*** Typography ***/
.text-special {
  font-family: "Special Elite", system-ui;
}

.text-body {
  color: var(--bs-dark) !important;
  background: url("../img/papel_blanco.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  padding: 5%;
  margin-top: auto;
  margin-bottom: 0;
  filter: drop-shadow(0.1vw 0.1vw 0.1vw var(--bs-dark));
}

.text-white {
  color: #f8f9fa !important;
}

.english-text {
  font-style: italic;
  font-size: 0.9em;
  color: var(--bs-secondary);
}

.text-header {
  color: var(--bs-dark) !important;
  font-size: 500% !important;
}

.text-xl {
  color: var(--bs-dark) !important;
  font-size: 500%;
}

.text-big {
  color: var(--bs-dark) !important;
  font-size: 200%;
}

.text-medium {
  font-size: 80%;
}

.text-small {
  font-size: 60%;
}

.text-footer {
  color: var(--bs-white) !important;
}

.text-credits {
  color: var(--bs-secondary) !important;
  font-size: smaller !important;
}

/*** Navigation ***/
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: var(--bs-dark) !important;
  transition: all 0.3s ease;
  width: 100%;
  min-height: 70px;
  padding: 1rem 0;
}

.navbar-brand {
  color: var(--bs-white);
  font-size: 1.25rem;
}

.navbar-brand img {
  height: 30px;
  margin-right: 10px;
}

.navbar-center-logo {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
}

.navbar-center-logo img {
  height: 40px;
}

.navbar-nav .nav-link-active {
  color: var(--bs-light) !important;
  position: relative;
}

.navbar-nav .nav-link-active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--bs-light);
}

.navbar-dark .navbar-nav .nav-link {
  color: var(--bs-white);
  padding: 0.5rem 1rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--bs-light);
}

.navbar-dark .navbar-nav .active > .nav-link,
.navbar-dark .navbar-nav .nav-link.active {
  color: var(--bs-light);
}

.login-link {
  color: #2c5530 !important; /* Dark green text */
  background-color: var(--bs-light); /* Cream background from your theme */
  border-radius: 4px;
  margin-left: 8px;
  transition: all 0.3s ease;
}

.login-link:hover {
  background-color: #8b9e6e; /* Lighter green on hover */
  color: var(--bs-light) !important; /* Cream text on hover */
}

/*** Hero Section ***/
.hero-section {
  min-height: 95vh; /* This makes it take full viewport height */
  background: var(--bs-dark);
  color: var(--bs-light);
  padding: 0;
  margin-bottom: 3rem;
  min-width: 100%;
}

.hero-section .about-img img {
  max-height: 40vh;
  width: auto;
}

/*** Section Headers ***/
.section-header {
  position: sticky;
  top: 70px;
  background: var(--bs-dark);
  padding: 2rem 0;
  margin-bottom: 0;
  z-index: 1020;
  padding: 2rem;
  margin: 0;
  z-index: 1020;
  width: 100%;
}

.section-header .container {
  position: relative;
}

.section-header h2 {
  color: var(--bs-white);
  margin: 0;
  font-size: 2.25rem;
  font-family: "Special Elite", system-ui;
}

.section-header::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100vw;
  margin-left: -50vw;
  left: 50%;
  background: var(--bs-dark);
  z-index: -1;
}

/*** Sections ***/
section {
  position: relative;
  min-height: auto;
}

.section-header.is-sticky {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/*** Sections ***/
section {
  position: relative;
  margin: 0;
}

.section-content {
  padding: 2rem 0;
}

/*** Buttons ***/
.btn {
  font-weight: 600;
  transition: 0.5s;
}

.btn.btn-primary {
  background: var(--bs-primary);
  color: var(--bs-white);
  border: none;
}

.btn-big {
  font-size: 1.25rem;
  padding: 0.75rem 1.5rem;
  background: #2c5530;
  border: none;
  color: var(--bs-white);
}

.btn-big:hover {
  background: #8b9e6e;
  color: var(--bs-white);
}

.btn-primary {
  background: var(--bs-primary);
  border: none;
  color: var(--bs-white);
}

.btn-primary:hover {
  background: var(--bs-secondary);
}

.btn-light {
  color: var(--bs-primary);
  background: var(--bs-light);
  border: none;
}

.btn-light:hover {
  color: var(--bs-primary);
  background: var(--bs-white);
}

.btn-square {
  width: 32px;
  height: 32px;
}

.btn-sm-square {
  width: 34px;
  height: 34px;
}

.btn-md-square {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-lg-square {
  width: 46px;
  height: 46px;
}

.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  user-select: none;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-dark);
  border: 2px solid var(--bs-light);
  color: var(--bs-light);
  border-radius: 8px;
}

.back-to-top:hover {
  background: var(--bs-light);
  color: var(--bs-dark);
  border-color: var(--bs-dark);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

/* Make the arrow icon itself a bit more elegant */
.back-to-top i {
  font-size: 20px;
}

.btn.btn-primary.btn-lg-square.back-to-top {
  background: var(
    --bs-primary
  ) !important; /* Only use !important if absolutely necessary */
  color: var(--bs-white);
  border: 2px solid var(--bs-light);
}

.btn.btn-primary.btn-lg-square.back-to-top:hover {
  background: var(--bs-light) !important;
  color: var(--bs-dark);
  border-color: var(--bs-dark);
}

/*** Portfolio Items ***/
.portfolio-item {
  margin-bottom: 2rem;
  transition: transform 0.3s ease;
}

.portfolio-img {
  position: relative;
  overflow: hidden;
}

.portfolio-img-inner {
  background: var(--bs-light);
  padding: 1rem;
  transition: 0.5s;
}

.portfolio-img img {
  width: 100%;
  height: auto;
  transition: 0.5s;
}

.portfolio-item:hover .portfolio-img-inner {
  transform: rotate(-6deg);
}

/*** Team Carousel ***/
.testimonial-carousel {
  position: relative;
  transition: 0.5s;
  color: var(--bs-dark);
  display: block;
  margin: auto;
  width: 100%;
  height: auto;
  max-width: 1200px;
  background: url("../img/papel_blanco.jpg") no-repeat center center;
  background-size: cover;
}

.testimonial-fluid-img {
  border-color: var(--bs-primary);
  background-color: #171717;
}

.testimonial-item {
  padding: 2rem;
}

.testimonial-inner-img {
  width: 100px;
  height: 100px;
  overflow: hidden;
}

.testimonial-inner-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-carousel .owl-nav {
  margin: 0;
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none; /* This allows clicking through the nav container */
}

.testimonial-carousel .owl-nav button {
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--bs-white) !important;
  border: none !important;
  color: var(--bs-primary) !important;
  transition: 0.5s;
}

.testimonial-carousel .owl-nav button.owl-prev,
.testimonial-carousel .owl-nav button.owl-next {
  position: absolute;
  width: 48px;
  height: 48px;
  background: var(--bs-white) !important;
  border: 1px solid var(--bs-primary) !important;
  color: var(--bs-primary) !important;
  font-size: 24px !important;
  transition: all 0.3s ease;
  pointer-events: auto; /* Re-enable pointer events for buttons */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.testimonial-carousel .owl-nav button:hover {
  background: var(--bs-primary) !important;
  color: var(--bs-white) !important;
}

.testimonial-carousel .owl-nav button.owl-prev:hover,
.testimonial-carousel .owl-nav button.owl-next:hover {
  background: var(--bs-primary) !important;
  color: var(--bs-white) !important;
}

.testimonial-carousel .owl-nav .owl-prev {
  left: -24px;
}

.testimonial-carousel .owl-nav .owl-next {
  right: -24px;
}

.testimonial-carousel .owl-dots {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  padding: 1rem;
  position: relative; /* Add this */
  flex-wrap: wrap;
}

.testimonial-carousel .owl-dots .owl-dot {
  margin: 0 0.5rem;
}

.testimonial-carousel .owl-dots .owl-dot img {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bs-gray);
  transition: all 0.3s ease;
}

.testimonial-carousel .owl-dots .owl-dot.active img {
  width: 70px;
  height: 70px;
  border-color: var(--bs-primary);
}

/*** Stratum page ***/
/* Grid layout for features and factions */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 0 auto;
  max-width: 1200px;
}

/* Card styles */
.card {
  border: none;
  background: transparent;
}

.card-body {
  background: url("../img/papel_blanco.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  filter: drop-shadow(0.1vw 0.1vw 0.1vw var(--bs-dark));
}

/* Feature and faction cards */
.feature-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.feature-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.faction-card {
  transition: transform 0.3s ease;
}

.faction-card:hover {
  transform: translateY(-5px);
}

/* Video container for rules section */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 2rem auto;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Game features section */
.game-feature {
  height: 100%;
  margin-bottom: 2rem;
}

/*** Footer ***/
.footer {
  background-color: var(--bs-dark) !important;
  padding: 3rem 0;
}

.footer-content {
  text-align: center;
}

/*** Utility Classes ***/
.drop-shadow {
  filter: drop-shadow(0.1vw 0.1vw 0.1vw var(--bs-dark));
}

.pt-6 {
  padding-top: 4rem;
}
.pb-6 {
  padding-bottom: 4rem;
}
.ps-6 {
  padding-left: 4rem;
}
.pe-6 {
  padding-right: 4rem;
}

/*** Spiny envelope! ***/
.scene {
  width: 300px;
  height: 200px;
  perspective: 1000px;
  margin: 100px auto;
}

.envelope {
  width: 100%;
  height: 100%;
  position: relative;
  transform: rotateY(0deg);
  transform-style: preserve-3d;
  animation: spin 6s infinite linear;
  transition: transform 0.3 ease;
}

.envelope:hover {
  animation: grow 0.3s forwards;
}

@keyframes spin {
  from {
    transform: rotateY(0deg) scale(1);
  }
  to {
    transform: rotateY(360deg) scale(1);
  }
}

@keyframes grow {
  to {
    transform: scale(1.15);
  }
}

.envelope__face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background-color: #f7f3eb;
  border: 2px solid #333;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  /*fotito de textura*/
  background-image: url("../img/papel_blanco.jpg");
  background-size: cover;
  background-repeat: no-repeat;
}

.envelope__side {
  position: absolute;
  /*fotito de textura*/
  background-image: url("../img/papel_blanco.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  border: 1px solid #333;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.envelope__side--left {
  width: 15px;
  height: 100%;
  left: -7.5px;
  transform: rotateY(90deg);
}

.envelope__side--right {
  width: 15px;
  height: 100%;
  right: -7.5px;
  transform: rotateY(90deg);
}

.envelope__side--top {
  width: 100%;
  height: 15px;
  top: -7.5px;
  transform: rotateX(90deg);
}

.envelope__side--bottom {
  width: 100%;
  height: 15px;
  bottom: -7.5px;
  transform: rotateX(-90deg);
}

.envelope__front {
  transform: translateZ(7.5px);
}

.envelope__back {
  transform: translateZ(-7.5px) rotateY(180deg);
}

.flap {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 100px 150px;
  border-color: #f7f3eb transparent transparent transparent;
  top: -1px;
  left: -1px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.flap::after {
  content: "";
  position: absolute;
  top: -98px;
  left: -148px;
  width: 296px;
  height: 98px;
  /*fotito de textura*/
  background-image: url("../img/papel_blanco.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
}

.envelope__text {
  font-family: "Special Elite", system-ui;
  font-size: 200%;
  color: var(--bs-dark);
  text-align: center;
  padding: 20px;
  position: relative;
  top: 90px;
}

.envelope-link {
  text-decoration: none;
  display: block; /* Make the whole envelope clickable */
}

.envelope-container {
  display: flex;
  justify-content: center;
  gap: 10rem;
  flex-wrap: wrap;
}

/*** Media Queries ***/
@media (max-width: 991px) {
  body {
    padding-top: 56px; /* Standard mobile navbar height */
  }

  .navbar {
    min-height: 56px;
    padding: 0.5rem 0;
  }

  .navbar-collapse {
    background: var(--bs-dark);
    padding: 1rem;
    margin-top: 0.5rem;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .navbar .container-fluid .container {
    padding: 0 15px;
  }

  .navbar-brand {
    left: 1rem;
    z-index: 1000;
    position: relative;
  }

  .navbar-toggler {
    z-index: 1000;
    left: 0.3rem;
    position: relative;
  }

  .navbar-center-logo {
    display: block;
    position: absolute;
    top: auto;
    left: auto;
    right: 1rem;
    /* transform: translate(100%, -100%); */
  }
  
  .navbar-center-logo img {
    height: 40px;
  }

  .login-link {
    margin: 8px 0;
    text-align: center;
  }

  .section-header {
    top: 56px;
    padding: 0.75rem;
    margin-bottom: 0;
  }

  .section-content {
    padding: 1rem 0;
  }

  .text-body {
    padding: 1rem;
    margin: 0;
  }

  section {
    margin-bottom: 0;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .text-header {
    font-size: 300% !important;
  }

  .portfolio-item {
    margin-bottom: 1.5rem;
  }

  .testimonial-carousel {
    padding: 1rem;
  }

  .footer-content {
    padding: 2rem 1rem;
  }
}

@media (max-width: 767px) {
  body {
    padding-top: 56px; /* Standard mobile navbar height */
  }

  .navbar {
    min-height: 56px;
    padding: 0.5rem 0;
  }

  .navbar-collapse {
    background: var(--bs-dark);
    padding: 1rem;
    margin-top: 0.5rem;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .navbar .container-fluid .container {
    padding: 0 15px;
  }

  .navbar-brand {
    z-index: 1000;
    position: relative;
  }

  .navbar-toggler {
    z-index: 1000;
    position: relative;
  }

  .hero-section {
    padding: 4rem 0;
  }

  .text-header {
    font-size: 200% !important;
  }

  .section-header {
    top: 56px;
    padding: 0.75rem;
    margin-bottom: 0;
  }

  .section-content {
    padding: 1rem 0;
  }

  .text-body {
    padding: 1rem;
    margin: 0;
  }

  section {
    margin-bottom: 0;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .testimonial-carousel .owl-nav {
    display: none;
  }

  .pt-6,
  .pb-6,
  .ps-6,
  .pe-6 {
    padding: 2rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .game-feature {
    margin-bottom: 1rem;
  }
}
