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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #0066cc;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

/* Container and Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4rem 0;
}

.section-sm {
  padding: 2rem 0;
}

/* Color System */
:root {
  --primary-color: #fd9700;
  --primary-dark: #e8890a;
  --secondary-color: #f8f9fa;
  --secondary-dark: #e9ecef;
  --accent-color: #fd9700;
  --text-dark: #333;
  --text-light: #666;
  --border-color: #e9ecef;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

/* Header */
.header {
  background: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 60px;
  width: auto;
}

.nav-desktop {
  display: none;
}

.nav-desktop ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-desktop a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s;
}

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

.cta-header {
  display: none;
}

.mobile-menu-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  background-color: var(--secondary-color);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  z-index: 200;
  padding: 2rem;
  overflow-y: auto;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 150;
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  margin-bottom: 2rem;
  padding: 0.5rem;
  border-radius: 4px;
}

.mobile-menu ul {
  list-style: none;
  margin-bottom: 2rem;
}

.mobile-menu li {
  margin-bottom: 1rem;
}

.mobile-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 1.1rem;
  font-weight: 500;
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  transition: color 0.3s;
}

.mobile-menu a:hover,
.mobile-menu a:focus {
  color: var(--primary-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  line-height: 1.5;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

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

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

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-mobile-cta {
  width: 100%;
  background: var(--accent-color);
  color: white;
  font-size: 1.1rem;
  padding: 1rem;
  margin-top: 1rem;
}

/* Hero Section - Dynamic sizing rule implementation */
.hero {
  min-height: 100vh; /* Fallback for older browsers */
  min-height: 100dvh; /* Dynamic viewport height for modern browsers */
  display: flex;
  align-items: center;
  background-image: url('../images/ggghero.webp');
  background-size: cover;
  background-position: center top 37%;
  background-repeat: no-repeat;
  color: white;
  position: relative;
  overflow: hidden;
}

/* Cap hero height on very large screens */
@media (min-width: 1536px) {
  .hero {
    min-height: 75vh;
  }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subhead {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.hero-badges {
  background: rgba(255,255,255,0.1);
  padding: 1rem;
  border-radius: 8px;
  margin: 2rem 0;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-cta-single {
  margin-top: 2rem;
  text-align: center;
}

/* Grid Systems */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: 1fr;
}

/* Cards */
.card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.card ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.card li {
  padding: 0.25rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* Process Steps */
.process-grid {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.process-step {
  text-align: center;
  padding: 1.5rem;
  background: var(--secondary-color);
  border-radius: 8px;
  position: relative;
  border: 1px solid var(--secondary-dark);
}

.process-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.process-number {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--primary-color);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Testimonials */
.testimonial {
  background: var(--secondary-color);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  position: relative;
  border: 1px solid var(--secondary-dark);
}

.testimonial::before {
  content: '"';
  font-size: 4rem;
  color: var(--primary-color);
  position: absolute;
  top: -10px;
  left: 20px;
  font-family: serif;
}

.testimonial-quote {
  font-style: italic;
  margin-bottom: 1rem;
  padding-top: 1rem;
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary-color);
}

/* Gallery */
.gallery-grid {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
}

.faq-question {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover,
.faq-question:focus {
  color: var(--primary-color);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--text-light);
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding-top: 1rem;
}

.faq-toggle {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0,102,204,0.2);
}

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

.form-required {
  color: #dc3545;
}

.form-success,
.form-error {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: none;
}

.form-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Contact Info */
.contact-info {
  background: var(--secondary-color);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border: 1px solid var(--secondary-dark);
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.contact-icon {
  font-size: 1.2rem;
  color: var(--primary-color);
  width: 24px;
  text-align: center;
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover,
.footer-section a:focus {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #555;
  padding-top: 1rem;
  text-align: center;
  color: #ccc;
  font-size: 0.9rem;
}

/* CTA Sections */
.cta-section {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 3rem 0;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

.hidden { display: none; }
.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;
}

/* Focus Styles for Accessibility */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Responsive Design - Mobile First */
@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
  
  .nav-desktop {
    display: block;
  }
  
  .cta-header {
    display: block;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
  
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .hero-subhead {
    font-size: 1.5rem;
  }
  
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .process-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 4rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .hero-ctas {
    flex-wrap: nowrap;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .mobile-menu,
  .btn,
  .lightbox {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    page-break-inside: avoid;
  }
  
  .card {
    break-inside: avoid;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --shadow: 0 2px 10px rgba(0,0,0,0.3);
    --border-color: #000;
  }
  
  .card {
    border: 2px solid #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
