/**
 * Charles Francis Studio - Frontend Styles
 */

/* CSS Variables */
:root {
    --primary: #2c3e50;
    --secondary: #34495e;
    --accent: #3498db;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg: #fff;
    --bg-light: #f8f9fa;
    --border: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

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

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

/* Header */
.site-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary);
}

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

/* Navigation */
.main-nav > ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* Only style top-level nav links to avoid conflicts with menu-manager plugin */
.main-nav > ul > li > a {
    color: var(--text);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
    color: var(--accent);
}

.main-nav > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.main-nav > ul > li > a:hover::after,
.main-nav > ul > li > a.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Main Content */
.site-main {
    padding: 3rem 0;
    min-height: calc(100vh - 400px);
}

/* Page Content */
.page-content {
    background: white;
    border-radius: 10px;
    padding: 3rem;
    box-shadow: var(--shadow);
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-excerpt {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
}

.page-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1.5rem 0;
}

.page-body ul,
.page-body ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.page-body li {
    margin-bottom: 0.5rem;
}

.page-body blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-light);
}

.page-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.page-body th,
.page-body td {
    padding: 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}

.page-body th {
    background: var(--bg-light);
    font-weight: 600;
}

/* Footer */
.site-footer {
    background: var(--primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom .footer-artist-link {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.85rem;
}

.footer-bottom .footer-artist-link a {
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom .footer-artist-link a:hover {
    color: rgba(255, 255, 255, 0.7);
}

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

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0;
}

.error-404 h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-404 p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.search-box {
    max-width: 500px;
    margin: 0 auto;
}

.search-box form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 1rem;
}

.search-box button {
    padding: 0.75rem 2rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* Component Wrappers */
.component-block {
    display: block;
    margin: 1.25rem 0;
}

.component-align-left {
    text-align: left;
}

.component-align-center {
    text-align: center;
}

.component-align-right {
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .page-content {
        padding: 2rem 1.5rem;
    }

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

    .error-code {
        font-size: 5rem;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .site-main {
        padding: 2rem 0;
    }

    .page-content {
        padding: 1.5rem 1rem;
    }
}
