/* ==================================================
   HERO
================================================== */

.docs-hero {
  position: relative;
  padding: 170px 20px 90px;

  background:
    linear-gradient(
      90deg,
      rgba(0, 73, 145, 0.88),
      rgba(0, 73, 145, 0.62)
    ),
    url("assets/img/documenti/hero-documenti.webp") center center / cover no-repeat;

  color: white;
  text-align: center;
  overflow: hidden;
}

.docs-hero h1 {
  color: white;

  margin: 20px 0;

  font-size: 3rem;
}

.docs-hero p {
  max-width: 720px;

  margin: auto;

  opacity: 0.9;
}

.eyebrow {
  display: inline-block;

  padding: 8px 18px;

  background: #d6007f;

  border-radius: 30px;

  font-size: 0.85rem;

  font-weight: 700;

  letter-spacing: 1px;
}

/* ==================================================
   SEARCH
================================================== */

.docs-search {
  padding: 60px 20px 30px;
}

.search-box {
  max-width: 700px;

  margin: auto;

  display: flex;

  align-items: center;

  gap: 15px;

  background: white;

  padding: 18px 25px;

  border-radius: 60px;

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.search-box input {
  border: none;

  width: 100%;

  outline: none;

  font-size: 1rem;
}

.search-box i {
  color: #143a5a;
}

/* ==================================================
   FILTRI
================================================== */

.docs-filter {
  padding-bottom: 60px;
}

.filter-buttons {
  display: flex;

  justify-content: center;

  flex-wrap: wrap;

  gap: 15px;
}

.filter-buttons button {
  border: none;

  background: #eef2f7;

  color: #143a5a;

  padding: 12px 24px;

  border-radius: 30px;

  cursor: pointer;

  transition: 0.3s;

  font-weight: 600;
}

.filter-buttons button.active,
.filter-buttons button:hover {
  background: #d6007f;

  color: white;
}

/* ======================================================
   DOCUMENTI PIÙ RICHIESTI
====================================================== */

.featured-documents {
  padding: 100px 0;
}

.featured-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 28px;

  margin-top: 60px;
}

.featured-card {
  background: #ffffff;

  border-radius: 24px;

  padding: 35px;

  border: 1px solid #eceff3;

  transition: 0.35s;

  text-align: center;
}

.featured-card:hover {
  transform: translateY(-8px);

  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
}

.featured-icon {
  width: 78px;

  height: 78px;

  margin: 0 auto 25px;

  border-radius: 20px;

  background: #eef4fa;

  display: flex;

  justify-content: center;

  align-items: center;
}

.featured-icon i {
  font-size: 2rem;

  color: #143a5a;
}

.featured-card h3 {
  margin-bottom: 14px;

  color: #143a5a;
}

.featured-card p {
  margin-bottom: 28px;

  color: #666;

  line-height: 1.7;
}

