/* ===== Variables ===== */
:root {
  --color-green: #5CAE3F;
  --color-green-dark: #337300;
  --color-green-light: #66cc33;
  --color-orange: #FF8C00;
  --color-orange-alt: #ff9933;
  --color-dark: #333333;
  --color-dark-footer: #222222;
  --color-dark-bottom: #1a1a1a;
  --color-gray-text: #4A4A4A;
  --color-gray-light: #A0A0A0;
  --color-gray-border: #cccccc;
  --color-white: #ffffff;
  --font-sans: Arial, Helvetica, sans-serif;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* ===== Reset & base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-dark);
  background: var(--color-white);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== Image placeholders ===== */
.image-placeholder {

  display: block;
}

/* ===== DESKTOP (≥ 1024px) ===== */

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  background: var(--color-dark);
  color: var(--color-gray-light);
  font-size: 12px;
  height: 55px;
}

.header-top-inner {
  max-width: 1270px;
  margin: 0 auto;

  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top-nav {
  display: flex;
  gap: 35px;
  align-items: center;
}

.header-top-nav a {
  color: #fff;
font-size: 9px;
font-family: "Open Sans",Arial,sans-serif;
}

.header-top-nav a:hover {
  color: var(--color-white);
}

.icon-flag {
  display: inline-block;
  width: 14px;
  height: 10px;
  margin-left: 4px;
  vertical-align: middle;
  background: #888;
}

.header-top-reserved {
  color: var(--color-gray-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-main {
  background: #258900;
  min-height: 56px;
  border-bottom: 3px solid white;
}

.header-main-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 90px;
}

.header-main-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  width: 161px;
  height: 36px;

  color: var(--color-white);
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-primary {
  display: flex;
  gap: 8px;
  align-items: center;
      margin-left: 30px;
}

.nav-primary-link {
  color: var(--color-white);
  padding: 16px 20px;
  font-size: 16px;
}

.nav-primary-link.is-active {


}

.header-main-right {
  display: flex;
  align-items: center;
  gap: 8px;


  margin-right: -24px;
  min-height: 56px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.btn-search {
  background: url(img/sprites.png) no-repeat;
    background-size: calc(152px / 2);
    width: 21px;
    height: 21px;
    position: relative;
        background-position-x: -21px;
}

.btn-search::after {

}

.btn-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  min-width: 70px;
  color: var(--color-white);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;

  border-left: 1px solid white;
}

.btn-nav-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 10px;


  display: block;
}

.btn-nav-orange {
  background: var(--color-orange);
  color: var(--color-white);
  border-color: var(--color-orange);
  min-width: 140px;
}

.btn-nav-orange .btn-nav-icon {
  background: url(img/sprites.png) no-repeat;
background-size: calc(152px / 2);
width: 21px;
height: 21px;
position: relative;
background-position-x: -42px;
}

/* --- Main / Hero --- */
.main {
  min-height: calc(100vh - 92px);
}

.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;

  z-index: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url(img/cover.jpg);
  background-position: center;
}

.hero-help {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-gray-border);
  cursor: pointer;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--color-dark);
}

.hero-help-chevron {
  font-size: 10px;
  margin-top: -2px;
}

/* --- Login card --- */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.login-card-section {
  padding: 28px 32px;
}

.login-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-section-icon {
  width: 40px;
  height: 40px;

  border-radius: 50%;
  flex-shrink: 0;
}

.login-section-title {
  margin-top: 10px;
margin-bottom: 20px;
margin: 0 auto;
font-size: 23px;
font-weight: 500;
color: rgb(70, 140, 0);
}

.login-section-subtitle {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--color-gray-light);
  letter-spacing: 0.02em;
}

.login-section-links {
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
}

.login-section-links a {
  color: var(--color-green);
  font-size: 13px;
}

.login-form .input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--color-gray-border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.btn-entra {
  background: var(--color-green);
  color: var(--color-white);
  margin-top: 4px;
  margin-bottom: 16px;
}

.login-section-forgot {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-section-forgot a {
  color: var(--color-green);
  font-size: 12px;
}

/* Content blocks (page1, page2, page3) — same card style, hidden by default via JS */
.content-block .content-block-text {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--color-dark);
  line-height: 1.5;
}

/* New customer block */
.section-new-customer {
  background: var(--color-green);
  color: var(--color-white);
}

.section-new-customer-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.section-new-customer-subtitle {
  margin: 0 0 20px;
  font-size: 13px;
  opacity: 0.95;
}

.btn-apri {
  background: var(--color-white);
  color: var(--color-green);
  border: 2px solid var(--color-white);
}

/* Loan block */
.section-loan {
  background: var(--color-gray-text);
  color: var(--color-white);
}

.section-loan-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.section-loan-text {
  margin: 0;
font-size: 13px;
line-height: 1.5;
opacity: 0.9;
color: rgb(70, 140, 0);
background: white;
padding: 11px;
}

/* --- Footer --- */
.footer {
  background: var(--color-dark);
  color: var(--color-gray-light);
}

