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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Performance optimizations */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

:root {
  --primary-color: #2B2B2B;
  --primary-hover: #2B2B2B;
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(0, 0%, 15%);
  --secondary-bg: hsl(0, 0%, 96%);
  --muted-foreground: hsl(0, 0%, 30%);
  --border: hsl(0, 0%, 90%);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

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

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

/* Accessibility - Focus states */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

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

/* Header Styles */
.header {
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  font-size: 1.875rem;
  font-weight: normal;
  color: #2B2B2B;
  cursor: pointer;
}

.logo-link {
  display: inline-block;
  cursor: pointer !important;
  transition: opacity 0.3s ease;
}

.logo-link:hover {
  opacity: 0.7;
}

.logo-link:hover .logo {
  cursor: pointer;
}

/* Hamburger Menu Button */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 100;
}

.hamburger span {
  width: 32px;
  height: 3px;
  background-color: var(--foreground);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* Mobile Navigation */
.nav {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background-color: var(--background);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, box-shadow 0.3s ease;
  box-shadow: none;
  z-index: 40;
}

.nav.active {
  max-height: 300px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav a {
  color: var(--foreground);
  font-weight: 500;
  transition: all 0.3s;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.nav a:hover {
  opacity: 0.6;
  background-color: var(--secondary-bg);
}

/* Hero Section */
.hero {
  position: relative;
  height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3));
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  text-transform: uppercase;
  margin-bottom: 2rem;
  line-height: 1.2;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-weight: bold;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
}

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

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

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

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

.section > .container {
  padding: 5rem 1rem;
}

.section-secondary {
  background-color: var(--secondary-bg);
}

/* Intro Section */
.intro-section {
  text-align: center;
  max-width: 56rem;
  margin: 0 auto;
}

.intro-section h2 {
  font-size: 1.875rem;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.intro-section p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.service-card {
  background: transparent;
  perspective: 1000px;
  height: auto;
  min-height: 360px;
}

.service-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.service-card.flipped .service-card-inner {
  transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  min-height: 360px;
  backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
}

.service-card-front {
  background: white;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.service-card:hover .service-card-front {
  box-shadow: var(--hover-shadow);
}

.service-card-back {
  background: white;
  border: 1px solid var(--border);
  transform: rotateY(180deg);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar for card back */
.service-card-back::-webkit-scrollbar {
  width: 8px;
}

.service-card-back::-webkit-scrollbar-track {
  background: var(--secondary-bg);
  border-radius: 4px;
}

.service-card-back::-webkit-scrollbar-thumb {
  background: #d1d1d1;
  border-radius: 4px;
}

.service-card-back::-webkit-scrollbar-thumb:hover {
  background: #b8b8b8;
}

.service-image {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
  background-color: var(--secondary-bg);
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

.service-content {
  padding: 1.5rem;
}

.service-content h3 {
  font-size: 1.75rem;
  font-weight: normal;
  margin-bottom: 0;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  user-select: none;
}

.service-content h3:hover {
  opacity: 0.6;
}

.title-arrow {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.service-content h3:hover .title-arrow {
  transform: translateX(5px);
}

/* Close button for flipped cards */
.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s;
  z-index: 10;
  padding: 0;
}

.close-btn::before,
.close-btn::after {
  content: '';
  position: absolute;
  width: 32px;
  height: 3px;
  background-color: var(--foreground);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.close-btn::before {
  transform: rotate(45deg);
}

.close-btn::after {
  transform: rotate(-45deg);
}

.close-btn:hover {
  opacity: 0.6;
}

/* Service back content */
.service-back-content {
  padding: 3rem 2rem 2rem 2rem;
}

.service-back-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted-foreground);
  margin-bottom: 1.25rem;
  text-align: left;
}

.service-back-content p:last-child {
  margin-bottom: 0;
}

/* Two Column Layout */
.two-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

.two-column-content h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.two-column-content h2 {
  font-size: 2.25rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

.two-column-content p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.two-column-content ul {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin: 0;
  padding-left: 2rem;
  list-style-position: outside;
}

.two-column-content ul li {
  margin-bottom: 0.5rem;
}

/* Certification List Styles */
.certification-list {
  list-style: none;
  padding-left: 0;
}

.certification-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cert-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.two-column-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.two-column-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Footer */
.footer {
  background-color: var(--foreground);
  color: var(--background);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h3 {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.footer .footer-logo {
  font-size: 1.5rem;
  font-weight: normal;
  color: white;
}

.footer h4 {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.footer p {
  font-size: 0.875rem;
  opacity: 0.8;
}

.footer ul {
  list-style: none;
}

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

.footer ul li a {
  font-size: 0.875rem;
  opacity: 0.8;
  transition: color 0.3s;
}

.footer ul li a:hover {
  color: #cccccc;
}

.social-link {
  display: inline-block;
  margin-top: 0.5rem;
}

.social-icon {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
  transition: opacity 0.3s;
}

.social-link:hover .social-icon {
  opacity: 0.8;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.6;
}

/* Responsive Design */
@media (min-width: 768px) {
  .hamburger {
    display: none;
  }

  .nav {
    position: static;
    flex-direction: row;
    gap: 2rem;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    padding: 0;
  }

  .nav a {
    padding: 0;
    border-bottom: none;
  }

  .nav a:hover {
    opacity: 0.6;
    background-color: transparent;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-back-content {
    padding: 3.5rem 2.5rem 2.5rem 2.5rem;
  }

  .service-back-content p {
    font-size: 1.05rem;
  }

  .two-column {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 4.5rem;
  }

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

  .two-column-content h2 {
    font-size: 2.5rem;
  }
}

/* Mobile adjustments for service cards */
@media (max-width: 767px) {
  .service-card {
    min-height: 430px;
  }

  .service-card-front,
  .service-card-back {
    min-height: 430px;
  }

  .service-back-content {
    padding: 3rem 1.5rem 2rem 1.5rem;
  }

  .service-back-content p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .close-btn {
    width: 28px;
    height: 28px;
    top: 0.75rem;
    right: 0.75rem;
  }

  .close-btn::before,
  .close-btn::after {
    width: 28px;
  }
}

/* Contact Methods Styles */
.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  text-decoration: none;
  color: #2B2B2B;
  transition: opacity 0.2s ease;
}

.contact-card:hover {
  opacity: 0.7;
}

.contact-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #2B2B2B;
  flex-shrink: 0;
  filter: grayscale(100%);
  border: 2px solid #2B2B2B;
  border-radius: 8px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  font-weight: 500;
}

.contact-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2B2B2B;
}

@media (max-width: 768px) {
  .contact-methods {
    margin-top: 1.25rem;
  }
  
  .contact-card {
    padding: 0.875rem 1rem;
    gap: 0.875rem;
  }
  
  .contact-icon {
    font-size: 1.25rem;
    width: 36px;
    height: 36px;
  }
  
  .contact-value {
    font-size: 1rem;
  }
}

/* Services CTA Section */
.services-cta {
  text-align: center;
  margin-top: 4rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #2B2B2B 0%, #1a1a1a 100%);
  border-radius: 12px;
  color: white;
}

.services-cta h3 {
  font-size: 1.875rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: white;
}

.services-cta p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.services-cta .btn {
  background-color: white;
  color: #2B2B2B;
  font-weight: bold;
  padding: 1rem 2.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.services-cta .btn:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Enhanced Service Card Content */
.service-content p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* Business Info Section */
.business-info {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--secondary-bg);
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.business-info h4 {
  font-size: 1.125rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.business-info ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.business-info ul li {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.business-info ul li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}
