/* ===== BASE PAGE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #e5e5e5;
    color: #004b8d;
}

.page-wrapper {
    max-width: 1400px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: #0073c8;
    color: #ffffff;
    padding: 15px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 0px;
}

.brand-logo {
    width: 45px;
    height: 45px;
}

.brand-logo img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    display: block;
}

.brand-text {
    display: flex;
    align-items: flex-end;
    font-size: 14px;
    font-weight: 500;
    margin-top: 30px;
}

.brand-name {
    font-size: 14px;
    font-weight: 600;
}

.top-actions {
    display: flex;
    align-items: center;
}

.top-actions a {
    margin-left: 10px;
}

.btn-login {
    color: #ffffff;
    text-decoration: none;
    border: 1px solid #ffffff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 14px;
}

.btn-login:hover {
    background: #ffffff;
    color: #0073c8;
}

/* ===== MAIN CONTENT ===== */
.main {
    padding: 35px 80px 50px;
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero-title {
    font-size: 28px;
    color: #004b8d;
    margin-bottom: 4px;
}

.hero-subtitle {
    font-size: 15px;
    color: #005fa3;
}

/* ===== TOOL LIST ===== */
.tool-list {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 40px;
    text-decoration: none;
    color: inherit;
}

.tool-badge {
    background: #0073c8;
    color: #ffffff;
    padding: 26px 60px;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 700;
}

.tool-info-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
}

.tool-info-subtitle {
    font-size: 16px;
    color: #0064b1;
}

/* ===== FOOTER ===== */
.footer {
    background: #b44de2;
    color: #ffffff;
    padding: 14px;
    text-align: center;
    font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .main {
        padding: 25px 20px 35px;
    }

    .tool-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .tool-badge {
        padding: 18px 40px;
    }
}

/* ===== LOGIN PAGE ===== */

.login-main {
    padding-top: 30px;
    padding-bottom: 60px;
}

.login-container {
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    padding: 36px 40px;
}

.company-or {
    text-align: center;
    font-size: 13px;
    color: #777;
    margin: -6px 0 12px;
}

.company-associate-main .hero {
    margin-bottom: 25px;
}

.company-associate-main .login-container {
    max-width: 500px;
}

form label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #004b8d;
}

form input[type="email"],
form input[type="password"],
form input[type="text"],
form input[type="number"] {
    width: 100%;
    padding: 10px 11px;
    margin-bottom: 18px;
    border-radius: 6px;
    border: 1px solid #c5c5c5;
    font-size: 14px;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 13px;
}

.remember-me input[type="checkbox"] {
    margin-right: 4px;
}

.btn-login-submit {
    width: 100%;
    padding: 10px;
    background: #0073c8;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

.btn-login-submit:hover {
    background: #005fa3;
}

.login-register {
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
}

.login-link {
    color: #0073c8;
    text-decoration: none;
    font-weight: 600;
}

.login-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .login-container {
        margin: 0 16px 30px;
        padding: 24px 20px 20px;
    }
}

.remember-me a {
    color: #0073c8;
    text-decoration: underline;
    font-weight: 600;
}

/* ===== DASHBOARD ===== */

.dashboard-layout {
    max-width: 1100px;
    margin: 0 auto 40px auto;
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.dashboard-left {
    flex: 2;
}

.dashboard-right {
    flex: 1;
}

.dashboard-right .account-warning {
    background: #ffffff;
    padding: 32px 36px;
    border-radius: 18px;
    max-width: 420px;
    margin-left: 40px;
    margin-top: 25px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
    border-top: 2px solid #1976d2;
    border-left: 2px solid #1976d2;
    border-right: 2px solid #b44de2;
    border-bottom: 2px solid #b44de2;
}

.account-warning-title {
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1976d2;
}

.btn-warning-primary {
    display: inline-block;
    margin: 18px 0 22px 0;
    padding: 12px 26px;
    border-radius: 999px;
    border: none;
    background: #1976d2;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
}

.btn-warning-primary:hover {
    background: #0f5ba8;
}

.account-warning .final-note {
    font-size: 13px;
    color: #555;
    margin-top: 10px;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .dashboard-layout {
        flex-direction: column;
        gap: 20px;
    }

    .dashboard-right {
        width: 100%;
        margin-top: 20px;
    }
}

.warning-title {
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1976d2;
}

.warning-box .btn-warning-primary {
    display: inline-block;
    margin: 18px 0 22px 0;
    padding: 12px 26px;
    border-radius: 999px;
    background: #1976d2;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.warning-box .btn-warning-primary:hover {
    background: #0f5ba8;
}

.warning-box .final-note {
    font-size: 13px;
    color: #555;
    margin-top: 10px;
}

/* ========= ACCOUNT SETUP ========= */

.settings-container {
    max-width: 900px;
    margin: 0 auto 40px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 24px 28px 28px;
}

.settings-row + .settings-row {
    border-top: 1px solid #e5e5e5;
    margin-top: 20px;
    padding-top: 20px;
}

.settings-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.settings-row-title {
    font-size: 18px;
    font-weight: 600;
    color: #004b8d;
}

.settings-row-tag {
    font-size: 12px;
    color: #555;
    background: #f1f5fb;
    border-radius: 999px;
    padding: 4px 10px;
}

.settings-row-body p {
    font-size: 14px;
    margin-bottom: 4px;
    color: #004b8d;
}

.settings-note {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
}

.company-list {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
}

.company-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.company-item:last-child {
    border-bottom: none;
}

.company-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.company-name {
    font-weight: 600;
}

.company-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e6f0ff;
    color: #004b8d;
}

