/* ============================================================
   ResinPlan — Home Page Components
   Page-specific styles for welcome.blade.php.
   ============================================================ */

/* ---- Form inputs Liquid Resin ------------------------------- */
.rp-input {
    background: rgba(24, 25, 63, 0.04);
    border: 1.5px solid rgba(24, 25, 63, 0.10);
    border-radius: var(--radius-md);
    padding: 11px 16px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--rp-ink);
    transition: border-color var(--dur-base) var(--ease-out),
                box-shadow var(--dur-base) var(--ease-out);
}

.rp-input:focus {
    outline: none;
    border-color: var(--rp-blue);
    box-shadow: 0 0 0 3px rgba(41, 121, 255, 0.12);
    background: #fff;
}

.rp-input::placeholder {
    color: var(--rp-ink-30);
    font-weight: 400;
}

/* ---- Contatti: icone + social ------------------------------- */
.rp-contact-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(41, 121, 255, 0.08);
    color: var(--rp-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.rp-social-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(24, 25, 63, 0.06);
    border: 1px solid rgba(24, 25, 63, 0.08);
    color: var(--rp-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    text-decoration: none;
    transition: background var(--dur-base) var(--ease-out),
                color var(--dur-base) var(--ease-out);
}

.rp-social-btn:hover {
    background: var(--rp-blue);
    color: #fff;
    border-color: transparent;
}

/* ---- Pagine info (trasporto, policy, ecc.) ------------------ */
.rp-trasporto-wrap {
    max-width: 860px;
}

/* ---- Layout ------------------------------------------------- */
.rp-home-container {
    width: 90%;
    max-width: none;
}

@media (max-width: 768px) {
    .rp-home-container {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ---- Hero --------------------------------------------------- */
.rp-hero-glass {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

/* Colonna sinistra: copy — specificità doppia per battere Bootstrap col-* */
.rp-hero-glass .rp-hero-body {
    padding: 52px 48px 52px 56px;
    border-right: 1px solid rgba(255, 255, 255, 0.5);
}

.rp-hero-eyebrow {
    margin-bottom: 22px;
}

/* rp-display già definito in colors_and_type: clamp(3rem, 6vw, 5.5rem).
   Lo sovrascriviamo qui per l'hero: più compatto, 2 righe pulite. */
.rp-hero-headline {
    font-size: clamp(2.4rem, 4.2vw, 3.6rem);
    line-height: 0.95;
    margin-bottom: 28px;
}

.rp-hero-lead {
    max-width: 480px;
}

/* Colonna destra: stats + CTAs */
.rp-hero-glass .rp-hero-aside {
    padding: 52px 52px 52px 52px;
    gap: 36px;
}

/* Stats */
.rp-hero-stats {
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(24, 25, 63, 0.07);
}

.rp-stat-number {
    font-size: 40px;
    color: var(--rp-blue);
    line-height: 1;
}

.rp-stat-label {
    letter-spacing: 0.1em;
}

/* CTAs */
.rp-hero-btn {
    font-size: 14px;
    padding: 11px 20px;
}

/* ---- Mobile ------------------------------------------------- */
@media (max-width: 991px) {
    .rp-hero-glass .rp-hero-body {
        padding: 40px 32px 32px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    }

    .rp-hero-glass .rp-hero-aside {
        padding: 36px 32px 40px;
    }

    .rp-stat-number {
        font-size: 32px;
    }
}

/* ---- Settori: header ---------------------------------------- */
.rp-sector-header .rp-h2 {
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    line-height: 1.2;
    color: var(--rp-ink);
}


/* ---- Sector grid — override Bootstrap row margin-top --------- */
.rp-sector-grid > [class*="col-"] {
    margin-top: 28px;
}
.rp-sector-grid {
    margin-top: -28px;
}

/* ---- Sector card -------------------------------------------- */
.rp-sector-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    color: inherit;
    position: relative;
}

.rp-sector-glow {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, var(--rp-blue) 0%, transparent 65%);
    opacity: 0.12;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Area contenuto — icon destra, testo sinistra */
.rp-sector-content {
    position: relative;
    z-index: 1;
    padding: 20px 22px 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Riga superiore: testo sx / icon dx */
.rp-sector-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: auto;
}

.rp-sector-lordicon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.rp-sector-title {
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.05;
    color: var(--rp-ink);
    letter-spacing: 0.01em;
    margin: 0 0 6px;
}

.rp-sector-count {
    font-size: 12px;
    color: var(--rp-ink-50);
    font-weight: 500;
    margin: 0;
}

.rp-sector-link {
    color: var(--rp-blue);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-top: 14px;
}

.rp-sector-link i {
    font-size: 10px;
    transition: transform var(--dur-base) var(--ease-out);
}

.rp-sector-card:hover .rp-sector-link i {
    transform: translateX(3px);
}

/* ---- Calcolatore -------------------------------------------- */
.rp-calc-browser {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-3);
    width: 100%;
    max-width: 360px;
}

.rp-calc-bar {
    background: #e8e8ea;
    padding: 11px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.rp-calc-dots {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
}

.rp-calc-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.rp-calc-dot-r { background: #FF5F57; }
.rp-calc-dot-y { background: #FEBC2E; }
.rp-calc-dot-g { background: #28C840; }

.rp-calc-url {
    flex: 1;
    background: rgba(0, 0, 0, 0.09);
    border-radius: var(--radius-pill);
    padding: 4px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(0, 0, 0, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.rp-calc-live {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #28C840;
    flex-shrink: 0;
}

.rp-calc-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #28C840;
    animation: rp-live-pulse 2s ease-in-out infinite;
}

@keyframes rp-live-pulse {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.75); }
}

.rp-calc-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--rp-ink-50);
    text-decoration: none;
    margin-top: 12px;
    transition: color var(--dur-base) var(--ease-out);
}

.rp-calc-open:hover {
    color: var(--rp-blue);
}

.rp-calc-iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
    background: #fff;
}

/* Colonna destra */
.rp-calc-aside {
    padding: 40px 48px 40px 52px;
}

.rp-calc-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rp-calc-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-2);
    line-height: 1.45;
}

