/* Component styles */

/* Banner */
.banner {
  position: relative;
  z-index: 55;
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem;
  text-align: center;
}

.banner-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.banner-dismiss {
  background: none;
  border: none;
  color: var(--primary-foreground);
  font-size: 1.25rem;
  cursor: pointer;
}

/* Navigation */
.navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.navigation.scrolled {
  box-shadow: var(--shadow-lg);
  background-color: rgba(255, 255, 255, 0.95);
}

/* Hide navigation brand when mobile menu is open */
.navigation.mobile-menu-open .navigation-brand {
  opacity: 0;
  visibility: hidden;
}

.navigation-container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.navigation-brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}

.navigation-icon {
  font-size: 1.5rem;
  margin-right: 0.75rem;
}

.navigation-menu {
  display: none;
}

.navigation-link,
.navigation-mobile-link {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 500;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: left;
}

.navigation-link:hover,
.navigation-mobile-link:hover {
  color: #0284c7;
}

/* Desktop navigation links */
.navigation-link {
  width: auto;
  text-align: center;
}

.navigation-mobile-toggle {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  padding: 0.5rem;
  cursor: pointer;
}

.navigation-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-xl);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  height: auto;
}

/* Hide navigation brand in mobile menu when menu is open */
.navigation-mobile-menu.open .navigation-brand {
  display: none;
}

.navigation-mobile-menu.open {
  transform: translateY(0);
}

.navigation-mobile-content {
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow-y: auto;
}

.navigation-mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
  height: 4rem;
}

.navigation-mobile-close {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  padding: 0.5rem;
  cursor: pointer;
  margin-right: -0.5rem; /* Adjust to align with the burger menu position */
}

.navigation-mobile-links {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  flex: 1;
}

.navigation-mobile-link {
  background: none;
  border: none;
  color: var(--foreground);
  font-weight: 500;
  padding: 1rem;
  text-align: left;
  font-size: 1.125rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.navigation-mobile-link:last-child {
  border-bottom: none;
}

.navigation-mobile-link:hover {
  color: var(--primary);
}

/* Hero */
/* Hero */
.hero {
  position: relative;
  height: 100vh; /* Changed from min-height to height to ensure exact viewport height */
  overflow: hidden;
  max-width: 100vw;
}

.hero-background {
  position: absolute;
  inset: 0;
  background-image: url('../Resources/steel-pipelines-cables-plant(4).jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(51, 65, 85, 0.8), rgba(14, 165, 233, 0.0));
}

.hero-container {
  position: relative;
  z-index: 10;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  height: 100%; /* Changed from min-height to height */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center content vertically */
  box-sizing: border-box;
}

.hero-content {
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 11;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-foreground);
  line-height: 1.1;
  margin-bottom: 2rem; /* Increased margin below title */
}

.hero-description-box {
  background-color: transparent;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 2rem 0;
  width: auto;
  max-width: none;
  margin-left: 0;
  text-align: left;
  margin-top: 1rem;
  margin-bottom: 5rem;
}

.hero-description {
  display: none; /* Hidden by default, shown on larger screens */
  font-size: 1.25rem; /* Increased from 1.125rem to 1.25rem */
  color: rgba(241, 245, 249, 0.9);
  padding: 0; /* Ensure no padding affects alignment */
}

.hero-button {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 500;
  width: auto;
  min-width: 200px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.hero-button:hover {
  background-color: #0284c7;
}

.hero-button-icon {
  margin-right: 0.5rem;
}

/* Section header */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

.section-divider {
  width: 6rem;
  height: 0.25rem;
  background-color: var(--primary);
  margin-left: auto;
  margin-right: auto;
}

/* Card */
.card {
  background-color: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.card-content {
  padding: 2rem;
}

/* Button */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.button-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.button-primary:hover {
  background-color: #0284c7;
}

.button-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.button-secondary:hover {
  background-color: #1e293b;
}

.button-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.button-outline:hover {
  background-color: var(--accent);
}

.button-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.button-icon {
  margin-right: 0.5rem;
}

/* Form elements */
.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--input);
  background-color: var(--card);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: var(--foreground);
  transition: var(--transition);
}

.form-input.invalid,
.form-select.invalid,
.form-textarea.invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
}

