/* ============================================
   ARTICLE EDITORIAL STYLES
   styles_article_editorial.css
   Version: 1.0
   For: Dog Training Articles - Editorial Layout
   ============================================ */

/* ============================================
   CSS VARIABLES - EDITORIAL THEME
   ============================================ */
:root {
    /* Editorial Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Editorial Spacing */
    --article-space-xs: 0.5rem;
    --article-space-sm: 1rem;
    --article-space-md: 1.5rem;
    --article-space-lg: 2.5rem;
    --article-space-xl: 4rem;
    --article-space-2xl: 6rem;
    
    /* Editorial Layout */
    --article-content-max-width: 750px;
    --article-sidebar-width: 260px;
    --article-page-max-width: 1400px;
    
    /* Editorial Transitions */
    --article-transition-fast: 0.15s ease;
    --article-transition-medium: 0.3s ease;
    --article-transition-slow: 0.5s ease;
}

/* ============================================
   GOOGLE FONTS IMPORT
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-red, #8B3A3A), var(--gold, #C4956A));
    transition: width 0.1s linear;
}

/* ============================================
   HERO SECTION - DIAGONAL DESIGN
   ============================================ */
.article-hero {
    position: relative;
    min-height: 480px;
    background: linear-gradient(135deg, var(--primary-red, #8B3A3A) 0%, #6B2A2A 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.article-hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: var(--warm-cream, #FAF6F1);
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 100%);
    z-index: 2;
}

.article-hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(196, 149, 106, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: var(--article-page-max-width);
    margin: 0 auto;
    padding: var(--article-space-xl) var(--article-space-lg);
    padding-bottom: calc(var(--article-space-xl) + 60px);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--article-space-xs);
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    color: var(--warm-cream, #FAF6F1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--article-space-md);
    border: 1px solid rgba(255,255,255,0.15);
}

.hero-badge i {
    color: #D4A57A;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.15;
    max-width: 700px;
    margin-bottom: var(--article-space-md);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: rgba(255,255,255,0.85);
    max-width: 550px;
    line-height: 1.6;
    font-weight: 300;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--article-space-md);
    margin-top: var(--article-space-lg);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-family: var(--font-body);
}

.meta-item i {
    color: #D4A57A;
    width: 18px;
}

/* ============================================
   QUICK FACTS FLOATING CARD
   ============================================ */
.quick-facts-card {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: -80px auto var(--article-space-xl);
    padding: 0 var(--article-space-lg);
}

.quick-facts-inner {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(45, 41, 38, 0.12), 
                0 8px 20px rgba(45, 41, 38, 0.08);
    padding: var(--article-space-lg);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--article-space-md);
}

.fact-item {
    text-align: center;
    padding: var(--article-space-sm);
}

.fact-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--warm-cream, #FAF6F1) 0%, #E8E0D5 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--article-space-xs);
    font-size: 1.3rem;
}

.fact-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #5A5552;
    margin-bottom: 4px;
    font-weight: 600;
}

.fact-value {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #2D2926);
}

/* ============================================
   MAIN LAYOUT - SIDEBAR + CONTENT
   ============================================ */
.article-layout {
    max-width: var(--article-page-max-width);
    margin: 0 auto;
    padding: 0 var(--article-space-lg);
    display: grid;
    grid-template-columns: var(--article-sidebar-width) 1fr;
    gap: var(--article-space-xl);
    align-items: start;
}

/* ============================================
   STICKY SIDEBAR NAVIGATION
   ============================================ */
.article-sidebar {
    position: sticky;
    top: 100px;
    padding-bottom: var(--article-space-xl);
}

.toc-container {
    background: #fff;
    border-radius: 12px;
    padding: var(--article-space-md);
    box-shadow: 0 4px 20px rgba(45, 41, 38, 0.06);
    border: 1px solid #E8E0D5;
}

.toc-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-red, #8B3A3A);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding-bottom: var(--article-space-sm);
    margin-bottom: var(--article-space-sm);
    border-bottom: 2px solid #E8E0D5;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 2px;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: var(--article-space-xs);
    padding: 0.6rem 0.8rem;
    color: #3A3836;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all var(--article-transition-fast);
    position: relative;
}

.toc-link:hover {
    background: var(--warm-cream, #FAF6F1);
    color: var(--primary-red, #8B3A3A);
}

.toc-link.active {
    background: var(--primary-red, #8B3A3A);
    color: #fff;
}

.toc-number {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E8E0D5;
    border-radius: 6px;
    flex-shrink: 0;
    transition: all var(--article-transition-fast);
}

.toc-link:hover .toc-number {
    background: #A54A4A;
    color: #fff;
}

.toc-link.active .toc-number {
    background: rgba(255,255,255,0.2);
}

/* ============================================
   ARTICLE CONTENT AREA
   ============================================ */
.article-content {
    max-width: var(--article-content-max-width);
    padding-bottom: var(--article-space-2xl);
}

/* Section Styling */
.article-section {
    margin-bottom: var(--article-space-2xl);
    scroll-margin-top: 120px;
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: var(--article-space-md);
    margin-bottom: var(--article-space-lg);
}

.section-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 300;
    color: #9A8B7A;
    line-height: 1;
    flex-shrink: 0;
    position: relative;
}

.section-number::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--gold, #C4956A);
    border-radius: 2px;
}

.section-title-group {
    padding-top: 0.5rem;
}

.section-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-red, #8B3A3A);
    font-weight: 600;
    margin-bottom: 4px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary, #2D2926);
    line-height: 1.25;
}

