/* ==========================================================================
   Base Styles and CSS Variables
   ========================================================================== */

:root {
  /* Colors */
  --primary-green: #277a08;
  --accent-yellow: #ffd300;
  --footer-blue: #003192;
  --bg-light: #f9fafb;
  --text-dark: #333333;
  --text-light: #ffffff;
  --border-light: #e5e7eb;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 2rem;
  --space-l: 4rem;
  
  /* Typography */
  --font-body: 1rem;
  --font-small: 0.875rem;
  --font-subheading: 1.25rem;
  --font-h3: 1.5rem;
  --font-h2: 2rem;
  --font-h1: 3rem;
  
  /* UI Elements */
  --radius: 8px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: 'ff-cocon-pro', sans-serif;
  background: #fff;
  color: var(--text-dark);
  font-size: var(--font-body);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'ff-cocon-pro', sans-serif;
  margin-bottom: var(--space-s);
  line-height: 1.2;
  color: var(--primary-green);
}

p {
  margin-bottom: var(--space-s);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary-green);
  text-decoration: underline;
  transition: var(--transition);
}

a:hover, a:focus {
  color: var(--accent-yellow);
}

ul, ol {
  padding-left: var(--space-m);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-s);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Header and Navigation
   ========================================================================== */

.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(39, 122, 8, 0.05);
  padding: var(--space-s) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-m);
}

.header__logo-link {
  text-decoration: none;
  display: block;
}

.header__logo {
  height: 56px;
  width: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-xs) var(--space-s);
  transition: var(--transition);
}

.header__logo:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.header__nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--primary-green);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-xs);
  transition: var(--transition);
}

.header__nav-toggle:hover, .header__nav-toggle:focus {
  color: var(--accent-yellow);
}

.header__nav-list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__nav-item {
  position: relative;
}

.header__nav-link {
  text-decoration: none;
  color: var(--primary-green);
  font-weight: bold;
  font-size: var(--font-subheading);
  padding: var(--space-xs) var(--space-s);
  border-radius: var(--radius);
  transition: var(--transition);
  display: block;
}

.header__nav-link:hover, .header__nav-link:focus, .header__nav-link.active {
  background: var(--accent-yellow);
  color: var(--primary-green);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ==========================================================================
   Buttons and Links
   ========================================================================== */

.btn {
  display: inline-block;
  background: var(--accent-yellow);
  color: var(--primary-green);
  padding: var(--space-xs) var(--space-m);
  border-radius: var(--radius);
  font-weight: bold;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn:hover, .btn:focus {
  background: var(--primary-green);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn--primary {
  background: var(--primary-green);
  color: var(--text-light);
}

.btn--primary:hover, .btn--primary:focus {
  background: var(--accent-yellow);
  color: var(--primary-green);
}

.btn--secondary {
  background: transparent;
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
}

.btn--secondary:hover, .btn--secondary:focus {
  background: var(--primary-green);
  color: var(--text-light);
}

.link-secondary {
  color: var(--primary-green);
  text-decoration: underline;
  font-weight: 500;
  transition: var(--transition);
  display: inline-block;
  margin-bottom: var(--space-xs);
}

.link-secondary:hover, .link-secondary:focus {
  color: var(--accent-yellow);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-yellow) 100%);
  color: var(--primary-green);
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero__overlay {
  background: rgba(255, 255, 255, 0.9);
  padding: var(--space-m);
  max-width: 800px;
  width: 90%;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero__title {
  font-size: var(--font-h1);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
  margin-bottom: var(--space-s);
  color: var(--primary-green);
}

.hero__subtitle {
  font-size: var(--font-subheading);
  margin-bottom: var(--space-m);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-s);
}

.hero__cta .btn {
  margin: 0;
}

/* ==========================================================================
   Section Common Styles
   ========================================================================== */

.section {
  padding: var(--space-l) 0;
}

.section__heading {
  font-size: var(--font-h2);
  text-align: center;
  margin-bottom: var(--space-m);
  color: var(--primary-green);
  position: relative;
}

.section__heading::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent-yellow);
  margin: var(--space-xs) auto var(--space-m);
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about {
  background: var(--bg-light);
}

.about__content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about__core-values {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin-top: var(--space-m);
}

.about__value {
  background: var(--accent-yellow);
  color: var(--primary-green);
  padding: var(--space-xs) var(--space-s);
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
}

.about__value:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services {
  background: #fff;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-m);
}

.services__card {
  background: #fff;
  padding: var(--space-m);
  text-align: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
}

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

.services__icon {
  font-size: 2.5rem;
  color: var(--accent-yellow);
  margin-bottom: var(--space-s);
  display: block;
}

.services__title {
  font-size: var(--font-h3);
  margin-bottom: var(--space-xs);
}

.services__description {
  margin-bottom: 0;
}

/* ==========================================================================
   Locations & Contact Section
   ========================================================================== */

.locations {
  background: var(--bg-light);
}

.locations__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-m);
  margin-bottom: var(--space-l);
}

