/* ==========================================================================
   Elbow Score Database - Main Stylesheet
   Site ID: 3010 | CSS Prefix: pg-3010
   Anti-footprint obfuscation enabled
   ========================================================================== */

/* CSS Variables */
:root {
    --esd-primary: #2c5f2d;
    --esd-secondary: #4a7c4b;
    --esd-accent: #97bc62;
    --esd-dark: #1a3a1a;
    --esd-light: #f7faf7;
    --esd-text: #2d3b2d;
    --esd-text-light: #5a6b5a;
    --esd-border: #d4e5d4;
    --esd-success: #27ae60;
    --esd-warning: #d4a012;
    --esd-danger: #c0392b;
    --esd-info: #2980b9;
    --esd-font-primary: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    --esd-font-secondary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --esd-font-mono: 'Consolas', 'Monaco', monospace;
    --esd-max-width: 1200px;
    --esd-content-width: 800px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

.esd-body {
    margin: 0;
    padding: 0;
    font-family: var(--esd-font-secondary);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--esd-text);
    background-color: var(--esd-light);
}

/* Skip Link for Accessibility */
.esd-skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--esd-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    text-decoration: none;
    font-family: var(--esd-font-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: top 0.2s ease;
}

.esd-skip-link:focus {
    top: 0;
    color: #fff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--esd-font-primary);
    font-weight: 600;
    line-height: 1.3;
    color: var(--esd-dark);
    margin-top: 0;
}

a {
    color: var(--esd-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--esd-secondary);
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--esd-accent);
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--esd-accent);
    outline-offset: 2px;
}

/* Header */
.esd-header {
    background: white;
    border-bottom: 3px solid var(--esd-primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.esd-header-container {
    max-width: var(--esd-max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.esd-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.esd-logo-img {
    height: 40px;
    width: auto;
}

.esd-logo-text {
    font-family: var(--esd-font-primary);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--esd-dark);
}

.esd-logo:hover .esd-logo-text {
    color: var(--esd-primary);
}

.esd-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.esd-nav-link {
    color: var(--esd-text);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.esd-nav-link:hover,
.esd-nav-active {
    color: var(--esd-primary);
    border-bottom-color: var(--esd-primary);
}

.esd-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--esd-dark);
}

/* Breadcrumb */
.esd-breadcrumb {
    background: #eef5ee;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--esd-border);
}

.esd-breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: var(--esd-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    font-size: 0.9rem;
}

.esd-breadcrumb-item {
    display: flex;
    align-items: center;
}

.esd-breadcrumb-item:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
    color: var(--esd-text-light);
}

.esd-breadcrumb-item a {
    color: var(--esd-primary);
}

.esd-breadcrumb-item span {
    color: var(--esd-text-light);
}

/* Main Content */
.esd-main {
    min-height: calc(100vh - 200px);
}

.esd-container {
    max-width: var(--esd-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero Section */
.esd-hero {
    background: linear-gradient(135deg, var(--esd-dark) 0%, var(--esd-primary) 100%);
    color: white;
    padding: 4rem 1.5rem;
    text-align: center;
}

.esd-hero-content {
    max-width: var(--esd-content-width);
    margin: 0 auto;
}

.esd-title {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.esd-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin: 0;
}

/* Sections */
.esd-intro,
.esd-featured,
.esd-about-preview {
    padding: 4rem 1.5rem;
}

.esd-intro {
    background: white;
}

.esd-featured {
    background: var(--esd-light);
}

.esd-about-preview {
    background: white;
}

.esd-section-title {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 2rem;
}

.esd-text {
    max-width: var(--esd-content-width);
    margin: 0 auto 1.5rem;
    text-align: center;
}

/* Grid & Cards */
.esd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: var(--esd-max-width);
    margin: 0 auto;
}

.esd-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid var(--esd-primary);
}

.esd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.esd-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.esd-card-text {
    color: var(--esd-text-light);
    margin-bottom: 1rem;
}

.esd-link {
    color: var(--esd-primary);
    font-weight: 500;
}

.esd-button {
    display: inline-block;
    background: var(--esd-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.esd-button:hover {
    background: var(--esd-secondary);
    color: white;
}

/* Article Styles */
.esd-article {
    padding: 3rem 1.5rem;
}

.esd-article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--esd-border);
}

.esd-article-title {
    font-size: 2.25rem;
    max-width: var(--esd-content-width);
    margin: 0 auto 1rem;
}

.esd-article-meta {
    color: var(--esd-text-light);
}

.esd-author {
    margin-right: 1.5rem;
}

.esd-credentials {
    font-size: 0.9rem;
    color: var(--esd-text-light);
    margin-top: 0.5rem;
}

.esd-article-content {
    max-width: var(--esd-content-width);
    margin: 0 auto;
}

.esd-article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 8px;
}

