:root {
  --primary: #c4ae78;
  --primary-dark: #ad835a;
  --primary-light: #ecd19a;
  --secondary: #752b1a;
  --secondary-dark: #62351f;
  --dark: #29221c;
  --darker: #1a1410;
  --light: #ffcb8d;
  --text: #efefef;
}

html {
  scrollbar-gutter: stable;
}

body {
  font-family: "Lato", sans-serif;
  font-size: 16px;
  color: var(--text);
  background-color: var(--darker);
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.nav-link {
  font-family: "Cinzel", serif;
  font-weight: 600;
}

.fancy-heading {
  font-family: "Cinzel Decorative", cursive;
}

.text-primary {
  color: var(--primary) !important;
}

.text-secondary {
  color: var(--secondary) !important;
}

.text-light {
  color: var(--light) !important;
}

.bg-dark-pattern {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)),
    url("../img/dark_wall.png");
  background-repeat: repeat;
}

.bg-darker-pattern {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)),
    url("../img/dark_leather.png");
  background-repeat: repeat;
}

/* Hero section */
.hero {
  height: 100vh;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)),
    url("../img/neverwinter_seascape.jpeg");
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 0;
  overflow: hidden;
  /* Added for Ken Burns zoom */
}

/* Ken Burns Effect */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  z-index: -1;
  animation: kenburns 20s ease infinite alternate;
}

@keyframes kenburns {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.1);
  }
}

.hero-content {
  max-width: 900px;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.hero-logo {
  max-width: 350px;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.5));
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--primary);
  font-size: 2rem;
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 2;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-10px);
  }

  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Navigation */
.navbar {
  background: linear-gradient(rgba(26, 20, 16, 0.95), rgba(26, 20, 16, 0.85));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  padding: 1rem;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  padding: 0.5rem 1rem;
  background: rgba(26, 20, 16, 0.98);
}

.navbar-brand img {
  height: 40px;
  transition: all 0.4s ease;
}

.navbar.scrolled .navbar-brand img {
  height: 30px;
}

.nav-link {
  color: var(--primary) !important;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--light) !important;
  text-shadow: 0 0 10px rgba(201, 176, 118, 0.5);
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--primary);
  transition: all 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(to bottom, #b93a27, #9e1e0b);
  border: 1px solid #b93a27;
  color: var(--light);
  font-family: "Cinzel", serif;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(to bottom, #c64e3b, #b22a17);
  border-color: #c64e3b;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: linear-gradient(to bottom, #2b6a0f, #194209);
  border: 1px solid #2b6a0f;
  color: var(--light);
}

.btn-secondary:hover {
  background: linear-gradient(to bottom, #327a12, #225b0c);
  border-color: #327a12;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background-color: rgba(196, 174, 120, 0.2);
  color: var(--light);
}

/* unique style for Visitatore btn as per plan */
#logvisitatore {
  border-style: dashed;
  margin-top: 10px;
}

/* reCAPTCHA Disclaimer styling */
.recaptcha-disclaimer {
  color: var(--primary-dark);
  font-size: 0.85rem;
  opacity: 0.8;
  letter-spacing: 0.5px;
}

.recaptcha-disclaimer a {
  color: var(--primary);
  text-decoration: underline;
  transition: all 0.3s ease;
}

.recaptcha-disclaimer a:hover {
  color: var(--light);
}

/* Form Styling */
.form-control {
  background-color: rgba(41, 34, 28, 0.8);
  border: 1px solid var(--primary-dark);
  border-radius: 0;
  color: var(--light);
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  background-color: rgba(41, 34, 28, 0.95);
  border-color: var(--primary);
  color: var(--light);
  box-shadow: 0 0 0 0.25rem rgba(196, 174, 120, 0.25);
}

.form-label {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Divider */
.divider {
  height: 80px;
  position: relative;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.divider::before,
.divider::after {
  content: "";
  height: 2px;
  background: linear-gradient(to right,
      transparent,
      var(--primary),
      transparent);
  flex-grow: 1;
}

.divider-icon {
  font-size: 2rem;
  color: var(--primary);
  margin: 0 1rem;
}

/* Cards & Content Sections */
.content-section {
  padding: 6rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  color: var(--primary-light);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 100px;
  height: 3px;
  background: linear-gradient(to right,
      transparent,
      var(--primary),
      transparent);
  margin: 1rem auto;
}

.card {
  background-color: rgba(41, 34, 28, 0.7);
  border: 1px solid var(--primary-dark);
  border-radius: 0;
  transition: all 0.3s ease;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
}

.card-img-top {
  border-bottom: 1px solid var(--primary-dark);
}

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--primary);
  margin-bottom: 1rem;
}

/* Carousel */
.carousel {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--primary-dark);
  position: relative;
}

/* <picture> è inline per default: lo rendiamo block per non deformare le immagini del carousel */
.carousel-item picture {
  display: block;
  width: 100%;
  line-height: 0;
}

/* height: auto assicura che l'attributo height="1080" non stretchi verticalmente l'immagine */
.carousel-item picture img {
  width: 100%;
  height: auto;
}

.carousel-caption {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 1.5rem;
  border-left: 4px solid var(--primary);
  text-align: left;
  max-width: 80%;
  margin: 0 auto;
  bottom: 2rem;
  border-radius: 0;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.carousel-indicators button.active {
  opacity: 1;
  transform: scale(1.2);
}

/* Login & Registration Section */
.auth-section {
  background-color: rgba(26, 20, 16, 0.7);
  border: 1px solid var(--primary-dark);
  padding: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.auth-icon {
  color: var(--primary);
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Feature boxes */
.feature-box {
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-box:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.feature-box:hover .feature-icon {
  color: var(--light);
  transform: scale(1.1);
}

/* Footer */
.footer {
  padding: 4rem 0 2rem;
  background-color: var(--darker);
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right,
      transparent,
      var(--primary),
      transparent);
}

.footer-heading {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.social-links a {
  color: var(--primary);
  font-size: 1.5rem;
  margin-right: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  line-height: 1;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
}

.social-links a:hover {
  color: var(--light);
  transform: translateY(-3px);
}

.social-links {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
}

.social-links .social-icon-svg {
  width: 1.5rem;
  height: 1.5rem;
}

.copyright {
  text-align: center;
  font-family: "Cinzel", serif;
  color: var(--primary-dark);
  margin-top: 3rem;
  letter-spacing: 1px;
}

/* Overlay Message Improvements */
.overlay-message {
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.95);
  color: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  font-family: "Trebuchet MS", sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  width: 90%;
  max-width: 800px;
  border: 1px solid var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
  .content-section {
    padding: 4rem 0;
  }

  .hero-logo {
    max-width: 250px;
  }

  .auth-section {
    padding: 2rem;
  }

  .carousel-caption {
    padding: 1rem;
    bottom: 1rem;
    max-width: 90%;
  }
}

@media (max-width: 576px) {

  html,
  body {
    font-size: 14px;
  }

  .hero-logo {
    max-width: 200px;
  }

  .auth-section {
    padding: 1.5rem;
  }

  .section-title {
    margin-bottom: 2rem;
  }

  .card-body {
    padding: 1.5rem;
  }

  .carousel-caption {
    max-width: 95%;
    bottom: 0.5rem;
    padding: 0.75rem;
  }
}