/*
 * Global styles for Mega‑Rich Aircon Services website
 */

/* Reset & base typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fdfdfd;
}

h1,
h2,
h3 {
  font-weight: 600;
  color: #0a3d62;
}

p {
  margin-bottom: 1rem;
}

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

ul {
  list-style: none;
}

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

/* Utility classes */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: #0a3d62;
  color: #fff;
}

.btn-primary:hover {
  background-color: #062c48;
}

/* Secondary button (used in nav for booking) */
.nav-book {
  background-color: #e67e22;
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.nav-book:hover {
  background-color: #cf711e;
}

.nav-book.active {
  background-color: #cf711e;
}

/* Navigation bar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

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

.navbar .brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0a3d62;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center; /* center nav items vertically for pleasant alignment */
}

.nav-links a {
  font-weight: 500;
  color: #0a3d62;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #e67e22;
}

/* Hero section */
.hero {
  position: relative;
  min-height: 90vh;
  /* Use an optimised JPEG version of the hero image for better performance */
  background: url('assets/hero12.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 61, 98, 0.6); /* lighter overlay */
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 2rem;
  color: #ffffff;
  margin-top: auto;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
  margin-top: auto;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: #fff;
}

.hero .btn-primary {
  background-color: #ffffff;
  color: #0a3d62;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.hero .btn-primary:hover {
  background-color: #e0e0e0;
}

/* Responsive styles for smaller screens */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-container {
    padding: 1.5rem;
  }
}


/* Services */
.services {
  padding: 4rem 0;
}

.service-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 2rem;
}

.service-card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.08);
}

.service-icon {
  font-size: 2rem;
  color: #0a3d62;
  margin-bottom: 0.75rem;
}

/* About */
.about {
  background-color: #f5f7fa;
  padding: 4rem 0;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.about-text {
  flex: 1 1 300px;
}

.about-image {
  flex: 1 1 350px;
}

.about-image img {
  border-radius: 6px;
}

/* Testimonials */
.testimonials {
  padding: 4rem 0;
}

.testimonial-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 2rem;
}

.testimonial {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 6px;
  border-left: 4px solid #0a3d62;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.testimonial cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-weight: 600;
  color: #0a3d62;
}

/* Preventive maintenance section */
.preventive {
  background-color: #f5f7fa;
  padding: 4rem 0;
  text-align: center;
}

/* Intro paragraph inside preventive section */
.preventive > p {
  max-width: 800px;
  margin: 0 auto;
  color: #555;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Grid for maintenance benefits */
.preventive-grid {
  display: grid;
  gap: 2rem;
  /* Support up to four cards while still adapting on smaller screens */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1rem;
}

.preventive-grid img {
  max-width: 100%;
  width: 120px;
  margin: 0 auto;
  display: block;
}

@media (max-width: 480px) {
  .preventive-grid {
    gap: 1rem;
  }
}


.preventive-item {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  /* Increase internal padding for breathing room and add external margin to
     prevent cards from appearing flush against each other or the container
     edges. */
  padding: 2rem;
  margin: 0.5rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preventive-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.08);
}

.preventive-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.preventive-icon {
  font-size: 3rem;
  color: #0a3d62;
  margin-bottom: 1rem;
}

/* How it works section */
.how {
  padding: 4rem 0;
  text-align: center;
}
.how p {
  max-width: 700px;
  margin: 0 auto 2rem auto;
  color: #555;
}
.how-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 1rem;
}
.how-item {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.how-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.08);
}
.how-item i {
  font-size: 2rem;
  color: #0a3d62;
  margin-bottom: 0.5rem;
}
.how-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.how-item p {
  color: #555;
  line-height: 1.5;
}

/* Trusted logos row */
.trusted {
  margin-top: 2rem;
}

.trusted-logos {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.trusted-logos i {
  font-size: 2rem;
  color: #e67e22;
}

/* Why choose us section */
.why-us {
  padding: 4rem 0;
}

/*
 * Combined "Why Choose Us" and trusted brands section
 * The two columns stack on smaller screens and display side‑by‑side on
 * desktops. A vertical border separates them on wider viewports for a
 * clear distinction. Icons use FontAwesome check marks and the logos
 * reuse our existing client images.
 */
.choose-trusted {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
  align-items: flex-start;
}
.choose-reasons {
  flex: 1 1 260px;
  padding-right: 2rem;
  border-right: 1px solid #e0e0e0;
}
.choose-reasons h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #0a3d62;
}
.reasons-list {
  list-style: none;
  padding-left: 0;
}
.reasons-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: #555;
}
.reasons-list li i {
  color: #e67e22;
  margin-right: 0.75rem;
  font-size: 1.2rem;
  margin-top: 0.15rem;
}
.reasons-list li span {
  display: block;
}
.choose-logos {
  flex: 1 1 260px;
  padding-left: 2rem;
  text-align: center;
}
.choose-logos h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #0a3d62;
  text-align: center;
}
.choose-logos .client-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}
.choose-logos .client-logos img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.5rem;
  background-color: #fafafa;
}

/* Remove vertical divider on small screens */
@media (max-width: 768px) {
  .choose-reasons {
    border-right: none;
    padding-right: 0;
  }
  .choose-logos {
    padding-left: 0;
    text-align: center;
  }
}