.locations__card {
  background: #fff;
  padding: var(--space-m);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.locations__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.locations__title {
  margin-top: 0;
  font-size: var(--font-h3);
}

.locations__address {
  font-style: normal;
  margin-bottom: var(--space-s);
}

.locations__phone {
  text-decoration: none;
  font-weight: bold;
}

.locations__actions {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-s);
}

.locations__hours {
  margin: var(--space-s) 0;
}

.locations__hours-title {
  font-size: var(--font-subheading);
  margin-bottom: var(--space-xs);
}

.locations__hours-list {
  display: grid;
  gap: var(--space-xs);
}

.locations__hours-item {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-small);
}

.locations__social {
  margin-top: auto;
  padding-top: var(--space-s);
  display: flex;
  flex-direction: column;
}

/* Contact Form */
.contact-form {
  background: #fff;
  padding: var(--space-m);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto;
}

.contact-form__heading {
  text-align: center;
  margin-bottom: var(--space-m);
}

.contact-form__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-weight: bold;
  color: var(--primary-green);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: var(--transition);
  font-family: inherit;
  font-size: inherit;
}

.form-control:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(39, 122, 8, 0.25);
  border-color: var(--primary-green);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--footer-blue);
  color: var(--text-light);
  padding: var(--space-m) 0;
  text-align: center;
}

.footer__social {
  display: flex;
  justify-content: center;
  gap: var(--space-s);
  margin-bottom: var(--space-s);
}

.footer__social a {
  color: var(--accent-yellow);
  font-size: 1.5rem;
  transition: var(--transition);
  text-decoration: none;
}

.footer__social a:hover, .footer__social a:focus {
  color: var(--text-light);
  transform: translateY(-3px);
}

.footer__credit {
  font-size: var(--font-small);
}

.footer__credit p {
  margin: var(--space-xs) 0;
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: var(--space-m);
  right: var(--space-m);
  background: var(--accent-yellow);
  color: var(--primary-green);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  z-index: 99;
}

.back-to-top:hover, .back-to-top:focus {
  background: var(--primary-green);
  color: var(--text-light);
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.back-to-top.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

/* ==========================================================================
   Animation Classes
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 576px) {
  :root {
    --font-h1: 2rem;
    --font-h2: 1.75rem;
    --font-h3: 1.25rem;
  }
  
  .hero {
    height: 70vh;
  }
  
  .hero__overlay {
    width: 95%;
    padding: var(--space-s);
  }
  
  .services__grid {
    grid-template-columns: 1fr;
  }
  
  .locations__grid {
    grid-template-columns: 1fr;
  }
  
  .back-to-top {
    bottom: var(--space-s);
    right: var(--space-s);
    width: 40px;
    height: 40px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 768px) {
  .header__content {
    flex-wrap: wrap;
  }
  
  .header__nav-toggle {
    display: block;
  }
  
  .header__nav {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .header__nav.open {
    max-height: 300px;
  }
  
  .header__nav-list {
    flex-direction: column;
    gap: 0;
    margin-top: var(--space-s);
  }
  
  .header__nav-link {
    padding: var(--space-s);
    border-radius: 0;
  }
  
  .hero__cta {
    flex-direction: column;
    align-items: center;
  }
  
  .hero__cta .btn {
    width: 100%;
    max-width: 250px;
  }
  
  .about__core-values {
    flex-direction: column;
    align-items: center;
  }
  
  .about__value {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }
  
  .locations__actions {
    flex-direction: column;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .hero__title {
    font-size: 3.5rem;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container {
    padding: 0 var(--space-m);
  }
}