/* ==========================================================================
   1. CONFIGURATION
   ========================================================================== */

:root {
  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-size-base: 1rem; /* 16px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-md: 1.25rem; /* 20px */
  --font-size-lg: 1.563rem; /* 25px */
  --font-size-xl: 1.953rem; /* 31px */
  --font-size-xxl: 2.441rem; /* 39px */

  /* Colors */
  --color-bg: #f5f7fb;
  --color-panel: #ffffff;
  --color-light-bg: #eef2f9;
  --color-text-dark: #0b1220;
  --color-text-light: #eef2ff;
  --color-muted: #6b7280;
  --color-accent: #2563eb;
  --color-accent-hover: #0ea5b7;
  --color-dark-bg: #0f172a;

  /* Spacing */
  --space-unit: 1rem;
  --space-xs:  calc(0.5 * var(--space-unit));
  --space-sm:  calc(0.75 * var(--space-unit));
  --space-md:  calc(1.25 * var(--space-unit));
  --space-lg:  calc(2 * var(--space-unit));
  --space-xl:  calc(3.25 * var(--space-unit));
  --space-section: 5rem;

  /* Others */
  --radius: 14px;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --transition: 0.3s cubic-bezier(.2, .8, .2, 1);
  --maxW: 1240px;
}

/* ==========================================================================
   2. BASE
   ========================================================================== */

body {
  background-color: var(--color-bg);
  color: var(--color-text-dark);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: var(--font-size-xxl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--color-accent-hover); }

.container { max-width: var(--maxW); }

.img-fluid { max-width: 100%; height: auto; }
.rounded { border-radius: var(--radius) !important; }
.shadow { box-shadow: var(--shadow) !important; }

/* ==========================================================================
   3. COMPONENTS
   ========================================================================== */

/* --------------------------------------------------------------------------
   .c-header & .c-nav
   -------------------------------------------------------------------------- */

.c-header {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.c-header__inner { display: flex; justify-content: space-between; align-items: center; padding: var(--space-sm) 0; }

.c-header__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--font-size-md);
  color: var(--color-text-dark);
  display: flex;
  align-items: center;
}
.c-header__brand:hover { color: var(--color-text-dark); }

.c-nav { display: flex; gap: var(--space-lg); align-items: center; }
.c-nav a { font-family: var(--font-display); font-weight: 600; color: var(--color-text-dark); }
.c-nav a.active { color: var(--color-accent); }

.c-nav-toggler { background: none; border: none; font-size: 1.8rem; color: var(--color-text-dark); }

.c-nav--mobile { 
  padding: var(--space-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: stretch;
}
.c-nav--mobile .c-button { justify-content: center; }

/* --------------------------------------------------------------------------
   .c-button
   -------------------------------------------------------------------------- */

.c-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 600;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  font-size: var(--font-size-base);
}

.c-button--primary { background-color: var(--color-accent); color: #fff; }
.c-button--primary:hover { background-color: var(--color-accent-hover); color: #fff; transform: translateY(-3px); box-shadow: 0 12px 40px rgba(37,99,235,0.2); }

.c-button--outline-light { border-color: rgba(255,255,255,0.3); color: #fff; }
.c-button--outline-light:hover { background-color: #fff; color: var(--color-text-dark); }

.c-button--lg { padding: var(--space-md) var(--space-xl); }
.c-button--full-width { width: 100%; }

/* --------------------------------------------------------------------------
   .c-badge
   -------------------------------------------------------------------------- */

.c-badge { display: inline-flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--space-sm); border-radius: 999px; font-weight: 700; font-size: var(--font-size-sm); }
.c-badge--light { background: rgba(255,255,255,0.1); color: #fff; }

/* --------------------------------------------------------------------------
   .c-section
   -------------------------------------------------------------------------- */

.c-section { padding: var(--space-section) 0; }
.c-section--light-bg { background-color: var(--color-light-bg); }

.c-section__header { text-align: center; max-width: 750px; margin: 0 auto var(--space-xl); }
.c-section__title { font-size: var(--font-size-xl); margin-bottom: var(--space-unit); position: relative; display: inline-block; }
.c-section__title::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background-color: var(--color-accent); border-radius: 2px; }

.c-section__title-left { font-size: var(--font-size-xl); margin-bottom: var(--space-md); }

.c-section__lead { color: var(--color-muted); font-size: var(--font-size-md); }

/* --------------------------------------------------------------------------
   .c-hero
   -------------------------------------------------------------------------- */

.c-hero {
  padding: 6rem 0;
  background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.9)), url('image (23).webp');
  background-size: cover;
  background-position: bottom;
  color: var(--color-text-light);
  overflow: hidden;
}

.c-hero__title { font-size: var(--font-size-xxl); margin: var(--space-md) 0; }
.c-hero__lead { font-size: var(--font-size-md); color: rgba(255,255,255,0.8); max-width: 650px; }
.c-hero__actions { margin-top: var(--space-lg); display: flex; flex-wrap: wrap; gap: var(--space-md); }

/* --------------------------------------------------------------------------
   .c-card
   -------------------------------------------------------------------------- */

.c-card { background: var(--color-panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--space-lg); }

.c-card--form { padding: var(--space-xl); }
.c-card--form .c-card__title { font-size: var(--font-size-lg); text-align: center; margin-bottom: var(--space-lg); color: var(--color-text-dark); }

.c-card--problem { text-align: center; height: 100%; transition: all var(--transition); }
.c-card--problem:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(2,6,23,0.12); }
.c-card--problem .c-card__icon-wrapper { margin: 0 auto var(--space-md); background: none; font-size: 3rem; color: var(--color-accent); width: auto; height: auto; }
.c-card--problem .c-card__title-sm { font-size: var(--font-size-base); font-weight: 700; }
.c-card--problem .c-card__text { font-size: var(--font-size-sm); }

