/* ============================================
   EVOLUTE MEDIA - Landing Page
   CSS Variables (from Figma) + Components
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-bg-dark: #0F1D0E;
  --color-bg-footer: #001712;
  --color-accent: #3CC669;
  --color-accent-hover: #33b05a;
  --color-text-light: #F5F5F5;
  --color-text-dark: #0F1D0E;
  --color-white: #FFFFFF;
  --color-border-light: rgba(255, 255, 255, 0.5);
  --color-border-accent: #016651;
  --color-placeholder: rgba(15, 29, 14, 0.5);
  --color-placeholder-footer: rgba(15, 29, 14, 0.6);
  --color-avatar-bg: rgba(0, 23, 18, 0.4);

  /* Typography - Adobe Fonts Project wlb1djy */
  --font-family: "proxima-nova", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing (mobile-first) */
  --container-padding: 1.25rem;
  --section-padding-y: 3rem;
  --grid-gap: 2rem;

  /* Breakpoints */
  --bp-tablet: 768px;
  --bp-desktop: 1024px;
  --bp-wide: 1200px;

  /* Typography scale (mobile-first: min=mobile 320px, max=desktop ~1400px) - mobile proporzionalmente più grande */
  --fs-hero-line1: clamp(2.35rem, 10vw, 142px);
  --fs-hero-line2: clamp(3rem, 16vw, 230px);
  --fs-hero-cta: clamp(1.125rem, 2.5vw, 2.5rem);
  --fs-hero-sub: clamp(1rem, 2.5vw, 1.25rem);
  --fs-section-heading: clamp(2rem, 5.5vw, 80px);
  --fs-h3: clamp(1.125rem, 2.7vw, 38px);
  --fs-h4: clamp(1rem, 1.55vw, 22px);
  --fs-body: clamp(1rem, 1.2vw, 1rem);
  --fs-body-lg: clamp(1.0625rem, 1.4vw, 1.25rem);
  --fs-stat-number: clamp(2rem, 4vw, 4rem);
  --fs-stat-text: clamp(1rem, 1.4vw, 1.25rem);
  --fs-footer-h2: clamp(1.75rem, 3.2vw, 4rem);
  --fs-footer-p: clamp(1rem, 1.2vw, 1.25rem);
  --fs-btn-post-hero: clamp(1.125rem, 1.6vw, 22px);
  --fs-modal-title: clamp(1.375rem, 2vw, 1.5rem);

  /* Line-height scale (display / headings / body / small) */
  --lh-display: 0.95;
  --lh-heading: 0.9;
  --lh-subheading: 1.25;
  --lh-h3: 0.9;
  --lh-h4: 1.25;
  --lh-lead: 1.4;
  --lh-body: 1.45;
  --lh-body-tight: 1.35;
  --lh-label: 1.2;
  --lh-small: 1.35;
}

@media (min-width: 768px) {
  :root {
    --container-padding: 2rem;
    --section-padding-y: 5rem;
    --grid-gap: 3rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --container-padding: 2.5rem;
    --section-padding-y: 6rem;
  }
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Mobile: base più grande per testi proporzionalmente più grandi */
  font-size: 18px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: var(--lh-body);
  color: var(--color-text-light);
  background: var(--color-bg-dark);
}

p {
  font-weight: 300;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  padding-top: 2em;
  padding-bottom: 2em;
}

/* --- Digital Pattern Overlay --- */
.section-dark {
  position: relative;
  background-color: var(--color-bg-dark);
}

.section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ============================================
   COMPONENT: Navbar
   ============================================ */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem var(--container-padding);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-logo {
  display: block;
}

.navbar-logo img {
  height: 60px;
  object-fit: contain;
}

