/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.875rem 2rem; font-weight: 600;
  border-radius: var(--radius-pill); transition: var(--transition-normal);
  cursor: pointer; border: 2px solid transparent;
}
.btn-primary {
  background-color: var(--color-primary); color: var(--color-white);
  box-shadow: 0 4px 18px rgba(74,122,88,0.35);
  letter-spacing: 0.3px;
}
.btn-primary:hover {
  background-color: var(--color-primary-dark); transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(74,122,88,0.45); color: var(--color-white);
}
.btn-secondary { background-color: rgba(255,255,255,0.1); backdrop-filter: blur(5px); color: var(--color-white); border-color: var(--color-white); }
.btn-secondary:hover { background-color: var(--color-white); color: var(--color-dark); transform: translateY(-2px); }

/* =========================================
   SECTION TITLES
   ========================================= */
.section-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--color-primary-dark); margin-bottom: 1.2rem;
  background: var(--color-primary-light);
  padding: 0.35rem 1rem; border-radius: var(--radius-pill);
  border: 1px solid rgba(74,122,88,0.2);
}
.section-title { font-size: 2.8rem; font-weight: 800; margin-bottom: 1.5rem; }
.section-description { max-width: 800px; margin: 0 auto 4rem auto; font-size: 1.1rem; color: var(--color-text); }

/* =========================================
   WHATSAPP FLOTANTE
   ========================================= */