/* Content Typography */
.section-content {
    font-family: var(--font-body);
}

.section-content p {
    margin-bottom: var(--article-space-md);
    font-size: 1.05rem;
    color: #3A3836;
    line-height: 1.7;
}

.section-content p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 600;
    float: left;
    line-height: 1;
    padding-right: 12px;
    padding-top: 4px;
    color: var(--primary-red, #8B3A3A);
}

/* Pull Quote */
.pull-quote {
    position: relative;
    margin: var(--article-space-xl) 0;
    padding: var(--article-space-lg) var(--article-space-lg) var(--article-space-lg) var(--article-space-xl);
    background: linear-gradient(135deg, var(--primary-red, #8B3A3A) 0%, #6B2A2A 100%);
    border-radius: 12px;
    color: #fff;
}

.pull-quote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: var(--font-display);
    font-size: 8rem;
    color: var(--gold, #C4956A);
    opacity: 0.3;
    line-height: 1;
}

.pull-quote p {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    margin: 0;
    position: relative;
    z-index: 1;
    color: #fff !important;
}

.pull-quote p::first-letter {
    font-size: inherit !important;
    float: none !important;
    padding: 0 !important;
    color: inherit !important;
}

/* Tip Box */
.tip-box {
    background: #fff;
    border-radius: 12px;
    padding: var(--article-space-md);
    margin: var(--article-space-lg) 0;
    border-left: 4px solid var(--gold, #C4956A);
    box-shadow: 0 4px 15px rgba(45, 41, 38, 0.06);
}

.tip-header {
    display: flex;
    align-items: center;
    gap: var(--article-space-xs);
    margin-bottom: var(--article-space-xs);
}

.tip-icon {
    width: 28px;
    height: 28px;
    background: var(--gold, #C4956A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
}

.tip-label {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary, #2D2926);
    font-size: 0.95rem;
}

.tip-box p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary, #4A4543);
}

.tip-box p::first-letter {
    font-size: inherit !important;
    float: none !important;
    padding: 0 !important;
    color: inherit !important;
}

/* Warning Box */
.warning-box {
    background: linear-gradient(135deg, #FEF6F0 0%, #FFF8F5 100%);
    border-radius: 12px;
    padding: var(--article-space-md);
    margin: var(--article-space-lg) 0;
    border: 1px solid rgba(139, 58, 58, 0.15);
}

.warning-header {
    display: flex;
    align-items: center;
    gap: var(--article-space-xs);
    margin-bottom: var(--article-space-xs);
}

.warning-icon {
    width: 28px;
    height: 28px;
    background: var(--primary-red, #8B3A3A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
}

.warning-label {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--primary-red, #8B3A3A);
    font-size: 0.95rem;
}

.warning-box p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary, #4A4543);
}

.warning-box p::first-letter {
    font-size: inherit !important;
    float: none !important;
    padding: 0 !important;
    color: inherit !important;
}

/* Step List */
.step-list {
    counter-reset: step-counter;
    list-style: none;
    margin: var(--article-space-lg) 0;
    padding: 0;
}

.step-item {
    counter-increment: step-counter;
    position: relative;
    padding-left: 70px;
    margin-bottom: var(--article-space-lg);
}

.step-item::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-red, #8B3A3A) 0%, #6B2A2A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.step-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #2D2926);
    margin-bottom: 0.5rem;
}

.step-item p {
    font-size: 0.95rem;
    color: var(--text-secondary, #4A4543);
    margin: 0;
    line-height: 1.6;
}

.step-item p::first-letter {
    font-size: inherit !important;
    float: none !important;
    padding: 0 !important;
    color: inherit !important;
}

/* Section Divider */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--article-space-sm);
    margin: var(--article-space-xl) 0;
    color: #E8E0D5;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: #E8E0D5;
}

.divider-icon {
    font-size: 1.2rem;
    color: var(--gold, #C4956A);
}

/* ============================================
   BREED CONSIDERATION CARDS
   ============================================ */
.breed-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--article-space-md);
    margin: var(--article-space-lg) 0;
}

.breed-card {
    background: #fff;
    border-radius: 12px;
    padding: var(--article-space-md);
    box-shadow: 0 4px 15px rgba(45, 41, 38, 0.06);
    border: 1px solid #E8E0D5;
    transition: all var(--article-transition-medium);
}

.breed-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(45, 41, 38, 0.12);
}

.breed-card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--warm-cream, #FAF6F1) 0%, #E8E0D5 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: var(--article-space-sm);
}

.breed-card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #2D2926);
    margin-bottom: 0.5rem;
}