/* --------------------------------------------------------------------------
   .c-list-checked
   -------------------------------------------------------------------------- */

.c-list-checked { list-style: none; padding: 0; margin-top: var(--space-lg); }
.c-list-checked li { position: relative; padding-left: var(--space-lg); margin-bottom: var(--space-sm); font-size: var(--font-size-base); }
.c-list-checked li::before { content: '\f26a'; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: 0; color: var(--color-accent); font-size: 1.2em; }

/* --------------------------------------------------------------------------
   .c-card--step (replaces .c-steps)
   -------------------------------------------------------------------------- */

.c-card--step {
  padding: 0; /* Remove default card padding */
  text-align: center;
  overflow: hidden; /* For image border-radius */
  height: 100%;
  transition: all var(--transition);
  position: relative; /* Needed for absolute positioning of the number */
}
.c-card--step:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(2,6,23,0.12);
}

.c-card--step .c-card__image {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.c-card--step .c-card__body {
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
}

.c-card--step .c-card__text {
  color: var(--color-text-dark);
  text-align: left;
}

.c-card--step .c-list {
  list-style: none;
  padding: 0;
  text-align: left;
  font-size: var(--font-size-base);
  color: var(--color-text-dark);
}

.c-card--step .c-list li {
  position: relative;
  padding-left: 1.5em; /* space for the icon */
  margin-bottom: var(--space-xs);
}

.c-card--step .c-list li::before {
  content: '\f26a'; /* Bootstrap icon checkmark */
  font-family: 'bootstrap-icons';
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--color-accent);
}

.c-card--step .c-card__step-number {
  position: absolute;
  top: 200px; /* Matches image height */
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-block;
  width: 50px;
  height: 50px;
  line-height: 42px; /* Adjusted for border */
  border-radius: 50%;
  background-color: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.5rem;
  border: 4px solid var(--color-panel);
  box-shadow: var(--shadow);
}

.c-card--step .c-card__title-sm {
  margin-bottom: var(--space-md);
}


/* --------------------------------------------------------------------------
   .c-calculator
   -------------------------------------------------------------------------- */