/* ============================================
   COMPONENT: Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 9rem;
  padding-bottom: 4rem;
  overflow: hidden;
  background-image: url("../images/header.webp");
  background-size: cover;
  background-position: center;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-title {
  font-family: "proxima-nova", var(--font-family);
  font-weight: 500;
  font-style: normal;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1;
}

.hero-title-line1 {
  font-size: var(--fs-hero-line1);
  letter-spacing: -0.05em;
  display: block;
  line-height: 0.95;
}

.hero-title-line2 {
  font-size: var(--fs-hero-line2);
  letter-spacing: -0.05em;
  display: block;
  line-height: 0.75;
}

@media (max-width: 599px) {
  .hero-title-line1 {
    font-size: clamp(3.15rem, 13.5vw, 142px);
  }

  .hero-title-line2 {
    font-size: clamp(4rem, 21vw, 230px);
  }
}

.hero-title .highlight {
  color: var(--color-accent);
}

.hero-cta-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-top: 3rem;
  margin-bottom: 1rem;
  position: relative;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: "proxima-nova", var(--font-family);
  font-size: var(--fs-hero-cta);
  font-weight: 600;
  color: #000000;
  background: var(--color-accent);
  border: none;
  border-radius: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

@media (max-width: 599px) {
  .hero-cta {
    font-size: clamp(0.8125rem, 2.5vw, 1.125rem);
    padding: 0.875rem 1.25rem;
  }
}

.hero-hand {
  position: relative;
  z-index: 1;
  width: 60px;
  height: auto;
  margin-left: -8px;
}

@media (min-width: 768px) {
  .hero-hand {
    width: 80px;
    margin-left: -12px;
  }
}

.hero-scroll {
  display: inline-block;
  margin-top: 2rem;
  color: var(--color-text-light);
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
}

.hero-scroll:hover {
  opacity: 1;
  transform: translateY(4px);
}

.hero-scroll svg {
  display: block;
}

.modal-security-form {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.modal-form-row input[type="text"] {
  flex: 1;
  min-width: 180px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font-family);
  color: var(--color-text-dark);
  background: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
}

.modal-form-row input[type="text"]::placeholder {
  color: var(--color-placeholder);
}

@media (max-width: 599px) {
  .modal {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 2rem;
  }

  .modal-dialog {
    max-height: calc(100vh - 2rem);
  }

  .modal-header {
    padding: 1rem 1rem;
  }

  .modal-title {
    font-size: 1.25rem;
    line-height: 1.3;
    padding-right: 0.75rem;
  }

  .modal-close {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 1.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .modal-body {
    padding: 1rem 1rem;
  }

  .modal-form-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .modal-form-row input[type="text"] {
    min-width: 0;
    width: 100%;
    font-size: 16px;
    padding: 0.875rem 1rem;
  }

  .modal-form-row .btn {
    width: 100%;
    padding: 0.875rem 1.25rem;
  }
}

.hero-cta:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
}

.hero-sub {
  font-size: var(--fs-hero-sub);
  font-weight: 500;
  color: var(--color-text-light);
  opacity: 0.95;
  line-height: var(--lh-lead);
}

.hero-sub .accent {
  font-weight: 600;
}

/* ============================================
   COMPONENT: Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-family);
  font-size: clamp(0.9rem, 1.5vw, 1.25rem);
  font-weight: 500;
  text-decoration: none;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-dark);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-promo {
  background: #FFFFFF;
  color: var(--color-text-dark);
}

.btn-promo:hover {
  background: #f5f5f5;
}

.btn-outline {
  background: var(--color-white);
  color: var(--color-text-dark);
  border: 2px solid var(--color-text-dark);
}

.btn-outline:hover {
  background: var(--color-text-dark);
  color: var(--color-white);
  border-color: var(--color-text-dark);
}

/* Pulsanti dopo la sezione hero */
main .btn,
.footer .btn,
.modal .btn {
  font-size: var(--fs-btn-post-hero);
  font-weight: 400;
  border-radius: 8px;
  padding: 0.5rem 1rem;
}

/* ============================================
   Section: Hosting Importance (2-col)
   ============================================ */
.hosting-importance {
  background-color: #0F1D0E;
}

.hosting-importance-grid {
  align-items: start;
}

