/* Basic resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

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

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header & Navigation */
.header {
  background-color: #0d3b66;
  color: #fff;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Increased padding to make the header slightly larger */
  padding: 1.5rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar a {
  margin-right: 1rem;
  font-weight: 500;
}

.navbar a:last-child {
  margin-right: 0;
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 0 auto;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* Animate to an X when open */
.nav-container.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-container.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-container.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.cta-button {
  background-color: #d32f2f;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s;
  display: inline-block;
}

.cta-button:hover {
  background-color: #a72121;
}

/* Hero Section */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: 8rem 0;
  min-height: 70vh;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

/* Section Styles */
section {
  padding: 3rem 0;
}

section h2 {
  margin-bottom: 1.5rem;
  color: #0d3b66;
  text-align: center;
  font-size: 1.75rem;
}

/* Service Grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.service-item {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
}

.service-item img {
  max-width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.service-item--centered {
  grid-column: 1 / -1;
  max-width: 250px;
  margin: 0 auto;
  width: 100%;
}

.service-item h3 {
  margin-bottom: 0.5rem;
  color: #d32f2f;
  font-size: 1.25rem;
}

.service-item p {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* About snippet */
.about-snippet p {
  line-height: 1.6;
  margin-bottom: 1rem;
  text-align: center;
}

.about-snippet .cta-button {
  margin-top: 1rem;
}

.about-page .about-content {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
  line-height: 1.6;
}

.about-page h3 {
  color: #0d3b66;
  margin-top: 1.5rem;
}

.about-contact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.resume-section {
  padding: 3rem 0;
}

.resume-content {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  line-height: 1.6;
}

.resume-content h2 {
  text-align: center;
  color: #0d3b66;
}

.resume-content h3 {
  color: #0d3b66;
  margin-top: 0.5rem;
}

.resume-list {
  list-style: disc;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.resume-actions {
  margin-top: 1rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
}

.gallery-item-link {
  display: block;
  color: inherit;
}

.gallery-item img {
  max-width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.gallery-item p {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Contact Section */
.contact-section {
  background-color: #f9f9f9;
  text-align: center;
}

.contact-section p {
  margin-bottom: 1.5rem;
}

.contact-section ul {
  list-style: none;
  margin-bottom: 1rem;
}

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

/* Appointment form */
.appointment-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.appointment-form label {
  margin-top: 0.5rem;
  margin-bottom: 0.2rem;
  font-weight: bold;
}

.appointment-form input,
.appointment-form select,
.appointment-form textarea {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.appointment-form textarea {
  resize: vertical;
}

.appointment-form button {
  margin-top: 1rem;
  align-self: flex-start;
}

/* Service Plans */
.plans-section,
.addons-section {
  padding: 3rem 0;
}

.addons-section {
  background-color: #f9f9f9;
}

.plans-intro {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
  line-height: 1.6;
  color: #333;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 620px;
  margin: 0 auto;
}

.plan-card {
  background-color: #f5f5f5;
  border: 1px solid #e1e5ee;
  border-radius: 8px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* make selectable cards behave like buttons */
.plan-card,
.addon-item {
  position: relative;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
  -webkit-user-select: none;
  user-select: none;
}

/* room for the corner quantity stepper (addon-item right padding lives in its base rule) */
.plan-card {
  padding-top: 2.75rem;
}

.plan-card:hover,
.addon-item:hover {
  border-color: #0d3b66;
}

.plan-card:focus-visible,
.addon-item:focus-visible {
  outline: 2px solid #0d3b66;
  outline-offset: 2px;
}

/* corner quantity stepper */
.qty-stepper {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  border: 1px solid #e1e5ee;
  border-radius: 999px;
  padding: 0.15rem 0.3rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.plan-card .qty-stepper {
  top: 0.6rem;
  right: 0.6rem;
}

.addon-item .qty-stepper {
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
}

.qty-btn {
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #f0f2f7;
  color: #0d3b66;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.qty-btn:hover {
  background: #0d3b66;
  color: #fff;
}

.qty-value {
  min-width: 1.1ch;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0d3b66;
}

.plan-card.is-selected,
.addon-item.is-selected {
  border-color: #d32f2f;
  border-width: 2px;
  box-shadow: 0 8px 22px rgba(211, 47, 47, 0.18);
}

.plan-card.is-selected {
  background-color: #fff;
}

.plan-card--featured {
  border-color: #d32f2f;
  box-shadow: 0 8px 22px rgba(211, 47, 47, 0.12);
}

.plan-cta-wrap {
  text-align: center;
  margin-top: 2rem;
}

.plan-selection-summary {
  margin-bottom: 1rem;
  font-weight: 600;
  color: #0d3b66;
}

.plan-card h3 {
  color: #0d3b66;
  font-size: 1.2rem;
}

.plan-price {
  color: #d32f2f;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
}

.plan-price span {
  font-size: 1rem;
  font-weight: 500;
  color: #666;
}

.plan-desc {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #444;
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 840px;
  margin: 0 auto;
}

.addon-item {
  background: #fff;
  border: 1px solid #e1e5ee;
  border-radius: 8px;
  padding: 1.25rem 4rem 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.addon-price {
  flex-shrink: 0;
  background: #0d3b66;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  text-align: center;
  line-height: 1.25;
}

.addon-price-year {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.85;
}

.addon-item p {
  font-size: 0.92rem;
  line-height: 1.4;
  color: #333;
}

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

/* Project detail */
.project-hero {
  background-color: #f5f5f5;
  color: #0d3b66;
  text-align: center;
  padding: 2.5rem 0;
}

.project-hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.project-meta {
  max-width: 800px;
  margin: 2rem auto 0;
  text-align: left;
  line-height: 1.6;
}

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

.project-gallery img {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
  min-height: 200px;
}

/* Wider grid for before/after sets */
.project-gallery.wide-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tagged {
  position: relative;
}

.image-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(13, 59, 102, 0.9);
  color: #fff;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.social-links a {
  margin-right: 1rem;
  color: #fff;
  text-decoration: underline;
}

.social-links a:last-child {
  margin-right: 0;
}

/* Logo image */
.logo img {
  /* Increase the logo size slightly for prominence */
  height: 60px;
  width: auto;
}

/* Brand link styling: display logo and brand name together */
.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* Brand name styling */
.brand-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  margin-left: 0.5rem;
}

/* Trigger page */
.trigger-page {
  background-color: #f2f4f8;
}

.trigger-wrapper {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 4rem 0;
}

.trigger-card {
  background: #fff;
  border: 1px solid #e1e5ee;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  max-width: 720px;
  margin: 0 auto;
}

.trigger-card h1 {
  color: #0d3b66;
  margin-bottom: 0.75rem;
}

.trigger-card p {
  line-height: 1.6;
  color: #333;
}

.trigger-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.trigger-input-row input {
  flex: 1;
  min-width: 220px;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccd2de;
  border-radius: 6px;
  font-size: 1rem;
}

.trigger-error {
  color: #d32f2f;
  margin-top: 0.5rem;
  font-weight: 600;
}

.form-hint {
  margin-top: 0.5rem;
  color: #666;
  font-size: 0.95rem;
}

.trigger-result {
  margin-top: 1.5rem;
  background: #0d3b66;
  color: #fff;
  padding: 1.25rem;
  border-radius: 8px;
}

.result-label {
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

.trigger-result code {
  display: inline-block;
  margin: 0.25rem 0;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.result-note {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: #e8eef6;
}

/* ---------- Responsive ---------- */

/* Mobile navigation: hamburger + centered dropdown */
@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
    order: 2;
  }

  .nav-container .logo {
    order: 1;
  }

  /* Collapsed by default, shown when .nav-open is set */
  .navbar {
    order: 3;
    flex-basis: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 1rem;
  }

  .nav-container.nav-open .navbar {
    display: flex;
  }

  .navbar a {
    width: 100%;
    margin: 0;
    padding: 0.85rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  /* "Request Service" button: hidden until menu opens, then centered */
  .nav-container > .cta-button {
    order: 4;
    display: none;
  }

  .nav-container.nav-open > .cta-button {
    display: inline-block;
    flex-basis: 100%;
    width: max-content;
    margin: 1rem auto 0;
  }
}

/* Tablets: ease the add-ons down to 2 columns */
@media (max-width: 760px) {
  .addon-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Phones */
@media (max-width: 600px) {
  /* Maintenance Plans: single column (original mobile layout) */
  .plan-grid,
  .addon-grid {
    grid-template-columns: 1fr;
  }

  /* Home services: max 2 columns on mobile */
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .service-item {
    padding: 0.85rem;
  }

  .service-item h3 {
    font-size: 1.05rem;
  }

  .service-item p {
    font-size: 0.82rem;
  }
}
