/* ═══════════════════════════════════════════════════════════════════════════
   DevIBrain Booking — CSS
   Replica fedele di www.devibrain.com
   ═══════════════════════════════════════════════════════════════════════════ */

/* Fonts loaded via fonts.css (offline) */

:root {
    --blue: #0079BF;
    --blue-dark: #1F6EB3;
    --blue-deep: #21446B;
    --white: #ffffff;
    --gray-bg: #f5f5f5;
    --gray-light: #eaeaea;
    --text: #333333;
    --text-body: #666666;
    --text-light: #999999;
    --green: #27ae60;
    --red: #e74c3c;
    --orange: #f39c12;
    --font-body: 'Open Sans', sans-serif;
    --font-heading: 'Roboto', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-body);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    color: var(--blue-dark);
}

/* ─── Layout ───────────────────────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ─── Hero — DevIBrain Style ───────────────────────────────────────────── */
.hero {
    background: var(--blue-dark);
    color: var(--white);
    padding: 36px 30px 65px;
    text-align: center;
    position: relative;
}

.hero-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.hero-logos img {
    height: 50px;
}

.hero-logos .logo-sep {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.35);
}

.hero h1 {
    font-size: 38px;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 10px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.hero p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 580px;
    margin: 0 auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ─── Language Switcher ────────────────────────────────────────────────── */
.lang-switcher {
    position: absolute;
    top: 18px;
    right: 30px;
    display: flex;
    gap: 6px;
}

.lang-select {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    min-width: 140px;
}

.lang-select:hover,
.lang-select:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    outline: none;
}

.lang-select option {
    background: var(--blue-deep);
    color: var(--white);
}

/* ─── Diagonal Divider (DevIBrain style — NOT wave) ───────────────────── */
.diagonal-divider {
    display: block;
    width: 100%;
    margin-top: -1px;
    line-height: 0;
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.footer-logos img {
    height: 28px;
    opacity: 0.8;
}

/* ─── Steps Bar ────────────────────────────────────────────────────────── */
.steps {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 30px 20px 10px;
}

.step-ind {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    background: var(--gray-light);
    color: var(--text-light);
    transition: background 0.2s, color 0.2s;
}

.step-ind.active {
    color: var(--blue);
}

.step-ind.active .step-num {
    background: var(--blue);
    color: var(--white);
}

.step-ind.done .step-num {
    background: var(--green);
    color: var(--white);
}

.step-ind.done {
    color: var(--green);
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--gray-light);
    align-self: center;
}

.step-line.done {
    background: var(--green);
}

/* ─── Body-level location text (under steps) ──────────────────────────── */
#steps-location-text {
    padding: 0 16px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ─── Section ──────────────────────────────────────────────────────────── */
.section {
    padding: 40px 0;
}

.section-alt {
    background: var(--gray-bg);
}

.section-hidden {
    display: none;
}

.section-title {
    font-size: 30px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-body);
    margin-bottom: 35px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ─── Card ─────────────────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: 6px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
    padding: 30px;
    margin-bottom: 24px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

/* ─── Calendar Grid ────────────────────────────────────────────────────── */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 10px;
}

