/* ============================================================
   Color palette — mirrors www.grigolato.it (Astra/UAGB theme)
   --primary:   #21B4A6  teal accent
   --hover:     #0FAF9F  teal hover
   --bg:        #111A28  page background (very dark navy)
   --card:      #1C2A3C  container / card background
   --heading:   #FFFFFF  headings
   --body-text: #EDF6F3  body copy (light mint)
   --border:    #4E4E4E  borders / dividers
   ============================================================ */

/* General Body Styles */
body {
    font-family: 'Lato', -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #111A28;
    color: #EDF6F3;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100vh;
}

.container {
    width: 80%;
    max-width: 960px;
    margin: 20px auto;
    padding: 20px;
    background-color: #1C2A3C;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Headings */
h1, h2, h3 {
    font-family: 'Poppins', 'Lato', sans-serif;
    font-weight: 700;
    color: #FFFFFF;
    text-align: center;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.5em;
}

/* Paragraphs and Links */
p {
    line-height: 1.7;
    text-align: center;
    color: #EDF6F3;
}

a {
    color: #21B4A6;
    text-decoration: none;
}

a:hover {
    color: #0FAF9F;
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: #21B4A6;
    color: #FFFFFF;
    padding: 10px 20px;
    border: 2px solid #21B4A6;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 1em;
    text-align: center;
    text-decoration: none;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn:hover {
    background-color: #0FAF9F;
    border-color: #0FAF9F;
    text-decoration: none;
    color: #FFFFFF;
}

/* Map Container */
#map {
    height: 500px;
    width: 100%;
    border-radius: 8px;
    margin-top: 20px;
}

/* Scanner Page */
#loadingMessage {
    text-align: center;
    font-style: italic;
    margin-top: 20px;
    color: #EDF6F3;
}

#canvas {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    border-radius: 8px;
}

/* ============================================================
   APP HEADER
   ============================================================ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #0d1520;
    border-bottom: 1px solid #2a3a4c;
    width: 100%;
    box-sizing: border-box;
}

.header-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 14px 40px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.header-logo {
    height: 28px;
    width: auto;
    /* invert the black wordmark to white for the dark header */
    filter: brightness(0) invert(1);
    display: block;
}

.header-divider {
    width: 1px;
    height: 22px;
    background: #2a3a4c;
    flex-shrink: 0;
}

.header-product {
    font-size: 0.92em;
    color: #EDF6F3;
    opacity: 0.75;
    flex: 1;
}