.esd-lead {
    font-size: 1.2rem;
    color: var(--esd-text);
    line-height: 1.8;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #eef5ee;
    border-radius: 8px;
    border-left: 4px solid var(--esd-primary);
}

.esd-article-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--esd-border);
}

.esd-article-content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.esd-article-content h4 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Lists */
.esd-list {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.esd-list li {
    margin-bottom: 0.5rem;
}

.esd-numbered-list {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.esd-numbered-list li {
    margin-bottom: 0.75rem;
}

/* Tables */
.esd-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.esd-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

.esd-table th,
.esd-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--esd-border);
}

.esd-table th {
    background: var(--esd-dark);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.esd-table tr:last-child td {
    border-bottom: none;
}

.esd-table tr:hover td {
    background: var(--esd-light);
}

.esd-table-note {
    font-size: 0.85rem;
    color: var(--esd-text-light);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Data Source Citation */
.esd-citation {
    font-size: 0.85rem;
    color: var(--esd-text-light);
    padding: 0.75rem 1rem;
    background: #f0f4f0;
    border-radius: 4px;
    margin: 1rem 0;
}

.esd-citation strong {
    color: var(--esd-text);
}

/* Warning & Note Boxes */
.esd-warning {
    background: #fef9e7;
    border-left: 4px solid var(--esd-warning);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.esd-warning h4 {
    color: #7d6608;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.esd-warning p {
    margin: 0;
    color: #7d6608;
}

.esd-note {
    background: #e8f4fc;
    border-left: 4px solid var(--esd-info);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.esd-note h4 {
    color: #1a5276;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.esd-note p {
    margin: 0;
    color: #1a5276;
}

.esd-important {
    background: #fdf2f2;
    border-left: 4px solid var(--esd-danger);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.esd-important h4 {
    color: #922b21;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.esd-important p {
    margin: 0;
    color: #922b21;
}

/* Research Box */
.esd-research-box {
    background: white;
    border: 2px solid var(--esd-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.esd-research-box h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--esd-primary);
    font-size: 1rem;
}

.esd-research-box p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.esd-research-box p:last-child {
    margin-bottom: 0;
}

/* Component Cards */
.esd-component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.esd-component-card {
    background: white;
    border: 1px solid var(--esd-border);
    border-radius: 8px;
    padding: 1.5rem;
    border-top: 4px solid var(--esd-primary);
}

.esd-component-card h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--esd-dark);
}

.esd-component-card p {
    margin: 0;
    font-size: 0.95rem;
}

.esd-component-card ul {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.esd-component-card li {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

/* Grade Cards */
.esd-grade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.esd-grade-card {
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
}

.esd-grade-card h5 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.esd-grade-card p {
    margin: 0;
    font-size: 0.9rem;
}

.esd-grade-0 {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}
.esd-grade-0 h5 { color: #155724; }

.esd-grade-1 {
    background: #fff3cd;
    border: 1px solid #ffeeba;
}
.esd-grade-1 h5 { color: #856404; }

.esd-grade-2 {
    background: #ffe0b2;
    border: 1px solid #ffcc80;
}
.esd-grade-2 h5 { color: #e65100; }

.esd-grade-3 {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}
.esd-grade-3 h5 { color: #721c24; }

/* Comparison Table */
.esd-comparison-table th,
.esd-comparison-table td {
    padding: 0.75rem;
    font-size: 0.9rem;
}

.esd-comparison-table .esd-highlight {
    background: #eef5ee;
    font-weight: 500;
}

/* Code/Format Examples */
.esd-code {
    font-family: var(--esd-font-mono);
    background: #f4f4f4;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.esd-format-example {
    background: #f8f9fa;
    border: 1px solid var(--esd-border);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1rem 0;
}

.esd-format-example h5 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: var(--esd-primary);
}

.esd-format-example code {
    display: block;
    font-family: var(--esd-font-mono);
    font-size: 0.95rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.esd-format-example p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--esd-text-light);
}

/* Protocol Steps */
.esd-protocol-steps {
    margin: 1.5rem 0;
}

.esd-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--esd-border);
}

.esd-step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--esd-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.esd-step-content h4 {
    margin: 0 0 0.5rem;
    color: var(--esd-dark);
}

.esd-step-content p {
    margin: 0;
    font-size: 0.95rem;
}

/* Breeding Decision Matrix */
.esd-breeding-matrix {
    margin: 1.5rem 0;
}

.esd-decision-card {
    background: white;
    border: 1px solid var(--esd-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.esd-decision-card h4 {
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.esd-decision-card p {
    margin: 0;
    font-size: 0.95rem;
}

.esd-recommend {
    border-left: 4px solid var(--esd-success);
}
.esd-recommend h4::before {
    content: "OK";
    background: var(--esd-success);
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.esd-caution {
    border-left: 4px solid var(--esd-warning);
}
.esd-caution h4::before {
    content: "CAUTION";
    background: var(--esd-warning);
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.esd-avoid {
    border-left: 4px solid var(--esd-danger);
}
.esd-avoid h4::before {
    content: "AVOID";
    background: var(--esd-danger);
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* Page Styles */
.esd-page-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.esd-date {
    color: var(--esd-text-light);
    text-align: center;
    display: block;
    margin-bottom: 2rem;
}

/* About Page */
.esd-about {
    padding: 3rem 1.5rem;
}

.esd-about-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--esd-border);
}

.esd-role {
    font-size: 1.25rem;
    color: var(--esd-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.esd-specialty {
    color: var(--esd-text-light);
    margin-bottom: 0.25rem;
}

.esd-location {
    color: var(--esd-text-light);
}

.esd-bio-full {
    max-width: var(--esd-content-width);
    margin: 0 auto;
}

/* Articles List */
.esd-articles-index {
    padding: 3rem 1.5rem;
}

.esd-intro-text {
    max-width: var(--esd-content-width);
    margin: 0 auto 2rem;
    text-align: center;
    color: var(--esd-text-light);
}

.esd-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.esd-article-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid var(--esd-primary);
}

.esd-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.esd-card-link {
    color: var(--esd-dark);
}

.esd-card-link:hover {
    color: var(--esd-primary);
}

.esd-card-description {
    color: var(--esd-text-light);
    margin-bottom: 1rem;
}

.esd-card-meta {
    font-size: 0.875rem;
    color: var(--esd-text-light);
}

/* Internal Links */
.esd-internal-links {
    background: #eef5ee;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.esd-internal-links h4 {
    margin: 0 0 1rem;
    color: var(--esd-dark);
}

.esd-internal-links ul {
    margin: 0;
    padding-left: 1.25rem;
}

.esd-internal-links li {
    margin-bottom: 0.5rem;
}

/* Footer */
.esd-footer {
    background: var(--esd-dark);
    color: white;
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 4rem;
}

.esd-footer-container {
    max-width: var(--esd-max-width);
    margin: 0 auto;
}

.esd-footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.esd-footer-logo {
    font-family: var(--esd-font-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.esd-footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

.esd-footer-heading {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: white;
}

.esd-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.esd-footer-links li {
    margin-bottom: 0.5rem;
}

.esd-footer-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.esd-footer-link:hover {
    color: white;
}

.esd-footer-address {
    font-style: normal;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
}

.esd-footer-bottom {
    text-align: center;
}

.esd-copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.esd-disclaimer {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 1rem;
}

.esd-footer-legal {
    font-size: 0.85rem;
}

.esd-footer-legal a {
    color: rgba(255, 255, 255, 0.6);
}

.esd-footer-legal a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .esd-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 3px solid var(--esd-primary);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .esd-nav.esd-nav-open {
        display: block;
    }

    .esd-nav-list {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
    }

    .esd-nav-link {
        display: block;
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid var(--esd-border);
    }

    .esd-nav-link:last-child {
        border-bottom: none;
    }

    .esd-menu-toggle {
        display: block;
    }

    .esd-title {
        font-size: 1.75rem;
    }

    .esd-article-title {
        font-size: 1.75rem;
    }

    .esd-hero {
        padding: 3rem 1.5rem;
    }

    .esd-footer-main {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .esd-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .esd-component-grid,
    .esd-grade-grid {
        grid-template-columns: 1fr;
    }
}
