/* ================================
   STATIC BLOG SYSTEM - MAIN STYLES
   Monochrome Design | Mobile-First
   ================================ */

/* ================================
   CSS VARIABLES
   ================================ */
:root {
    /* Colors - Pure Monochrome */
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --accent-color: #1a1a1a;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-size-base: 1.125rem;
    --line-height-base: 1.8;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   RESET & BASE STYLES
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================
   TYPOGRAPHY
   ================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    letter-spacing: -0.01em;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-primary);
}

a {
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    transition: var(--transition-fast);
}

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

/* Animated underline for links */
.content a:not(.btn):not(.back-link) {
    position: relative;
}

.content a:not(.btn):not(.back-link)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-color);
    transition: width var(--transition-base);
}

.content a:not(.btn):not(.back-link):hover::after {
    width: 100%;
}

/* ================================
   MOBILE HEADER
   ================================ */
.mobile-header {
    display: none; /* Hidden on desktop, shown on mobile via responsive.css */
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) var(--spacing-md);
    text-align: center;
}

.mobile-header-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.mobile-header-subtitle {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.mobile-header-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

/* ================================
   LAYOUT - THREE COLUMN
   ================================ */
.container {
    display: grid;
    grid-template-columns: 200px 1fr 350px;
    gap: var(--spacing-xl);
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    min-height: 100vh;
}

/* ================================
   SIDEBAR - LEFT (Desktop Header)
   ================================ */
.sidebar-left {
    position: sticky;
    top: var(--spacing-xl);
    height: fit-content;
}

.logo {
    margin-bottom: var(--spacing-md);
}

.logo a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.3;
    display: block;
}

.logo-subtitle {
    font-size: 0.813rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.3;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 8px;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
}

.sidebar-left nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.sidebar-left nav a {
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.sidebar-left nav a:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.social {
    margin-top: var(--spacing-lg);
}

/* ================================
   MAIN CONTENT
   ================================ */
.content {
    max-width: 700px;
    margin: 0 auto;
}

.post {
    background-color: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.back-link {
    display: inline-block;
    margin-bottom: var(--spacing-lg);
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.back-link:hover {
    color: var(--text-primary);
    transform: translateX(-4px);
}

.meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: var(--spacing-lg) 0;
}

.intro,
.outro {
    padding: var(--spacing-md) 0;
}

.caption {
    padding: var(--spacing-md) 0;
}

.post-image {
    margin: var(--spacing-lg) 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-base);
}

.post-image:hover img {
    transform: scale(1.02);
}

.view-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    padding: var(--spacing-sm) 0;
}

/* ================================
   POST NAVIGATION
   ================================ */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.post-navigation a {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: var(--transition-base);
}

.post-navigation a:hover:not(.disabled) {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.post-navigation .next {
    text-align: right;
}

.post-navigation .disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ================================
   SIDEBAR - RIGHT
   ================================ */
.sidebar-right {
    position: sticky;
    top: var(--spacing-xl);
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.promo-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
}

.promo-card:last-child {
    margin-bottom: 0;
}

.promo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.promo-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.promo-content {
    padding: var(--spacing-md);
}

.promo-content p {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

/* ================================
   BUTTONS
   ================================ */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: transparent;
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-sm);
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.875rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

/* ================================
   CARDS (for blog listing)
   ================================ */
.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
}

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

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: var(--spacing-lg);
}

.card-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.card-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.card-excerpt {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

/* ================================
   PAGINATION
   ================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-xl) 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: var(--spacing-xs) var(--spacing-sm);
    min-width: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    font-size: 0.875rem;
}

.pagination a:hover {
    border-color: var(--accent-color);
    background-color: var(--bg-secondary);
}

.pagination .current {
    background-color: var(--accent-color);
    color: var(--bg-secondary);
    border-color: var(--accent-color);
    font-weight: 600;
}

.pagination .arrow {
    padding: var(--spacing-xs) var(--spacing-md);
}

/* ================================
   MOBILE FOOTER
   ================================ */
.mobile-footer {
    display: none; /* Shown on mobile via responsive.css */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-sm);
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.mobile-footer a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs);
    color: var(--text-muted);
    transition: var(--transition-fast);
    min-height: 44px; /* Touch target */
}