.rp-calc-features li i {
    color: var(--rp-blue);
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.rp-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    border-radius: var(--radius-squircle);
    background: var(--rp-ink);
    color: var(--rp-white);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background var(--dur-base) var(--ease-out);
}

.rp-store-btn:hover {
    background: var(--rp-ink-90);
    color: var(--rp-white);
}

.rp-store-btn i {
    font-size: 17px;
}

/* ---- Problema → Soluzione ----------------------------------- */
.rp-problem-section {
    background-color: rgba(18, 19, 52, 0.88); /* semi-transparent dark — lets gradient bleed through at edges */
    padding: 80px 0;
    margin-bottom: 56px;
    position: relative;
    z-index: 2;
}

/* Sezione successiva in stacking context — permette all'ombra di sovrapporsi */
.rp-product-columns-section {
    position: relative;
    z-index: 1;
}

.rp-problem-section .rp-eyebrow {
    color: var(--rp-blue-50);
}

.rp-problem-section .rp-h2 {
    color: var(--rp-white);
}

.rp-problem-header {
    margin-bottom: 48px;
}

.rp-problem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rp-problem-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rp-problem-item:nth-child(odd) {
    padding-right: 56px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.rp-problem-item:nth-child(even) {
    padding-left: 56px;
}

.rp-problem-num {
    font-family: var(--font-display);
    font-size: 52px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.10);
    flex-shrink: 0;
    width: 48px;
    text-align: right;
}

/* Riga "Problema → Soluzione" */
.rp-problem-ps {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
}

.rp-problem-q {
    font-size: 15px;
    font-weight: 600;
    color: var(--rp-white);
    margin: 0;
    line-height: 1.3;
}

.rp-problem-arrow {
    font-size: 10px;
    color: var(--rp-blue);
    flex-shrink: 0;
}

.rp-problem-s {
    font-size: 15px;
    font-weight: 700;
    color: var(--rp-blue-50);
    margin: 0;
    line-height: 1.3;
}

.rp-problem-desc {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.50);
    margin: 0;
    line-height: 1.65;
}

@media (max-width: 768px) {
    .rp-problem-section {
        padding: 56px 0;
    }

    .rp-problem-grid {
        grid-template-columns: 1fr;
    }

    .rp-problem-item:nth-child(odd) {
        padding-right: 0;
        border-right: none;
    }

    .rp-problem-item:nth-child(even) {
        padding-left: 0;
    }
}

/* ---- Product columns nav ------------------------------------ */
.rp-product-column-nav:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