.btn--sm {
    padding: 6px 14px;
    font-size: 0.8em;
    margin-top: 0;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Language selector ── */
.lang-selector {
    position: relative;
}

.lang-btn {
    background: transparent;
    border: 1px solid #2a3a4c;
    border-radius: 4px;
    color: #EDF6F3;
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    padding: 5px 8px;
    transition: border-color 0.2s;
}

.lang-btn:hover {
    border-color: #21B4A6;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #1C2A3C;
    border: 1px solid #2a3a4c;
    border-radius: 6px;
    overflow: hidden;
    z-index: 200;
    min-width: 100px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.lang-dropdown.open {
    display: block;
}

.lang-option {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: #EDF6F3;
    cursor: pointer;
    font-size: 0.88em;
    padding: 8px 14px;
    text-align: left;
    transition: background 0.15s;
}

.lang-option:hover {
    background: #111A28;
    color: #21B4A6;
}

/* ============================================================
   PAGE SECTIONS
   ============================================================ */
.page-section {
    width: 100%;
    box-sizing: border-box;
    padding: 60px 0;
    border-bottom: 1px solid #2a3a4c;
}

.section-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2em;
    font-weight: 700;
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 8px;
    padding-bottom: 0;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #21B4A6;
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-lead {
    text-align: center;
    color: #aac;
    font-size: 0.95em;
    margin-top: 8px;
    margin-bottom: 0;
}

.subsection-title {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 1.3em;
    font-weight: 700;
    color: #FFFFFF;
    margin-top: 48px;
    margin-bottom: 24px;
}

/* Map ship cursor */
.map-ship-cursor {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(33, 180, 166, 0.9));
    user-select: none;
    pointer-events: none;
}

/* ============================================================
   JOURNEY TIMELINE
   ============================================================ */
.journey-timeline {
    display: flex;
    gap: 0;
    overflow-x: auto;
    margin-top: 40px;
    padding-bottom: 16px;
}

.timeline-stop {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.timeline-stop:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #2a3a4c;
    z-index: 0;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #21B4A6;
    border: 2px solid #21B4A6;
    z-index: 1;
    position: relative;
    flex-shrink: 0;
}

.timeline-card {
    margin-top: 16px;
    background: #1C2A3C;
    border-radius: 8px;
    padding: 14px 16px;
    text-align: center;
    width: calc(100% - 32px);
    border: 1px solid #2a3a4c;
    box-sizing: border-box;
}

.timeline-icon {
    font-size: 1.8em;
    display: block;
    margin-bottom: 4px;
}

.timeline-name {
    font-weight: 700;
    font-size: 0.9em;
    color: #FFFFFF;
    display: block;
    margin-bottom: 4px;
}

.timeline-date {
    font-size: 0.78em;
    color: #21B4A6;
    display: block;
    margin-bottom: 8px;
}

.timeline-stats {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.timeline-stat {
    font-size: 0.75em;
    color: #aac;
    background: #111A28;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ============================================================
   DIGITAL PRODUCT PASSPORT — PASSPORT GRID
   ============================================================ */
.passport-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 40px;
}

.passport-card {
    background: #1C2A3C;
    border-radius: 10px;
    padding: 28px;
    border: 1px solid #2a3a4c;
}

/* Product image inside identity card */
.product-image {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #2a3a4c;
}

.card-label {
    text-align: left;
    font-size: 0.8em;
    color: #21B4A6;
    margin-top: 0;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

/* Info list (DL) */
.info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
    margin: 0;
}

.info-list dt {
    color: #aac;
    font-size: 0.82em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    align-self: center;
    white-space: nowrap;
}

.info-list dd {
    color: #EDF6F3;
    font-size: 0.92em;
    margin: 0;
    align-self: center;
}

/* ESG bars */
.material-origin {
    font-size: 0.82em;
    color: #aac;
    text-align: left;
    margin-bottom: 16px;
    margin-top: 0;
}

.esg-bar-wrap {
    margin-bottom: 14px;
}

.esg-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.84em;
    margin-bottom: 5px;
    color: #EDF6F3;
}

.esg-value {
    font-weight: 500;
    color: #21B4A6;
}

.esg-bar-track {
    height: 6px;
    background: #111A28;
    border-radius: 3px;
    overflow: hidden;
}

.esg-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.esg-bar--good {
    background: linear-gradient(90deg, #21B4A6, #0FAF9F);
}

.esg-bar--warn {
    background: linear-gradient(90deg, #b88a00, #d4a800);
}

/* Certification badges */
.cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.cert-badge {
    font-size: 0.78em;
    color: #21B4A6;
    border: 1px solid #21B4A6;
    border-radius: 20px;
    padding: 3px 10px;
    letter-spacing: 0.04em;
    font-weight: 500;
}

/* ============================================================
   INDUSTRY / POSOLOGY CARDS
   ============================================================ */
.industry-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.industry-card {
    background: #1C2A3C;
    border-radius: 10px;
    padding: 24px 20px;
    border: 1px solid #2a3a4c;
    text-align: center;
}

.industry-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.industry-card h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 0.88em;
    color: #21B4A6;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.industry-card p {
    font-size: 0.86em;
    color: #aac;
    line-height: 1.6;
    text-align: left;
    margin: 0;
}

/* ============================================================
   CUSTOMER REVIEWS
   ============================================================ */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.review-platform {
    background: #1C2A3C;
    border-radius: 10px;
    padding: 24px;
    border: 1px solid #2a3a4c;
    border-top: 4px solid;
    display: flex;
    flex-direction: column;
}

.platform-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a3a4c;
}

.platform-name {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1em;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.platform-rating {
    font-size: 1em;
    color: #f5c518;
    letter-spacing: 1px;
}

.platform-count {
    display: block;
    font-size: 0.78em;
    color: #aac;
    margin-top: 2px;
}

.review-card {
    background: #111A28;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid #1C2A3C;
}

.review-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.reviewer-name {
    font-weight: 700;
    font-size: 0.84em;
    color: #EDF6F3;
}

.review-date {
    font-size: 0.76em;
    color: #aac;
}

.review-stars {
    color: #f5c518;
    font-size: 0.84em;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.review-text {
    font-size: 0.82em;
    color: #aac;
    line-height: 1.5;
    text-align: left;
    margin: 0;
}

.platform-link {
    margin-top: auto;
    padding-top: 16px;
    display: inline-block;
    font-size: 0.85em;
    color: #21B4A6;
    text-decoration: none;
}

.platform-link:hover {
    text-decoration: underline;
}

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
    width: 100%;
    background: #0d1520;
    padding: 32px 0;
    box-sizing: border-box;
}

.footer-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-logo-link {
    display: inline-block;
    text-decoration: none;
}

.footer-logo {
    height: 72px;
    width: auto;
    display: block;
    opacity: 0.92;
    transition: opacity 0.2s;
}

.footer-logo-link:hover .footer-logo {
    opacity: 1;
}

.footer-tagline {
    font-size: 0.8em;
    color: #21B4A6;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

.footer-copy {
    font-size: 0.78em;
    color: #aac;
    margin: 0;
}

.footer-links {
    font-size: 0.78em;
    color: #aac;
    margin: 6px 0 0;
}
.footer-links a {
    color: #21B4A6;
    text-decoration: none;
}
.footer-links a:hover {
    text-decoration: underline;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 900px) {
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .passport-grid {
        grid-template-columns: 1fr;
    }

    .section-inner,
    .footer-inner {
        padding: 0 20px;
    }

    .header-inner {
        padding: 14px 20px;
    }

    .industry-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .industry-cards {
        grid-template-columns: 1fr;
    }
}

/* Blockchain ID — monospace, truncated with tooltip */
.blockchain-id {
    font-family: 'Courier New', monospace;
    font-size: 0.82em;
    color: #21B4A6;
    cursor: default;
    letter-spacing: 0.02em;
}

/* Expiration date — amber tint when present */
.expiration-date {
    color: #d4a800;
    font-weight: 500;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */
.landing-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
}

.landing-inner {
    max-width: 560px;
    text-align: center;
}

.landing-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.4em, 6vw, 3.6em);
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.15;
    margin-bottom: 24px;
}

.landing-lead {
    font-size: 1.05em;
    color: #aac;
    line-height: 1.7;
    margin-bottom: 40px;
}

.landing-btn {
    font-size: 1em;
    padding: 14px 36px;
    margin-top: 0;
}

/* ============================================================
   Product Info Page
   ============================================================ */
/* Product Info Page */
pre {
    background-color: #061314;
    color: #EDF6F3;
    padding: 15px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
    border-left: 3px solid #21B4A6;
}