.mobile-footer a:hover,
.mobile-footer a.active {
    color: var(--accent-color);
}

.mobile-footer svg {
    width: 24px;
    height: 24px;
}

/* ================================
   SCROLL REVEAL ANIMATIONS
   ================================ */
.reveal-group {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal-group.active {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   SITE FOOTER
   ================================ */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-lg) var(--spacing-md);
    margin-top: var(--spacing-xl);
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-copyright {
    font-size: 0.813rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.footer-links {
    font-size: 0.813rem;
    color: var(--text-secondary);
}

.footer-links a {
    color: var(--text-secondary);
    transition: var(--transition-fast);
    text-decoration: none;
}

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

.footer-separator {
    margin: 0 8px;
    color: var(--text-muted);
}

.footer-decoration {
    margin-bottom: var(--spacing-lg);
    text-align: center;
    /* Break out of container to span full width */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.footer-end-image {
    width: 100%;
    height: 300px;
    max-height: 300px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ================================
   AD CAROUSEL
   ================================ */
.ad-carousel {
    position: relative;
    width: 100%;
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: var(--spacing-lg) 0;
}

.ad-slides {
    position: relative;
    width: 100%;
    height: 400px;
}

.ad-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-slide.active {
    opacity: 1;
    z-index: 1;
}

.ad-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.6));
    z-index: 1;
}

.ad-content {
    position: absolute;
    left: 50px;
    bottom: 80px;
    z-index: 2;
    text-align: left;
    color: #ffffff;
    max-width: 500px;
    margin-bottom: 20px;
}

.ad-business-name {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: #ffffff;
    text-transform: uppercase;
}

.ad-headline {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 12px;
    color: #ffffff;
}

.ad-caption {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #ffffff;
}

/* Social Media Icons - Desktop (vertical on right) */
.ad-social-desktop {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10;
}

.ad-social-btn {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.688rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.ad-social-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Controls (Below Image) */
.ad-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    background-color: var(--bg-secondary);
}

/* Navigation Buttons */
.ad-nav {
    background: none;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 16px;
    transition: all var(--transition-fast);
    text-transform: uppercase;
}

.ad-nav:hover {
    color: var(--accent-color);
    transform: translateX(0);
}

.ad-nav-prev:hover {
    transform: translateX(-4px);
}

.ad-nav-next:hover {
    transform: translateX(4px);
}

/* Pagination Dots */
.ad-dots {
    display: flex;
    gap: 10px;
}

.ad-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
}

.ad-dot:hover {
    background-color: var(--text-secondary);
    transform: scale(1.2);
}

.ad-dot.active {
    background-color: var(--accent-color);
}

/* Social Media Icons - Mobile (inside slide at bottom) */
.ad-social-mobile {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 15px;
    justify-content: center;
    gap: 15px;
    z-index: 10;
}

.ad-social-mobile .ad-social-btn {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ad-carousel {
        border-radius: 0;
    }

    .ad-slides {
        height: 60vh;
        min-height: 400px;
    }

    .ad-content {
        left: 40px;
        bottom: 80px;
        max-width: calc(100% - 80px);
    }

    .ad-headline {
        font-size: 2rem;
    }

    .ad-caption {
        font-size: 0.938rem;
    }

    .ad-social-desktop {
        display: none;
    }

    .ad-social-mobile {
        display: flex;
    }

    .ad-social-btn {
        width: 45px;
        height: 45px;
    }

    .ad-controls {
        padding: 20px 16px;
    }

    .ad-nav {
        font-size: 0.688rem;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .ad-headline {
        font-size: 1.5rem;
    }

    .ad-caption {
        font-size: 0.875rem;
    }

    .ad-content {
        left: 20px;
        bottom: 100px;
        max-width: calc(100% - 40px);
    }
}

/* ================================
   UTILITY CLASSES
   ================================ */
.text-center {
    text-align: center;
}

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

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

/* ================================
   ACCESSIBILITY
   ================================ */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: var(--bg-secondary);
    padding: var(--spacing-sm);
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}