/* ---- Perché ResinPlan --------------------------------------- */
.rp-why-section {
    background-color: transparent; /* let the body rp-stage gradient show through */
    padding: 80px 0;
}

.rp-why-section > .container {
    width: 90%;
    max-width: 1400px;
}

.rp-why-section .rp-eyebrow {
    color: var(--rp-blue);
}

.rp-why-header {
    margin-bottom: 56px;
}

.rp-why-list {
    border-top: 1px solid var(--rp-ink-15);
}

.rp-why-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 24px;
    align-items: start;
    padding: 32px 0;
    border-bottom: 1px solid var(--rp-ink-15);
}

.rp-why-num {
    font-family: var(--font-display);
    font-size: 56px;
    line-height: 1;
    color: var(--rp-ink-15);
    text-align: right;
    padding-top: 4px;
}

.rp-why-title {
    font-family: var(--font-display);
    font-size: 26px;
    line-height: 1.05;
    color: var(--rp-ink);
    letter-spacing: 0.01em;
    margin: 0 0 8px;
}

.rp-why-desc {
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-2);
    line-height: 1.65;
    margin: 0;
}

@media (max-width: 576px) {
    .rp-why-item {
        grid-template-columns: 48px 1fr;
        gap: 16px;
    }

    .rp-why-num {
        font-size: 36px;
    }

    .rp-why-section {
        padding: 56px 0;
    }
}

/* ---- Video & Tutorial --------------------------------------- */
.rp-video-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.rp-video-thumb {
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    margin-bottom: 16px;
}

.rp-video-thumb-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    opacity: 0.08;
    color: #fff;
}

.rp-video-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rp-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rp-video-play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    padding-left: 3px;
    transition: transform var(--dur-base) var(--ease-out),
                background var(--dur-base) var(--ease-out);
}

.rp-video-card:hover .rp-video-play-btn {
    transform: scale(1.12);
    background: rgba(255, 0, 0, 0.75);
    border-color: transparent;
}

.rp-video-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--rp-blue);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.rp-video-title {
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.05;
    color: var(--rp-ink);
    margin: 0 0 8px;
}

.rp-video-desc {
    font-size: 13px;
    color: var(--fg-2);
    margin: 0 0 12px;
    line-height: 1.5;
}

.rp-video-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--rp-blue);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rp-video-link i {
    font-size: 10px;
    transition: transform var(--dur-base) var(--ease-out);
}

.rp-video-card:hover .rp-video-link i {
    transform: translateX(3px);
}

/* ---- Social proof / Trustpilot ------------------------------ */
.rp-tp-header {
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(24, 25, 63, 0.07);
    margin-bottom: 32px;
}

.rp-tp-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 18px;
    color: #00B67A;
    text-decoration: none;
}

.rp-tp-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #00B67A;
    border-radius: 4px;
}

.rp-tp-logo-mark i {
    color: #fff;
    font-size: 14px;
}

.rp-tp-stars {
    display: flex;
    gap: 3px;
    font-size: 18px;
    color: #00B67A;
    margin-top: 6px;
}

.rp-tp-score {
    font-size: 13px;
    font-weight: 600;
    color: var(--rp-ink-50);
    margin-top: 4px;
}

.rp-review-card {
    background: rgba(24, 25, 63, 0.03);
    border: 1px solid rgba(24, 25, 63, 0.06);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.rp-review-stars {
    display: flex;
    gap: 3px;
    font-size: 16px;
    color: #00B67A;
    margin-bottom: 14px;
}

.rp-review-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--rp-ink);
    line-height: 1.6;
    margin: 0 0 20px;
}

.rp-review-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rp-review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rp-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}

.rp-review-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--rp-ink);
    margin: 0;
}

.rp-review-date {
    font-size: 12px;
    color: var(--rp-ink-50);
    margin: 0;
}

.rp-tp-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #00B67A;
    text-decoration: none;
    border: 1.5px solid #00B67A;
    border-radius: var(--radius-squircle);
    padding: 10px 24px;
    transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}

.rp-tp-cta:hover {
    background: #00B67A;
    color: #fff;
}

.rp-review-nav {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(24, 25, 63, 0.12);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--rp-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--dur-base) var(--ease-out),
                color var(--dur-base) var(--ease-out),
                border-color var(--dur-base) var(--ease-out);
}