.company-badge.owner {
    background: #ffe9e0;
    color: #c0392b;
}

.company-meta span {
    font-size: 13px;
    color: #555;
    margin-right: 10px;
}

.settings-link {
    font-size: 13px;
    color: #0073c8;
    text-decoration: none;
    font-weight: 600;
}

.settings-link:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .settings-container {
        margin: 0 16px 30px;
        padding: 22px 20px 24px;
    }
}

.account-section {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid #e3e3e3;
}

.account-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.account-section-header h2 {
    font-size: 18px;
    color: #004b8d;
}

.account-section-subtitle {
    font-size: 13px;
    color: #555;
    margin-bottom: 14px;
}

.account-section-empty {
    font-size: 13px;
    color: #777;
}

.chip-link {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #ddd;
    font-size: 12px;
    text-decoration: none;
    color: #0073c8;
    background: #f7f7f7;
}

.chip-link:hover {
    border-color: #0073c8;
    background: #e9f3ff;
}

.module-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.module-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.module-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.module-code {
    font-weight: 700;
    color: #0073c8;
    min-width: 42px;
}

.module-name {
    font-weight: 500;
    color: #004b8d;
}

.module-status {
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 999px;
}

.mod-status-off {
    background: #f5f5f5;
    color: #666;
}

.mod-status-pending {
    background: #fff4e0;
    color: #d07b00;
}

.mod-status-on {
    background: #e3f5e9;
    color: #2d8a46;
}

.mod-status-blocked {
    background: #ffe3e3;
    color: #c62828;
}

.module-active-border {
    border: 4px solid #A63FDE;
    box-shadow: 0 0 12px rgba(166, 63, 222, 0.35);
}

.badge-active-crm {
    background-color: #B043E1 !important;
    color: #ffffff !important;
    transition: 0.2s ease-in-out;
}

/* =========================
   HRM PAGE FIXES
   ========================= */

body.hrm-page .hero,
body.hrm-page .hrm-hero,
.hrm-page .hero.hrm-hero {
    text-align: left !important;
}

.hrm-hero .crm-main-title,
.hrm-page .crm-main-title {
    text-align: left;
}

.hrm-hero .crm-main-subtitle,
.hrm-page .crm-main-subtitle {
    text-align: left;
}

.hrm-page .crm-main-title {
    margin-bottom: 6px;
}

.hrm-page .crm-main-subtitle {
    margin-bottom: 16px;
}

/* =========================
   HRM ACTION BUTTONS
   ========================= */

.hrm-actions {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 10px;
}

.hrm-action {
    display: flex;
    align-items: center;
    gap: 18px;
}

.hrm-btn {
    display: inline-block;
    min-width: 160px;
    text-align: center;
    padding: 12px 22px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #01579b;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #d0d0d0;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.hrm-btn:hover {
    background: #01579b;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(1,87,155,0.25);
}

.hrm-action-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    max-width: 520px;
}

@media (max-width: 700px) {
    .hrm-action {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .hrm-btn {
        width: 100%;
        text-align: center;
    }
}

.hrm-btn-primary {
    background: #01579b;
    color: #ffffff;
    border-color: #01579b;
}

.hrm-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

@media (min-width: 701px) {
    .hrm-action {
        flex-direction: row;
        align-items: center;
        gap: 18px;
    }
}

/* ===== HRM SUMMARY ===== */

.hrm-summary-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.hrm-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f3f8ff;
    border-radius: 10px;
}

.hrm-summary-label {
    font-size: 14px;
    color: #004b8d;
    font-weight: 500;
}

.hrm-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #01579b;
}

