/* Stili globali e reset */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}
html, body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
* {
  box-sizing: border-box;
}
img, video, iframe, div {
  max-width: 100%;
}
body {
  overflow-x: hidden;
  background: url('sfondo.jpeg') no-repeat center center fixed;
  background-size: cover;
}
.btn-close-white {
    filter: invert(1);
}

/* Stili comuni per tutti i dispositivi */
.container.main-content-area {
    background-color: rgba(33, 37, 41, 0.85);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    color: white;
    padding: 40px;
    margin-top: 40px;
    margin-bottom: 40px;
    margin-left: auto;
    margin-right: auto;
}
.main-content-area > .row {
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}
.section-bg-primary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.section-bg-secondary {
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.slogan-main, .features-section h2, .audio-demo-section h2, .cta-section h2, .feature-card h3, .audio-card h4 {
    font-family: 'Montserrat', sans-serif;
}
.slogan-main, .features-section h2, .audio-demo-section h2, .cta-section h2 {
    font-weight: 700;
}
.slogan-lead, .subtitle, .feature-card p, .audio-card p {
    font-family: 'Open Sans', sans-serif;
}
.slogan-lead, .subtitle, .feature-card p, .audio-card p {
    color: #e0e0e0;
}
.slogan-lead {
    max-width: 900px;
    margin: 0 auto 50px auto;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.slogan-lead img.ari-logo {
    width: auto;
    vertical-align: middle;
}
.col-md-6.col-lg-4.d-flex {
    padding: 15px;
}
.card-item {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.card-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    background-color: rgba(255, 255, 255, 0.15);
}
.feature-icon {
    color: #1abc9c;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.feature-card h3, .audio-card h4 {
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
}
.feature-card p, .audio-card p {
    line-height: 1.7;
}
.audio-card #waveform1, .audio-card #waveform2, .audio-card #waveform3 {
    width: 100%;
    height: 100px;
    margin-top: 20px;
    margin-bottom: 20px;
}
.audio-card .btn-primary {
    background-color: #3498db;
    border-color: #3498db;
}
.audio-card .btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}
.audio-description {
    color: #bbb;
}
.slogan-main, .features-section h2, .audio-demo-section h2, .cta-section h2 {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.custom-cta-button {
    font-weight: bold;
    border-radius: 50px;
    background-color: #3498db;
    border-color: #3498db;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.custom-cta-button:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}
.add-button {
    background-color: #0da191;
    color: white;
    border: none;
    width: 10vh;
    height: 10vh;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5vh;
    cursor: pointer;
    position: fixed;
    bottom: 2.78vh;
    right: 2.78vh;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}
.add-button .text {
    display: none;
    font-size: 16px;
    font-weight: normal;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.add-button:hover {
    height: 8.33vh;
    width: 19.44vh;
    border-radius: 20px;
    justify-content: center;
}
.add-button:hover .plus {
    display: none;
}
.add-button:hover .text {
    display: block;
    opacity: 1;
}
.top-level-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 2000;
}
.top-level-content {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.3);
    width: 60%;
    max-width: 500px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}
.close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px;
}
.top-level-container.show {
    opacity: 1;
    visibility: visible;
}
.top-level-container.show .top-level-content {
    transform: scale(1);
}
.main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.content-area {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 70px;
    padding-bottom: 20px;
}
.login-box {
    background-color: rgba(33, 37, 41, 0.85);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    max-width: 450px;
    width: 90%;
}
.login-box img {
    max-width: 80px;
    margin-bottom: 1rem;
}
.btn-google {
    background-color: #DB4437;
    color: white;
    border: none;
    transition: background-color 0.3s ease;
}
.btn-google:hover {
    background-color: #c33a2c;
    color: white;
}
.login-box p {
    font-size: 0.9rem;
    color: #adb5bd;
}
footer {
    flex-shrink: 0;
}
.restaurant-card {
    position: relative;
    overflow: hidden;
}
.card-header-image {
    background-size: cover;
    background-position: center;
    border-radius: 1rem;
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}
.card-header-content {
    position: relative;
    padding-bottom: 20px;
}
.logo-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    background-color: white;
}
.map-container {
    position: relative;
    overflow: hidden;
    padding-top: 75%;
    border-radius: 1rem;
}
.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Stili per Schermi > 767px (Desktop/Tablet) --- */
@media (min-width: 768px) {
  .slogan-section {
      padding-top: 80px;
      padding-bottom: 80px;
  }
  .slogan-main {
      font-size: 3em;
      margin-bottom: 25px;
      line-height: 1.2;
  }
  .slogan-lead {
      font-size: 1.4em;
      margin-bottom: 50px;
  }
  .slogan-lead img.ari-logo {
      height: 6em;
  }
  .main-content-area > .row {
      padding: 60px 30px;
      margin-bottom: 40px;
  }
  .card-item {
      padding: 35px;
  }
  .feature-icon {
      font-size: 4.2em;
      margin-bottom: 25px;
  }
  .feature-card h3, .audio-card h4 {
      font-size: 1.8em;
  }
  .feature-card p, .audio-card p {
      font-size: 1.1em;
  }
  .features-section h2, .audio-demo-section h2, .cta-section h2 {
      font-size: 3em;
      margin-bottom: 25px;
  }
  .subtitle {
      font-size: 1.3em;
      margin-bottom: 60px;
  }
  .cta-section {
      padding-top: 80px;
      padding-bottom: 80px;
  }
  .custom-cta-button {
      padding: 20px 40px;
      font-size: 1.5em;
  }
  .card-header-image {
      height: 400px;
      width: 100%;
      margin-top: -20px;
  }
  .card-header-content {
      margin-top: -80px;
  }
}

