:root {
  --primary-color: #0056b3;
  --secondary-color: #28a745;
  --dark-color: #333;
  --light-color: #f4f4f4;
  --white: #ffffff;
  --accent-color: #ffc107;
  --font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --focus-color: #004494;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--white);
  font-size: 16px;
}

/* Navigation */
header {
  background: var(--white);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-size: 1.25rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  font-weight: 700;
}

.nav-logo:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* Mobile Menu Toggle Button */
.nav-toggle {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  gap: 0.4rem;
}

.nav-toggle-bar {
  width: 25px;
  height: 3px;
  background: var(--dark-color);
  transition: all 0.3s ease;
}

.nav-toggle:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* Mobile menu visible when aria-expanded="true" */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation Menu */
.nav-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--white);
  list-style: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-menu.show {
  display: flex;
}

.nav-menu li {
  border-bottom: 1px solid var(--light-color);
}

.nav-menu a {
  display: block;
  padding: 1rem;
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 600;
  transition:
    background 0.3s,
    color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: var(--light-color);
  color: var(--primary-color);
}

.nav-menu a:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: -3px;
}

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

/* Hero Section */
.hero {
  min-height: 60vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("images/hero.jpg") no-repeat center center/cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--white);
  padding: 2rem 1rem;
}

.hero h1 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 5px;
  transition:
    background 0.3s,
    transform 0.2s;
  border: 2px solid transparent;
  font-weight: 600;
  cursor: pointer;
}

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

.btn:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(0);
}

/* Main Content */
main {
  width: 100%;
}

/* Sections */
section {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

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

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  font-size: 1.75rem;
  position: relative;
  padding-bottom: 1rem;
  color: var(--dark-color);
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary-color);
}

/* Gallery Sections */
.gallery-section {
  margin-bottom: 3rem;
}

.gallery-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--primary-color);
  text-align: center;
}

.gallery-section.section-light {
  background-color: var(--light-color);
  padding: 1.5rem;
  border-radius: 12px;
}

/* About Section */
.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.about-img {
  width: 100%;
}

.about-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.about-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.about-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* Features Section */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.feature {
  padding: 1.5rem;
  background: var(--white);
  border-left: 4px solid var(--primary-color);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition:
    box-shadow 0.3s,
    transform 0.3s;
}

.feature:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.feature h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.feature p {
  font-size: 0.95rem;
  color: #666;
}

/* Gallery Section */
.section-subtitle {
  text-align: center;
  font-size: 1rem;
  color: #666;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  min-height: 320px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.gallery-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.gallery-item figure {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0;
  height: 100%;
}

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

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

.gallery-caption {
  padding: 0.9rem 1rem 1.2rem;
  font-size: 0.95rem;
  color: #444;
  text-align: center;
  background: var(--white);
}

/* Contact Section */
.contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-form {
  background: var(--light-color);
  padding: 1.5rem;
  border-radius: 8px;
}

.contact-form h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.form-feedback {
  margin-top: 1rem;
  padding: 1rem;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  font-weight: 600;
}

.contact-info {
  background: var(--white);
}

.contact-info h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.contact-info h3 {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 1rem;
  line-height: 1.8;
  font-size: 0.95rem;
}

.contact-map {
  margin-top: 1.5rem;
}

.contact-map iframe {
  width: 100%;
  height: 300px;
  border: 2px solid #ddd;
  border-radius: 8px;
}

/* Footer */
footer {
  background: var(--dark-color);
  color: var(--white);
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

footer p {
  margin: 0;
}

/* Social Media Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s;
  font-size: 1.1rem;
}

.social-links a:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

.social-links a:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* Large Social Links (Contact Page) */
.social-links-large {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-links-large a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--light-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}

.social-links-large a:hover {
  background: var(--primary-color);
  color: var(--white);
}

.social-links-large a:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

.social-links-large i {
  font-size: 1.2rem;
}

/* Responsive Design - Mobile First */
@media (min-width: 640px) {
  nav {
    padding: 1rem 2rem;
  }

  .nav-logo {
    font-size: 1.5rem;
  }

  .hero {
    min-height: 70vh;
    padding: 3rem 2rem;
  }

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

  .hero p {
    font-size: 1.1rem;
  }

  section {
    padding: 3rem 2rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

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

  .contact-form {
    padding: 2rem;
  }

  .contact-map iframe {
    height: 320px;
  }

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

  .gallery-item {
    height: 280px;
  }
}

@media (min-width: 768px) {
  nav {
    padding: 1rem 2rem;
  }

  .nav-toggle {
    display: none;
  }

  .nav-menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: transparent;
    box-shadow: none;
  }

  .nav-menu li {
    border-bottom: none;
    margin-left: 2rem;
  }

  .nav-menu a {
    padding: 0.5rem 0;
    font-size: 0.95rem;
  }

  .nav-menu a.active {
    border-bottom: 2px solid var(--primary-color);
    background: transparent;
  }

  .hero {
    min-height: 80vh;
    padding: 4rem 2rem;
  }

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

  .hero p {
    font-size: 1.2rem;
  }

  section {
    padding: 4rem 2rem;
  }

  .section-title h2 {
    font-size: 2.5rem;
  }

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

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

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

  .contact-map iframe {
    height: 350px;
  }

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

  .gallery-item {
    height: 300px;
  }
}

@media (min-width: 1024px) {
  nav {
    padding: 1.5rem 3rem;
    max-width: 1400px;
  }

  section {
    padding: 5rem 3rem;
    max-width: 1400px;
  }

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

  .section-title h2 {
    font-size: 2.75rem;
  }

  .btn {
    padding: 0.9rem 2.5rem;
    font-size: 1.05rem;
  }

  .gallery-item {
    height: 330px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .btn {
    border: 2px solid currentColor;
  }

  .feature {
    border-left: 5px solid var(--primary-color);
  }
}

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