/* ============================================================
   Homepage polish (index.html)
   Brings the existing homepage sections in line with the paid
   landing (landing-niuexa.css): navy left-aligned headings, solid
   accent colours instead of gradient text, hairline lists, quiet
   cards with aligned footers. Tokens from styles.css only.
   Everything is scoped to body.home-page so shared classes
   (.faq-section, .partners-section, ...) keep their look elsewhere.
   ============================================================ */

.home-page {
    --home-container: 1200px;
    --home-section: clamp(64px, 8vw, 104px);
    --home-card-shadow: 0 1px 2px rgba(10, 26, 38, 0.04), 0 8px 24px rgba(10, 26, 38, 0.06);
    --home-card-shadow-hover: 0 2px 4px rgba(10, 26, 38, 0.05), 0 16px 36px rgba(10, 26, 38, 0.1);
}

.home-page main .container {
    max-width: var(--home-container);
}

/* ---------- Section headings ---------- */
.home-page main .section-title {
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-align: left;
    color: var(--dark-gray);
    background: none;
    -webkit-text-fill-color: currentColor;
    margin: 0 0 2.5rem;
    max-width: 24ch;
}

.home-page .testimonials-intro,
.home-page .courses-header,
.home-page .talk-with-us-section .section-subtitle {
    text-align: left;
}

.home-page .section-title + .testimonials-intro,
.home-page .courses-header .section-title {
    margin-top: -1.5rem;
}

.home-page .courses-header .section-title {
    margin: 0 0 1rem;
}

.home-page .testimonials-intro p,
.home-page .courses-intro {
    max-width: 62ch;
    margin: 0 0 3rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--medium-gray);
}

/* Inline links in body copy: the browser default blue read as unstyled */
.home-page .company-section p a,
.home-page .testimonials-section p a,
.home-page .faq-section p a,
.home-page .talk-with-us-section p a,
.home-page .checkbox-label a {
    color: var(--blue-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.home-page .company-section p a:hover,
.home-page .testimonials-section p a:hover,
.home-page .faq-section p a:hover,
.home-page .talk-with-us-section p a:hover,
.home-page .checkbox-label a:hover {
    color: var(--dark-blue);
}

/* ---------- Hero ---------- */
.home-page .hero-title .highlight {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--signal-on-dark);
}

.home-page .hero-title .highlight::after {
    display: none;
}

/* ---------- Chi Siamo ---------- */
.home-page .company-section {
    padding: var(--home-section) 0;
}

.home-page .company-content {
    gap: clamp(2.5rem, 6vw, 5rem);
}

.home-page .company-description {
    max-width: 60ch;
    line-height: 1.7;
}

.home-page .company-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--blue-text);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
    transition: color var(--transition-fast);
}

.home-page .company-link:hover {
    color: var(--dark-blue);
}

/* ---------- Partner and technology strips ---------- */
.home-page .partners-section {
    padding: var(--home-section) 0 2.5rem;
}

.home-page .partners-section + .partners-section {
    padding: 2.5rem 0 var(--home-section);
    border-top: 1px solid var(--border-light);
}

.home-page .partners-section .section-title {
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
}

.home-page .partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
    gap: 0.75rem;
}

.home-page .partner-logo {
    width: auto;
    height: 88px;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: none;
}

.home-page .partner-logo:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-medium);
}

.home-page .partner-logo img {
    max-height: 48px;
    width: auto;
    opacity: 0.8;
    transition: filter var(--transition-fast), opacity var(--transition-fast);
}

.home-page .partner-logo:hover img {
    opacity: 1;
}

/* ---------- Cards: data, services, courses ---------- */
.home-page .testimonials-section,
.home-page .services-overview,
.home-page .courses-section {
    padding: var(--home-section) 0;
}

.home-page .testimonials-grid,
.home-page .services-grid,
.home-page .courses-grid {
    gap: 1.5rem;
    margin: 0;
}

