/* 
  Modern and Timeless Digital Magazine Design System
  Entreparágrafos - Aportando o debate contemporâneo
*/

:root {
    /* Color Palette */
    --primary: #0D3B47;
    /* Petrol Blue */
    --accent: #1F6672;
    /* Light Blue */
    --secondary: #B0B0B0;
    /* Medium Grey */
    --text-main: #333333;
    /* Dark Grey */
    --text-muted: #B0B0B0;
    /* Grey for secondary text */
    --bg-white: #FFFFFF;
    --bg-light: #F8F8F8;
    --bg-2: #F1F5F9;
    --border-color: #E2E8F0;
    --gradient-banner: linear-gradient(to right, #0D3B47, #1F6672);

    /* Typography */
    --font-sans: 'Inter', 'Poppins', 'Roboto', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Lora', serif;
    --h1-size: clamp(1.8rem, 5vw, 2.8rem);
    --h2-size: clamp(1.5rem, 4vw, 2.2rem);
    --h3-size: 1.5rem;
    --p-size: 1.05rem;
    --small-size: 0.875rem;
    --line-height-base: 1.65;

    /* Spacing & Layout */
    --container-max: 1250px;
    --padding-side: 5vw;
    --gap-base: clamp(1.5rem, 3vw, 3rem);
    --radius: 4px;

    /* Effects */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease-in-out;
}

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

/* Selection color */
::selection {
    background-color: var(--primary);
    color: #fff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography Hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--primary);
    line-height: 1.2;
}

h1 {
    font-size: var(--h1-size);
}

h2 {
    font-size: var(--h2-size);
}

h3 {
    font-size: var(--h3-size);
}

p {
    margin-bottom: 1.5rem;
    font-size: var(--p-size);
}

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

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--padding-side);
}

.section-padding {
    padding: 5rem 0;
}

/* --- Header & Navigation (Fixed Selectors) --- */
.navbar {
    background-color: var(--bg-white);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 1rem;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu-inner a {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
}

.dropdown-menu-inner a:hover {
    background: var(--bg-light);
    color: var(--accent);
}

/* Theme Toggle */
.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s;
}

.theme-btn:hover {
    background: var(--bg-light);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    overflow: hidden;
}

.carousel-slide {
    height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(13, 59, 71, 0.8), rgba(31, 102, 114, 0.4));
}

.hero-content {
    position: relative;
    z-index: 10;
    color: #fff;
    max-width: 700px;
}

.hero-content h1 {
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

/* ============================================================
   NEWSPAPER MAGAZINE LAYOUT (REBUILT FROM SCRATCH)
   ============================================================ */

.magazine-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 340px; /* SIDEBAR | FEATURED (constrained) | LIST */
    gap: 3rem;
    align-items: start;
    margin-top: 3rem;
    position: relative;
    min-height: 600px;
}

/* Ensure images never exceed their containers and prevent layout blowout */
.mag-featured img, 
.mag-item img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* 1. Sidebar (Temas) */
.magazine-sidebar {
    position: sticky;
    top: 100px;
}

.magazine-sidebar-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
    margin-bottom: 2rem;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    font-weight: 800;
}

.magazine-categories button {
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    background: none;
    border: none;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-main);
}

.magazine-categories button:hover,
.magazine-categories button.active {
    background: var(--bg-2);
    color: var(--accent);
}

