/**
 * Inner pages & shared section components
 *
 * @package Destinazioni_Digitali
 */

/* ==========================================================================
   PAGE HERO — mesh gradient full-bleed (design screen)
   ========================================================================== */
.page-hero {
    position: relative;
    /* Spazio sotto header fisso (navbar-glass + logo) */
    padding: 160px 0 72px;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    overflow: hidden;
    background: #1a1028;
}

.page-hero-compact {
    min-height: 300px;
    padding-bottom: 56px;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    transform: scale(1.02);
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Soft vignette so text stays readable without killing color */
    background:
        linear-gradient(90deg, rgba(18, 8, 28, 0.55) 0%, rgba(18, 8, 28, 0.22) 55%, rgba(18, 8, 28, 0.35) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.25) 100%);
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero-inner {
    max-width: 820px;
}

.page-hero-eyebrow {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffd54f;
    margin-bottom: 1rem;
}

.page-hero .section-eyebrow {
    color: #ffd54f;
}

.page-hero-title {
    font-size: clamp(2rem, 4.2vw, 3.25rem);
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 1.15rem;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.page-hero-meta {
    max-width: 640px;
}

.page-hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
}

.page-hero-period {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
    margin: 0.4rem 0 0;
    letter-spacing: 0.02em;
}

.page-scheda {
    font-size: 1.125rem;
}

/* ==========================================================================
   BODY WASH — soft pastel under content (design “bg sotto header”)
   ========================================================================== */
.page-scheda .content-after-hero.page-body-wash,
.page-body-wash {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    background-image: url('../images/page-heroes/page-body-bg.png');
    background-repeat: no-repeat;
    background-position: left top;
    background-size: min(1200px, 100%) auto;
}

.page-body-wash > section,
.page-body-wash .container {
    position: relative;
    z-index: 1;
}

.page-body-wash > section {
    background: transparent !important;
}

/* ==========================================================================
   SECTION TYPOGRAPHY
   ========================================================================== */
.section-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dd-primary, #c2185b);
    margin-bottom: 0.75rem;
}

.page-section-narrow {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--dd-secondary, #1a1a2e);
}

.section-body.prose {
    color: #3d3d4a;
    font-size: 1.1875rem;
    line-height: 1.75;
}

.section-body.prose p:last-child {
    margin-bottom: 0;
}

.text-section-figure {
    margin: 2rem 0 0;
    text-align: center;
}

.text-section-figure img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(80, 40, 70, 0.1);
    background: #fff;
}

.section-cta-wrap {
    margin-top: 1.75rem;
}

/* ==========================================================================
   CARDS
   ========================================================================== */
.content-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.75rem;
    border-radius: 18px;
    border: 1px solid rgba(152, 95, 128, 0.12);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 28px rgba(80, 40, 70, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.content-card-has-media {
    padding: 0;
}

.content-card-media {
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #efe8ec;
}

.content-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.35rem 1.5rem 1.5rem;
}

.content-card-has-media .content-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.content-card-link {
    text-decoration: none;
    color: inherit;
}

.content-card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(80, 40, 70, 0.1);
    border-color: rgba(233, 30, 99, 0.25);
    color: inherit;
}

.content-card-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dd-primary, #c2185b);
    margin-bottom: 0.5rem;
}

.content-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--dd-secondary, #1a1a2e);
}