.whatsapp-float {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  transition: var(--transition-normal);
}
.whatsapp-float svg { width: 28px; height: 28px; }
.whatsapp-float:hover { background: #1ebe5d; transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,.5); color: #fff; }

/* =========================================
   MÃ“DULO 1 â€” VALORACIÃ“N DE ARTÃCULOS â­
   ========================================= */
.rating-widget {
  margin: 3.5rem 0 2rem;
  background: linear-gradient(135deg, #edf5ee, #e4f0e6);
  border: 1px solid var(--color-primary-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}
.rating-header {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  font-weight: 600; font-size: 1.1rem; color: var(--color-dark);
  margin-bottom: 1.5rem;
}
.stars-container {
  display: flex; justify-content: center; gap: .4rem; margin-bottom: 1.5rem;
}
.star-btn {
  background: none; border: none; cursor: pointer; padding: .2rem;
  transition: transform var(--transition-fast);
}
.star-btn svg {
  width: 40px; height: 40px;
  stroke: #d1a520; fill: none;
  transition: fill var(--transition-fast), transform var(--transition-fast);
}
.star-btn:hover svg,
.star-btn.hovered svg { fill: #f59e0b; transform: scale(1.15); }
.star-btn:focus-visible { outline: 2px solid var(--color-primary); border-radius: 4px; }
.rating-widget.already-voted .star-btn { cursor: not-allowed; }

.rating-summary { margin-top: .5rem; }
.rating-avg-display {
  display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap;
}
.rating-avg-number {
  font-size: 2.5rem; font-weight: 800; color: var(--color-dark);
  font-family: var(--font-heading);
}
.rating-avg-stars { display: flex; gap: 2px; }
.rating-votes-count { font-size: .9rem; color: #64748b; }
.rating-no-votes { color: #64748b; font-size: .95rem; }
.rating-thanks {
  margin-top: 1rem; font-weight: 600;
  color: var(--color-primary-dark); font-size: 1rem;
}

/* =========================================
   MÃ“DULO 2 â€” FORMULARIO CONTACTO MEJORADO ðŸ“¬
   ========================================= */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: .5rem;
  width: 100%;
}
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.4rem; min-width: 0; }
.form-group label { font-weight: 700; font-size: .78rem; color: var(--color-primary-dark); text-transform: uppercase; letter-spacing: 1px; margin-bottom: .25rem; }
.form-group .required { color: var(--color-primary-dark); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: .85rem 1rem;
  border: 1.5px solid #d4e4d6;
  border-radius: var(--radius-sm);
  background: #f7fbf8;
  font-size: 1rem;
  color: var(--color-dark); font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  box-sizing: border-box;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #aec3b0; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(140,184,146,0.2);
}
.form-group input.field-valid,
.form-group textarea.field-valid,
.form-group select.field-valid { border-color: #22c55e; background: #f0fdf4; }
.form-group input.field-invalid,
.form-group textarea.field-invalid,
.form-group select.field-invalid { border-color: #ef4444; background: #fff5f5; }
.field-error { font-size: .82rem; color: #ef4444; min-height: 1.1rem; }
.form-group textarea { resize: vertical; min-height: 110px; padding-top: .75rem; }
.form-group select { cursor: pointer; }
.whatsapp-cta { gap: .7rem; }

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* =========================================
   MÃ“DULO 3 â€” CALCULADORA DE SERVICIOS ðŸ§®
   ========================================= */
.calculator-section { background: var(--color-light); }

/* Barra de progreso */
.calc-progress-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 3rem; max-width: 480px; margin-left: auto; margin-right: auto;
}
.calc-step-indicator {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  opacity: .4; transition: opacity var(--transition-normal);
}
.calc-step-indicator.active { opacity: 1; }
.step-circle {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-primary-light); color: var(--color-primary-dark);
  font-weight: 700; font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition-normal); border: 2px solid transparent;
}
.calc-step-indicator.active .step-circle { background: var(--color-primary); color: #fff; border-color: var(--color-primary-dark); }
.calc-step-indicator.completed .step-circle { background: var(--color-primary-dark); color: #fff; }
.calc-step-indicator span { font-size: .8rem; font-weight: 600; color: var(--color-dark); }
.calc-step-line { flex: 1; height: 2px; background: var(--color-primary-light); margin: 0 .5rem; margin-bottom: 1.4rem; max-width: 80px; }

/* Wizard */
.calc-wizard { max-width: 700px; margin: 0 auto; }
.calc-step { display: none; animation: fadeUp .4s ease-out; }
.calc-step.active { display: block; }
.calc-error {
  color: #b91c1c;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 1.5rem;
  display: block;
  animation: shakeAlert 0.3s ease;
}

html.dark-mode .calc-error {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.calc-group { margin-bottom: 1rem; }
.calc-label { display: block; font-weight: 700; font-size: 1rem; color: var(--color-dark); margin-bottom: 1rem; }

/* Cards de servicios */
.service-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.service-option { cursor: pointer; position: relative; }
.service-option input { position: absolute; opacity: 0; pointer-events: none; }
.service-option-inner {
  border: 2px solid #e2e8f0; border-radius: var(--radius-md);
  padding: 1.5rem 1rem; text-align: center;
  transition: var(--transition-normal); background: var(--color-white);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.service-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  margin-bottom: .6rem;
  transition: transform 0.2s ease, color 0.2s ease;
}
.service-option:hover .service-option-icon {
  transform: translateY(-2px);
  color: var(--color-primary);
}
.service-option.selected .service-option-icon {
  color: var(--color-primary-dark);
}
.service-option-name { font-weight: 700; color: var(--color-dark); font-size: .95rem; margin-bottom: 0; }
.service-option:focus-within .service-option-inner {
  border-color: var(--color-primary-dark);
  box-shadow: 0 0 0 3px rgba(117,164,126,.4);
}
.service-option.selected .service-option-inner {
  border-color: var(--color-primary); background: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(117,164,126,.2);
}
.service-option.selected:focus-within .service-option-inner {
  box-shadow: 0 0 0 4px rgba(88,130,96,.5);
}
.service-option.selected .service-option-name { color: var(--color-primary-dark); }

/* Radio options */
.radio-options { display: flex; flex-direction: column; gap: .75rem; }
.radio-option {
  display: flex; align-items: center; gap: .9rem;
  padding: 1rem 1.25rem; border: 2px solid #e2e8f0; border-radius: var(--radius-md);
  cursor: pointer; transition: var(--transition-normal); background: var(--color-white);
}
.radio-option:hover { border-color: var(--color-primary); background: var(--color-primary-light); }
.radio-option:focus-within {
  border-color: var(--color-primary-dark);
  box-shadow: 0 0 0 3px rgba(117,164,126,.4);
}
.radio-option input[type="radio"] { accent-color: var(--color-primary); width: 18px; height: 18px; }
.radio-option:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-light); }
.radio-option span { font-weight: 500; color: var(--color-dark); }

/* Navegación del wizard (Botones Siguiente / Atrás) */
.calc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 2.5rem;
  padding-top: 0.5rem;
}
#step-1 .calc-nav {
  justify-content: flex-start;
}
.calc-nav .btn {
  min-width: 160px;
}
.calc-nav .calc-back {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary-dark);
  transition: var(--transition-normal);
}
.calc-nav .calc-back:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
}
html.dark-mode .calc-nav .calc-back {
  border-color: #86efac;
  color: #86efac;
}
html.dark-mode .calc-nav .calc-back:hover {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}


/* Resultado */
.calc-result { text-align: center; }
.result-header { margin-bottom: 2.5rem; }
.result-icon { font-size: 3rem; margin-bottom: 1rem; }
.result-header h2 { font-size: 2rem; margin-bottom: .5rem; }
.result-header p { color: #64748b; }
.result-breakdown { text-align: left; margin-bottom: 2rem; display: flex; flex-direction: column; gap: .75rem; }
.result-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem; background: var(--color-white);
  border-radius: var(--radius-md); border: 1px solid #e2e8f0;
}
.result-item-name { font-weight: 600; color: var(--color-dark); }
.result-item-range { color: var(--color-primary-dark); font-weight: 700; font-size: .95rem; }
.result-total-box {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: var(--radius-lg); padding: 2.5rem; color: #fff; margin-bottom: 1.5rem;
}
.result-total-label { font-size: .85rem; text-transform: uppercase; letter-spacing: 2px; opacity: .85; margin-bottom: .5rem; }
.result-total-amount { font-size: 2.5rem; font-weight: 800; font-family: var(--font-heading); }
.result-total-note { font-size: .9rem; opacity: .85; margin-top: .5rem; }
.result-disclaimer {
  display: flex; align-items: center; gap: .5rem; justify-content: center;
  font-size: .85rem; color: #64748b; margin-bottom: 2rem;
}
.result-cta { background: var(--color-primary-light); border-radius: var(--radius-md); padding: 2rem; }
.result-cta p { color: var(--color-dark); margin-bottom: 0; }

/* PaginaciÃ³n del blog */
.blog-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-pill);
  border: 2px solid #e2e8f0; color: var(--color-dark);
  font-weight: 600; margin: 0 .2rem; transition: var(--transition-normal);
}
.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
  background: var(--color-primary); border-color: var(--color-primary); color: #fff;
}
.blog-pagination .prev, .blog-pagination .next { width: auto; padding: 0 1rem; }