.hosting-importance-col-title {
  text-align: left;
}

.hosting-importance .section-heading {
  text-align: left;
}

.hosting-importance-col-content {
  text-align: left;
}

.hosting-importance-h3 {
  font-family: "proxima-nova", var(--font-family);
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: var(--lh-h3);
  letter-spacing: -0.5px;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hosting-importance-h3 {
    letter-spacing: -1.5px;
  }
}

.hosting-importance-h3 .highlight {
  color: var(--color-accent);
  font-weight: 600;
}

.heading-h4 {
  font-family: "proxima-nova", var(--font-family);
  font-size: var(--fs-h4);
  font-weight: 400;
  line-height: var(--lh-h4);
  letter-spacing: -0.5px;
  color: var(--color-text-light);
}

.heading-h4 .highlight {
  color: var(--color-accent);
  font-weight: 600;
}

.testimonial-card .heading-h4 {
  color: var(--color-text-dark);
}


.hosting-importance-p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-light);
  opacity: 0.95;
  margin-bottom: 1.5rem;
}

.hosting-importance-btn {
  margin-top: 0;
}

@media (min-width: 1024px) {
  .hosting-importance .two-col {
    gap: 6rem;
  }
}

.section {
  padding: var(--section-padding-y) 0;
}

.test-grade-result {
  padding-top: 0;
}

.section-light {
  background: var(--color-white);
  color: var(--color-text-dark);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  align-items: center;
}

@media (min-width: 1024px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.section-heading {
  font-family: "proxima-nova", var(--font-family);
  font-size: var(--fs-section-heading);
  font-style: normal;
  font-weight: 400;
  line-height: var(--lh-heading);
  letter-spacing: -2px;
  color: var(--color-text-light);
}

@media (min-width: 768px) {
  .section-heading {
    letter-spacing: -5px;
  }
}

.section-heading .highlight {
  color: var(--color-accent);
  font-weight: 400;
}

.highlight-warning {
  color: #E74C3C;
  font-weight: 500;
}

.section-heading-dark {
  color: var(--color-text-dark);
}

.section-heading-dark .highlight {
  color: var(--color-accent);
}

.section-text {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-lead);
  color: var(--color-text-light);
  opacity: 0.95;
}

.section-text .highlight {
  font-weight: 600;
}

.section-text-dark {
  color: var(--color-text-dark);
}

.section-text-dark .highlight {
  color: var(--color-text-dark);
  font-weight: 600;
}

/* ============================================
   Section: Hosting Benefits (server + list)
   ============================================ */
.hosting-benefits {
  background-image: url("../images/hosting_benefits_mobile.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (min-width: 1024px) {
  .hosting-benefits {
    background-image: url("../images/hosting_benefits.webp");
  }
}

.two-col-reverse .col-img {
  order: 2;
}

@media (min-width: 1024px) {
  .two-col-reverse {
    grid-template-columns: 1fr 1fr;
  }
  .two-col-reverse .col-img {
    order: 1;
  }
  .two-col-reverse .col-text {
    order: 2;
  }
}

.col-img img {
  width: 100%;
  border-radius: 8px;
}

/* Lista con icona personalizzata (dopo hero) */
main ul,
.footer ul {
  list-style: none;
}

main ul li,
.footer ul li {
  position: relative;
  padding-left: 3rem;
}

main ul li::before,
.footer ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 28px;
  height: 28px;
  background-image: url("../images/list_icon.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
}

.benefits-list {
  margin-top: 2.5rem;
}

.benefits-list li {
  margin-bottom: 1.5rem;
}

.benefits-list li:last-child {
  margin-bottom: 0;
}

/* ============================================
   Section: Rischi Hosting non affidabile
   ============================================ */
.hosting-risks .col-text {
  text-align: left;
}

.hosting-risks .section-heading {
  text-align: left;
  margin-bottom: 1.5rem;
}

.risks-box {
  border: 2px solid #E74C3C;
  border-radius: 12px;
  padding: 1.5rem;
  background: var(--color-bg-dark);
}

.risks-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.risks-list li::before {
  display: none;
}

.risks-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0;
  padding-left: 0;
}

