/*
|--------------------------------------------------------------------------
| Project Theme CSS
|--------------------------------------------------------------------------
| Purpose:
| Central theme file for colors, borders, shadows, text, cards, buttons,
| forms and reusable UI tokens.
|
| Shared Hosting Friendly:
| - No external imports
| - No heavy animation libraries
| - CSS variables for easy theme changes
| - Lightweight reusable classes
|--------------------------------------------------------------------------
*/

:root {
    /*
    |--------------------------------------------------------------------------
    | Brand Colors
    |--------------------------------------------------------------------------
    */
    --color-primary: #2563EB;
    --color-primary-dark: #1E3A8A;
    --color-primary-light: #7DD3FC;
    --color-primary-soft: #E8F1FF;

    --color-secondary: #047857;
    --color-secondary-dark: #065F46;
    --color-secondary-soft: #E7F6EF;

    --color-navy: #07111F;
    --color-navy-soft: #111827;
    --color-navy-light: #374151;

    /*
    |--------------------------------------------------------------------------
    | Background Colors
    |--------------------------------------------------------------------------
    */
    --bg-body: #EEF1F4;
    --bg-page: #FCFCFD;
    --bg-soft: #F3F5F7;
    --bg-muted: #F8F9FB;
    --bg-dark: #050A12;

    /*
    |--------------------------------------------------------------------------
    | Text Colors
    |--------------------------------------------------------------------------
    */
    --text-main: #111827;
    --text-heading: #070B12;
    --text-body: #3F4A5A;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --text-white: #FAFBFC;

    /*
    |--------------------------------------------------------------------------
    | Border Colors
    |--------------------------------------------------------------------------
    */
    --border-color: #D8DEE7;
    --border-light: #E7EBF0;
    --border-dark: #B7C0CD;
    --border-primary: rgba(37, 99, 235, 0.36);
    --border-secondary: rgba(4, 120, 87, 0.34);

    /*
    |--------------------------------------------------------------------------
    | Card Colors
    |--------------------------------------------------------------------------
    */
    --card-bg: rgba(252, 252, 253, 0.92);
    --card-bg-soft: rgba(246, 248, 251, 0.86);
    --card-border: rgba(216, 222, 231, 0.92);
    --card-hover-border: rgba(37, 99, 235, 0.42);

    /*
    |--------------------------------------------------------------------------
    | Status Colors
    |--------------------------------------------------------------------------
    */
    --success: #059669;
    --success-soft: #DFF7EC;

    --danger: #DC2626;
    --danger-soft: #FEE2E2;

    --warning: #D97706;
    --warning-soft: #FEF3C7;

    --info: #0284C7;
    --info-soft: #E0F2FE;

    /*
    |--------------------------------------------------------------------------
    | Shadows
    |--------------------------------------------------------------------------
    */
    --shadow-xs: 0 2px 8px rgba(7, 17, 31, 0.07);
    --shadow-sm: 0 10px 30px rgba(7, 17, 31, 0.11), 0 1px 0 rgba(255, 255, 255, 0.72) inset;
    --shadow-md: 0 18px 54px rgba(7, 17, 31, 0.16), 0 0 0 1px rgba(37, 99, 235, 0.05);
    --shadow-lg: 0 34px 100px rgba(7, 17, 31, 0.24), 0 14px 34px rgba(37, 99, 235, 0.08);

    /*
    |--------------------------------------------------------------------------
    | Radius
    |--------------------------------------------------------------------------
    */
    --radius-xs: 5px;
    --radius-sm: 9px;
    --radius-md: 13px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    /*
    |--------------------------------------------------------------------------
    | Layout
    |--------------------------------------------------------------------------
    */
    --container-width: 1220px;
    --container-padding: 16px;

    /*
    |--------------------------------------------------------------------------
    | Typography
    |--------------------------------------------------------------------------
    */
    --font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

    --font-size-xs: 12px;
    --font-size-sm: 13px;
    --font-size-md: 15px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 22px;
    --font-size-2xl: 30px;
    --font-size-3xl: 42px;

    --font-weight-normal: 400;
    --font-weight-medium: 600;
    --font-weight-bold: 800;
    --font-weight-black: 950;

    /*
    |--------------------------------------------------------------------------
    | Transitions
    |--------------------------------------------------------------------------
    */
    --transition-fast: 0.16s ease;
    --transition-normal: 0.22s ease;
}

