/* ========================================
   Content Pages Styles
   For Hook Drop Guide, Art Hanging, etc.
   ======================================== */

/* ===== PAGE HERO ===== */
.page-hero {
    padding: calc(var(--header-height) + 3rem) 2rem 3rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.page-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb-separator {
    opacity: 0.5;
}

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

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
}

/* ===== ARTICLE CONTAINER ===== */
.article-container {
    padding: 3rem 2rem 4rem;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

/* ===== ARTICLE SECTIONS ===== */
.article-section {
    margin-bottom: 3.5rem;
}

.article-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.article-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.article-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.article-section p:last-child {
    margin-bottom: 0;
}

.article-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== DIAGRAM BOX ===== */
.diagram-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
}

.hook-drop-diagram {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.hook-drop-diagram text {
    font-family: 'Inter', sans-serif;
}

/* ===== COMPARISON BOX ===== */
.comparison-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.comparison-item {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.comparison-item.wrong {
    background: var(--error-bg);
    border-color: var(--error);
}

.comparison-item.correct {
    background: var(--accent-subtle);
    border-color: var(--accent);
}

.comparison-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.comparison-item.wrong .comparison-header {
    color: var(--error);
}

.comparison-item.correct .comparison-header {
    color: var(--accent);
}

.comparison-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* ===== STEPS LIST ===== */
.steps-list {
    margin: 2rem 0;
}

.step {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.step-content h3 {
    margin-bottom: 0.35rem;
}

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

/* ===== TIP BOX ===== */
.tip-box {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--accent-subtle);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm);
    margin: 2rem 0;
}

.tip-icon {
    flex-shrink: 0;
    color: var(--accent);
}

.tip-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.tip-content strong {
    color: var(--accent);
}

/* ===== HARDWARE GRID ===== */
.hardware-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.hardware-card {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
}

.hardware-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
}

.hardware-icon svg {
    width: 100%;
    height: 100%;
}

.hardware-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.hardware-drop {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.75rem !important;
}

.hardware-card p:last-child {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===== MISTAKES LIST ===== */
.mistakes-list {
    margin: 2rem 0;
}

.mistake-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.mistake-item:last-child {
    margin-bottom: 0;
}

.mistake-icon {
    flex-shrink: 0;
    color: var(--error);
}

.mistake-content h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.mistake-content p {
    font-size: 0.9rem;
    margin: 0;
}

/* ===== QUICK REFERENCE ===== */
.quick-ref-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 1.5rem 0;
}

.quick-ref-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

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

.quick-ref-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.quick-ref-value {
    font-weight: 600;
    color: var(--accent);
}

.quick-ref-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 1rem;
}

/* ===== ARTICLE CTA ===== */
.article-cta {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-top: 3rem;
}

.article-cta h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.article-cta p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--accent);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.cta-button:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

/* ===== ACTIVE NAV LINK ===== */
.nav-link.active {
    color: var(--accent);
}

.mobile-nav-link.active {
    color: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-hero {
        padding: calc(var(--header-height) + 2rem) 1.5rem 2rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .article-container {
        padding: 2rem 1.5rem 3rem;
    }

    .article-section h2 {
        font-size: 1.35rem;
    }

    .step {
        flex-direction: column;
        gap: 0.75rem;
    }

    .comparison-box {
        grid-template-columns: 1fr;
    }

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

    .article-cta {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.75rem;
    }

    .hardware-grid {
        grid-template-columns: 1fr;
    }

    .quick-ref-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ===== TABLE OF CONTENTS ===== */
.toc-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
}

.toc-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 2rem;
}

.toc-list li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toc-list a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    padding: 6px 0;
    display: block;
    flex: 1;
}

.toc-list a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.toc-list .toc-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    background: var(--accent-subtle);
    border-radius: 6px;
    flex-shrink: 0;
}

/* ===== EXPANDABLE CARDS ===== */
.expandable-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.expandable-card {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.expandable-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.expandable-card.active {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.expandable-card .card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
}

.expandable-card .card-icon svg {
    width: 100%;
    height: 100%;
}

.expandable-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.expandable-card .card-subtitle {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.expandable-card .card-brief {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.expandable-card .expand-indicator {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.expandable-card:hover .expand-indicator {
    opacity: 1;
}

.expandable-card.active .expand-indicator {
    display: none;
}

/* Expanded Content Panel */
.expanded-panel {
    display: none;
    grid-column: 1 / -1;
    background: var(--bg-tertiary);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
    margin-top: -0.5rem;
    animation: slideDown 0.3s ease-out;
}

.expanded-panel.visible {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.expanded-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.expanded-panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0;
}

.expanded-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.expanded-panel-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.expanded-panel-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.expanded-panel-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.expanded-panel-section p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.expanded-panel-section ul {
    margin: 0;
    padding-left: 1.25rem;
}

.expanded-panel-section li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.expanded-panel-section li:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .expanded-panel-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .expanded-panel {
        padding: 1.25rem 1.5rem;
    }
}

/* ===== ANIMATED DEMO ===== */
.demo-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.demo-animation {
    width: 100%;
    max-width: 400px;
    height: 280px;
    margin: 0 auto 1rem;
    position: relative;
}

.demo-animation svg {
    width: 100%;
    height: 100%;
}

.demo-caption {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Animation keyframes */
@keyframes pullWire {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes measurePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.demo-pencil {
    animation: pullWire 3s ease-in-out infinite;
    transform-origin: center center;
}

.demo-measure-line {
    animation: measurePulse 3s ease-in-out infinite;
}

/* ===== STEP DIAGRAMS ===== */
.step-diagram {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.step-diagram svg {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ===== FLOATING CTA ===== */
.floating-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
}

.floating-cta.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-cta-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--accent);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.floating-cta-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

/* ===== SHARE BUTTONS ===== */
.share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.share-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.share-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.share-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* ===== RESPONSIVE ADDITIONS ===== */
@media (max-width: 768px) {
    .toc-box {
        padding: 1.25rem 1.5rem;
    }

    .toc-list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .floating-cta {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .floating-cta-btn {
        width: 100%;
        justify-content: center;
    }

    .share-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .demo-animation {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .floating-cta-btn span {
        display: none;
    }

    .floating-cta-btn {
        width: auto;
        padding: 14px;
    }
}

/* ===== ARTICLE IMAGES ===== */
.article-image-wrapper {
    margin: 2rem 0;
    width: 100%;
}

.article-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    display: block;
}

.article-image-caption {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Image grid for multiple images */
.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.image-grid .article-image-wrapper {
    margin: 0;
}

.image-grid .article-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    max-height: 180px;
}

/* Dark mode: subtle border on images */
[data-theme="dark"] .article-image {
    border: 1px solid var(--border);
}

@media (max-width: 640px) {
    .image-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .page-hero {
        padding-top: 2rem;
        background: none;
    }

    .article-cta {
        display: none;
    }

    .diagram-box {
        border: 1px solid #ddd;
        background: none;
    }

    .floating-cta,
    .share-section {
        display: none;
    }

    .article-image {
        max-width: 500px;
        margin: 1rem auto;
    }
}