.risks-list li:last-child {
  margin-bottom: 0;
}

.risks-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.risks-item-content p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-light);
  margin: 0;
  font-weight: 300;
}

@media (min-width: 1024px) {
  .hosting-risks .two-col {
    gap: 4rem;
    align-items: start;
  }
}

.benefits-list li p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-light);
  margin: 0;
}

/* ============================================
   Section: Contact Form
   ============================================ */
.contact-section .section-heading {
  text-align: left;
}

.contact-section-text {
  text-align: left;
}

.contact-section-promo-label {
  font-family: "proxima-nova", var(--font-family);
  font-size: clamp(1.05rem, 1.6vw, 2rem);
  line-height: var(--lh-label);
  font-weight: 400;
  color: var(--color-text-dark);
  margin: 1.5rem 0 0.15em;
}

.contact-section-promo-label .highlight {
  color: var(--color-accent);
}

.contact-section-promo-title {
  font-family: "proxima-nova", var(--font-family);
  font-size: clamp(1.75rem, 4.2vw, 2rem);
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 0 1.5rem;
  line-height: 1.1;
}

.contact-section-desc {
  font-size: var(--fs-body-lg);
  color: var(--color-text-dark);
  line-height: var(--lh-body);
  margin-top: 1rem;
}

.contact-section-desc--lead {
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  margin-top: 2rem;
}

.contact-section-desc--lead strong {
  font-weight: 600;
}

.contact-section-desc--small {
  font-size: clamp(0.875rem, 1.1vw, 1rem);
  color: #6b7280;
  line-height: var(--lh-body);
  margin-bottom: 0;
}

.contact-section-desc:last-of-type {
  margin-bottom: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-form input {
  width: 100%;
  padding: 0.75rem 0;
  font-family: var(--font-family);
  font-size: 1rem;
  color: var(--color-text-dark);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(15, 29, 14, 0.3);
  border-radius: 0;
  margin-bottom: 1rem;
}

.contact-form input::placeholder {
  color: #9ca3af;
}

.contact-form input:focus {
  outline: none;
  border-bottom-color: var(--color-accent);
}

.contact-form-privacy {
  margin-top: 1rem;
}

.contact-form-privacy-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-dark);
  cursor: pointer;
}

.contact-form-privacy-label input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}

.contact-form-privacy-label a {
  color: var(--color-accent);
  text-decoration: underline;
}

.contact-form-privacy-label a:hover {
  color: var(--color-accent-hover);
}

.contact-form-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.contact-form-note {
  font-size: 0.8rem;
  color: #9ca3af;
  margin: 0;
}