/*
|--------------------------------------------------------------------------
| Base Reset
|--------------------------------------------------------------------------
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    color: var(--text-body);
    background:
        radial-gradient(circle at top left, rgba(5, 150, 105, 0.08), transparent 30%),
        radial-gradient(circle at top right, rgba(198, 146, 46, 0.08), transparent 28%),
        linear-gradient(180deg, var(--bg-page) 0%, var(--bg-body) 50%, var(--bg-page) 100%);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

::selection {
    background: var(--color-primary);
    color: var(--text-white);
}

/*
|--------------------------------------------------------------------------
| Containers
|--------------------------------------------------------------------------
*/

.theme-container {
    width: min(var(--container-width), calc(100% - 32px));
    margin-inline: auto;
}

.theme-section {
    padding: 48px 0;
}

.theme-section-sm {
    padding: 28px 0;
}

.theme-section-lg {
    padding: 72px 0;
}

/*
|--------------------------------------------------------------------------
| Typography Helpers
|--------------------------------------------------------------------------
*/

.theme-kicker {
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-black);
    letter-spacing: 1.6px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.theme-title {
    margin: 0;
    color: var(--text-heading);
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -1.8px;
    font-weight: var(--font-weight-black);
}

.theme-subtitle {
    color: var(--text-muted);
    max-width: 720px;
    margin-top: 12px;
    margin-bottom: 0;
}

.theme-text-muted {
    color: var(--text-muted);
}

.theme-text-primary {
    color: var(--color-primary);
}

.theme-text-dark {
    color: var(--text-heading);
}

/*
|--------------------------------------------------------------------------
| Cards
|--------------------------------------------------------------------------
*/

.theme-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.theme-card-padding {
    padding: 22px;
}

.theme-card-hover {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.theme-card-hover:hover {
    transform: translateY(-4px);
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-md);
}

.theme-card-soft {
    background: var(--card-bg-soft);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
}

.theme-card-primary {
    background:
        radial-gradient(circle at top right, rgba(5, 150, 105, 0.14), transparent 40%),
        var(--card-bg);
    border: 1px solid var(--border-primary);
}

.theme-card-secondary {
    background:
        radial-gradient(circle at top right, rgba(198, 146, 46, 0.14), transparent 40%),
        var(--card-bg);
    border: 1px solid var(--border-secondary);
}

.theme-card-dark {
    background:
        radial-gradient(circle at top right, rgba(5, 150, 105, 0.20), transparent 40%),
        var(--color-navy);
    color: var(--text-white);
    border: 1px solid var(--color-navy);
}

/*
|--------------------------------------------------------------------------
| Buttons
|--------------------------------------------------------------------------
*/

.theme-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    background: var(--bg-page);
    color: var(--text-heading);
    padding: 12px 18px;
    font-size: 14px;
    font-weight: var(--font-weight-black);
    line-height: 1;
    white-space: nowrap;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal), background var(--transition-normal), color var(--transition-normal);
}

.theme-btn:hover {
    transform: translateY(-2px);
    border-color: var(--border-primary);
    box-shadow: var(--shadow-sm);
}

.theme-btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--text-white);
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(5, 150, 105, 0.22);
}

.theme-btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: var(--text-white);
}

.theme-btn-dark {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: var(--text-white);
}

.theme-btn-dark:hover {
    background: var(--color-navy-light);
    color: var(--text-white);
}

.theme-btn-secondary {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--text-white);
}

.theme-btn-secondary:hover {
    background: var(--color-secondary-dark);
    color: var(--text-white);
}

.theme-btn-light {
    background: var(--bg-soft);
    color: var(--text-heading);
}

.theme-icon-btn {
    width: 46px;
    padding: 0;
    border-radius: var(--radius-md);
}

/*
|--------------------------------------------------------------------------
| Forms
|--------------------------------------------------------------------------
*/

.theme-form-group {
    margin-bottom: 14px;
}

.theme-label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-heading);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
}

.theme-input,
.theme-select,
.theme-textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-page);
    color: var(--text-main);
    outline: 0;
    padding: 12px 15px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.theme-textarea {
    min-height: 120px;
    resize: vertical;
}

.theme-input:focus,
.theme-select:focus,
.theme-textarea:focus {
    border-color: rgba(5, 150, 105, 0.58);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.10);
}

.theme-input::placeholder,
.theme-textarea::placeholder {
    color: var(--text-light);
}

.theme-form-hint {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: var(--font-size-xs);
}

/*
|--------------------------------------------------------------------------
| Badges / Tags / Status
|--------------------------------------------------------------------------
*/

