* {
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  background-color: #f8fafc;
  color: #1f2937;
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.container {
  max-width: 100vw; /* Use viewport width for mobile */
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  background-color: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  min-height: 100vh;
  overflow-x: hidden; /* Prevent container overflow */
  height: auto;
}

header {
  padding: 32px;
  background-color: #1a73e8;
  color: #ffffff;
  border-radius: 8px;
  text-align: center;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.logo {
  max-width: 120px;
  height: auto;
}

.header-text {
  flex: 1;
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
}

header p {
  margin: 12px 0;
  font-size: 1.25rem;
  font-weight: 300;
}

.cta-button {
  display: inline-block;
  background-color: #10b981;
  color: #ffffff;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 6px;
  margin-top: 16px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #059669;
}

nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 16px 0;
  background-color: #1f2937;
  border-radius: 8px;
  margin: 24px 0;
  overflow-x: hidden; /* Prevent nav overflow */
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #ffffff;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 24px;
  transition: max-height 0.3s ease, opacity 0.3s ease; /* Smooth transition */
  max-height: 500px; /* Prevent layout shift */
  opacity: 1;
}

.nav-links.active {
  max-height: 1000px; /* Allow expansion */
  opacity: 1;
}

.nav-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.home-button {
  background-color: #f43f5e;
  padding: 8px 16px;
  border-radius: 6px;
}

.home-button:hover {
  background-color: #e11d48;
  color: #ffffff;
}

.content-sections {
  display: block;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent content overflow */
}

section {
  margin: 32px 0;
  padding: 24px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

section h2 {
  color: #1f2937;
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-subtitle {
  text-align: center;
  font-size: 1.125rem;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: 24px;
}

.info-container {
  margin: 32px 0;
  padding: 24px;
  background-color: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
}

.services-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  text-align: center;
}

section#services .services-grid li {
  padding: 16px;
  background-color: #f9fafb;
  border: 2px solid #1a73e8;
  border-radius: 8px;
}

section#services .services-grid li strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  text-align: center;
}

section#testimonials .testimonial-grid .testimonial {
  padding: 20px;
  background-color: #f9fafb;
  border: 2px solid #1a73e8;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.testimonial p {
  font-style: italic;
  color: #374151;
  font-size: 1rem;
}

.testimonial h3 {
  margin: 12px 0 0;
  color: #1a73e8;
  font-size: 1.125rem;
  font-weight: 600;
}

.testimonial .meta {
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 8px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
}

input, select, textarea {
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
  color: #1f2937;
  background-color: #ffffff;
}

textarea {
  resize: vertical;
}

button {
  padding: 12px;
  background-color: #1a73e8;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #2563eb;
}

button:disabled {
  background-color: #6b7280;
  cursor: not-allowed;
}

.success-message {
  display: block;
  color: #10b981;
  text-align: center;
  margin-top: 12px;
  font-weight: 500;
}

.error-message {
  color: #ef4444;
  text-align: center;
  margin-top: 12px;
  font-weight: 500;
}

.why-hire-us-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  text-align: left;
}

section#why-hire-us .why-hire-us-grid div {
  padding: 16px;
  background-color: #f9fafb;
  border: 2px solid #1a73e8;
  border-radius: 8px;
}

.why-hire-us-grid h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  text-align: left;
}

section#faqs .faq-grid .faq-item {
  padding: 16px;
  background-color: #f9fafb;
  border: 2px solid #1a73e8;
  border-radius: 8px;
  max-width: 800px;
  margin: 0 auto 24px;
}

.faq-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.blog-post {
  max-width: 800px;
  margin: 0 auto 24px;
  padding: 20px;
  background-color: #f9fafb;
  border: 2px solid #1a73e8;
  border-radius: 8px;
  text-align: left;
}

.blog-post h3 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 12px;
}

.blog-post .meta {
  color: #6b7280;
  font-style: italic;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.blog-post p {
  margin-bottom: 16px;
}

.blog-image {
  max-width: 200px;
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0 auto 12px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.gallery-item {
  background-color: #f9fafb;
  padding: 16px;
  border: 2px solid #1a73e8;
  border-radius: 8px;
  text-align: center;
}

.gallery-image {
  max-width: 200px;
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0 auto 12px;
}

footer {
  padding: 32px;
  background-color: #1f2937;
  color: #ffffff;
  border-radius: 8px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.footer-grid h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
}

.footer-grid ul li {
  margin-bottom: 12px;
}

.footer-grid a {
  color: #e2e8f0;
  text-decoration: none;
}

.footer-grid a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  margin-top: 24px;
  font-size: 0.875rem;
}

#admin-panel div {
  margin: 32px 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

#admin-panel div h2 {
  color: #1f2937;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

#admin-panel div p {
  margin: 12px 0;
}

#blogs-list, #bookings-list, #reviews-list {
  text-align: left;
  max-width: 800px;
  margin: 0 auto;
}

#blogs-list div, #bookings-list div, #reviews-list div {
  margin-bottom: 24px;
  padding: 16px;
  background-color: #f9fafb;
  border: 2px solid #1a73e8;
  border-radius: 8px;
}

#edit-blog-modal, #edit-booking-modal, #quote-modal, #edit-review-modal, #edit-gallery-modal {
  background-color: #ffffff;
  padding: 24px;
  border: 2px solid #1a73e8;
  border-radius: 8px;
  max-width: 640px;
  margin: 24px auto;
  overflow-x: hidden; /* Prevent modal overflow */
}

@media (max-width: 768px) {
  .container {
    padding: 16px;
    border: none;
    max-width: 100vw; /* Ensure full viewport width */
  }

  .header-content {
    flex-direction: column;
    gap: 16px;
  }

  .logo {
    max-width: 80px;
  }

  header h1 {
    font-size: 2rem;
  }

  header p {
    font-size: 1rem;
  }

  nav {
    flex-direction: column;
    gap: 12px;
    overflow-x: hidden; /* Prevent nav overflow */
  }

  .nav-toggle {
    display: block;
    align-self: flex-start;
    margin-left: 16px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    text-align: center;
    max-height: 0; /* Collapsed by default */
    opacity: 0;
  }

  .nav-links.active {
    display: flex;
    max-height: 1000px; /* Allow expansion */
    opacity: 1;
  }

  .content-sections {
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent content overflow */
  }

  section {
    padding: 16px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-grid, .why-hire-us-grid, .faq-grid, .gallery-grid {
    grid-template-columns: 1fr;
  }

  .info-container {
    padding: 16px;
    border: none;
  }

  .faq-item, .blog-post, .gallery-item, .testimonial {
    max-width: 100%;
    margin: 0 auto 16px;
  }

  #admin-panel div, #edit-blog-modal, #edit-booking-modal, #quote-modal, #edit-review-modal, #edit-gallery-modal {
    max-width: 100%;
    margin: 16px auto;
  }

  .gallery-image, .blog-image {
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }

  header p {
    font-size: 0.875rem;
  }

  .logo {
    max-width: 60px;
  }

  .gallery-image, .blog-image {
    max-width: 220px;
  }
}
