/* -----------------------
   CSS Variables
----------------------- */
:root {
  --primary: #0f766e;
  --primary-light: rgba(15, 118, 109, 0.3);
  --text-dark: #1f2937;
  --text-light: white;
  --bg-light: #f9fafb;
  --border-color: #d1d5db;
  --gray-light: #f3f4f6;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --nav-text: rgb(9, 45, 91);
  --radius-sm: 0.5rem;
  --radius-md: 0.6rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 999px;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* -----------------------
   Base
----------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-light);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('../images/topography.svg') repeat;
  background-size: 500px 500px;
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

/* -----------------------
   Header / Navigation
----------------------- */
.site-header {
  background: var(--primary-light);
  color: var(--text-light);
  padding: 0.8rem 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand a {
  color: var(--text-light);
  font-weight: 700;
  font-size: 1.25rem;
}

/* Flex container for logo + nav */
.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
}

/* Logo styling */
.hero-logo {
  max-width: 150px;
  height: auto;
  display: block;
}

/* Nav links */
.nav {
  display: flex;
  align-items: center;
}

.nav a {
  color: var(--nav-text);
  margin-left: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.nav a:hover {
  color: var(--primary);
}

/* Hamburger menu button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.nav-toggle .hamburger {
  width: 100%;
  height: 3px;
  background-color: var(--primary);
  border-radius: 2px;
  transition: all var(--transition-normal);
  transform-origin: center;
}

/* Hamburger animation when active */
.nav-toggle.active .hamburger:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .hamburger:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .hamburger:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* -----------------------
   Hero
----------------------- */
.hero {
  position: relative;
  background-image: url('/static/images/IMG_2574.JPG');
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-2xl);
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-light);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
}

/* -----------------------
   Buttons
----------------------- */
.btn {
  display: inline-block;
  background: var(--text-light);
  color: var(--primary);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.btn:hover {
  filter: brightness(0.95);
  transform: translateY(-2px);
  text-decoration: none;
}

/* -----------------------
   Gallery
----------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.card {
  background: var(--text-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* -----------------------
   Forms
----------------------- */
form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

form input,
form textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.2);
}

.quote-form .grid.two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* -----------------------
   Flash messages
----------------------- */
.flashes {
  margin: 1rem 0;
}

.flash {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.flash.error {
  background: var(--error-bg);
  color: var(--error-text);
}

.flash.success {
  background: var(--success-bg);
  color: var(--success-text);
}

/* -----------------------
   Tables
----------------------- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--text-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-top: 1rem;
}

.table th,
.table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-light);
  vertical-align: top;
}

.table th {
  background: var(--gray-light);
  text-align: left;
}

/* -----------------------
   Map container
----------------------- */
.map {
  width: 100%;
  height: 420px;
  border-radius: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
}



/* -----------------------
   Footer
----------------------- */
.site-footer {
  margin-top: 3rem;
  background: var(--primary-light);
  color: var(--text-light);
  padding: 1.5rem 0;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-grid div h4 {
  margin-bottom: 0.5rem;
}

.footer-grid div p,
.footer-grid div a {
  margin: 0.2rem 0;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-grid div a.btn {
  margin-top: 0.5rem;
  display: inline-block;
}

/* -----------------------
   Responsive - Mobile
----------------------- */
@media (max-width: 700px) {

  /* Header */
  .header-flex {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .hero-logo {
    max-width: 120px;
  }

  /* Navigation */
  .nav-toggle {
    display: flex !important;
  }

  .nav {
    display: none !important;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
    width: 100%;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 1rem 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .nav.active {
    display: flex !important;
  }

  .nav a {
    margin-left: 0;
    margin-right: 1rem;
    font-size: 1rem;
  }

  /* Hero */
  .hero {
    padding: 2rem 1rem;
  }

  /* Forms */
  .quote-form .grid.two {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-grid div {
    width: 100%;
    max-width: 300px;
  }
}

/* Auth Styles */
.auth-section {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    background: #f5f5f5;
}

.auth-card {
    max-width: 450px;
    margin: 0 auto;
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.auth-card .form-group {
    margin-bottom: 1.25rem;
}

.auth-card .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .auth-card .form-grid {
        grid-template-columns: 1fr;
    }
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group label {
    margin-bottom: 0;
}

.form-checkbox {
    width: auto;
}

.btn-block {
    width: 100%;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.auth-links a {
    color: #28a745;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Quote Form Styles */
.quote-form-section {
    padding: 3rem 0;
}

.quote-form {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .form-grid,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group .required {
    color: #dc3545;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #28a745;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

.form-control::placeholder {
    color: #999;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
}

.error-messages {
    margin-top: 0.5rem;
}

.error-messages .error {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
}

.form-actions {
    text-align: center;
    padding-top: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #28a745;
}

.btn-primary:hover {
    background-color: #218838;
}

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

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #2d5a27 0%, #1a3518 100%);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.125rem;
}

/* Thank You Page */
.thank-you-section {
    padding: 4rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: #f5f5f5;
}

.thank-you-card {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    background: #fff;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.thank-you-card .checkmark {
    width: 80px;
    height: 80px;
    background: #28a745;
    color: #fff;
    font-size: 3rem;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.thank-you-card h1 {
    color: #333;
    margin-bottom: 1rem;
}

.thank-you-card .reference {
    background: #f0f0f0;
    padding: 0.75rem;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.thank-you-card .btn {
    margin-top: 1.5rem;
}