.contact-form-message {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.contact-form-message.hidden {
  display: none;
}

.contact-form-message--success {
  background: rgba(60, 198, 105, 0.15);
  color: var(--color-text-dark);
  border: 1px solid rgba(60, 198, 105, 0.3);
}

.contact-form-message--error {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* ============================================
   Section: Stats (Perché scegliere noi)
   ============================================ */
.stats-section .section-heading {
  margin-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.stat-number {
  font-size: var(--fs-stat-number);
  font-weight: 500;
  color: var(--color-accent);
  line-height: 1;
  flex-shrink: 0;
}

.stat-text {
  font-size: var(--fs-stat-text);
  font-weight: 300;
  line-height: var(--lh-lead);
  padding-top: 0.25rem;
}

.stat-text strong {
  font-weight: 500;
}

.stats-description {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  max-width: 40ch;
  margin-bottom: 2rem;
}

/* ============================================
   Section: Testimonials
   ============================================ */
.testimonials-section .section-heading-dark {
  text-align: center;
  margin-bottom: 2rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial-card {
  text-align: center;
  padding: 1.5rem;
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(15, 29, 14, 0.06);
}

.testimonial-avatar {
  width: 108px;
  height: 108px;
  margin: 0 auto 1rem;
  background: var(--color-avatar-bg);
  color: var(--color-white);
  font-size: 2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.testimonial-stars {
  color: var(--color-accent);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.testimonial-text {
  font-size: 1rem;
  color: var(--color-text-dark);
  line-height: var(--lh-body);
}

/* ============================================
   COMPONENT: Footer
   ============================================ */
.footer {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 450px;
}

@media (min-width: 768px) {
  .footer {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-map {
  min-height: 350px;
  background: #e5e7eb;
}

@media (min-width: 768px) {
  .footer-map {
    min-height: 450px;
  }
}

.footer-map iframe {
  width: 100%;
  height: 100%;
  min-height: 350px;
  border: none;
}

@media (min-width: 768px) {
  .footer-map iframe {
    min-height: 450px;
  }
}

.footer-contact {
  background: var(--color-bg-footer);
  padding: 2rem var(--container-padding);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .footer-contact {
    padding: 3rem;
  }
}

.footer-contact h2 {
  font-size: var(--fs-footer-h2);
  font-weight: 500;
  letter-spacing: -1px;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .footer-contact h2 {
    letter-spacing: -2px;
  }
}

.footer-contact p {
  font-size: var(--fs-footer-p);
  line-height: var(--lh-body);
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.footer-contact a {
  color: var(--color-text-light);
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-contact a.btn:hover {
  text-decoration: none;
}

.footer-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.footer-legal {
  margin-top: auto;
  padding-top: 2rem;
  text-align: left;
}

.footer-legal p.footer-legal-text,
.footer-legal .footer-legal-text {
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  line-height: var(--lh-small);
  color: rgba(245, 245, 245, 0.45);
  margin-bottom: 0.15rem;
}

.footer-legal p.footer-legal-links,
.footer-legal .footer-legal-links {
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  margin: 0;
}

.footer-legal-links a {
  color: rgba(245, 245, 245, 0.45);
  text-decoration: none;
}

.footer-legal-links a:hover {
  color: rgba(245, 245, 245, 0.7);
  text-decoration: underline;
}

.footer-legal-sep {
  margin: 0 0.5rem;
  opacity: 0.6;
}

/* ============================================
   Security Test Modal
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--container-padding);
}

.modal.hidden {
  display: none !important;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 29, 14, 0.9);
  cursor: pointer;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  background: var(--color-bg-dark);
  border-radius: 15px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(60, 198, 105, 0.3);
}

.modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--container-padding);
  background: var(--color-bg-dark);
  flex-shrink: 0;
}

.modal-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(60, 198, 105, 0.03) 2px,
      rgba(60, 198, 105, 0.03) 4px
    ),
    linear-gradient(180deg, rgba(60, 198, 105, 0.06) 0%, transparent 40%);
  pointer-events: none;
}

.modal-title {
  position: relative;
  margin: 0;
  font-family: "proxima-nova", var(--font-family);
  font-size: var(--fs-modal-title);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-text-light);
}

.modal-title .highlight {
  color: var(--color-accent);
}

.modal-close {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text-light);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--color-border-light);
  cursor: pointer;
  border-radius: 15px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.modal-close:hover {
  color: var(--color-bg-dark);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.modal-body {
  padding: 1.5rem var(--container-padding);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  scrollbar-width: thin;
  scrollbar-color: rgba(60, 198, 105, 0.6) rgba(0, 0, 0, 0.2);
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(60, 198, 105, 0.6);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(60, 198, 105, 0.8);
}

.results-summary {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.grade-badge-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  min-width: 140px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.grade-badge-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

.modal-body .grade-badge {
  margin-top: 0;
  margin-bottom: 0;
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 1.5rem;
  font-size: 8rem;
  line-height: 8rem;
  font-weight: 800;
  animation: grade-badge-appear 0.4s ease-out;
}

@keyframes grade-badge-appear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 480px) {
  .results-summary {
    flex-direction: column;
  }

  .grade-badge-wrap {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
  }

  .summary-row {
    padding: 1.5rem 1.5rem;
  }
}

.grade-badge-wrap.grade-aplus { background: var(--color-accent); color: var(--color-text-dark); }
.grade-badge-wrap.grade-a { background: #22c55e; color: var(--color-text-dark); box-shadow: 0 8px 32px rgba(34, 197, 94, 0.35), 0 0 0 3px rgba(255, 255, 255, 0.15); }
.grade-badge-wrap.grade-b { background: #84cc16; color: var(--color-text-dark); box-shadow: 0 8px 32px rgba(132, 204, 22, 0.35), 0 0 0 3px rgba(255, 255, 255, 0.15); }
.grade-badge-wrap.grade-c { background: #eab308; color: var(--color-text-dark); box-shadow: 0 8px 32px rgba(234, 179, 8, 0.35), 0 0 0 3px rgba(255, 255, 255, 0.15); }
.grade-badge-wrap.grade-d { background: #f97316; color: var(--color-white); box-shadow: 0 8px 32px rgba(249, 115, 22, 0.35), 0 0 0 3px rgba(255, 255, 255, 0.15); }
.grade-badge-wrap.grade-f { background: #dc2626; color: var(--color-white); box-shadow: 0 8px 32px rgba(220, 38, 38, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.15); }
.grade-badge-wrap.grade-r { background: #6366f1; color: var(--color-white); box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.15); }

.summary-row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  font-size: 0.9rem;
  flex: 1;
  min-width: 0;
}

.summary-item {
  color: var(--color-text-light);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.summary-item strong {
  flex-shrink: 0;
  min-width: 5.5rem;
  color: var(--color-text-light);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.headers-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 2rem;
}

.headers-table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
}

.headers-table th,
.headers-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-text-light);
}

.headers-table th {
  background: rgba(0, 0, 0, 0.2);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}

@media (max-width: 599px) {
  .headers-table thead {
    display: none;
  }

  .headers-table tbody tr {
    display: block;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .headers-table tbody td {
    display: block;
    padding: 0.5rem 0;
    border-bottom: none;
  }

  .headers-table tbody td:first-child {
    padding-top: 0;
    font-weight: 600;
    font-size: 0.95rem;
  }

  .headers-table tbody td:nth-child(2)::before {
    content: "Stato: ";
    font-weight: 500;
    margin-right: 0.5rem;
  }

  .headers-table tbody td:nth-child(3)::before {
    content: "Valore: ";
    display: block;
    font-weight: 500;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    opacity: 0.9;
  }
}

.header-status {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.header-status.green { background: var(--color-accent); }
.header-status.red { background: #dc2626; }
.header-status.yellow { background: #eab308; }

.header-value {
  font-family: monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.header-info {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
}

.results-heading {
  color: var(--color-text-light);
}

.security-loading {
  color: var(--color-text-light);
  font-weight: 500;
  padding: 1rem 0;
}

.security-error-msg {
  color: #dc2626;
  padding: 1rem 1.25rem;
  background: rgba(220, 38, 38, 0.08);
  border-radius: 15px;
  margin-bottom: 1rem;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.results-title {
  margin-bottom: 1rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.results-heading {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text-light);
  font-weight: 500;
  font-size: 1.1rem;
}

.hidden {
  display: none !important;
}

/* Home page utility classes (replace inline styles) */
.text-mb-1 { margin-bottom: 1rem; }
.text-mb-1_5 { margin: 1.5rem 0; }
.text-fs-095 { font-size: 0.95rem; }
.text-fs-1 { font-size: 1rem; }
.text-fs-125 { font-size: 1.25rem; }
.text-fs-175 { font-size: 1.75rem; }
.text-mt-1_5 { margin-top: 1.5rem; }
.section-subheading { font-size: clamp(1.375rem, 2vw, 1.75rem); margin: 1rem 0; }