.content-card-text {
    color: #555;
    font-size: 1.0625rem;
    line-height: 1.65;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.content-card-payoff {
    font-size: 0.95rem;
    font-style: italic;
    color: #6b5a66;
    margin-bottom: 0.85rem;
    line-height: 1.4;
}

.content-card-role {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--dd-primary, #c2185b);
    margin: 0 0 0.85rem;
    line-height: 1.4;
}

.cards-section-people .section-header {
    text-align: left;
}

.cards-section-people .content-card-title {
    margin-bottom: 0.25rem;
}

.cards-section-people .content-card-text {
    font-size: 1rem;
    margin-bottom: 0;
}

.content-card-cta {
    font-weight: 600;
    color: var(--dd-primary, #c2185b);
}

.cards-section-media .section-title {
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   TWO PATHS / FEATURES / PHASES / TABLES / CLOSING
   ========================================================================== */
.path-card {
    display: block;
    height: 100%;
    padding: 2.25rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(152, 95, 128, 0.14);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 14px 40px rgba(80, 40, 70, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.path-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 48px rgba(80, 40, 70, 0.12);
    color: inherit;
}

.path-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dd-secondary, #1a1a2e);
}

.path-card-text {
    color: #444;
    font-size: 1.125rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.path-card-cta {
    font-weight: 600;
    color: var(--dd-primary, #c2185b);
}

.feature-block {
    height: 100%;
    padding: 1.75rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(152, 95, 128, 0.1);
    box-shadow: 0 8px 24px rgba(80, 40, 70, 0.05);
}

.feature-block-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dd-secondary, #1a1a2e);
}

.feature-block-text {
    color: #4a4a55;
    font-size: 1.0625rem;
    line-height: 1.65;
    margin: 0;
}

.phase-item + .phase-item {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(152, 95, 128, 0.12);
}

.phases-list-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 2.5rem;
}

.phases-list-grid .phase-item + .phase-item {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.phases-list-grid .phase-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(152, 95, 128, 0.12);
}

@media (max-width: 767px) {
    .phases-list-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .phases-list-grid .phase-item {
        padding: 1.25rem 0;
    }

    .phases-list-grid .phase-item + .phase-item {
        border-top: 1px solid rgba(152, 95, 128, 0.12);
    }
}

.phase-item-media {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 2rem 2.5rem;
    align-items: center;
}

.phase-item-media.phase-item-reverse .phase-media {
    order: 2;
}

.phase-item-media.phase-item-reverse .phase-content {
    order: 1;
}

.phase-media {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(80, 40, 70, 0.12);
    background: #f3f0f4;
}

.phase-media img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.phase-item-device .phase-media-device {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.phase-media-device img {
    aspect-ratio: auto;
    object-fit: contain;
    width: auto;
    max-width: 100%;
    max-height: 560px;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(80, 40, 70, 0.14);
}

@media (min-width: 768px) {
    .phase-item-device.phase-item-media {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    }
}

.phase-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dd-secondary, #1a1a2e);
}

@media (max-width: 767px) {
    .phase-item-media,
    .phase-item-media.phase-item-reverse {
        grid-template-columns: 1fr;
    }

    .phase-item-media.phase-item-reverse .phase-media,
    .phase-item-media.phase-item-reverse .phase-content {
        order: initial;
    }
}

.dd-data-table-wrap {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(152, 95, 128, 0.1);
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 1px 2px rgba(80, 40, 70, 0.04),
        0 12px 36px rgba(80, 40, 70, 0.07);
}

.dd-data-table {
    --dd-table-pad-y: 1.15rem;
    --dd-table-pad-x: 1.35rem;
    font-size: 1.0625rem;
    line-height: 1.55;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    color: #3d3d4a;
}

.dd-data-table thead th {
    background: linear-gradient(180deg, rgba(233, 30, 99, 0.08) 0%, rgba(233, 30, 99, 0.045) 100%);
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dd-secondary, #1a1a2e);
    border: 0;
    border-bottom: 1px solid rgba(152, 95, 128, 0.12);
    padding: calc(var(--dd-table-pad-y) + 0.15rem) var(--dd-table-pad-x);
    white-space: nowrap;
    vertical-align: middle;
}

.dd-data-table tbody td {
    border: 0;
    border-bottom: 1px solid rgba(152, 95, 128, 0.08);
    padding: var(--dd-table-pad-y) var(--dd-table-pad-x);
    vertical-align: top;
}

.dd-data-table tbody tr:last-child td {
    border-bottom: 0;
}

.dd-data-table tbody tr:nth-child(even) td {
    background: rgba(152, 95, 128, 0.03);
}

.dd-data-table tbody tr:hover td {
    background: rgba(233, 30, 99, 0.05);
}

.dd-data-table tbody td:first-child {
    font-weight: 600;
    color: var(--dd-secondary, #1a1a2e);
}

.table-caption {
    padding-left: 0.25rem;
}

@media (max-width: 767px) {
    .dd-data-table-wrap {
        border-radius: 14px;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }

    .dd-data-table {
        --dd-table-pad-y: 0.65rem;
        --dd-table-pad-x: 0.75rem;
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .dd-data-table thead th {
        font-size: 0.6875rem;
        letter-spacing: 0.03em;
        padding: 0.7rem 0.75rem;
        white-space: normal;
    }

    .dd-data-table tbody td {
        padding: var(--dd-table-pad-y) var(--dd-table-pad-x);
    }
}

/* Section background utility (shared with home) */
.home-section-has-bg {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.home-section-has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--dd-section-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.42;
    pointer-events: none;
}

.home-section-has-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.55) 45%, rgba(255, 255, 255, 0.78) 100%);
}

.home-section-has-bg > .container {
    position: relative;
    z-index: 1;
}

.closing-section .closing-box {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    padding: 2.75rem 1.75rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(152, 95, 128, 0.12);
    box-shadow: 0 14px 40px rgba(80, 40, 70, 0.08);
}

.closing-section-has-bg .closing-box {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(4px);
}

.closing-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dd-secondary, #1a1a2e);
}

.closing-body {
    margin-bottom: 1.5rem;
    color: #444;
    font-size: 1.1875rem;
    line-height: 1.7;
}

.company-details-row {
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: 0.75rem 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(152, 95, 128, 0.1);
}

.company-details-row dt {
    font-weight: 600;
    margin: 0;
}

.company-details-row dd {
    margin: 0;
}

.suite-compact-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 120px;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(152, 95, 128, 0.12);
    background: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.suite-compact-card:hover {
    border-color: var(--dd-primary, #c2185b);
    box-shadow: 0 8px 20px rgba(80, 40, 70, 0.08);
    color: inherit;
}

.suite-compact-name {
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 0.35rem;
}

.suite-compact-payoff {
    font-size: 0.8125rem;
    color: #666;
    line-height: 1.4;
}

.esperienza-strumenti-grid .suite-compact-card {
    min-height: 110px;
}

@media (max-width: 575.98px) {
    .esperienza-strumenti-grid .col-6:nth-child(odd):last-child {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.hero-eyebrow {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
}

.dd-contact-form .form-control,
.dd-contact-form .form-select {
    border-radius: 12px;
    border-color: rgba(152, 95, 128, 0.2);
    padding: 0.75rem 1rem;
}

.dd-contact-form .form-control:focus,
.dd-contact-form .form-select:focus {
    border-color: var(--dd-primary, #c2185b);
    box-shadow: 0 0 0 0.2rem rgba(233, 30, 99, 0.15);
}

.contact-aside {
    padding: 0.5rem 0 1.5rem;
}

.contact-form-panel {
    padding: 0.5rem 0 0;
}

.contact-panel-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dd-secondary, #1a1a2e);
    margin: 0 0 0.75rem;
    line-height: 1.25;
}

.contact-panel-cta {
    color: #555;
    font-size: 1.0625rem;
    line-height: 1.55;
    margin: 0 0 1.5rem;
    max-width: 28rem;
}

.contact-aside-item {
    margin: 0 0 1.25rem;
}

.contact-aside-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--dd-primary, #c2185b);
    margin-bottom: 0.35rem;
}

.contact-aside-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dd-secondary, #1a1a2e);
    text-decoration: none;
    line-height: 1.3;
}

.contact-aside-value:hover {
    color: var(--dd-primary, #c2185b);
}

.contact-aside-action {
    margin: 0;
}

.contact-aside-action .btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
}

@media (min-width: 992px) {
    .contact-split .contact-aside {
        padding-right: 2.5rem;
    }

    .contact-split .contact-form-col {
        border-left: 1px solid rgba(152, 95, 128, 0.18);
        padding-left: 2.75rem;
    }
}

@media (max-width: 991px) {
    .contact-split .contact-aside {
        padding-bottom: 2rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid rgba(152, 95, 128, 0.18);
    }
}

@media (max-width: 991px) {
    .page-hero {
        /* Header mobile più alto (logo + padding barra) */
        padding: 150px 0 48px;
        min-height: 280px;
        align-items: flex-start;
    }

    .page-hero-compact {
        min-height: 0;
        padding-bottom: 40px;
    }

    body.admin-bar .page-hero {
        padding-top: 190px;
    }
}

@media (max-width: 767px) {
    .page-hero {
        padding: 128px 0 40px;
        min-height: 0;
        align-items: flex-start;
    }

    body.admin-bar .page-hero {
        padding-top: 174px;
    }

    .page-scheda {
        font-size: 1.0625rem;
    }

    .page-hero-subtitle {
        font-size: 1.125rem;
    }

    .section-body.prose,
    .closing-body {
        font-size: 1.125rem;
    }

    .page-body-wash {
        background-size: 140% auto;
        background-position: left -40px top;
    }

    .company-details-row {
        grid-template-columns: 1fr;
    }
}