.cal-day {
    padding: 14px 10px;
    border-radius: 6px;
    border: 2px solid var(--gray-light);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.cal-day:hover {
    border-color: var(--blue);
    box-shadow: 0 2px 12px rgba(0, 121, 191, 0.12);
}

.cal-day.selected {
    border-color: var(--blue);
    background: #f0f7ff;
}

.cal-day .day-name {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.cal-day .day-date {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.cal-day .day-avail {
    font-size: 12px;
    margin-top: 4px;
    color: var(--green);
    font-weight: 600;
}

.cal-day.full {
    opacity: 0.45;
    cursor: not-allowed;
}

.cal-day.full .day-avail {
    color: var(--red);
}

/* ─── Slot Grid ────────────────────────────────────────────────────────── */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 10px;
}

.slot-item {
    padding: 16px;
    border-radius: 6px;
    border: 2px solid var(--gray-light);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.slot-item:hover {
    border-color: var(--blue);
    box-shadow: 0 2px 12px rgba(0, 121, 191, 0.12);
}

.slot-item.selected {
    border-color: var(--blue);
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.18);
}

.slot-item .slot-time {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.slot-item .slot-avail {
    font-size: 12px;
    color: var(--green);
    margin-top: 4px;
    font-weight: 600;
}

.slot-item.full {
    opacity: 0.45;
    cursor: not-allowed;
}

.slot-item.full .slot-avail {
    color: var(--red);
}

/* ─── Forms ────────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group .req {
    color: var(--red);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--blue);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ─── Buttons — DevIBrain Style ────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 13px 32px;
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
    box-shadow: 2px 2px 5px rgba(34, 34, 34, 0.35);
}

.btn-primary:hover {
    background: var(--blue-dark);
    box-shadow: 2px 2px 8px rgba(34, 34, 34, 0.45);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-light);
    color: var(--text-body);
    box-shadow: none;
}

.btn-outline:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 12px;
}

.btn-success {
    background: var(--green);
    color: var(--white);
    box-shadow: 2px 2px 5px rgba(34, 34, 34, 0.25);
}

.btn-success:hover {
    background: #219a52;
    color: var(--white);
}

.btn-danger {
    background: var(--red);
    color: var(--white);
    box-shadow: 2px 2px 5px rgba(34, 34, 34, 0.25);
}

.btn-danger:hover {
    background: #c0392b;
    color: var(--white);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Alerts ───────────────────────────────────────────────────────────── */
.alert {
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-info {
    background: #e8f4fd;
    color: #1a5276;
    border: 1px solid #bdd8ee;
}

.alert-success {
    background: #eafaf1;
    color: #1e7e47;
    border: 1px solid #a9dfbf;
}

.alert-danger {
    background: #fdedec;
    color: #922b21;
    border: 1px solid #f5b7b1;
}

/* ─── Loading / Empty ──────────────────────────────────────────────────── */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-light);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 12px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state .emoji {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ─── Confirm Card ─────────────────────────────────────────────────────── */
.confirm-card {
    max-width: 480px;
    margin: 50px auto;
    text-align: center;
}

.confirm-card .icon-big {
    font-size: 56px;
    margin-bottom: 16px;
}

/* ─── LinkedIn Embed Section ───────────────────────────────────────────── */
.iframe-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.iframe-link-embed {
    background: var(--white);
    border-radius: 6px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    min-height: 400px;
}

.iframe-link-embed iframe {
    width: 100%;
    min-height: 400px;
    border: none;
}

/* ─── Services Section (placeholder) ───────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--white);
    border-radius: 6px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
    padding: 30px;
    text-align: center;
    transition: box-shadow 0.2s;
}

.service-card:hover {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.profiling-card .profiling-icon {
    font-size: 40px;
    color: var(--blue);
    margin-bottom: 16px;
}

.profiling-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.profiling-card p {
    font-size: 14px;
    color: var(--text-body);
}

/* ─── Profiling Grid ──────────────────────────────────────────────────── */
.profiling-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

/* ─── Footer Diagonal ─────────────────────────────────────────────────── */
.footer-divider {
    margin-bottom: -2px;
}

.footer-divider polygon {
    fill: var(--blue-deep);
}

/* ─── Footer ───────────────────────────────────────────────────────────── */
.footer {
    background: var(--blue-deep);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 30px 30px;
    font-size: 14px;
}

.footer a {
    color: var(--white);
}

.footer strong {
    color: var(--white);
}

.footer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-logo-main {
    height: 50px;
    opacity: 0.9;
}

.footer-details p {
    margin: 3px 0;
    line-height: 1.6;
}

.footer-details .material-symbols-outlined {
    opacity: 0.6;
    margin-right: 4px;
}

.footer-powered {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 20px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    opacity: 0.7;
}

.footer-iux-logo {
    height: 24px;
}

/* ─── Material Icons alignment ────────────────────────────────────────── */
.material-symbols-outlined {
    vertical-align: middle;
}

.card-title .material-symbols-outlined {
    font-size: 22px;
    margin-right: 6px;
    color: var(--blue);
}

/* ─── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero {
        padding: 35px 20px 45px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .container {
        padding: 0 16px;
    }

    .calendar-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .slot-grid {
        grid-template-columns: 1fr 1fr;
    }

    .steps {
        gap: 4px;
        flex-wrap: wrap;
        padding: 20px 12px 8px;
    }

    .step-ind {
        font-size: 13px;
    }

    .step-line {
        width: 20px;
    }

    .lang-switcher {
        position: static;
        justify-content: center;
        margin-bottom: 16px;
    }

    .iframe-links-grid {
        grid-template-columns: 1fr;
    }

    .profiling-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 24px;
    }

    .footer-info {
        flex-direction: column;
        text-align: center;
    }

    .consent-item label {
        font-size: 14px !important;
    }

    .consent-item label a {
        color: var(--blue);
        text-decoration: underline;
    }
}

/* ─── Fade animation ───────────────────────────────────────────────────── */
.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Privacy Policy Popup Modal ──────────────────────────────────────── */
.privacy-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

.privacy-popup-modal {
    background: var(--white, #fff);
    border-radius: 12px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.privacy-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0;
}

.privacy-popup-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text, #333);
    margin: 0;
}

.privacy-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-light, #999);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.privacy-popup-close:hover {
    color: var(--red, #e74c3c);
}

.privacy-popup-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-body, #666);
}

.privacy-popup-body h2 {
    font-size: 20px;
    color: var(--text, #333);
    margin: 0 0 12px;
}

.privacy-popup-body h3 {
    font-size: 15px;
    color: var(--blue-deep, #21446B);
    margin: 24px 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.privacy-popup-body p {
    margin: 0 0 12px;
}

.privacy-popup-body a {
    color: var(--blue, #0079BF);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .privacy-popup-overlay {
        padding: 12px;
    }

    .privacy-popup-modal {
        max-height: 90vh;
        border-radius: 10px;
    }

    .privacy-popup-header {
        padding: 16px 20px;
    }

    .privacy-popup-body {
        padding: 20px;
    }
}