/* Status label for unscheduled events in admin dashboard */
.status-nodate {
  background-color: #fadbd8;
  color: #c0392b;
}

/* Add padding to hero on small screens so the fixed navbar doesn't overlap the headline */
@media (max-width: 768px) {
  .hero {
    padding-top: 5rem;
  }
}
.why-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 2rem;
}
.why-item {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.why-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.08);
}
.why-item i {
  font-size: 2rem;
  color: #0a3d62;
  margin-bottom: 0.5rem;
}
.why-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.why-item p {
  font-size: 0.95rem;
  color: #555;
}

/* Call-to-action section */
.cta {
  background-color: #e67e22;
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.cta h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}
.cta p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #fff;
}
.cta .btn-primary {
  background-color: #fff;
  color: #e67e22;
}
.cta .btn-primary:hover {
  background-color: #fef9f3;
  color: #cf711e;
}

/* Contact */
.contact {
  background-color: #f5f7fa;
  padding: 4rem 0;
  text-align: center;
}

/* Booking page section */
.book-section {
  margin-top: 5rem;
  padding: 4rem 0;
}

.book-section .section-subtitle {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #555;
  text-align: center;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: flex-start;
  text-align: center;
}

.contact-info {
  flex: 1 1 280px;
  text-align: center;
}

.contact-details li {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  color: #0a3d62;
}

.contact-details {
  display: inline-block;
  text-align: left;
  margin: 0 auto;
}

.contact-details i {
  margin-right: 0.75rem;
  font-size: 1.2rem;
}

.contact-form-wrapper {
  flex: 1 1 320px;
  background-color: #fff;
  padding: 2rem;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.contact-form .form-group {
  margin-bottom: 1rem;
}

.contact-form label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: #0a3d62;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

/* Style select fields similarly to inputs */
.contact-form select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  background-color: #fff;
}

.contact-form button {
  margin-top: 0.5rem;
  width: 100%;
}

.form-message {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #0a3d62;
}

/* Footer */
.footer {
  background-color: #0a3d62;
  color: #fff;
  text-align: center;
  padding: 1rem 0;
}

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

/* Admin dashboard styles */
.admin-dashboard {
  margin-top: 5rem; /* account for fixed navbar */
  padding-bottom: 3rem;
}

.admin-dashboard .card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

.admin-calendar #calendar {
  margin-top: 1rem;
}

.customer-list .customer-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.customer-header {
  font-weight: 600;
  color: #0a3d62;
  cursor: pointer;
}

.customer-details {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #333;
}

/* History page */
.history-list .history-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.history-header {
  font-weight: 600;
  color: #0a3d62;
  cursor: pointer;
}

.history-details {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #333;
}

.upload-status li {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: #0a3d62;
}

/* Upcoming schedule styles */
.upcoming-list {
  margin-top: 1rem;
}

.upcoming-item {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
  line-height: 1.4;
}

.upcoming-item strong {
  color: #0a3d62;
}

.upcoming-item span {
  color: #555;
}

.upcoming-item small {
  color: #888;
}

/* Scrollable lists for dashboard panels. These containers cap the height
   and allow vertical scrolling when there are many entries. */
.upcoming-list,
.expired-list,
.suggestions-list {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 0.25rem; /* little space for scrollbar */
}

/* Action buttons container for detail modal */
.detail-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Status labels for upcoming schedule */
.status-label {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.status-pending {
  background-color: #f9e79f;
  color: #7d6608;
}
.status-confirmed {
  background-color: #abebc6;
  color: #1e8449;
}
.status-cancelled {
  background-color: #f5b7b1;
  color: #922b21;
}

/* Modal styles for admin add-entry form */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 6px;
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: relative;
}

.modal-content .close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 1.5rem;
  color: #333;
  cursor: pointer;
}

.modal-form .form-group {
  margin-bottom: 1rem;
}

.modal-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #0a3d62;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

/* Radio group styling for update status modal */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}
.radio-group label {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  color: #333;
}
.radio-group input {
  margin-right: 0.4rem;
}

@media (max-width: 992px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

/* Media Queries */
@media (max-width: 768px) {
  /* Stack brand and navigation vertically on mobile */
.navbar .brand {
    font-size: 1rem; /* adjust as needed */
    white-space: nowrap;
  }
  
  .navbar .container {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
  }
  .nav-links li {
    margin-bottom: 0.5rem;
  }
  .nav-links a,
  .nav-links .btn {
    display: inline-block;
  }
  .hero-title {
    font-size: 2rem;
  }

/* Client logo placeholders: displayed below the trusted icons. Use flex
   layout to arrange five equal holders on larger screens and wrap on mobile. */
.client-logos {
  /* Arrange client logos in a horizontal row that centres the items. Use flex
     layout to keep them in one line on larger screens and wrap on mobile. */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.client-logos img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.5rem;
  background-color: #fafafa;
  /* Remove flex-basis so logos flow naturally and align horizontally */
  /* Centre images within grid cells */
  margin: auto;
}
  .services,
  .about,
  .testimonials,
  .contact,
  .preventive,
  .why-us,
  .cta {
    padding: 3rem 0;
  }
  .contact-container {
    flex-direction: column;
  }
  .contact-form-wrapper {
    width: 100%;
  }
}
