/* ═══════════════════════════════════════════════════════════════
   tipo-paziente.css — Page-specific styles (shared base in booking-flow.css)
   ═══════════════════════════════════════════════════════════════ */

/* ── Container (narrower for 2-card layout) ── */
.container {
    max-width: 800px;
    width: 100%;
    margin: -20px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* ── Service Cards Grid ── */
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.service-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    animation: cardFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.22s; }

@keyframes cardFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}
.service-card:active {
    transform: translateY(-2px);
}

/* Card accent stripe — different per card */
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
}
.service-card.card-nuovo::before {
    background: linear-gradient(90deg, #7c3aed, #a855f7);
}
.service-card.card-nuovo:hover { border-color: #c4b5fd; }

.service-card.card-controllo::before {
    background: linear-gradient(90deg, #0891b2, #06b6d4);
}
.service-card.card-controllo:hover { border-color: #a5f3fc; }

/* Card icon — distinct per type */
.service-icon {
    width: 60px; height: 60px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff;
    margin: 0 auto 16px;
    transition: transform 0.3s ease;
}
.service-card:hover .service-icon {
    transform: scale(1.08) rotate(4deg);
}
.card-nuovo .service-icon {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    box-shadow: 0 4px 14px rgba(124,58,237,0.3);
}
.card-controllo .service-icon {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    box-shadow: 0 4px 14px rgba(8,145,178,0.3);
}

/* Card content */
.service-card-body {
    padding: 28px 24px 20px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.service-title {
    font-size: 1.2em;
    font-weight: 800;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.25;
}
.service-description {
    font-size: 0.9em;
    color: #6b7280;
    line-height: 1.6;
    flex: 1;
}

/* Card features — compact */
.service-features {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
    text-align: left;
}
.service-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.82em;
    color: #374151;
    line-height: 1.4;
}
.service-feature i {
    flex-shrink: 0;
    font-size: 0.8em;
}
.card-nuovo .service-feature i { color: #7c3aed; }
.card-controllo .service-feature i { color: #0891b2; }

/* Card CTA footer */
.service-card-footer {
    padding: 16px 24px;
    border-top: 1px solid #f3f4f6;
    text-align: center;
}
.btn-service {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 24px;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    letter-spacing: 0.3px;
}
.btn-service:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}
.btn-service:active {
    transform: translateY(0);
}
.card-nuovo .btn-service {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    box-shadow: 0 4px 14px rgba(124,58,237,0.3);
}
.card-controllo .btn-service {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    box-shadow: 0 4px 14px rgba(8,145,178,0.3);
}

/* Price badge */
.price-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef2f2;
    color: #e74c3c;
    font-size: 0.82em;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #fecaca;
    margin-top: 14px;
}

/* ── Modal ── */
.ctrl-modal-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
    padding: 24px;
}
.ctrl-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    padding: 32px 28px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
    position: relative;
    text-align: center;
    animation: modalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to { opacity: 1; transform: none; }
}
.ctrl-modal-close {
    position: absolute; top: 14px; right: 14px;
    background: #f3f4f6; border: none;
    width: 34px; height: 34px; border-radius: 50%;
    cursor: pointer; font-size: 1rem; color: #6b7280;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.ctrl-modal-close:hover { background: #e5e7eb; }
.ctrl-modal-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff;
    margin: 0 auto 16px;
    box-shadow: 0 6px 16px rgba(8,145,178,0.25);
}
.ctrl-modal h2 {
    font-size: 1.2em; font-weight: 800; color: #111827; margin-bottom: 6px;
}
.ctrl-modal p {
    font-size: 0.88em; color: #6b7280; margin-bottom: 24px; line-height: 1.6;
}
.ctrl-btn-primary {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: #fff; border-radius: 12px;
    font-size: 1rem; font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(8,145,178,0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 12px;
}
.ctrl-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8,145,178,0.45);
}
.ctrl-forgot {
    display: inline-block; font-size: 0.85rem;
    color: #6b7280; text-decoration: none;
    margin-bottom: 20px; transition: color 0.2s;
}
.ctrl-forgot:hover { color: #0891b2; }
.ctrl-divider {
    display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.ctrl-divider::before, .ctrl-divider::after {
    content: ''; flex: 1; height: 1px; background: #e5e7eb;
}
.ctrl-divider span {
    font-size: 0.75rem; color: #9ca3af; font-weight: 600;
}
.ctrl-btn-secondary {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; width: 100%;
    padding: 12px 24px;
    background: #f3f4f6; color: #374151;
    border: 2px solid #e5e7eb; border-radius: 12px;
    font-size: 0.9rem; font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}
.ctrl-btn-secondary:hover {
    border-color: #0891b2; background: #ecfeff;
}

.patient-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .service-grid { grid-template-columns: 1fr; gap: 16px; }
    .container { margin-top: -14px; }
    .service-card-body { padding: 24px 20px 16px; }
    .service-card-footer { padding: 14px 20px; }
    .patient-type-grid { grid-template-columns: 1fr; }
    .ctrl-modal { padding: 24px 20px; }
}