/* --- Stili per Schermi <= 767px (Mobile/Tablet piccolo) --- */
@media (max-width: 767px) {
  .container.main-content-area {
      padding: 20px;
      margin-top: 20px;
      margin-bottom: 20px;
  }
  .slogan-section {
      padding-top: 50px;
      padding-bottom: 50px;
  }
  .slogan-main {
      font-size: 2.2em;
      line-height: 1.3;
  }
  .slogan-lead {
      font-size: 1em;
      margin-bottom: 30px;
      flex-direction: column;
  }
  .slogan-lead img.ari-logo {
      height: 4em;
      margin-top: 10px;
  }
  .features-section h2, .audio-demo-section h2, .cta-section h2 {
      font-size: 2em;
      margin-bottom: 20px;
  }
  .subtitle {
      font-size: 1em;
      margin-bottom: 30px;
  }
  .feature-icon {
      font-size: 3em;
  }
  .feature-card h3, .audio-card h4 {
      font-size: 1.4em;
  }
  .feature-card p, .audio-card p {
      font-size: 0.9em;
      line-height: 1.6;
  }
  .card-item {
      padding: 20px;
      margin-bottom: 20px;
  }
  .audio-card #waveform1, .audio-card #waveform2, .audio-card #waveform3 {
      margin-top: 15px;
      margin-bottom: 15px;
  }
  .audio-description {
      font-size: 0.85em;
  }
  .custom-cta-button {
      font-size: 1.1em;
      padding: 15px 25px;
  }
  .main-content-area > .row {
      padding: 40px 15px;
      margin-bottom: 25px;
  }
  .col-md-6.col-lg-4.d-flex {
      padding: 10px;
  }
  .card-header-image {
      height: 250px;
      width: 100%;
      margin-top: 0;
  }
  .card-header-content {
      margin-top: -60px;
  }
}

/* Stili per le tabelle */
table {
    width: 100%;
    border-collapse: collapse;
    user-select: none;
}
th, td {
    border: 1px solid #ddd;
    text-align: center;
    padding: 10px;
    position: relative;
    cursor: pointer;
}
th {
    background-color: #007bff;
    color: white;
}
td.highlight {
    background-color: #ffc107;
}
td.selected, td.selected-first {
    background-color: #0da191;
    color: white;
}
td.selected-giallo, td.selected-first-giallo {
    background-color: yellow;
    color: black;
}
td.selected::after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}
td.selected-giallo::after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    font-size: 0.8rem;
    font-weight: bold;
}
td.selected-first::after {
    content: attr(data-content);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}
td.selected-first-giallo::after {
    content: attr(data-content);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    font-size: 0.8rem;
    font-weight: bold;
}
.grouped-cells {
    border: 2px solid blue;
    border-right: none;
    border-left: none;
}
.grouped-cells-left {
    border: 2px solid blue;
    border-right: none;
}
.grouped-cells-left-right {
    border: 2px solid blue;
}
.grouped-cells-right {
    border: 2px solid blue;
    border-left: none;
}