.home-page .testimonial-card,
.home-page .service-card,
.home-page .course-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: var(--home-card-shadow);
}

.home-page .testimonial-card::before,
.home-page .service-card::before {
    display: none;
}

/* Data cards are not links: no hover lift */
.home-page .testimonial-card:hover {
    transform: none;
    box-shadow: var(--home-card-shadow);
}

.home-page .testimonial-content {
    flex: 1;
    font-size: 1rem;
}

.home-page .testimonial-content h3 {
    font-size: 1.3rem;
    line-height: 1.25;
}

.home-page .testimonial-content > p {
    line-height: 1.65;
    color: var(--dark-gray);
}

.home-page .testimonial-source p {
    font-size: 0.88rem;
    color: var(--medium-gray);
}

.home-page .testimonial-results {
    border-top-color: var(--border-light);
}

.home-page .result-item {
    text-align: left;
}

.home-page .result-number {
    font-size: 1.6rem;
    line-height: 1.15;
}

.home-page .result-label {
    display: block;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Services */
.home-page .service-card {
    padding: 2rem;
}

.home-page .service-card:hover,
.home-page .service-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--border-medium);
    box-shadow: var(--home-card-shadow-hover);
}

.home-page .service-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    margin-bottom: 1.5rem;
    border-radius: 14px;
    background: var(--light-blue);
    color: var(--blue-text);
}

.home-page .service-card[data-service="training"] .service-icon {
    background: var(--light-green);
    color: var(--green-text);
}

.home-page .service-card[data-service="product"] .service-icon {
    background: var(--signal-surface);
    color: var(--signal);
}

.home-page .service-icon svg {
    width: 28px;
    height: 28px;
}

.home-page .service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.home-page .service-card p {
    flex: 1;
    line-height: 1.65;
    color: var(--medium-gray);
}

.home-page .service-link {
    margin-top: 1.25rem;
    color: var(--blue-text);
}

/* Courses: equal-height cards with the button pinned to the bottom */
.home-page .course-card {
    border-width: 2px;
    border-color: var(--border-light);
    overflow: hidden;
}

.home-page .course-card.featured {
    border-color: var(--primary-blue);
    background: var(--white);
}

.home-page .course-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-medium);
    box-shadow: var(--home-card-shadow-hover);
}

.home-page .course-card.featured:hover {
    border-color: var(--primary-blue);
}

.home-page .course-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
}

.home-page .course-content-wrapper h3 {
    font-size: 1.2rem;
    text-wrap: balance;
}

.home-page .course-description {
    flex: 1;
}

.home-page .course-highlights {
    align-content: flex-start;
}

.home-page .course-meta {
    padding: 0.75rem 1rem;
}

.home-page .course-btn,
.home-page .course-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin-top: auto;
    padding: 0.9rem 1.5rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    /* every stop of --gradient-cta carries white at AA */
    background: var(--gradient-cta);
    border-radius: 50px;
}

.home-page .course-badge {
    background: var(--dark-gray);
    color: var(--white);
}

/* ---------- Events band ---------- */
.home-page .events-hero-section {
    min-height: min(80vh, 720px);
}

.home-page .events-hero-container {
    max-width: var(--home-container);
}

.home-page .events-hero-title {
    font-size: clamp(2.2rem, 4.5vw, 3rem);
    letter-spacing: -0.02em;
}

.home-page .events-hero-title .highlight {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--green-on-dark);
}

.home-page .events-hero-section .btn {
    background: var(--gradient-cta);
    border-radius: 50px;
}