/* =========================================
   BEFORE / AFTER INTERACTIVE SLIDER
   ========================================= */
.before-after-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 2.5rem auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.12);
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  background: #f1f5f9;
}

.ba-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.ba-after-layer,
.ba-before-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ba-after-layer img,
.ba-before-layer img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}

.ba-before-layer {
  width: 50%;
  border-right: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.ba-before-layer img {
  /* Truco para mantener la imagen alineada sin deformación */
  width: 100vw;
  max-width: 900px;
}

@media (max-width: 940px) {
  .ba-before-layer img {
    width: 100%;
    min-width: 100%;
  }
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-white);
  border: 3px solid var(--color-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: ew-resize;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: var(--color-primary-dark);
}

.ba-handle:focus-visible {
  outline: 3px solid var(--color-primary-dark);
  outline-offset: 2px;
}

.ba-handle:hover,
.before-after-container:active .ba-handle {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(117, 164, 126, 0.4);
}

.ba-handle-arrows {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.8rem;
  font-weight: bold;
}

.ba-badge {
  position: absolute;
  bottom: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 5;
  pointer-events: none;
}

.ba-badge-before {
  left: 1rem;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  backdrop-filter: blur(8px);
}

.ba-badge-after {
  right: 1rem;
  background: rgba(117, 164, 126, 0.9);
  color: #fff;
  backdrop-filter: blur(8px);
}

/* =========================================
   PROJECTS FILTER BAR & AJAX GRID
   ========================================= */
.proyectos-filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background: var(--color-white);
  color: #475569;
  border: 1.5px solid #e2e8f0;
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(117, 164, 126, 0.15);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(117, 164, 126, 0.3);
}

.filter-btn .filter-count {
  font-size: 0.75rem;
  opacity: 0.8;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
}

.filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

#proyectos-grid {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#proyectos-grid.is-loading {
  opacity: 0.35;
  pointer-events: none;
  transform: scale(0.995);
}

.no-proyectos {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: #64748b;
  font-size: 1.1rem;
}
.no-proyectos p {
  text-align: center;
}

/* =========================================
   PDF ESTIMATE DOCUMENT TEMPLATE & PREVIEW MODAL
   ========================================= */
.pdf-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.pdf-modal-overlay.active {
  display: flex;
}

.pdf-modal-content {
  background: #ffffff;
  border-radius: 16px;
  max-width: 820px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: relative;
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.pdf-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.8rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.pdf-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pdf-modal-close {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
}

.pdf-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.pdf-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  background: #f1f5f9;
  flex: 1;
}