/* Checkbox */
.form-checkbox {
  border-radius: var(--radius);
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--input);
  background-color: var(--card);
  color: var(--primary);
  accent-color: var(--primary);
}

/* Responsive adjustments */
@media (min-width: 640px) {
  .navigation-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .hero-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .hero-title {
    font-size: 4.5rem;
  }
  
  .hero-subtitle {
    font-size: 2.25rem;
  }
  
  .hero-description-box {
    padding: 2rem;
  }
}

@media (min-width: 768px) {
  .navigation-menu {
    display: flex;
  }
  
  .navigation-mobile-toggle {
    display: none;
  }
  
  .hero-container {
    padding-top: 0;
    height: 100vh;
  }
  
  .hero-content {
    margin-bottom: 4rem;
    display: block;
    height: auto;
    padding-top: 0;
  }
  
  .hero-title {
    font-size: 6rem;
  }
  
  .hero-title::after {
    content: "Eficientes e Fiáveis";
    display: block;
    font-size: 3rem;
    margin-top: 1.3rem;
  }
  
  .hero-description-box {
    margin-left: 0; /* Keep left alignment on larger screens */
    max-width: 40rem;
    padding: 2rem 0; /* Maintain consistent padding */
  }
  
  .hero-description {
    display: block;
    font-size: 1.25rem; /* Increased from 1.125rem to 1.25rem */
    color: rgba(241, 245, 249, 0.9);
    line-height: 1.6;
    padding: 0; /* Ensure no padding affects alignment */
  }
  
  .hero-button {
    width: 400px;
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: 0;
    align-self: auto;
  }
  
  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .navigation-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .hero-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .hero-title {
    font-size: 6rem;
  }
}

/* Mobile-specific styles */
@media (max-width: 767px) {
  .navigation-menu {
    display: none;
  }

  .navigation {
    background-color: rgba(255, 255, 255, 0.75);
  }

  .navigation-mobile-toggle {
    display: block;
  }

  .hero-background {
    background-position: 60% center; /* Move slightly to the left */
  }

  .hero-container {
    padding-top: 0; /* Remove top padding to fit within viewport */
    height: 100vh; /* Ensure exact viewport height */
    padding-bottom: 4rem;
    position: relative; /* Needed for absolute positioning of description */
    max-width: 100vw;
    overflow-x: hidden;
  }

  .hero-content {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    height: 100%;
    padding-top: 1rem; /* Add some top padding to account for fixed navigation */
  }

  .hero-title {
    font-size: 4rem;
    font-weight: 700;
  }

  .hero-description-box {
    width: auto;
    max-width: 55%; /* Limit width to 50% */
    margin: 0;
    z-index: 12; /* Ensure it's above other content */
  }

  .hero-description {
    display: block; /* Show the description on mobile */
    font-size: 1rem;
    color: rgba(241, 245, 249, 1);
    margin: 0;
    line-height: 1.8;
    padding: 0;
    text-align: left;
  }

  .hero-button {
    width: auto;
    min-width: 200px;
    position: absolute;
    bottom: 0;
    margin-top: 2rem;
    z-index: 12;
    background-color: rgba(14, 165, 233, 0.2); /* Match logo color with transparency */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid #0f172a;
    font-weight: 700;
    white-space: nowrap;
    padding: 1rem 2rem;
    color: white; /* Ensure text is visible */
    align-self: center; /* Center the button */
  }
}

/* Popup */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.popup-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.popup-content {
  background-color: white;
  border-radius: 12px;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(1);
  transition: transform 0.3s ease;
}

.popup-overlay.hidden .popup-content {
  transform: scale(0.9);
}

.popup-close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  z-index: 10;
}