.home-page .events-hero-section .btn:hover {
    background: var(--gradient-cta);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

/* ---------- FAQ: title column + hairline list ---------- */
.home-page .faq-section {
    padding: var(--home-section) 0;
    background: var(--white);
}

.home-page .faq-container {
    max-width: var(--home-container);
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    grid-template-rows: auto 1fr;
    column-gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.home-page .faq-container .section-title {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 1.25rem;
}

.home-page .faq-section .author-attribution {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    padding: 0;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.6;
}

.home-page .faq-section .faq-list {
    grid-column: 2;
    grid-row: 1 / span 2;
    gap: 0;
    border-top: 1px solid var(--border-light);
}

.home-page .faq-section .faq-item {
    background: none;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--border-light);
}

.home-page .faq-section .faq-item summary {
    gap: 1.25rem;
    padding: 1.25rem 0;
}

.home-page .faq-section .faq-item summary:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 4px;
    border-radius: 4px;
}

.home-page .faq-section .faq-item summary h3 {
    font-size: 1.1rem;
    line-height: 1.35;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.home-page .faq-section .faq-item summary:hover h3 {
    color: var(--blue-text);
}

/* Drawn plus that turns into a cross when open */
.home-page .faq-section .faq-item summary::after {
    content: '';
    width: 16px;
    height: 16px;
    margin: 0;
    background:
        linear-gradient(var(--blue-text), var(--blue-text)) center / 100% 2px no-repeat,
        linear-gradient(var(--blue-text), var(--blue-text)) center / 2px 100% no-repeat;
    transition: transform var(--transition-fast);
}

.home-page .faq-section .faq-item[open] summary::after {
    content: '';
    transform: rotate(45deg);
}

.home-page .faq-section .faq-item p {
    padding: 0;
    max-width: 68ch;
    margin: 0 0 0.75rem;
}

.home-page .faq-section .faq-item p:last-child {
    padding-bottom: 0;
    margin-bottom: 1.5rem;
}

/* ---------- Contact: intro + direct contacts left, form right ---------- */
.home-page .talk-with-us-section {
    padding: var(--home-section) 0 3rem;
    background: var(--light-gray);
}

.home-page .talk-with-us-section > .container {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas:
        "title form"
        "intro form"
        "info  form"
        "meta  meta";
    grid-template-rows: auto auto 1fr auto;
    column-gap: clamp(2rem, 6vw, 5.5rem);
    align-items: start;
}

.home-page .talk-with-us-section .section-title {
    grid-area: title;
    margin-bottom: 1rem;
}

.home-page .talk-with-us-section .section-subtitle {
    grid-area: intro;
    max-width: 44ch;
    margin: 0 0 2.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.home-page .talk-with-us-section .contact-form {
    grid-area: form;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(1.4rem, 2.6vw, 2.25rem);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(10, 26, 38, 0.04), 0 24px 48px rgba(10, 26, 38, 0.08);
}

.home-page .talk-with-us-section .form-row-2col {
    gap: 0 0.85rem;
    margin-bottom: 0;
}

.home-page .talk-with-us-section .form-group {
    margin-bottom: 1rem;
    min-width: 0;
}

.home-page .talk-with-us-section .contact-form label {
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.home-page .talk-with-us-section .contact-form input[type="text"],
.home-page .talk-with-us-section .contact-form input[type="email"],
.home-page .talk-with-us-section .contact-form input[type="tel"],
.home-page .talk-with-us-section .contact-form select,
.home-page .talk-with-us-section .contact-form textarea {
    min-height: 46px;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border-medium);
    border-radius: 10px;
    background: var(--white);
    color: var(--black);
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.home-page .talk-with-us-section .contact-form ::placeholder {
    color: var(--medium-gray);
    font-weight: 400;
}

.home-page .talk-with-us-section .contact-form input:focus,
.home-page .talk-with-us-section .contact-form select:focus,
.home-page .talk-with-us-section .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(35, 125, 166, 0.18);
}

.home-page .talk-with-us-section .contact-form input:user-invalid,
.home-page .talk-with-us-section .contact-form select:user-invalid,
.home-page .talk-with-us-section .contact-form textarea:user-invalid {
    border-color: var(--error);
}

.home-page .talk-with-us-section .contact-form select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2354697A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    cursor: pointer;
}

.home-page .talk-with-us-section .contact-form textarea {
    min-height: 96px;
}

.home-page .talk-with-us-section .form-group:has(.checkbox-label) {
    margin-bottom: 0.7rem;
}

.home-page .talk-with-us-section .checkbox-label {
    gap: 0.65rem;
    margin: 0;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.45;
    color: var(--dark-gray);
    cursor: pointer;
}

.home-page .talk-with-us-section .checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin: 0;
    accent-color: var(--primary-blue);
    cursor: pointer;
}