.c-calculator {
  background: var(--color-panel);
  padding: var(--space-xl);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.c-calculator .c-form__group {
  border-bottom: 1px solid var(--color-light-bg);
  padding-bottom: var(--space-md);
}

.c-calculator .c-form__checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.c-image-checkbox input[type="checkbox"] {
  display: none; /* Visually hide the checkbox */
}

.c-image-checkbox label {
  display: block;
  border: 2px solid var(--color-light-bg);
  border-radius: var(--radius);
  padding: var(--space-sm);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.c-image-checkbox label:hover {
  border-color: var(--color-accent-hover);
  background-color: var(--color-light-bg);
}

.c-image-checkbox img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: var(--space-sm);
}

.c-image-checkbox span {
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.c-image-checkbox input[type="checkbox"]:checked + label {
  border-color: var(--color-accent);
  background-color: var(--color-light-bg);
}

.c-image-checkbox input[type="checkbox"]:checked + label::after {
  content: '\f26a';
  font-family: 'bootstrap-icons';
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  background-color: var(--color-accent);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.c-calculator__result {
  background-color: var(--color-light-bg);
  padding: var(--space-md);
  border-radius: var(--radius);
  text-align: center;
  margin: var(--space-lg) 0;
}

.c-calculator__result p {
  margin: 0;
  color: var(--color-muted);
  text-transform: uppercase;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.c-calculator__result div {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-accent);
  font-family: var(--font-display);
}

/* Custom Range Slider Styles */
.c-calculator .form-range {
  --range-track-bg: var(--color-light-bg);
  --range-thumb-bg: var(--color-accent);
  --range-thumb-border: 2px solid #fff;
  --range-thumb-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.c-calculator .form-range::-webkit-slider-runnable-track {
  height: 8px;
  background-color: var(--range-track-bg);
  border-radius: 4px;
}

.c-calculator .form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  margin-top: -6px; /* (track-height - thumb-height) / 2 */
  width: 20px;
  height: 20px;
  background-color: var(--range-thumb-bg);
  border-radius: 50%;
  border: var(--range-thumb-border);
  box-shadow: var(--range-thumb-shadow);
  cursor: pointer;
}

.c-calculator .form-range::-moz-range-track {
  height: 8px;
  background-color: var(--range-track-bg);
  border-radius: 4px;
}

.c-calculator .form-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background-color: var(--range-thumb-bg);
  border-radius: 50%;
  border: var(--range-thumb-border);
  box-shadow: var(--range-thumb-shadow);
  cursor: pointer;
}


/* --------------------------------------------------------------------------
   .c-portfolio-object
   -------------------------------------------------------------------------- */

.c-portfolio-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.c-portfolio-object {
  display: flex;
  gap: var(--space-lg);
  background: var(--color-panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-lg);
}

.c-portfolio-object__info {
  flex: 1;
  min-width: 300px;
}

.c-portfolio-object__title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-md);
}

.c-portfolio-object__description {
  color: var(--color-muted);
  margin-bottom: var(--space-lg);
}

.c-portfolio-object__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.c-portfolio-object__tags span {
  background-color: var(--color-light-bg);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 5px;
  font-size: var(--font-size-sm);
}

.c-portfolio-object__slider {
  flex: 0 0 50%;
  max-width: 600px;
  position: relative;
  height: 350px; /* Ensure slider has a fixed height */
  overflow: hidden; /* Prevent slides from overflowing during transition */
}

.portfolio-slider {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden; /* Add this to contain the slides */
}

.portfolio-slider .swiper-slide {
  background-size: cover;
  background-position: center;
}

.portfolio-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-slider .swiper-pagination-bullet-active {
  background-color: var(--color-accent);
}

.portfolio-slider .swiper-button-next,
.portfolio-slider .swiper-button-prev {
  color: #fff;
  background-color: rgba(0,0,0,0.3);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color var(--transition);
}
.portfolio-slider .swiper-button-next:hover,
.portfolio-slider .swiper-button-prev:hover {
  background-color: rgba(0,0,0,0.5);
}

.portfolio-slider .swiper-button-next::after,
.portfolio-slider .swiper-button-prev::after {
  font-size: 1rem;
  font-weight: bold;
}

/* --------------------------------------------------------------------------
   .c-review-card
   -------------------------------------------------------------------------- */

.c-review-card {
  background: var(--color-panel);
  border-radius: var(--radius);
  height: 100%;
  display: flex;
  overflow: hidden; /* To contain the image's border-radius */
}

