
/* =========================================
   1. Reset & Base Styles
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Color Palette */
    --primary-color: #ff5402;
    --primary-hover: #e04800;
    --secondary-color: #287233;
    --secondary-hover: #1e5a26;
    --text-color: #333333;
    --text-light: #666666;
    --bg-body: #f4f7f6;
    --bg-card: #ffffff;
    --border-color: #e1e1e1;
    --accent-blue: #007bff;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-size-base: 1rem;
    --line-height: 1.6;
    
    /* Spacing & Sizes */
    --container-width: 1200px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 16px 32px rgba(0,0,0,0.15);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

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

/* =========================================
   2. Layout & Container
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 300px; /* Sidebar layout */
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* =========================================
   3. Typography
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    color: #111;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
    line-height: 1.2;
}

h1.entry-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    color: #222;
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

h1.entry-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-blue));
    border-radius: 2px;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-top: var(--spacing-lg);
}

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

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* =========================================
   4. Header & Navigation
   ========================================= */
/* Assuming header logic based on empty nav in HTML provided, styling placeholders */
#site-navigation {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-md) 0;
    border-radius: var(--border-radius);
    margin-top: var(--spacing-md);
}

.header-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: var(--spacing-md) auto;
}

/* =========================================
   5. Main Content Area
   ========================================= */
.content-area {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

/* Article Styling */
.entry-content {
    font-size: 1.125rem;
}

.page-separator {
    height: 2px;
    background-color: var(--bg-body);
    margin: var(--spacing-lg) 0;
}

/* =========================================
   6. Components: Buttons & Links
   ========================================= */
.btn-box {
    display: flex;
    justify-content: center;
    margin: var(--spacing-lg) 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff !important;
    border-radius: 50px;
    letter-spacing: 0.5px;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Specific button colors overrides based on inline styles interaction */
.btn[style*="background-color:#ff5402"] {
    background: linear-gradient(135deg, #ff5402 0%, #ff7e42 100%) !important;
}

.btn[style*="background-color:#287233"] {
    background: linear-gradient(135deg, #287233 0%, #3ca84d 100%) !important;
}

/* =========================================
   7. Blockquotes & Lists
   ========================================= */
blockquote {
    position: relative;
    padding: var(--spacing-lg);
    background: #f9f9f9;
    border-left: 5px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin: var(--spacing-lg) 0;
    font-style: italic;
}

blockquote.quote {
    border-color: var(--accent-blue);
    background-color: rgba(0, 123, 255, 0.05);
}

blockquote.check {
    border-color: var(--secondary-color);
    background-color: rgba(40, 114, 51, 0.05);
}

blockquote.check::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: var(--secondary-color);
    opacity: 0.2;
}

blockquote.warning {
    border-color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

ul {
    list-style: none;
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-md);
}

ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

ul li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2em;
    position: absolute;
    left: 0;
    top: -2px;
}

/* =========================================
   8. Images
   ========================================= */
img, 
span[itemprop="image"] {
    max-width: 100%;
    height: auto;
    display: block;
    margin: var(--spacing-md) auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

a:hover span[itemprop="image"] {
    transform: scale(1.02);
}

/* =========================================
   9. Sidebar (Widgets)
   ========================================= */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.widget {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.widget-header {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
}

/* =========================================
   10. Footer
   ========================================= */
.site-footer {
    background-color: #222;
    color: #eee;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: auto;
}

.footer-info {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Scroll to top button */
.scrolltop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scrolltop::after {
    content: '';
    border: solid white;
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 5px;
    transform: rotate(-135deg);
    margin-top: 5px;
}

.scrolltop.is-visible,
/* Force visibility for demo since JS isn't controlling class */
.scrolltop {
    opacity: 0.8;
    visibility: visible;
}

.scrolltop:hover {
    background-color: var(--primary-hover);
    transform: translateY(-5px);
    opacity: 1;
}

/* =========================================
   11. Forms (Generic if added later)
   ========================================= */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: var(--accent-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* =========================================
   12. Responsive Design
   ========================================= */
/* Tablet */
@media (max-width: 992px) {
    .site-content {
        grid-template-columns: 1fr; /* Stack sidebar below content */
    }
    
    .widget-area {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-md);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }

    .container {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }

    h1.entry-title {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .btn {
        width: 100%; /* Full width buttons on mobile */
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }

    .widget-area {
        grid-template-columns: 1fr;
    }

    blockquote {
        padding: var(--spacing-md);
        font-size: 0.95rem;
    }
}

/* Accessibility: Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    -webkit-clip-path: none;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}
