/*
 * Horus Energy - Installazioni (Public)
 * Stile derivato dalla struttura HTML fornita dall'utente.
 */

:root {
  --hei-primary: #2c7a34;
  --hei-accent: #e67e22;
  --hei-text: #333;
  --hei-muted: #888;
  --hei-white: #fff;
  --hei-bg: #f9f9f9;
}

/* -------------------- Single (Scheda impianto) -------------------- */

.hei-installazione {
  background-color: var(--hei-bg);
  color: var(--hei-text);
}

.hei-project-hero {
  background-size: cover;
  background-position: center;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--hei-white);
}

.hei-project-hero__inner {
  padding: 0 15px;
}

.hei-project-hero h1 {
  font-size: 2.5rem;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hei-project-hero p {
  font-size: 1.3rem;
  font-weight: 300;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Forza titolo e sottotitolo bianchi nel hero (il tema puo' sovrascrivere h1/p) */
body.single-he_installazione .hei-project-hero .hei-project-hero__inner h1,
body.single-he_installazione .hei-project-hero .hei-project-hero__inner h1 *,
body.single-he_installazione .hei-project-hero .hei-project-hero__inner p,
body.single-he_installazione .hei-project-hero .hei-project-hero__inner p * {
  color: rgba(255,255,255,0.9) !important;
}


/* Breadcrumb sotto al sottotitolo (nel hero) */
.hei-hero-breadcrumbs {
  margin-top: 14px;
  font-size: 0.9rem;
  line-height: 1.2;
  color: rgba(255,255,255,0.9);
}

.hei-hero-breadcrumbs a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

.hei-hero-breadcrumbs a:hover {
  color: #fff;
  text-decoration: underline;
}

.hei-hero-breadcrumbs .sep {
  margin: 0 8px;
  opacity: 0.75;
}

.hei-hero-breadcrumbs .current {
  opacity: 0.95;
}

/* Nascondi title/breadcrumb del tema Solak (ThemeHoly) solo sulle singole installazioni */
body.single-he_installazione .breadcumb-wrapper,
body.single-he_installazione #breadcumbwrap,
body.single-he_installazione .page-title,
body.single-he_installazione .page-title-area,
body.single-he_installazione .page-header,
body.single-he_installazione .page-header-wrap,
body.single-he_installazione .breadcrumb-area {
  display: none !important;
}

.hei-container {
  max-width: 1100px;
  margin: -50px auto 50px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.hei-specs-section {
  background: var(--hei-white);
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  margin-bottom: 40px;
}

.hei-section-title {
  text-align: center;
  margin: 0 0 30px;
  color: var(--hei-primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.5rem;
}

.hei-specs-grid {
  display: grid;
  /* Griglia "ordinata": stesso numero di card per riga */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}

@media (max-width: 992px) {
  .hei-specs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .hei-specs-grid {
    grid-template-columns: 1fr;
  }
}

.hei-spec-card {
  text-align: center;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: var(--hei-white);
}

.hei-spec-card:hover {
  border-color: var(--hei-primary);
  background-color: #fcfcfc;
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.hei-spec-icon {
  font-size: 2rem;
  color: var(--hei-primary);
  margin-bottom: 10px;
}

.hei-spec-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--hei-muted);
  margin-bottom: 5px;
  font-weight: 600;
}

.hei-spec-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--hei-text);
}

.hei-spec-card--empty {
  opacity: 0.75;
}

.hei-spec-card--empty .hei-spec-value {
  color: var(--hei-muted);
  font-weight: 600;
}

.hei-description-section {
  background: var(--hei-white);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 40px;
  border-left: 5px solid var(--hei-primary);
}

.hei-description-section h3 {
  margin-top: 0;
  color: var(--hei-primary);
}

.hei-gallery-section {
  margin-bottom: 40px;
}

.hei-gallery-title {
  color: var(--hei-primary);
  margin: 0 0 20px;
  font-size: 1.5rem;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

.hei-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.hei-gallery-item {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  height: 200px;
  background-color: #ddd;
  position: relative;
}

.hei-gallery-item:hover {
  transform: scale(1.02);
  z-index: 5;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.hei-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hei-gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 5px 10px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.hei-gallery-item:hover .hei-gallery-caption {
  opacity: 1;
}

.hei-cta-section {
  background: var(--hei-primary);
  color: var(--hei-white);
  padding: 50px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(44, 122, 52, 0.3);
}

.hei-cta-section h2 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.hei-cta-section p {
  margin: 0 auto 30px;
  opacity: 0.9;
  max-width: 700px;
}

/* Force CTA title and text to white (theme overrides) */
.hei-cta-section h2,
.hei-cta-section p {
  color: var(--hei-white) !important;
}

.hei-contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  gap: 15px;
}

.hei-form-control {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  box-sizing: border-box;
  font-family: inherit;
}

.hei-form-control:focus {
  outline: 2px solid var(--hei-accent);
}

.hei-contact-form textarea.hei-form-control {
  resize: vertical;
  min-height: 120px;
}

.hei-btn-submit {
  background-color: var(--hei-accent);
  color: var(--hei-white);
  border: none;
  padding: 15px 30px;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  width: 100%;
  margin-top: 10px;
  text-transform: uppercase;
}

.hei-btn-submit:hover {
  background-color: #d35400;
  transform: scale(1.02);
}

.hei-form-status {
  margin: 0 auto 18px;
  padding: 12px 14px;
  border-radius: 8px;
  max-width: 600px;
  text-align: left;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
}

.hei-form-status--ok {
  border-color: rgba(255,255,255,0.45);
}

/* -------------------- Archive / Taxonomy / Shortcode grid -------------------- */

.hei-archive-header {
  max-width: 1100px;
  margin: 30px auto 0;
  padding: 0 20px;
}

.hei-archive-title {
  margin: 0 0 15px;
  color: var(--hei-primary);
  font-size: 2rem;
}

.hei-archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 25px;
}

.hei-archive-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 25px;
}

.hei-archive-toolbar .hei-archive-filters {
  margin: 0;
}

.hei-archive-sort form {
  margin: 0;
}

.hei-sort-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 10px 42px 10px 14px;
  border-radius: 999px;
  border: 1px solid #e7e7e7;
  background: #fff;
  color: var(--hei-text);
  font-weight: 700;
  cursor: pointer;
  position: relative;
}

