:root {
    --primary-color: #0d2b45;    /* Azul Acadêmico */
    --accent-color: #f37021;     /* Laranja Sagrado */
    --bg-color: #f8f6f2;         /* Off-white/Papel Antigo */
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --container-max: 1200px;
    --reading-max: 820px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

.serif { font-family: 'Lora', serif; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }

/* Main Header */
.main-header {
    background: #fff;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-container {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.site-logo {
    max-height: 60px;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 1.2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

/* Hero Section */
.hero-section {
    background: var(--primary-color);
    color: white;
}

.hero-banner {
    background-size: cover;
    background-position: center;
    padding: 5rem 1rem;
    text-align: center;
}

.hero-content h1 {
    font-family: 'Lora', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Site Layout Grid */
.site-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    margin: 3rem auto;
}

/* Post Cards (Home) */
.posts-grid { 
    display: grid; 
    gap: 2.5rem; 
}

.post-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.post-card-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.post-card-content {
    padding: 2.5rem;
}

.post-card h2 {
    font-family: 'Lora', serif;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.25;
}

.post-card p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.read-link {
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

/* Full Post View */
.post-full {
    max-width: var(--reading-max);
    margin: 0 auto;
}

.post-full-image {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.post-full-image img { width: 100%; display: block; }

.post-full h1 {
    font-family: 'Lora', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.post-meta {
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.post-body {
    font-family: 'Lora', serif;
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: #334155;
    line-height: 1.8;
}

.post-body p { margin-bottom: 1.8rem; }

.post-body img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 12px; 
    margin: 2rem 0; 
    display: block;
}

.post-body blockquote {
    border-left: 5px solid var(--accent-color);
    padding: 1.5rem 2rem;
    font-style: italic;
    color: #475569;
    margin: 2.5rem 0;
    background: #fff9f5;
    border-radius: 0 12px 12px 0;
}

/* PDF Box */
.post-pdf-box {
    margin: 3.5rem 0;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.post-pdf-box h3 { margin: 0; color: var(--primary-color); font-family: 'Lora', serif; }
.post-pdf-box p { margin: 5px 0 0 0; font-size: 0.95rem; color: var(--text-muted); }

.btn-pdf {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 25px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.btn-pdf:hover { opacity: 0.9; }

/* Sidebar Styling */
.sidebar-widget {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.sidebar-widget h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.newsletter-widget {
    background: #fff9f5;
    border-color: #ffe8d6;
}

.newsletter-widget input {
    width: 100%;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 1rem;
}

.newsletter-widget button {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.newsletter-widget button:hover { background: #1a3a5c; }

/* Alerts */
.alert {
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #dcfce7; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fee2e2; }

/* PDF List */
.pdf-list { list-style: none; }
.pdf-list li { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; }
.pdf-list li:last-child { border-bottom: none; }
.pdf-list a { 
    text-decoration: none; 
    color: var(--primary-color); 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    gap: 10px;
}
.pdf-list a:hover { color: var(--accent-color); }

/* Main Footer */
.main-footer {
    background: #fff;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 5rem;
}

/* Responsive */
@media (max-width: 1100px) {
    .site-wrapper { gap: 2rem; }
}

@media (max-width: 1024px) {
    .site-wrapper { grid-template-columns: 1fr; gap: 3rem; margin: 2rem auto; }
    .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    .container { padding: 0 15px; }
    .header-right { gap: 1rem; }
    .main-nav { display: none; } /* Mobile menu simplified */
    
    .site-logo { max-height: 50px; }
    
    .hero-banner { padding: 4rem 1rem; }
    .sidebar { grid-template-columns: 1fr; }
    
    .post-full h1 { font-size: 2rem; }
    .post-body { font-size: 1.15rem; }
    
    .post-pdf-box { flex-direction: column; text-align: center; padding: 1.5rem; }
    .btn-pdf { width: 100%; justify-content: center; }
}

