/* === Hero Section (index.php) === */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #1a3a5c 100%);
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(13,110,253,.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(32,201,151,.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-form {
    border-radius: 12px !important;
    overflow: hidden;
}
.hero-form .form-control:focus {
    box-shadow: none;
}
.hero-form .input-group-text {
    padding-left: 18px;
}

/* Hero Stats */
.hero-stat {
    text-align: center;
    padding: 0 20px;
}
.hero-stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.hero-stat-label {
    font-size: .75rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* === How it Works === */
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 12px;
}
.step-icon {
    font-size: 2.5rem;
    color: #0d6efd;
}
.step-connector {
    position: absolute;
    top: 45px;
    left: -30%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, #dee2e6, #0d6efd);
    z-index: 0;
}

/* === Feature Cards (What we check) === */
.feature-icon-lg {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.bg-purple { background-color: #6f42c1 !important; }
.bg-purple-subtle { background-color: rgba(111,66,193,.1) !important; }
.text-purple { color: #6f42c1 !important; }

.feature-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}
.feature-checklist li {
    padding: 4px 0;
    font-size: .875rem;
    color: #495057;
}
.feature-checklist li i {
    color: #198754;
    margin-right: 6px;
}
.feature-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.08) !important;
}

/* === Score Explanation === */
.score-example {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-weight: 700;
    font-size: .85rem;
    color: #fff;
    flex-shrink: 0;
}
.score-ex-green  { background: linear-gradient(135deg, #198754, #20c997); }
.score-ex-orange { background: linear-gradient(135deg, #fd7e14, #ffc107); }
.score-ex-red    { background: linear-gradient(135deg, #dc3545, #e85d72); }

/* === Report Features === */
.report-feature-icon {
    font-size: 2.5rem;
}
.report-feature-card {
    transition: transform 0.2s ease;
}
.report-feature-card:hover {
    transform: translateY(-3px);
}

/* === Recent Scans === */
.recent-scan-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.recent-scan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.1) !important;
}
.recent-scan-score {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

/* === FAQ Accordion === */
.accordion-button:not(.collapsed) {
    background: #f8f9fa;
    color: #0d6efd;
    box-shadow: none;
}
.accordion-button:focus {
    box-shadow: none;
}

/* === CTA Section === */
.cta-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

/* Feature Icons (legacy small) */
.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Progress card in hero */
#progress-section .card {
    border-color: rgba(255,255,255,.2) !important;
    color: #fff;
}
#progress-section .text-muted {
    color: rgba(255,255,255,.6) !important;
}
.progress-bar {
    transition: width 0.5s ease;
}

/* === Results Header === */
.results-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.severity-badge-critical { background: #dc3545; color: #fff; font-size: .75rem; padding: .35em .65em; }
.severity-badge-high     { background: #fd7e14; color: #212529; font-size: .75rem; padding: .35em .65em; }
.severity-badge-medium   { background: #0dcaf0; color: #212529; font-size: .75rem; padding: .35em .65em; }
.severity-badge-low      { background: #6c757d; color: #fff; font-size: .75rem; padding: .35em .65em; }

/* === SVG Score Rings === */
.score-ring {
    display: block;
}
.score-ring-fill {
    animation: ringFill 1.2s ease-out;
    transform-origin: center;
}
@keyframes ringFill {
    from { stroke-dasharray: 0 100; }
}

/* === Overall Score Card === */
.overall-score-card {
    background: #fff;
}

/* === Category Cards === */
.category-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent !important;
    position: relative;
    overflow: hidden;
}
.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.1) !important;
}
.category-card.active {
    border-color: var(--cat-color, #0d6efd) !important;
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.12) !important;
}
.category-card-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}
.category-card-arrow {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    font-size: .7rem;
    color: #adb5bd;
}
.category-card:hover .category-card-arrow,
.category-card.active .category-card-arrow {
    opacity: 1;
}
.category-card.active .category-card-arrow {
    color: var(--cat-color, #0d6efd);
}
.category-card.active .category-card-arrow i {
    transform: rotate(180deg);
    display: inline-block;
}

/* === Category Detail Panel === */
.category-detail-panel {
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.category-detail-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tracking-wide {
    letter-spacing: .05em;
}

/* === Issue Groups === */
.issue-group {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}
.issue-group-header {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    background: #fafbfc;
}
.issue-group-header:hover {
    background: #f0f2f5;
}
.issue-group-title {
    font-size: .9rem;
}
.issue-chevron {
    transition: transform 0.2s;
    font-size: .75rem;
    color: #adb5bd;
}
.issue-group-header[aria-expanded="true"] .issue-chevron,
.issue-group-header:not(.collapsed) .issue-chevron {
    transform: rotate(90deg);
}
.severity-sm {
    font-size: .7rem;
    min-width: 55px;
    text-align: center;
}

/* Issue pages list */
.issue-pages-list {
    background: #fff;
    border-top: 1px solid #e9ecef;
    padding: 8px 16px;
    max-height: 300px;
    overflow-y: auto;
}
.issue-page-row {
    padding: 4px 0;
    border-bottom: 1px solid #f5f5f5;
}
.issue-page-row:last-child {
    border-bottom: none;
}
.issue-page-row a {
    color: #495057;
}
.issue-page-row a:hover {
    color: #0d6efd;
}

/* === Checks List === */
.checks-list {
    background: #fafbfc;
    border-radius: 8px;
    padding: 12px 16px;
}
.check-row i {
    font-size: .85rem;
}

/* === Nav Tabs === */
.nav-tabs .nav-link {
    color: #495057;
    border: none;
    padding: .65rem 1rem;
}
.nav-tabs .nav-link.active {
    font-weight: 600;
    border-bottom: 2px solid #0d6efd;
}
.nav-tabs .nav-link .badge {
    font-size: .65rem;
    vertical-align: middle;
}

/* === Tables === */
.table td, .table th {
    vertical-align: middle;
    font-size: .875rem;
}
.table .text-break {
    word-break: break-all;
    max-width: 300px;
}
.badge {
    font-weight: 500;
}

/* Sortable column headers */
.sortable {
    cursor: pointer;
    user-select: none;
}
.sortable:hover {
    background: #e9ecef;
}
.sortable i {
    font-size: .65rem;
    opacity: .4;
}
.sortable.sort-active i {
    opacity: 1;
}

/* === Card Hover === */
.card.shadow-sm {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card.shadow-sm:hover {
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.1) !important;
}

/* === Responsive === */
@media (max-width: 767px) {
    .results-header h1 { font-size: 1.1rem; }
    .results-header .d-flex.gap-3 { gap: .5rem !important; }
    .category-detail-icon { width: 40px; height: 40px; }
    .category-detail-panel h4 { font-size: 1.1rem; }
}