.c-review-card__content {
  padding: var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.c-review-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.c-review-card__icon {
  font-size: 3rem;
  color: #ced4da;
}

.c-review-card__name {
  font-weight: 700;
  font-size: var(--font-size-base);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.c-review-card__location {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
}

.c-review-card__text {
  color: var(--color-text-dark);
  flex-grow: 1; /* Pushes rating to the bottom */
}

.c-review-card__rating {
  font-size: 1rem;
  color: #ffc107;
  margin-top: var(--space-md);
}

.c-review-card__photo {
  flex-shrink: 0;
  width: 200px; /* Adjust width as needed */
}

.c-review-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   .c-faq-item (Accordion)
   -------------------------------------------------------------------------- */

.c-faq-item { border: 1px solid #dee2e6; border-radius: var(--radius); overflow: hidden; margin-bottom: var(--space-sm); }
.c-faq-item__header { margin: 0; }
.c-faq-item__button { font-size: var(--font-size-base); font-weight: 600; width: 100%; text-align: left; padding: var(--space-md); background: #fff; border: none; position: relative; }
.c-faq-item__button:not(.collapsed) { background-color: var(--color-light-bg); color: var(--color-accent); }
.c-faq-item__button::after { content: '+'; position: absolute; right: var(--space-md); top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 300; transition: transform var(--transition); }
.c-faq-item__button:not(.collapsed)::after { transform: translateY(-50%) rotate(45deg); }
.c-faq-item__body { padding: var(--space-md); }
.accordion-button { all: unset; }
.accordion-button:focus { box-shadow: none; }

/* --------------------------------------------------------------------------
   .c-form
   -------------------------------------------------------------------------- */

.c-form__group { margin-bottom: var(--space-md); }
.c-form__label { font-weight: 600; font-size: var(--font-size-sm); margin-bottom: var(--space-xs); display: block; }
.c-form__input, .c-form__select { width: 100%; padding: var(--space-sm) var(--space-md); border-radius: 10px; border: 1px solid #ddd; transition: all var(--transition); background: #fff; }
.c-form__input:focus, .c-form__select:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }
.c-form__privacy-note { font-size: var(--font-size-sm); color: var(--color-muted); text-align: center; margin-top: var(--space-md); }

/* --------------------------------------------------------------------------
   .c-footer
   -------------------------------------------------------------------------- */

.c-footer { background-color: var(--color-dark-bg); color: rgba(255,255,255,0.7); padding: var(--space-xl) 0; font-size: var(--font-size-sm); }
.c-footer__title { font-size: var(--font-size-md); color: #fff; margin-bottom: var(--space-md); }
.c-footer__socials { display: flex; gap: var(--space-md); font-size: 1.5rem; }
.c-footer__socials a { color: rgba(255,255,255,0.7); }
.c-footer__socials a:hover { color: #fff; }
.c-footer__list { list-style: none; padding: 0; }
.c-footer__list li { margin-bottom: var(--space-xs); }
.c-footer__list a { color: rgba(255,255,255,0.7); }
.c-footer__list a:hover { color: #fff; }
.c-footer__phone { font-family: var(--font-display); color: #fff; font-size: var(--font-size-lg); font-weight: 700; }
.c-footer__divider { border-color: rgba(255,255,255,0.1); }
.c-footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: var(--space-lg); }
  .c-footer__bottom a { margin-left: var(--space-md); }

/* --------------------------------------------------------------------------
   .c-reviews-slider (Swiper)
   -------------------------------------------------------------------------- */

.c-reviews-slider {
  position: relative;
  /* Add padding to make space for the navigation arrows and pagination */
  padding: 0 80px 50px;
}

.c-reviews-slider .swiper-pagination-bullet-active {
  background-color: var(--color-accent);
}

.c-reviews-slider .swiper-button-next {
  right: 0;
}
.c-reviews-slider .swiper-button-prev {
  left: 0;
}

.c-reviews-slider .swiper-button-next::after,
.c-reviews-slider .swiper-button-prev::after {
  font-size: 1.8rem; /* Make the arrow icon larger for visibility */
  color: var(--color-text-dark); /* Ensure high contrast */
}

/* Position pagination at the very bottom */
.c-reviews-slider .swiper-pagination {
  bottom: 0;
}

/* Ensure slides themselves don't have weird overflow */
.c-reviews-slider .swiper-slide {
  height: auto; /* Allow slide to grow with content */
  display: flex;
}

.c-reviews-slider .c-review-card {
  width: 100%; /* Ensure card fills the slide */
}

/* ==========================================================================
   5. RESPONSIVE
   ========================================================================== */
 
@media (max-width: 991px) {
  :root { --space-section: 4rem; }
  .c-hero { padding: 4rem 0; }
  .c-hero__title { font-size: 2.8rem; } 
  .c-footer__bottom { flex-direction: column; gap: var(--space-sm); }
  .c-portfolio-object {
    flex-direction: column;
  }
  .c-portfolio-object__slider {
    max-width: 100%;
    height: 400px;
    margin-top: var(--space-lg);
  }
}

@media (max-width: 767px) {
  .c-portfolio-object__main {
    flex-direction: column-reverse;
  }
  .c-portfolio-object__primary-image {
    width: 100%;
    max-width: 100%;
    height: 250px;
  }
}

.edit-mode .image-wrapper {
  border: 2px dashed #2563eb;
  padding: 5px;
  margin-bottom: 10px;
}

.edit-mode .delete-image-btn {
  cursor: pointer;
  opacity: 0.8;
}

.edit-mode .delete-image-btn:hover {
  opacity: 1;
}

.c-form__success-message {
  padding: 1rem;
  text-align: center;
  color: var(--color-muted);
}

.c-form__success-message strong {
  color: var(--color-text-dark);
}