@media (max-width: 1100px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ======================================================
   DOCUMENTI
====================================================== */

.documents {
  padding: 100px 0;

  background: #f7f8fb;
}

.documents-grid {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 35px;

  align-items: start;
}

.document-card {
  background: #fff;

  border: 1px solid #e8edf3;

  border-radius: 24px;

  overflow: hidden;

  transition: all 0.3s ease;

  box-shadow: 0 4px 16px rgba(20, 58, 90, 0.05);
}

.document-card:hover {
  transform: translateY(-6px);

  box-shadow: 0 16px 40px rgba(20, 58, 90, 0.12);

  border-color: #d6007f33;
}

.document-card.open {
  border-color: #d6007f;

  box-shadow: 0 20px 45px rgba(214, 0, 127, 0.15);
}

.document-icon {
  width: 96px;
  height: 96px;

  border-radius: 24px;

  background: linear-gradient(135deg, #143a5a, #1b5d88);

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 24px;

  box-shadow: 0 15px 35px rgba(20, 58, 90, 0.18);

  transition: 0.35s;
}

.document-icon i {
  font-size: 40px;
  color: #ffffff !important;
}

.document-card:hover .document-icon {
  transform: rotate(-6deg) scale(1.05);

  background: linear-gradient(135deg, #d6007f, #143a5a);
}

.document-card h3 {
  font-size: 3rem;

  line-height: 1.1;

  min-height: 2.4em;
  color: #143a5a;
  transition: 0.3s;
}

.document-card p {
  min-height: 3em;
  font-size: 1rem;
  line-height: 1.55;
  color: #5f6d7b;
  margin: 0;
  min-height: 70px;
  cursor: pointer;
}

.document-link {
  color: #e4007c;

  text-decoration: none;

  font-weight: 700;
}

.document-link:hover {
  text-decoration: underline;
}

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

/* ==========================================
   ACCORDION DOCUMENTI
========================================== */

.document-header {
  width: 100%;

  padding: 32px;

  background: none;

  border: none;

  text-align: left;

  display: flex;

  justify-content: space-between;

  align-items: flex-start;

  cursor: pointer;

  min-height: 270px;
}

.document-header i {
  font-size: 1.2rem;

  color: #143a5a;

  transition: 0.3s;

  margin-top: 10px;
}

.document-content {
  max-height: 0;

  overflow: hidden;

  opacity: 0;

  margin-top: 0;

  padding: 0 28px;

  transition:
    max-height 0.45s ease,
    opacity 0.35s ease,
    padding 0.35s ease;
}

.document-content a {
  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 18px 0;

  border-top: 1px solid #eef2f6;

  text-decoration: none;

  color: #143a5a;

  font-weight: 600;

  transition: 0.3s;
}

.document-content a:hover {
  color: #d6007f;

  padding-left: 10px;
}

.document-card.open .document-content {
  max-height: 900px;

  opacity: 1;

  padding: 0 28px 28px;

  margin-top: 10px;

  border-top: 1px solid #ececec;
}

.document-card.open .document-header i {
  transform: rotate(180deg);
}

/*==================================================
DOCUMENTAZIONE
==================================================*/

.documents-library {
  padding: 110px 0;

  background: #f8fafc;
}

.documents-accordion {
  margin-top: 60px;
}

.doc-category {
  background: #ffffff;

  border: 1px solid #e8edf3;

  border-radius: 22px;

  margin-bottom: 22px;

  overflow: hidden;

  transition: 0.35s;
}

.doc-category:hover {
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.doc-header {
  width: 100%;

  padding: 28px 35px;

  background: none;

  border: none;

  display: flex;

  justify-content: space-between;

  align-items: center;

  cursor: pointer;
}

.doc-header > div {
  display: flex;

  align-items: center;

  gap: 18px;
}

.doc-header i:first-child {
  width: 54px;

  height: 54px;

  border-radius: 16px;

  background: #eef5fb;

  display: flex;

  justify-content: center;

  align-items: center;

  color: #143a5a;

  font-size: 1.4rem;
}

.doc-header span {
  font-size: 1.35rem;

  font-weight: 700;

  color: #143a5a;
}

.doc-header .fa-chevron-down {
  color: #d6007f;
  font-size: 30px;

  transition: 0.3s;

  margin-left: 20px;
}

.doc-content {
  display: none;

  padding: 0 35px 30px;
}

/*==================================================
LINK DOCUMENTI
==================================================*/

.doc-content a {
  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 18px 0;

  border-top: 1px solid #edf2f7;

  text-decoration: none;

  color: #143a5a;

  font-weight: 600;

  transition: 0.25s;
}

.doc-content a::after {
  content: "Scarica PDF";

  font-size: 0.9rem;

  color: #d6007f;

  font-weight: 700;
}

.doc-content a:hover {
  color: #d6007f;

  padding-left: 10px;
}

/* ---------- Documento ---------- */

.document-item {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 20px;

  padding: 18px;

  margin-top: 14px;

  border: 1px solid #e7edf5;

  border-radius: 16px;

  background: #fff;

  transition: 0.3s ease;

  text-decoration: none;
}

.document-item:hover {
  transform: translateY(-3px);

  box-shadow: 0 12px 30px rgba(20, 58, 90, 0.08);

  border-color: #d6007f22;
  cursor: pointer;
}

.document-info {
  display: flex;

  align-items: center;

  gap: 16px;
}

.document-info i {
  font-size: 28px;

  color: #e53935;
}

.document-info strong {
  display: block;

  color: #143a5a;

  font-size: 1rem;
}

.document-info span {
  display: block;

  margin-top: 4px;

  color: #7a8796;

  font-size: 0.88rem;
}

.download-button {
  padding: 10px 18px;

  border-radius: 999px;

  background: #f4f7fb;

  color: #d6007f;

  font-weight: 700;

  transition: 0.3s;
}

.document-item:hover .download-button {
  background: #d6007f;

  color: #fff;
  cursor: pointer;
}

.document-card:hover h3 {
  color: #d6007f;
}

.document-card {
  position: relative;
}

.document-card::before {
  content: "";

  position: absolute;

  top: 0;
  left: 0;

  width: 100%;
  height: 4px;

  background: #d6007f;

  transform: scaleX(0);

  transition: 0.35s;

  transform-origin: left;
}

.document-card:hover::before {
  transform: scaleX(1);
}

/*======================================
HERO IMAGE
======================================*/

.hero-grid {
  display: grid;

  grid-template-columns: 1.1fr 0.9fr;

  gap: 70px;

  align-items: center;
}

.hero-image img {
  width: 100%;

  border-radius: 28px;

  display: block;

  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

/*======================================
BUTTON GLASS
======================================*/

.button.button-glass {
  background: rgba(255, 255, 255, 0.1);

  color: #ffffff;

  border: 1px solid rgba(255, 255, 255, 0.35);

  backdrop-filter: blur(12px);

  -webkit-backdrop-filter: blur(12px);
}

.button.button-glass:hover {
  background: rgba(255, 255, 255, 0.18);

  border-color: rgba(255, 255, 255, 0.55);

  transform: translateY(-2px);
}

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  z-index: 9999;
}
