/* ============================================================
   Default Theme — Frontend Styles
   Extracted from layouts/main.php
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f9f9f9;
}

/* ---- Navigation ---- */
nav {
    background: #2c3e50;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    color: #ecf0f1;
    text-decoration: none;
    margin: 0 0.5rem;
}

nav a:hover {
    color: #3498db;
}

nav .brand {
    font-size: 1.3rem;
    font-weight: bold;
}

/* ---- Hero (main site) ---- */
.hero {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero .cta {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
}

.hero .cta:hover {
    background: #c0392b;
}

/* ---- Main content ---- */
main {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ---- Post items ---- */
.post-item {
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
}

.post-item h2 {
    margin-bottom: 0.3rem;
}

.post-item h2 a {
    color: #2c3e50;
    text-decoration: none;
}

.post-item h2 a:hover {
    color: #3498db;
}

.post-meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.post-meta a {
    color: #e74c3c;
    text-decoration: none;
    margin-left: 0.5rem;
}

.post-meta a:hover {
    text-decoration: underline;
}

/* ---- Footer ---- */
footer {
    text-align: center;
    padding: 2rem;
    color: #888;
    border-top: 1px solid #eee;
    margin-top: 2rem;
}

/* ---- Flash messages ---- */
.flash {
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ---- Forms ---- */
form {
    max-width: 500px;
    margin: 0 auto;
}

form.form-wide {
    max-width: 100%;
}

.post-editor-main main {
    max-width: 1100px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
}

.form-group .checkbox {
    width: auto;
    margin-right: 0.5rem;
}

/* ---- Buttons ---- */
.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-xs {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
}

/* ---- Pagination ---- */
.pagination {
    text-align: center;
    margin: 2rem 0;
}

.pagination a {
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.pagination a.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination a:hover {
    background: #eee;
}

/* ---- Content card ---- */
.content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ---- Article ---- */
.article-container {
    max-width: 750px;
    margin: 0 auto;
    font-size: 1.18rem;
    line-height: 1.9;
}

.article-container h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-container h2 {
    font-size: 1.6rem;
    margin: 2rem 0 0.8rem;
}

.article-container h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.5rem;
}

.article-container p {
    margin-bottom: 1.4rem;
}

.article-container img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

.article-container blockquote {
    border-left: 4px solid #3498db;
    padding: 0.5rem 1.5rem;
    margin: 1.5rem 0;
    background: #f0f7ff;
    border-radius: 0 6px 6px 0;
    font-style: italic;
}

.article-container ul,
.article-container ol {
    margin: 0.8rem 0 1.2rem 2rem;
}

.article-container li {
    margin-bottom: 0.4rem;
}

.article-container pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1.2rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
}

.article-container code {
    background: #f0f0f0;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.article-container pre code {
    background: none;
    padding: 0;
}

.article-container iframe,
.article-container video {
    max-width: 100%;
    border-radius: 6px;
    margin: 1rem 0;
}

.article-meta {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.article-meta a {
    color: #3498db;
    text-decoration: none;
    margin-left: 0.8rem;
}

/* ---- Tables ---- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
}

table th {
    background: #f5f5f5;
    text-align: left;
    padding: 0.8rem;
    border-bottom: 2px solid #ddd;
}

table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #eee;
}

/* ---- Stats cards ---- */
.stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 150px;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3498db;
}

.stat-card .label {
    color: #888;
    margin-top: 0.3rem;
}

/* ============================================================
   Modern SaaS Homepage Styles (main-home.php)
   ============================================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --accent: #f59e0b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
}

/* ---- Container ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---- Section titles ---- */
.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* ---- Hero Section ---- */
.home-hero {
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1e293b 0%, #1e40af 40%, #2563eb 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: 4rem 2rem;
}

.home-hero .container {
    position: relative;
    z-index: 2;
}

.home-hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-hero-primary {
    background: var(--accent);
    color: #1e293b;
    border-color: var(--accent);
}

.btn-hero-primary:hover {
    background: #fbbf24;
    border-color: #fbbf24;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-hero-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
    transform: translateY(-1px);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

/* ---- Features Section ---- */
.home-features {
    padding: 5rem 2rem;
    background: var(--bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.feature-card {
    background: var(--bg-alt);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.feature-icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---- How It Works ---- */
.home-how {
    padding: 5rem 2rem;
    background: var(--bg-alt);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.step-number {
    width: 64px;
    height: 64px;
    line-height: 64px;
    margin: 0 auto 1.25rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.step-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---- FAQ Section ---- */
.home-faq {
    padding: 5rem 2rem;
    background: var(--bg);
}

.faq-list {
    max-width: 760px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 0.25rem 0;
}

.faq-item summary {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    padding: 1.25rem 1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.15s;
}

.faq-item summary:hover {
    color: var(--primary);
}

.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    content: '\2212';
    transform: rotate(0);
}

.faq-item[open] summary {
    color: var(--primary);
}

.faq-answer {
    padding: 0 1rem 1.25rem;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
}

/* ---- CTA Section ---- */
.home-cta {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    text-align: center;
}

.home-cta h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.home-cta p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.home-cta .btn-hero-primary {
    background: #fff;
    color: var(--primary-dark);
    border-color: #fff;
}

.home-cta .btn-hero-primary:hover {
    background: #f1f5f9;
    border-color: #f1f5f9;
}

/* ---- Footer Section ---- */
.home-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 3rem 2rem 2rem;
}

.home-footer .container {
    text-align: center;
}

.footer-brand {
    margin-bottom: 1.5rem;
}

.footer-brand strong {
    font-size: 1.2rem;
    color: #e2e8f0;
}

.footer-brand p {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.footer-links {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: #e2e8f0;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.85rem;
    color: #64748b;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .home-hero h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .home-hero {
        min-height: 450px;
        padding: 3rem 1rem;
    }

    .home-features,
    .home-how,
    .home-faq,
    .home-cta {
        padding: 3rem 1rem;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: center;
    }

    .btn-hero {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}