.footer-social {
  padding: 28px 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social-title {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-white);
  padding-top: 10px;
margin-right: 10px;
}

.footer-social-icons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-icon {
  width: 40px;
  height: 40px;
  background: var(--color-dark-footer);
  border: 1px solid var(--color-gray-light);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 14px;
}

.footer-links {
  padding: 32px 48px 24px;
  background: var(--color-dark-footer);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
  margin-bottom: 32px;
}

.footer-columns-secondary {
  margin-bottom: 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col-title {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-white);
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--color-gray-light);
  font-size: 12px;
}

.footer-col a:hover {
  color: var(--color-white);
}

.footer-bottom {
  background: var(--color-dark-bottom);
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.footer-logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 8px;
}

.footer-legal {
  margin: 0;
  font-size: 11px;
  color: var(--color-gray-light);
}

.footer-garanzia strong {
  display: block;
  color: var(--color-white);
  font-size: 12px;
  margin-bottom: 4px;
}

.footer-garanzia p {
  margin: 0;
  font-size: 11px;
  color: var(--color-gray-light);
}

/* Mobile-only elements: hidden on desktop */
.mobile-tabs,
.mobile-accordion,
.footer-esignature {
  display: none;
}

/* ===== MOBILE (≤ 768px) ===== */
@media (max-width: 768px) {
  /* Hide desktop header parts */
  .header-top {
    display: none;
  }

  .header-main {
    min-height: 48px;
  }

  .header-main-inner {
    padding: 0 16px;
    min-height: 48px;
  }

  .header-main-left .nav-primary {
    display: none;
  }

  .header-main-right .btn-nav {
    display: none;
  }

  .header-main-right .btn-nav:nth-child(3) {
    display: flex;
    min-width: auto;
    padding: 8px;
    color: var(--color-white);
    background: transparent;
    border: none;
  }

  .header-main-right .btn-nav:nth-child(3) .btn-nav-text {
    display: none;
  }

  .header-main-right .btn-nav:nth-child(3) .btn-nav-icon {
    background: var(--color-white);
    width: 20px;
    height: 16px;
    border-radius: 0;
  }

  .logo {
    width: 120px;
    height: 32px;
    font-size: 10px;
  }

  .header-main-right {
    margin-right: -16px;
    padding: 6px 8px;
    gap: 4px;
    background: transparent;
  }

  .btn-search {
    width: 36px;
    height: 36px;
  }

  /* Mobile tabs */
  .mobile-tabs {
    display: flex;
    width: 100%;
  }

  .mobile-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-white);
  }

  .mobile-tab-green {
    background: var(--color-green-light);
  }

  .mobile-tab-orange {
    background: var(--color-orange-alt);
  }

  .mobile-tab-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: block;
  }

  /* Main / Hero: full width, stacked */
  .hero {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }

  .hero-bg {
    min-height: 320px;
    position: relative;
  }

  .hero-help {
    display: none;
  }

  .login-card {
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    margin-top: 0;
  }

  .login-card-section {
    padding: 24px 20px;
  }

  .login-section-title {
    font-size: 18px;
    text-align: center;
  }

  .login-section-header {
    justify-content: center;
  }

  .login-section-subtitle {
    text-align: left;
  }

  /* Loan section: white inner box on mobile */
  .section-loan {
    padding: 24px 20px;
  }

  .section-loan-text {
    background: var(--color-white);
    color: var(--color-dark);
    padding: 16px;
    border-radius: 6px;
    margin-top: 8px;
  }

  /* Footer: hide columns, show accordion */
  .footer-social {
    padding: 24px 20px;
    text-align: center;
  }

  .footer-social-title {
    margin-bottom: 16px;
  }

  .footer-social-icons {
    justify-content: center;
  }

  .social-icon {
    width: 44px;
    height: 44px;
  }

  .footer-links {
    display: none;
  }

  .mobile-accordion {
    display: block;
    background: var(--color-dark-footer);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-accordion-item summary {
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-white);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-accordion-item summary::-webkit-details-marker {
    display: none;
  }

  .mobile-accordion-item summary::before {
    content: "▶";
    font-size: 10px;
    color: var(--color-gray-light);
  }

  .mobile-accordion-item[open] summary::before {
    content: "▼";
  }

  .mobile-accordion-item p {
    margin: 0;
    padding: 0 20px 16px 36px;
    font-size: 12px;
    color: var(--color-gray-light);
    line-height: 1.5;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
  }

  .footer-esignature {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: var(--color-dark-bottom);
    color: var(--color-white);
    font-size: 13px;
    min-height: 60px;
  }

  .footer-garanzia {
    text-align: center;
  }
}

/* ===== Breakpoint 769–1023: keep desktop layout ===== */
@media (min-width: 769px) and (max-width: 1023px) {
  .hero {
    padding: 24px 24px 40px;
  }

  .login-card {
    max-width: 360px;
  }

  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-columns-secondary {
    grid-template-columns: repeat(2, 1fr);
  }
}