.rp-review-nav:hover {
    background: var(--rp-blue);
    color: #fff;
    border-color: var(--rp-blue);
}

.rp-review-nav:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

/* ---- Catalog bottom block ----------------------------------- */
.rp-catalog-section {
    max-width: 1320px;
}

.rp-cat-divider {
    border-color: rgba(24, 25, 63, 0.05) !important;
}

.rp-cat-eyebrow {
    color: var(--rp-blue);
    font-size: 11px;
}

.rp-cat-heading {
    font-size: 32px;
    color: var(--rp-ink);
}

.rp-cat-btn {
    font-size: 13px;
    padding: 10px 24px;
    box-shadow: var(--shadow-1);
    border: 1px solid rgba(24, 25, 63, 0.05);
    color: var(--rp-ink);
}

.rp-cat-scroll {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.rp-cat-scroll::-webkit-scrollbar {
    display: none;
}

.rp-cat-pill {
    min-width: 200px;
    box-shadow: var(--shadow-1);
    border: 1px solid rgba(24, 25, 63, 0.02);
}

.rp-cat-pill-icon {
    color: var(--rp-blue);
    font-size: 14px;
}

.rp-cat-pill-name {
    font-size: 13px;
    color: var(--rp-ink);
    max-width: 120px;
}

.rp-cat-pill-count {
    font-size: 12px;
    color: var(--rp-ink-50);
}

/* ============================================================
   MOBILE FIXES — solo per schermi < 992px
   ============================================================ */

/* Fix globale: min-w-0 non è una utility Bootstrap standard,
   va definita manualmente altrimenti i flex children non si
   restringono e il testo sfora fuori dalla card */
.min-w-0 { min-width: 0 !important; }

@media (max-width: 991px) {

    /* ---- Product columns (Novità / Più scelti / Soluzioni) ---- */

    /* Meno padding in modo che nome + prezzo abbiano spazio */
    .rp-product-column-card {
        padding: 20px 16px;
        min-height: unset;
    }

    /* Titolo sezione leggermente più compatto */
    .rp-product-column-title {
        font-size: 22px;
    }

    /* Meno gap tra le righe */
    .rp-product-list {
        gap: 6px;
    }

    /* Ogni riga: thumb più piccola, meno gap interno */
    .rp-product-list-item {
        gap: 12px;
        padding: 10px 8px;
        /* Evita che il contenuto sfori la card */
        overflow: hidden;
    }

    /* Thumbnail ridotta: 52px invece di 66px */
    .rp-product-thumb {
        width: 52px;
        height: 52px;
    }

    .rp-product-thumb img {
        max-height: 36px;
        max-width: 36px;
    }

    /* Il div centrale (nome + desc) DEVE potersi restringere.
       flex-grow-1 da solo non basta: serve min-width: 0
       per permettere al testo di truncare correttamente */
    .rp-product-list-item .flex-grow-1 {
        min-width: 0;
        overflow: hidden;
    }

    /* Font leggermente ridotti nelle card */
    .rp-product-name {
        font-size: 13px;
    }

    .rp-product-desc {
        font-size: 11px;
    }

    .rp-product-price {
        font-size: 13px;
    }

    /* ---- Hero ------------------------------------------------- */
    .rp-hero-headline {
        font-size: clamp(1.9rem, 7vw, 2.8rem);
    }

    /* ---- Sezione settori: 2 colonne invece di più ---- */
    #settori .row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* ---- Calcolatore: padding del testo ridotto su mobile ---- */
    .rp-calc-aside {
        padding: 28px 24px 36px;
    }

    /* ---- Recensioni: padding sezione ridotto + 1 card per volta ---- */
    .rp-reviews-wrap {
        padding: 40px 16px 32px !important;
    }

    /* Su mobile col-lg-6 diventa full-width: la review card
       occupa tutta la larghezza disponibile tra i bottoni */
    .rp-review-card {
        padding: 20px;
    }

    /* Bottoni prev/next recensioni: leggermente più piccoli */
    .rp-review-nav {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
}

/* ---- Settori: 1 per riga su mobile (<768px) ----
   Override del blocco ≤991px (che li forza a 2 colonne).
   Dichiarato dopo, quindi vince per i telefoni; tablet 577-991 restano a 2. */
@media (max-width: 767px) {
    #settori .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
