/* Cloud Stack SEO Site - Professional CSS */

:root {
    --primary-color: #1a365d;
    --secondary-color: #2b6cb0;
    --accent-color: #38b2ac;
    --text-color: #2d3748;
    --text-light: #4a5568;
    --background: #ffffff;
    --background-alt: #f7fafc;
    --border-color: #e2e8f0;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --max-width: 1200px;
    --content-width: 800px;
}

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background);
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1.25rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

ul, ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Header */
header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

header h1 {
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--text-light);
    font-size: 1.25rem;
}

.breadcrumb {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

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

.breadcrumb span {
    margin: 0 0.5rem;
}

/* Main Content */
main {
    padding: 2rem 0;
}

/* Intro Section */
.intro {
    background: var(--background-alt);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.intro h2 {
    margin-top: 0;
}

.cta {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: var(--secondary-color);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none !important;
}

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

/* Topic Cards */
.pillar-content {
    margin-bottom: 3rem;
}

.topic-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.topic-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.topic-card.featured {
    border-color: var(--secondary-color);
    border-width: 2px;
}

.topic-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.topic-card h3 a {
    color: var(--primary-color);
}

.topic-card h3 a:hover {
    color: var(--secondary-color);
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
}

/* Grid Layout */
.topic-grid {
    margin-bottom: 3rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Article Page */
.article {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

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

    .sidebar {
        order: 2;
    }
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
    font-size: 2.25rem;
}

.article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

.article-meta .reading-time {
    margin-left: 1rem;
}

.article-meta .reading-time::before {
    content: '|';
    margin-right: 1rem;
}

.article-content {
    max-width: var(--content-width);
}

.article-content h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.article-content h3 {
    color: var(--primary-color);
    font-size: 1.35rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.article-content blockquote {
    border-left: 4px solid var(--secondary-color);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--background-alt);
    font-style: italic;
}

.article-content code {
    background: var(--background-alt);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.article-content pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Article CTA */
.article-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 3rem;
    text-align: center;
}

.article-cta h3 {
    color: white;
    margin-top: 0;
}

.article-cta p {
    margin-bottom: 1.5rem;
}

.article-cta .btn-primary {
    background: white;
    color: var(--primary-color) !important;
}

.article-cta .btn-primary:hover {
    background: var(--background-alt);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.sidebar section {
    background: var(--background-alt);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.sidebar h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* About Section */
.about {
    background: var(--background-alt);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 3rem;
}

.about h2 {
    margin-top: 0;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    text-align: center;
}

.footer-nav {
    margin-top: 1rem;
}

.footer-nav a {
    margin: 0 1rem;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .container {
        padding: 0 1rem;
    }

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

    .intro {
        padding: 1.5rem;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }
}

/* Print Styles */
@media print {
    header, footer, .sidebar, .article-cta {
        display: none;
    }

    .article {
        display: block;
    }

    a {
        color: inherit;
        text-decoration: none;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}