.hrm-no-plan {
    border-left: none;
    margin-bottom: 20px;
    background: #f7f7fb;
}

.hrm-no-plan-text {
    font-size: 14px;
    color: #555;
    margin: 10px 0 16px;
}

/* =========================
   HRM – NEW JOB POST FORM
   ========================= */

.hrm-form {
    max-width: 900px;
}

.hrm-form label {
    font-weight: 800;
    margin-bottom: 6px;
    display: block;
}

.hrm-form input[type="text"],
.hrm-form select,
.hrm-form textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 10px;
    border: 1px solid #cfcfcf;
    background: #ffffff;
    margin-bottom: 22px;
}

.hrm-form textarea {
    min-height: 140px;
    resize: vertical;
}

.hrm-form select {
    height: 52px;
}

.hrm-form input:focus,
.hrm-form textarea:focus,
.hrm-form select:focus {
    outline: none;
    border-color: #0073c8;
    box-shadow: 0 0 0 2px rgba(0,115,200,0.15);
}

.hrm-actions {
    display: flex;
    gap: 16px;
    margin-top: 30px;
}

.hrm-form textarea {
    min-height: 420px;
    resize: vertical;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.5;
    border-radius: 8px;
}

.hrm-form input[type="text"],
.hrm-form select {
    height: 52px;
    padding: 0 14px;
    font-size: 15px;
    border-radius: 8px;
}

.btn-primary-hrm {
    background: #0073c8;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary-hrm:hover {
    background: #005fa3;
}

.btn-secondary-hrm {
    background: #dbeaf8;
    color: #004b8d;
    border: none;
    padding: 12px 28px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary-hrm:hover {
    background: #c7def2;
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
}

.crm-table td:first-child {
    font-weight: 600;
}

.crm-table th,
.crm-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    text-align: center;
    vertical-align: middle;
}

.crm-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
    background: #e3f2fd;
    color: #01579b;
    text-decoration: none;
}

.btn-secondary {
    background: #ede7f6;
    color: #4527a0;
}

.btn-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-draft {
    background: #fff3e0;
    color: #ef6c00;
}

.badge-published {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-closed {
    background: #eceff1;
    color: #455a64;
}

.crm-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    height: 100%;
}

.crm-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-width: 60px;
    padding: 0 10px;
    font-size: 12px;
    line-height: 1;
    border-radius: 6px;
    box-sizing: border-box;
}

.company-section label {
    font-size: 16px;
    font-weight: 600;
    margin-top: 16px;
}

.company-section textarea {
    min-height: 90px;
    font-size: 15px;
}

.company-logo-preview {
    max-width: 120px;
    margin-bottom: 10px;
}

/* ===============================
   COMPANY FORM IMPROVEMENTS
   =============================== */

.company-section {
    margin-top: 28px;
}

.company-section label,
.login-container label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-top: 18px;
    margin-bottom: 6px;
    color: #003b73;
}

.login-container input[type="text"],
.login-container input[type="email"],
.login-container input[type="file"],
.company-section textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #ccd6e0;
    background: #fff;
}

.company-description {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
    font-size: 15px;
    text-align: left;
}

.company-logo-preview {
    display: block;
    max-width: 140px;
    max-height: 140px;
    margin: 10px 0 8px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    padding: 6px;
}

.company-logo-input {
    padding: 8px;
    background: #f6f9fc;
    cursor: pointer;
}

.btn-login-submit {
    margin-top: 26px;
    padding: 14px 22px;
    font-size: 16px;
    border-radius: 10px;
}

.login-container form {
    max-width: 820px;
    margin: 0 auto;
}

.login-container label {
    font-size: 15px;
    font-weight: 600;
    margin-top: 18px;
    margin-bottom: 6px;
    display: block;
    color: #1f2d3d;
}

.login-container input[type="text"],
.login-container input[type="email"],
.login-container input[type="file"] {
    width: 100%;
    height: 52px;
    padding: 10px 14px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccd4e0;
    background-color: #fff;
    box-sizing: border-box;
}

.login-container input:focus,
.login-container textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.company-section textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.6;
    border-radius: 8px;
    border: 1px solid #ccd4e0;
    box-sizing: border-box;
    font-family: inherit;
    text-align: left;
}

.company-section {
    margin-top: 28px;
    padding: 18px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5eaf0;
}

.company-section img {
    display: block;
    max-height: 120px;
    max-width: 200px;
    margin: 10px 0 12px;
    border-radius: 6px;
    background: #fff;
    padding: 6px;
    border: 1px solid #ddd;
}