.breed-card p {
    font-size: 0.85rem;
    color: var(--text-secondary, #4A4543);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   ETSY PROMO CARD
   ============================================ */
.etsy-promo-card {
    display: block;
    text-decoration: none;
    position: relative;
    max-width: 100%;
    margin: var(--article-space-xl) 0;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, #FFFCF8 0%, #FFF8F2 100%);
    border: 1px solid #E8E0D5;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 6px 25px rgba(74,63,55,0.08);
    overflow: hidden;
    transition: all var(--article-transition-medium);
}

.etsy-promo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(74,63,55,0.12);
}

.etsy-promo-card::before {
    content: '🐾';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2rem;
    opacity: 0.15;
    transform: rotate(-15deg);
}

.etsy-promo-card::after {
    content: '🐾';
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 2rem;
    opacity: 0.15;
    transform: rotate(15deg);
}

.etsy-promo-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #996515;
    margin-bottom: 0.5rem;
}

.etsy-promo-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary, #2D2926);
    margin-bottom: 0.25rem;
}

.etsy-promo-subtitle {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary, #7A7572);
    margin-bottom: 1rem;
}

.etsy-promo-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-red, #8B3A3A) 0%, #6B2A2A 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--article-transition-fast);
}

.etsy-promo-card:hover .etsy-promo-btn {
    background: linear-gradient(135deg, #6B2A2A 0%, #4B1A1A 100%);
}

/* ============================================
   BACK NAVIGATION
   ============================================ */
.back-navigation {
    max-width: var(--article-page-max-width);
    margin: 0 auto;
    padding: var(--article-space-lg);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--article-space-xs);
    color: var(--primary-red, #8B3A3A);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: var(--article-space-sm) var(--article-space-md);
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(45, 41, 38, 0.08);
    transition: all var(--article-transition-medium);
}

.back-link:hover {
    background: var(--primary-red, #8B3A3A);
    color: #fff;
    transform: translateX(-5px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        order: -1;
        margin-bottom: var(--article-space-lg);
    }

    .toc-container {
        display: flex;
        flex-wrap: wrap;
        gap: var(--article-space-sm);
        align-items: center;
    }

    .toc-title {
        width: 100%;
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .toc-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .toc-item {
        margin-bottom: 0;
    }

    .toc-link {
        padding: 0.5rem 0.8rem;
        background: var(--warm-cream, #FAF6F1);
        border-radius: 50px;
        font-size: 0.8rem;
    }

    .toc-number {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    .article-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .article-hero {
        min-height: 400px;
    }

    .hero-content {
        padding: var(--article-space-lg);
        padding-bottom: calc(var(--article-space-lg) + 60px);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .quick-facts-card {
        padding: 0 var(--article-space-sm);
        margin-top: -60px;
    }

    .quick-facts-inner {
        grid-template-columns: repeat(2, 1fr);
        padding: var(--article-space-md);
    }

    .article-layout {
        padding: 0 var(--article-space-sm);
    }

    .section-number {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .section-content p:first-of-type::first-letter {
        font-size: 2.8rem;
    }

    .pull-quote {
        padding: var(--article-space-md);
    }

    .pull-quote p {
        font-size: 1.15rem;
    }

    .pull-quote::before {
        font-size: 5rem;
        top: -5px;
        left: 10px;
    }

    .step-item {
        padding-left: 55px;
    }

    .step-item::before {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .breed-cards {
        grid-template-columns: 1fr;
    }

    .back-navigation {
        padding: var(--article-space-md);
    }
}

@media (max-width: 480px) {
    .quick-facts-inner {
        grid-template-columns: 1fr 1fr;
        gap: var(--article-space-sm);
    }

    .fact-item {
        padding: var(--article-space-xs);
    }

    .fact-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .fact-value {
        font-size: 0.85rem;
    }

    .hero-meta {
        flex-direction: column;
        gap: var(--article-space-sm);
    }

    .section-header {
        flex-direction: column;
        gap: var(--article-space-sm);
    }

    .section-number::after {
        display: none;
    }

    .etsy-promo-card {
        padding: 1.5rem;
    }

    .etsy-promo-title {
        font-size: 1.25rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-section {
    animation: fadeInUp 0.6s ease both;
}

.article-section:nth-child(1) { animation-delay: 0.1s; }
.article-section:nth-child(2) { animation-delay: 0.15s; }
.article-section:nth-child(3) { animation-delay: 0.2s; }
.article-section:nth-child(4) { animation-delay: 0.25s; }
.article-section:nth-child(5) { animation-delay: 0.3s; }
.article-section:nth-child(6) { animation-delay: 0.35s; }
.article-section:nth-child(7) { animation-delay: 0.4s; }
.article-section:nth-child(8) { animation-delay: 0.45s; }
.article-section:nth-child(9) { animation-delay: 0.5s; }

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .progress-container,
    .article-sidebar,
    .back-navigation,
    .etsy-promo-card {
        display: none !important;
    }

    .article-layout {
        display: block;
    }

    .article-hero {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .hero-title,
    .hero-subtitle,
    .hero-badge {
        color: #333 !important;
    }

    .article-section {
        page-break-inside: avoid;
    }
}