.sidebar-box {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.sidebar-box h4 {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.sidebar-box p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #555;
}

/* 2. Featured (The Lead Story) */
.mag-featured {
    padding-right: 1.5rem;
    border-right: 1px solid var(--border-color);
}

.mag-featured-cat {
    display: inline-block;
    color: var(--accent);
    font-weight: 900;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

/* Update cover image selectors to be more specific */
.mag-featured > a > img {
    width: 100%;
    max-height: 450px; /* Prevent it from being too tall on large screens */
    aspect-ratio: 16 / 10;
    object-fit: cover;
    margin-bottom: 2rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.mag-featured-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.mag-featured-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
}

/* Bolstered Avatar styles to prevent distortion */
.mag-featured-avatar, 
.mag-item-avatar, 
.mag-avatar-fallback {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50%;
    object-fit: cover;
    display: block !important;
    background: var(--bg-2);
}

.mag-avatar-fallback {
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.mag-avatar-fallback.small {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    font-size: 0.75rem;
}

.mag-featured-abstract {
    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 2rem;
}

/* 3. List (Secondary Stories) */
.mag-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.mag-item-content {
    display: flex;
    flex-direction: column;
}

.mag-item > a > img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.mag-item-cat {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.mag-item-title {
    font-size: 1.3rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.mag-item-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.mag-featured-author a:hover, .mag-item-author a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1300px) {
    .magazine-layout {
        grid-template-columns: 240px 1fr;
        gap: 2.5rem;
    }
    .mag-featured {
        grid-column: 2;
        padding-right: 0;
        border-right: none;
        padding-bottom: 2.5rem;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 2.5rem;
    }
    .mag-list {
        grid-column: 2; /* Align below featured section */
    }
}

@media (max-width: 1024px) {
    .magazine-layout {
        grid-template-columns: 1fr;
    }
    .magazine-sidebar {
        position: static;
        margin-bottom: 3rem;
    }
    .mag-featured {
        grid-column: 1;
        padding-right: 0;
        border-right: none;
        margin-bottom: 4rem;
        padding-bottom: 4rem;
        border-bottom: 1px solid var(--border-color);
    }
}

/* End Magazine Rebuild */

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border-color: var(--border-color);
    background: none;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--primary);
    color: #fff;
    padding: 6rem 0 3rem;
    font-family: var(--font-main);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 5rem;
}

.footer-logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
    background-color: #FFFFFF;
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary) !important;
    letter-spacing: 2px;
    margin: 0;
}

.footer-tagline {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

.footer-col h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(31, 102, 114, 0.3);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

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

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* --- Manifesto / Values Section --- */
.manifesto-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.manifesto-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

.manifesto-text-columns {
    column-count: 2;
    column-gap: 4rem;
}

.manifesto-text-columns p {
    margin-bottom: 2rem;
}

blockquote {
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--primary);
    line-height: 1.5;
    margin: 4rem auto;
    padding: 2rem 3rem;
    position: relative;
    border: none;
    max-width: 800px;
    text-align: center;
    background: var(--bg-light);
    border-radius: 8px;
}

blockquote::before {
    content: '“';
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-size: 5rem;
    color: var(--accent);
    opacity: 0.3;
    line-height: 1;
}

blockquote::after {
    content: '—';
    display: block;
    margin-top: 1.5rem;
    color: var(--accent);
    font-size: 1.2rem;
    font-style: normal;
}

/* Responsive */
@media (max-width: 1024px) {
    .magazine-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .manifesto-text-columns {
        column-count: 1;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .nav-actions {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .section-padding {
        padding: 3rem 0;
    }

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

.hidden {
    display: none;
}

/* --- Expediente & Staff --- */
.expediente-container {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.expediente-header {
    text-align: center;
    margin-bottom: 5rem;
}

.expediente-header h1 {
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.expediente-intro {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-muted);
    font-style: italic;
}

.role-section {
    margin-bottom: 4rem;
}

.role-title {
    font-size: 1.5rem;
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.role-desc {
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Carousel/Scroll CSS */
.staff-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 1rem 0 2rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
    align-items: stretch;
}

.staff-carousel::-webkit-scrollbar {
    height: 6px;
}

.staff-carousel::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.staff-card {
    flex: 0 0 300px;
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    scroll-snap-align: start;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: auto;
    min-height: min-content;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.staff-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 3px solid var(--accent);
    background: var(--bg-2);
}

.staff-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
    font-family: var(--font-heading);
}

.staff-bio {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.5;
    white-space: pre-line;
}

@media (max-width: 768px) {
    .staff-card {
        flex: 0 0 260px;
    }
}