.home-page .talk-with-us-section .contact-form .btn-submit {
    min-height: 54px;
    margin-top: 1rem;
    font-family: var(--font-primary);
    font-size: 1.05rem;
    background: var(--gradient-cta);
}

.home-page .talk-with-us-section .contact-form .btn-submit:hover {
    box-shadow: 0 10px 28px rgba(28, 92, 158, 0.3);
}

.home-page .talk-with-us-section .contact-form .btn-submit:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 3px;
}

.home-page .talk-with-us-section .contact-form .btn-submit svg {
    width: 18px;
    height: 18px;
}

/* Direct contacts: a quiet hairline list under the intro */
.home-page .talk-with-us-section .traditional-contact-info {
    grid-area: info;
    margin: 0;
    max-width: 30rem;
}

.home-page .traditional-contact-info h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.home-page .talk-with-us-section .contact-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: none;
    margin: 0;
    border-top: 1px solid var(--border-medium);
}

.home-page .talk-with-us-section .contact-item {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    text-align: left;
    border-bottom: 1px solid var(--border-medium);
}

.home-page .talk-with-us-section .contact-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    margin: 0;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: none;
}

.home-page .talk-with-us-section .contact-icon svg {
    width: 18px;
    height: 18px;
}

.home-page .talk-with-us-section .contact-item h4 {
    margin: 0 0 0.15rem;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--medium-gray);
}

.home-page .talk-with-us-section .contact-item p {
    font-size: 0.98rem;
    line-height: 1.45;
}

.home-page .talk-with-us-section .contact-item a {
    font-weight: 600;
}

.home-page .talk-with-us-section .content-last-updated {
    grid-area: meta;
    margin: 3.5rem 0 0;
    padding: 1.25rem 0 0;
    border-top: 1px solid var(--border-light);
    text-align: left;
}

/* ---------- Tablet and below ---------- */
@media (max-width: 960px) {
    .home-page .faq-container {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
    }

    .home-page .faq-container .section-title,
    .home-page .faq-section .author-attribution,
    .home-page .faq-section .faq-list {
        grid-column: 1;
        grid-row: auto;
    }

    .home-page .faq-section .author-attribution {
        margin-bottom: 2rem;
    }

    .home-page .talk-with-us-section > .container {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "title"
            "intro"
            "form"
            "info"
            "meta";
        grid-template-rows: none;
    }

    .home-page .talk-with-us-section .section-subtitle {
        margin-bottom: 2rem;
    }

    .home-page .talk-with-us-section .traditional-contact-info {
        max-width: none;
        margin-top: 3rem;
    }
}

@media (max-width: 768px) {
    .home-page main .section-title {
        margin-bottom: 2rem;
    }

    .home-page .company-content {
        text-align: left;
    }

    .home-page .partners-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-page .partner-logo {
        width: auto;
        height: 76px;
    }

    .home-page .partner-logo img {
        max-height: 38px;
    }

    /* styles.css pads the whole card and centres the tags on phones */
    .home-page .course-card {
        padding: 0;
    }

    .home-page .course-content-wrapper {
        padding: 1.5rem;
    }

    .home-page .course-highlights {
        justify-content: flex-start;
    }

    .home-page .course-card:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 560px) {
    .home-page .talk-with-us-section .form-row-2col {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-page .service-card:hover,
    .home-page .course-card:hover {
        transform: none;
    }
}
