/*
  Global stylesheet for the QPoint Cabo Ledo Resort website (multi‑page).
  Defines a cohesive colour palette, responsive layouts, navigation bar,
  grid system for the gallery and forms for reservations and contact pages.
*/

/* Colour palette derived from the official logo */
:root {
  --primary: #323b88;       /* deep blue from the logo */
  --accent: #2fa36b;        /* tropical green for highlights */
  --warning: #ffc107;       /* warm yellow for notices */
  --light: #ffffff;         /* white for backgrounds */
  --dark: #111111;          /* near black for text */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--dark);
  background-color: var(--light);
  line-height: 1.6;
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
}

p {
  margin: 0 0 1rem 0;
}

/* Reusable container class for consistent width */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header and navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255,255,255,0.97);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.navbar .logo img {
  height: 50px;
  width: auto;
}

.menu-toggle {
  width: 30px;
  height: 20px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

nav {
  display: flex;
  gap: 1rem;
}
nav a {
  padding: 0.5rem;
  font-weight: 500;
  color: var(--primary);
  transition: color 0.3s ease;
}
nav a:hover {
  color: var(--accent);
}

/* Active link indication */
nav a.active {
  color: var(--accent);
  font-weight: 600;
}

/* Mobile navigation */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  nav {
    position: absolute;
    top: 70px;
    right: 0;
    flex-direction: column;
    background: var(--light);
    width: 200px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: none;
    padding: 0.5rem;
    z-index: 1000;
  }
  nav.open {
    display: flex;
  }
}

/* Hero section (only on home page) */
.hero {
  position: relative;
  height: calc(100vh - 70px);
  /* Atualizamos a imagem de fundo da hero para uma foto real de Cabo Ledo fornecida pelo cliente */
  background: url('../images/cabo_ledo_beach1.jpg') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--light);
}
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 0;
}
.hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 1rem;
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.hero h2 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  font-weight: 400;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  min-width: 150px;
  text-align: center;
  transition: background-color 0.3s ease;
}
.btn-primary {
  background-color: var(--primary);
  color: var(--light);
}
.btn-primary:hover {
  background-color: #232f63;
}
.btn-accent {
  background-color: var(--accent);
  color: var(--light);
}
.btn-accent:hover {
  background-color: #248359;
}

/* Section styles */
section {
  padding: 80px 0;
  scroll-margin-top: 80px;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--primary);
}

/* About page */
.about {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
@media (max-width: 768px) {
  .about {
    grid-template-columns: 1fr;
  }
}
.about img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.about .values {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}
.about .value-box {
  flex: 1 1 200px;
  background-color: var(--warning);
  color: var(--dark);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.about .value-box h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.gallery-grid img:hover {
  transform: scale(1.03);
}
/* Lightbox with navigation */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2000;
}
.lightbox.active {
  visibility: visible;
  opacity: 1;
}
.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
}
.lightbox .close, .lightbox .prev, .lightbox .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: var(--light);
  cursor: pointer;
  padding: 0.5rem;
  user-select: none;
}
.lightbox .close {
  top: 20px;
  right: 30px;
  transform: none;
}
.lightbox .prev {
  left: 30px;
}
.lightbox .next {
  right: 30px;
}

/* Menu page */
.menu-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.menu-category {
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 20px;
  background-color: var(--light);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.menu-category h3 {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 1.3rem;
}
.menu-category ul {
  list-style: none;
  padding-left: 0;
}
.menu-category li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 1.2em;
}
.menu-category li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Form styles (reservations and contact) */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(50, 59, 136, 0.2);
}
.form-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-actions .btn {
  flex: 1 1 200px;
}

/* Mensagem de feedback do formulário */
.form-message {
  margin-top: 1rem;
  font-weight: 500;
}

/* Estilos de validação */
input.error,
textarea.error {
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.2);
}

/* Contact page */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}
.contact-info a {
  color: var(--accent);
  text-decoration: underline;
}

.map-container iframe {
  width: 100%;
  height: 350px;
  border: 0;
  border-radius: 8px;
}

/* Contact hero on contact page */
.contact-hero {
  position: relative;
  height: 40vh;
  background: url('../images/resort_overview1.jpg') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  text-align: center;
}
.contact-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}
.contact-hero h2 {
  position: relative;
  z-index: 1;
  font-size: 2.5rem;
  margin: 0;
}

/* Contact page layout */
.contact-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}
.contact-details,
.contact-form-wrapper {
  flex: 1 1 300px;
}
.contact-details p {
  margin-bottom: 1rem;
  line-height: 1.5;
}
.contact-details i {
  color: var(--accent);
  margin-right: 0.5rem;
}

/* Contact form */
.contact-form-wrapper form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-form-wrapper .form-group {
  display: flex;
  flex-direction: column;
}
.contact-form-wrapper .form-group label {
  margin-bottom: 0.25rem;
  font-weight: 500;
}
.contact-form-wrapper .form-group input,
.contact-form-wrapper .form-group textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}
.contact-form-wrapper .form-group input:focus,
.contact-form-wrapper .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(50, 59, 136, 0.2);
}
.contact-form-wrapper .form-actions {
  margin-top: 1rem;
}

/* Responsive tweaks for small screens */
@media (max-width: 600px) {
  .contact-hero {
    height: 30vh;
  }
  .contact-hero h2 {
    font-size: 1.75rem;
  }
  .contact-section {
    flex-direction: column;
  }
  .contact-section > div {
    width: 100%;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero h2 {
    font-size: 1.2rem;
  }
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Footer */
footer {
  background-color: var(--primary);
  color: var(--light);
  padding: 40px 0;
}
footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
footer .footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
footer .footer-links a {
  color: var(--light);
  font-weight: 500;
}
footer .social-links a {
  color: var(--light);
  font-size: 1.5rem;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}
footer .social-links a:hover {
  color: var(--warning);
}