/* Common Guide Page Styles - Shared by all guide pages */

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Account for fixed navbar when scrolling to anchors */
section[id] {
    scroll-margin-top: 80px;
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--theme-bg-neutral);
    border-bottom: 1px solid var(--theme-border);
    padding: 0.75rem 0;
    font-size: 0.9rem;
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs a {
    color: var(--theme-text-body);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--theme-primary);
}

.breadcrumbs li:last-child span {
    color: var(--theme-text-header);
    font-weight: 500;
}

.how-to-hero {
    padding: 6rem 0 4rem;
    background: var(--theme-gradient-hero);
    min-height: 40vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.how-to-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--theme-text-header);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--theme-text-body);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.meta-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--theme-bg-light);
    border-radius: 20px;
    font-size: 0.95rem;
    color: var(--theme-text-body);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.meta-item.highlight {
    background: var(--theme-gradient-cta);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Table of Contents */
.toc-section {
    padding: 3rem 0;
    background: var(--theme-bg-neutral);
}

.toc-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--theme-bg-light);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--theme-border);
    transition: box-shadow 0.3s ease;
}

.toc-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.toc-card h2 {
    margin-bottom: 1.5rem;
    color: var(--theme-text-header);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
}

.toc-list li {
    margin-bottom: 0.75rem;
    padding-left: 2.5rem;
    position: relative;
    counter-increment: toc-counter;
}

.toc-list li::before {
    content: counter(toc-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--theme-gradient-cta);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.toc-list li a {
    color: var(--theme-text-body);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1.1rem;
}

.toc-list li a:hover {
    color: var(--theme-primary);
}

/* Content Sections */
.content-section {
    padding: 5rem 0;
    background: var(--theme-bg-light);
    position: relative;
}

.content-section:nth-child(even) {
    background: var(--theme-bg-neutral);
}

/* Add subtle separator between sections */
.content-section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--theme-border), transparent);
}

.content-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.content-card h2 {
    margin-bottom: 1.5rem;
    color: var(--theme-text-header);
}

.content-card p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--theme-text-body);
}

.section-header {
    max-width: 900px;
    margin: 0 auto 4rem;
    text-align: center;
    padding: 0 2rem;
    position: relative;
}

.section-header::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--theme-gradient-cta);
    border-radius: 2px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--theme-text-header);
    position: relative;
}

.section-description {
    font-size: 1.25rem;
    color: var(--theme-text-body);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

/* Step Cards */
.step-card {
    max-width: 900px;
    margin: 0 auto 3rem;
    background: var(--theme-bg-light);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--theme-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.step-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    margin: 0px 8px;
    height: 4px;
    background: var(--theme-gradient-cta);
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--theme-primary);
}

.step-card:hover::before {
    opacity: 1;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--theme-gradient-cta);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.step-header h3 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--theme-text-header);
}

.step-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--theme-text-body);
    margin-bottom: 1.5rem;
}

.step-description a {
    color: var(--theme-primary);
    text-decoration: underline;
}

.step-description code {
    background: var(--theme-bg-accent);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
    color: var(--theme-primary-dark);
    border: 1px solid var(--theme-border);
    font-weight: 500;
    display: inline-block;
    line-height: 1.5;
}

.step-image {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.2);
    background: var(--theme-bg-neutral);
    position: relative;
}

.step-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
    z-index: 1;
}

.step-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    object-fit: contain;
    background: var(--theme-bg-neutral);
}

.step-image:hover img {
    transform: scale(1.01);
}

/* Lazy loading fade-in for images */
.step-image img[loading="lazy"] {
    opacity: 0;
    animation: fadeInImage 0.6s ease-in forwards;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Info Boxes */
.info-box {
    margin: 1.5rem 0;
    padding: 1.5rem 1.75rem;
    border-radius: 12px;
    border-left: 4px solid var(--theme-primary);
    background: var(--theme-bg-warm);
    color: var(--theme-text-header);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-box:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.info-box strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--theme-text-header);
}

.info-box.warning {
    background: #FEF3C7;
    border-left-color: #F59E0B;
}

.info-box.success {
    background: #D1FAE5;
    border-left-color: #10B981;
}

.info-box ul {
    margin: 0.75rem 0 0 1.5rem;
    padding: 0;
}

.info-box ul li {
    margin-bottom: 0.5rem;
    color: var(--theme-text-body);
}

/* Next Steps List */
.next-steps-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.next-steps-list li {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    position: relative;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--theme-text-body);
}

.next-steps-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--theme-primary);
    font-weight: bold;
    font-size: 1.25rem;
}

.next-steps-list li strong {
    color: var(--theme-text-header);
    display: block;
    margin-bottom: 0.5rem;
}

.next-steps-list li a {
    color: var(--theme-primary);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    section[id] {
        scroll-margin-top: 60px;
    }

    .how-to-hero {
        padding: 4rem 0 3rem;
        min-height: auto;
    }

    .how-to-title {
        font-size: 2.25rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .meta-info {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .meta-item {
        font-size: 0.875rem;
        padding: 0.4rem 0.875rem;
    }

    .toc-section {
        padding: 2rem 0;
    }

    .toc-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .content-section {
        padding: 3rem 0;
    }

    .section-header {
        margin: 0 auto 2.5rem;
        padding: 0 1rem;
    }

    .section-header::before {
        top: -1.5rem;
        width: 40px;
        height: 3px;
    }

    .section-header h2 {
        font-size: 1.875rem;
    }

    .section-description {
        font-size: 1.125rem;
    }

    .step-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
        border-radius: 12px;
    }

    .step-header {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.25rem;
    }

    .step-header h3 {
        font-size: 1.375rem;
        line-height: 1.4;
    }

    .step-number {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
        flex-shrink: 0;
    }

    .step-description {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1.25rem;
    }

    .step-image {
        margin: 1.5rem 0;
        border-radius: 8px;
    }

    .content-card {
        padding: 1rem;
    }

    .info-box {
        padding: 1.25rem 1.5rem;
        margin: 1.25rem 0;
    }

    .next-steps-list li {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 480px) {
    .how-to-title {
        font-size: 1.875rem;
    }

    .step-card {
        padding: 1.25rem;
    }

    .step-header h3 {
        font-size: 1.25rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }
}

/* Accessibility improvements */
.step-card:focus-within {
    outline: 2px solid var(--theme-primary);
    outline-offset: 2px;
}

.toc-list li a:focus {
    outline: 2px solid var(--theme-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .cta,
    .footer,
    .toc-section {
        display: none;
    }

    .how-to-hero {
        padding: 2rem 0;
        background: white;
    }

    .content-section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }

    .step-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 1.5rem;
    }

    .step-image {
        page-break-inside: avoid;
        box-shadow: none;
    }

    .step-image img {
        max-width: 100%;
    }
}