.pdf-modal-footer {
  padding: 1.2rem 1.8rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.pdf-preview-sheet {
  background: #ffffff;
  color: #1e293b;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  padding: 40px;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pdf-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #ddeee3;
  padding-bottom: 22px;
  margin-bottom: 25px;
}

.pdf-logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdf-logo-icon {
  width: 38px;
  height: 38px;
  color: #4a7a58;
}

.pdf-logo-title {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  line-height: 1;
}

.pdf-logo-sub {
  font-size: 11px;
  color: #4a7a58;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.pdf-doc-meta {
  text-align: right;
}

.pdf-doc-badge {
  display: inline-block;
  background: #ddeee3;
  color: #376045;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 8px;
}

.pdf-meta-line {
  font-size: 13px;
  color: #64748b;
  margin: 2px 0;
}

.pdf-meta-line strong {
  color: #1e293b;
}

.pdf-client-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 25px;
}

.pdf-client-block h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #4a7a58;
  margin: 0 0 6px 0;
  font-weight: 700;
}

.pdf-client-block p {
  font-size: 13.5px;
  margin: 3px 0;
  color: #334155;
}

.pdf-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
}

.pdf-table th {
  background: #4a7a58;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 11px 14px;
  text-align: left;
}

.pdf-table th:last-child {
  text-align: right;
}

.pdf-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13.5px;
  color: #1e293b;
}

.pdf-table td:last-child {
  text-align: right;
  font-weight: 700;
  color: #376045;
}

.pdf-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.pdf-total-box {
  background: linear-gradient(135deg, #4a7a58, #376045);
  color: #ffffff;
  border-radius: 12px;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.pdf-total-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.9;
  margin-bottom: 3px;
}

.pdf-total-desc {
  font-size: 11.5px;
  opacity: 0.85;
  margin: 0;
}

.pdf-total-val {
  font-size: 24px;
  font-weight: 800;
  text-align: right;
}

.pdf-guarantees {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 25px;
  border-top: 1px solid #e2e8f0;
  padding-top: 18px;
}

.pdf-guarantee-item {
  text-align: center;
  padding: 8px;
}

.pdf-guarantee-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.pdf-guarantee-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
}

.pdf-guarantee-text {
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.35;
  margin: 0;
}

.pdf-footer {
  border-top: 2px solid #ddeee3;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #64748b;
}

.pdf-footer-brand strong {
  color: #4a7a58;
}

.pdf-footer-contact {
  text-align: right;
}

.pdf-footer-contact a {
  color: #4a7a58;
  text-decoration: none;
  font-weight: 600;
}

/* =========================================
   PRINT STYLES FOR ESTIMATE SHEET
   ========================================= */
@media print {
  body * {
    visibility: hidden;
  }
  #pdf-preview-modal,
  #pdf-preview-modal * {
    visibility: visible;
  }
  #pdf-preview-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    background: transparent !important;
    padding: 0;
    display: block !important;
  }
  .pdf-modal-content {
    box-shadow: none !important;
    max-width: 100% !important;
    max-height: none !important;
    border-radius: 0 !important;
  }
  .pdf-modal-header,
  .pdf-modal-footer {
    display: none !important;
  }
  .pdf-modal-body {
    padding: 0 !important;
    background: #ffffff !important;
  }
  .pdf-preview-sheet {
    box-shadow: none !important;
    max-width: 100% !important;
    padding: 20px !important;
    border-radius: 0 !important;
  }
}

/* =========================================
   ATTACHED ESTIMATE CARD (CONTACT FORM)
   ========================================= */
.estimate-attached-card {
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.08);
  animation: fadeUp 0.4s ease-out;
}

.est-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #bbf7d0;
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
}

.est-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #14532d;
}

.est-icon {
  font-size: 1.4rem;
}

.est-ref-code {
  font-size: 0.85rem;
  color: #15803d;
  font-weight: 500;
}

.btn-discard-estimate {
  background: transparent;
  border: 1px solid #86efac;
  color: #15803d;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-discard-estimate:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.est-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem;
}

.est-badge {
  background: #ffffff;
  border: 1px solid #dcfce7;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  color: #334155;
}

.est-badge.est-price {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
  font-weight: 700;
}

html.dark-mode .estimate-attached-card {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
}

html.dark-mode .est-card-head {
  border-bottom-color: rgba(34, 197, 94, 0.2);
}

html.dark-mode .est-card-title {
  color: #86efac;
}

html.dark-mode .est-ref-code {
  color: #4ade80;
}

html.dark-mode .btn-discard-estimate {
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

html.dark-mode .est-badge {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

html.dark-mode .est-badge.est-price {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}