.btn-login-submit {
    margin-top: 28px;
    width: 100%;
    height: 54px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 10px;
}

@media (max-width: 640px) {
    .login-container form {
        padding: 0 10px;
    }
}

.login-container input[type="text"],
.login-container input[type="email"],
.login-container input[type="file"] {
    font-size: 16px;
    height: 52px;
    padding: 12px 14px;
    border-radius: 8px;
}

.company-logo-preview {
    max-width: 160px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 10px 0;
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 6px;
    border-radius: 8px;
}

/* =========================
   JOB FLASH MESSAGE
   ========================= */

.job-flash-success {
    max-width: 700px;
    margin: 60px auto 40px;
    padding: 22px 30px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #0d47a1;
    background: #e3f2fd;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid #bbdefb;
}


/* ===================================================
   HOMEPAGE MODULE GRID
   Classi prefissate hp- per evitare conflitti
   =================================================== */

body.home-page {
    font-family: 'DM Sans', Arial, Helvetica, sans-serif;
}

/* Hero */
.hp-hero {
    text-align: center;
    padding: 60px 20px 30px;
}

.hp-hero-title {
    font-family: 'Outfit', 'DM Sans', Arial, sans-serif;
    font-size: 46px;
    font-weight: 800;
    color: #0d47a1;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.hp-hero-subtitle {
    font-size: 19px;
    color: #546e7a;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Grid container */
.hp-modules {
    max-width: 1100px;
    margin: 20px auto 60px;
    padding: 0 30px;
}

.hp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

/* Cell + separators */
.hp-cell {
    position: relative;
    padding: 20px;
}

/* Vertical separator (right edge of odd cells) */
.hp-cell:nth-child(odd)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, #b0bec5 20%, #b0bec5 80%, transparent);
}

/* Horizontal separator (bottom of first row) */
.hp-cell:nth-child(1)::before,
.hp-cell:nth-child(2)::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    width: 70%;
    height: 1px;
    background: linear-gradient(to right, transparent, #b0bec5 20%, #b0bec5 80%, transparent);
}

/* Card */
.hp-card {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 32px 28px;
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    transition:
        transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
        background 0.3s ease;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.hp-card:hover {
    transform: scale(1.045);
    background: #ffffff;
    box-shadow:
        0 16px 40px rgba(13, 71, 161, 0.10),
        0 4px 12px rgba(0, 0, 0, 0.04);
    z-index: 2;
}

.hp-card:active {
    transform: scale(1.02);
}

/* Glow border on hover */
.hp-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.hp-card:hover::before {
    border-color: rgba(13, 71, 161, 0.12);
}

/* Badge (CRM / HRM / PMR / EAM) */
.hp-badge {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', 'DM Sans', Arial, sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1.5px;
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.hp-card:hover .hp-badge {
    transform: rotate(-3deg) scale(1.08);
}

/* Badge colors */
.hp-badge-crm { background: linear-gradient(135deg, #1565c0, #0d47a1); }
.hp-badge-hrm { background: linear-gradient(135deg, #00897b, #00695c); }
.hp-badge-pmr { background: linear-gradient(135deg, #e65100, #bf360c); }
.hp-badge-eam { background: linear-gradient(135deg, #6a1b9a, #4a148c); }

/* Text block */
.hp-text {
    flex: 1;
    padding-top: 4px;
}

.hp-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.hp-title {
    font-family: 'Outfit', 'DM Sans', Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a237e;
    line-height: 1.2;
}

.hp-card:hover .hp-title {
    color: #0d47a1;
}

.hp-desc {
    font-size: 14.5px;
    color: #607d8b;
    line-height: 1.55;
    margin: 0;
}

/* BETA flag */
.hp-beta {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: 'Outfit', 'DM Sans', Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ff6f00, #f57c00);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(255, 111, 0, 0.30);
    white-space: nowrap;
    line-height: 1;
}

/* Arrow on hover */
.hp-arrow {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    color: #0d47a1;
    font-size: 20px;
}

.hp-card:hover .hp-arrow {
    opacity: 0.5;
    transform: translateY(-50%) translateX(0);
}

/* RESPONSIVE homepage */
@media (max-width: 768px) {
    .hp-grid {
        grid-template-columns: 1fr;
    }

    .hp-cell:nth-child(odd)::after {
        display: none;
    }

    .hp-cell:not(:last-child)::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 15%;
        width: 70%;
        height: 1px;
        background: linear-gradient(to right, transparent, #b0bec5 20%, #b0bec5 80%, transparent);
    }

    .hp-card {
        padding: 24px 20px;
    }

    .hp-hero-title {
        font-size: 34px;
    }
}