.hei-archive-sort {
  position: relative;
}

.hei-archive-sort:after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(0,0,0,0.55);
}

@media (max-width: 640px) {
  .hei-archive-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .hei-sort-select {
    width: 100%;
  }
}

.hei-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #e7e7e7;
  background: #fff;
  color: var(--hei-text);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.hei-filter-btn:hover {
  border-color: var(--hei-primary);
  transform: translateY(-1px);
}

.hei-filter-btn--active {
  background: var(--hei-primary);
  color: var(--hei-white);
  border-color: var(--hei-primary);
}

.hei-archive-wrap {
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.hei-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.hei-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hei-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}

.hei-card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.hei-card-thumb {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: #ddd;
}

.hei-card-thumb--empty {
  background-image: linear-gradient(135deg, #eaeaea, #dcdcdc);
}

.hei-card-body {
  padding: 16px 16px 18px;
}

.hei-card-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(44,122,52,0.12);
  color: var(--hei-primary);
  margin-bottom: 10px;
}

.hei-card-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.hei-card-subtitle {
  margin: 0 0 12px;
  color: #555;
}

.hei-card-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.hei-card-meta i {
  color: var(--hei-primary);
  margin-right: 8px;
}

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

@media (max-width: 768px) {
  .hei-container {
    margin-top: -30px;
  }

  .hei-project-hero {
    height: 420px;
  }

  .hei-project-hero h1 {
    font-size: 1.8rem;
  }

  .hei-hero-breadcrumbs {
    font-size: 0.75rem;
    margin-top: 10px;
  }

  .hei-cta-section {
    padding: 30px 20px;
  }

  .hei-specs-section {
    padding: 25px 15px;
  }

  .hei-gallery-item {
    height: 180px;
  }
}