.theme-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-pill);
    padding: 7px 11px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-black);
    line-height: 1;
    border: 1px solid var(--border-color);
    background: var(--bg-soft);
    color: var(--text-body);
}

.theme-badge-primary {
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    border-color: rgba(5, 150, 105, 0.20);
}

.theme-badge-secondary {
    background: var(--color-secondary-soft);
    color: var(--color-secondary-dark);
    border-color: rgba(198, 146, 46, 0.25);
}

.theme-badge-success {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(22, 163, 74, 0.20);
}

.theme-badge-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.20);
}

.theme-badge-warning {
    background: var(--warning-soft);
    color: var(--warning);
    border-color: rgba(217, 119, 6, 0.20);
}

.theme-badge-info {
    background: var(--info-soft);
    color: var(--info);
    border-color: rgba(37, 99, 235, 0.20);
}

.theme-tag {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-pill);
    padding: 6px 10px;
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    color: var(--text-body);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
}

/*
|--------------------------------------------------------------------------
| Alerts
|--------------------------------------------------------------------------
*/

.theme-alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-page);
    color: var(--text-body);
    margin-bottom: 16px;
}

.theme-alert-success {
    background: var(--success-soft);
    border-color: rgba(22, 163, 74, 0.20);
    color: #166534;
}

.theme-alert-danger {
    background: var(--danger-soft);
    border-color: rgba(220, 38, 38, 0.20);
    color: #991b1b;
}

.theme-alert-warning {
    background: var(--warning-soft);
    border-color: rgba(217, 119, 6, 0.22);
    color: #92400e;
}

.theme-alert-info {
    background: var(--info-soft);
    border-color: rgba(37, 99, 235, 0.22);
    color: #1d4ed8;
}

/*
|--------------------------------------------------------------------------
| Tables
|--------------------------------------------------------------------------
*/

.theme-table-wrap {
    width: 100%;
    overflow-x: auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.theme-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.theme-table th,
.theme-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    vertical-align: middle;
}

.theme-table th {
    color: var(--text-heading);
    background: var(--bg-muted);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-black);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.theme-table td {
    color: var(--text-body);
    font-size: var(--font-size-sm);
}

.theme-table tr:last-child td {
    border-bottom: 0;
}

.theme-table tr:hover td {
    background: var(--bg-muted);
}

/*
|--------------------------------------------------------------------------
| Layout Helpers
|--------------------------------------------------------------------------
*/

.theme-grid {
    display: grid;
    gap: 18px;
}

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

.theme-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.theme-flex {
    display: flex;
}

.theme-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.theme-gap-sm {
    gap: 8px;
}

.theme-gap-md {
    gap: 16px;
}

.theme-gap-lg {
    gap: 24px;
}

.theme-mt-sm {
    margin-top: 8px;
}

.theme-mt-md {
    margin-top: 16px;
}

.theme-mt-lg {
    margin-top: 24px;
}

.theme-mb-sm {
    margin-bottom: 8px;
}

.theme-mb-md {
    margin-bottom: 16px;
}

.theme-mb-lg {
    margin-bottom: 24px;
}

.theme-hidden {
    display: none !important;
}

/*
|--------------------------------------------------------------------------
| Directory Specific Reusable Classes
|--------------------------------------------------------------------------
*/

.directory-logo {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--color-navy), var(--color-navy-light));
    color: var(--text-white);
    display: inline-grid;
    place-items: center;
    font-size: 16px;
    font-weight: var(--font-weight-black);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.directory-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    border: 1px solid rgba(5, 150, 105, 0.20);
    font-weight: var(--font-weight-black);
}

.directory-metric {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    background: var(--bg-muted);
}

.directory-metric strong {
    display: block;
    color: var(--text-heading);
    font-size: 17px;
    line-height: 1;
}

.directory-metric span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: var(--font-weight-bold);
    margin-top: 4px;
}

/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 1040px) {
    .theme-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    :root {
        --container-padding: 14px;
    }

    .theme-section {
        padding: 34px 0;
    }

    .theme-section-lg {
        padding: 46px 0;
    }

    .theme-container {
        width: min(100% - 28px, var(--container-width));
    }

    .theme-grid-2,
    .theme-grid-3,
    .theme-grid-4 {
        grid-template-columns: 1fr;
    }

    .theme-flex-between {
        align-items: flex-start;
        flex-direction: column;
    }

    .theme-btn {
        width: 100%;
    }

    .theme-title {
        letter-spacing: -1.2px;
    }
}

/*
|--------------------------------------------------------------------------
| Reduced Motion
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}