/* 
  Design System for The Bullocracy
  Cores: 
  - Azul Profundo (#001A33)
  - Dourado (#C5A059)
  - Cinza Apple (#F5F5F7)
  Fontes:
  - Cinzel (Logótipo e Títulos)
  - Montserrat (Navegação e Corpo)
*/

:root {
    --deep-blue: #001A33;
    --gold: #C5A059;
    --gold-hover: #D8B26A;
    /* Lighter gold for hover states */
    --apple-gray: #FAFAFA;
    --text-dark: #333333;
    /* Apple-like dark gray for better readability than pure black */
    --text-light: #86868B;
    --white: #FFFFFF;

    --font-heading: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;

    /* Spacing & Shadows */
    --soft-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    --border-radius: 16px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    /* Required global smooth scroll behavior */
}

body {
    font-family: var(--font-body);
    background-color: var(--apple-gray);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul {
    list-style: none;
}

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

h1,
h2,
h3,
h4,
.logo-text {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* Helper Class for Screen Readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Category Label */
.article-category {
    display: block;
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* Header Section */
.header {
    background-color: var(--deep-blue);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 26, 51, 0.1);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.header.header-hidden {
    transform: translateY(-100%);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 60px;
    /* Assuming a square icon, scalable */
    height: auto;
    object-fit: contain;
    /* Placeholder fallback color if image is missing */
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    min-height: 60px;
    min-width: 60px;
}

.logo-text {
    color: var(--gold);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

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

.main-nav a {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
}

.main-nav a:hover {
    color: var(--gold);
}

/* Styled Search Navigation Button */
.search-nav-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem !important;
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: 20px;
    background: rgba(197, 160, 89, 0.05);
    transition: all var(--transition-smooth);
}

.search-nav-btn:hover {
    background: var(--gold) !important;
    color: var(--white) !important;
    border-color: var(--gold);
}

.search-nav-btn::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C5A059' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: all var(--transition-smooth);
}

.search-nav-btn:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition-smooth);
}

/* Global Reveal System */
.reveal {
    opacity: 0;
    transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1) translateX(0) !important;
}

/* Animations that trigger when .reveal turns .active */
.slide-up {
    transform: translateY(40px);
}

.fade-in {
    opacity: 0;
}

/* Delay classes for staggered animations */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* Hero Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes panMap {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100vw 50vh;
    }
}

@keyframes drawTradeRoutes {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0;
    }

    10% {
        opacity: 0.15;
    }

    90% {
        opacity: 0.15;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

/* Hero Section (Manifesto) */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: var(--apple-gray);
    z-index: 1;
}

/* Dynamic Topographic & Geopolitical Background */
#hero-network {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-title {
    color: var(--deep-blue) !important;
    font-family: var(--font-body) !important;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 1.5rem;
    text-shadow: none !important;
}

.hero-subtitle {
    color: #55555A;
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    line-height: 1.6;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: none !important;
}

/* Editorial Pillars */
.pillars {
    background-color: #f4f4f7;
    /* Cinzento muito suave e elegante */
    padding: 5rem 0;
    /* Garante que há espaço suficiente para respirar dentro do bloco cinzento */
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    /* Linha divisória quase invisível */
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.pillars-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

.pillar {
    text-align: center;
    padding: 0 1rem;
}

.pillar-title {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.pillar-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: var(--gold);
    opacity: 0.5;
}

.pillar-desc {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.7;
}

/* Content Feed Grid */
.feed {
    padding: 5rem 0 8rem;
    background-color: var(--white);
}

.section-title {
    font-size: 2.5rem;
    color: var(--deep-blue);
    margin-bottom: 3rem;
    text-align: center;
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.feed-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    transition: var(--transition-smooth);
    position: relative;
    top: 0;
}

.feed-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 26, 51, 0.1);
}

.card-image-placeholder {
    width: 100%;
    height: 220px;
    background-color: #E5E5EA;
    /* Subtle gray placeholder */
    position: relative;
}

.revista-placeholder {
    background: linear-gradient(135deg, var(--deep-blue) 0%, #003366 100%);
}

.video-placeholder {
    background-color: #D1D1D6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--deep-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding-left: 4px;
    /* Optically center triangle */
}

.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.4rem;
    color: var(--deep-blue);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.read-more {
    font-family: var(--font-heading);
    color: var(--deep-blue);
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.read-more::after {
    content: '→';
    font-family: system-ui;
    /* simple arrow */
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--gold);
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* Feedback Section */
.feedback {
    padding: 6rem 0;
    background-color: var(--apple-gray);
}

.feedback-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.feedback-text .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.feedback-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 400px;
}

.feedback-form {
    background-color: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--soft-shadow);
}

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

input,
textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid #E5E5EA;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-dark);
    background-color: #FAFAFA;
    transition: var(--transition-smooth);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background-color: var(--gold);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: var(--transition-smooth);
}

.submit-btn:hover {
    background-color: var(--gold-hover);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 6px 16px rgba(197, 160, 89, 0.4);
}

/* --- Quill.js Frontend Formats --- */

/* Alignment */
.ql-align-center {
    text-align: center;
}

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

.ql-align-justify {
    text-align: justify;
}

/* Text Size */
.ql-size-small {
    font-size: 0.85em;
}

.ql-size-large {
    font-size: 1.35em;
}

.ql-size-huge {
    font-size: 1.8em;
}

/* Preview Modal de Rascunho */
.preview-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(4px);
}

.preview-modal-box {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    max-width: 780px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--gold);
    background: var(--apple-gray);
    flex-shrink: 0;
}

.preview-modal-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--deep-blue);
    margin: 0 0 0.25rem 0;
}

.preview-modal-author {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.preview-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-light);
    padding: 0 0 0 1rem;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.preview-modal-close:hover {
    color: var(--deep-blue);
}

.preview-modal-content {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.preview-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 2rem;
    border-top: 1px solid #E5E5EA;
    background: var(--apple-gray);
    flex-shrink: 0;
}

.preview-modal-btn {
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.preview-modal-btn--primary {
    background: var(--gold);
    color: var(--white);
}

.preview-modal-btn--primary:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
}

.preview-modal-btn--secondary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid #E5E5EA;
}

.preview-modal-btn--secondary:hover {
    background: #E5E5EA;
}

/* Footer */
.footer {
    background-color: var(--deep-blue);
    padding: 2.5rem 0;
    text-align: center;
    margin-top: 8rem;
    /* Creates significant breathing space before footer on all pages */
}

.footer-content p {
    color: var(--white);
    opacity: 0.6;
    font-size: 0.9rem;
    letter-spacing: 1px;
    font-family: var(--font-heading);
}

/* Sub-article Drag & Drop */
[data-sub-id] {
    cursor: grab;
    transition: box-shadow 0.2s ease, opacity 0.2s ease;
}

[data-sub-id]:active {
    cursor: grabbing;
}

[data-sub-id].sub-dragging {
    opacity: 0.45;
    box-shadow: 0 8px 24px rgba(0, 26, 51, 0.15);
}

[data-sub-id].sub-drag-over {
    outline: 2px solid var(--gold);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.2);
}

.footer-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 1rem;
    color: var(--gold);
}

.footer-socials a {
    color: var(--gold);
    display: flex;
    align-items: center;
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-socials a:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.footer-socials svg {
    fill: currentColor;
    width: 22px;
    height: 22px;
    transition: opacity 0.3s ease;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .pillars-content {
        gap: 2rem;
    }

    .feedback-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

    .feedback-text .section-title {
        text-align: center;
    }

    .feedback-text p {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--deep-blue);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
        opacity: 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        max-height: 600px;
        padding: 1.5rem 0;
        opacity: 1;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        text-align: center;
    }

    .main-nav li {
        margin: 1rem 0;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .main-nav.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .main-nav.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .main-nav.active li:nth-child(2) {
        transition-delay: 0.15s;
    }

    .main-nav.active li:nth-child(3) {
        transition-delay: 0.2s;
    }

    .main-nav.active li:nth-child(4) {
        transition-delay: 0.25s;
    }

    .main-nav.active li:nth-child(5) {
        transition-delay: 0.3s;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 101;
        /* Above nav */
    }

    /* Mobile Menu Animations (Hamburger to X) */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        padding: 5rem 0 4rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .pillars-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .pillar-title::after {
        width: 60px;
    }

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

    .feedback-form {
        padding: 2rem;
    }
}

/* --- Revista MIA Specific Styles --- */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    min-height: 50vh;
}

/* --- Compact Related Cards --- */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;

    /* Break out of the narrow article container */
    width: 90vw;
    max-width: 1100px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

@media (min-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.related-grid .magazine-card {
    flex-direction: column;
    align-items: stretch;
    height: 100%;
}

.related-grid .magazine-cover {
    width: 100%;
    min-width: 100%;
    height: 180px;
    border-bottom: 2px solid var(--gold);
    border-right: none;
}

.related-grid .magazine-info {
    padding: 1.5rem;
    justify-content: flex-start;
}

.related-grid .magazine-title {
    font-size: 1.15rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.related-grid .magazine-desc {
    display: none;
    /* Hide excerpt */
}

.related-grid .card-author {
    padding-top: 1rem;
    margin-top: auto;
    border-top: 1px solid rgba(0, 26, 51, 0.08);
}

.related-grid .card-author-photo {
    width: 28px;
    height: 28px;
}

.related-grid .card-author-name {
    font-size: 0.8rem;
}

.magazine-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    border: 1px solid rgba(0, 26, 51, 0.05);
}

.magazine-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.06);
}

.magazine-cover {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--deep-blue) 0%, #0a2e55 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 2px solid var(--gold);
}

.magazine-issue {
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    position: absolute;
    bottom: -15px;
    right: 15px;
}

.magazine-info {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.magazine-title {
    font-size: 1.6rem;
    color: var(--deep-blue);
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.magazine-desc {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

/* Card Author Info */
.card-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: auto;
    border-top: 1px solid rgba(0, 26, 51, 0.08);
    padding-top: 1rem;
}

.card-author-photo {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--deep-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.card-author-name {
    font-size: 0.9rem;
    color: var(--deep-blue);
    font-weight: 600;
    font-family: var(--font-heading);
}

/* --- Carousel Specific Styles --- */
.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 4rem auto 0;
    overflow: hidden;
    padding: 2rem 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    box-sizing: border-box;
}

.team-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--deep-blue);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid var(--white);
    box-shadow: var(--soft-shadow);
}

.team-name {
    font-family: var(--font-heading);
    color: var(--deep-blue);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.team-role {
    color: var(--gold);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: var(--soft-shadow);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    color: var(--deep-blue);
}

.carousel-btn:hover {
    background: var(--deep-blue);
    color: var(--gold);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Article Body Images */
.article-body img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 8px;
}

/* Article Reading Typography (Ergonomics) */
.article-body {
    max-width: 700px;
    margin: 0 auto;
}

.article-body p,
.article-block p {
    font-size: 1.25rem;
    /* 20px */
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

/* Newsletter Modal */
.newsletter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 26, 51, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    backdrop-filter: blur(4px);
}

.newsletter-overlay.active {
    opacity: 1;
    visibility: visible;
}

.newsletter-modal {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.5s ease;
    position: relative;
    border-top: 4px solid var(--gold);
}

.newsletter-overlay.active .newsletter-modal {
    transform: translateY(0);
}

.newsletter-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition-smooth);
}

.newsletter-close:hover {
    color: var(--gold);
}

.newsletter-modal h3 {
    font-size: 1.8rem;
    color: var(--deep-blue);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.newsletter-modal p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.newsletter-form .form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.newsletter-message {
    margin-top: 1rem;
    font-weight: 600;
    display: none;
}

.newsletter-message.success {
    color: #2E7D32;
    display: block;
}

.newsletter-message.error {
    color: #D32F2F;
    display: block;
}

/* --- Secção Estante MIA --- */
.mia-shelf {
    background-color: var(--deep-blue);
    /* Brilho radial com o roxo corporativo no topo central */
    background-image: radial-gradient(circle at 50% 0%, rgba(86, 77, 166, 0.25) 0%, var(--deep-blue) 70%);
    padding: 6rem 0;
    position: relative;
    border-top: 1px solid rgba(86, 77, 166, 0.3);
}

.mia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 4rem 3rem;
    margin-top: 2rem;
}

.mia-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.mia-card:hover {
    transform: translateY(-10px);
}

.mia-card:hover .mia-cover {
    /* Sombra roxa ao passar o rato */
    box-shadow: 0 25px 50px rgba(86, 77, 166, 0.35);
}

.mia-cover {
    width: 100%;
    aspect-ratio: 1 / 1.414;
    /* Proporção ISO clássica (A4/Revista) */
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    transition: var(--transition-smooth);
    background-color: #1a1a1a;
}

.mia-info {
    text-align: center;
}

.mia-title {
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.mia-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- Revista MIA Seamless Dark Glue --- */
.mia-shelf {
    margin-bottom: 0 !important;
    min-height: calc(100vh - 300px);
}

body.page-revista {
    background-color: var(--deep-blue) !important;
}

.feed {
    background-color: var(--apple-gray);
    /* Força o fundo claro original nas secções da Homepage */
}

/* Failsafe para garantir visibilidade na Revista */
.edition-layout,
.edition-content,
.article-block,
.reveal {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Ecrã Inteiro para os Editores de Texto */
.quill-fs-wrapper {
    position: relative;
    background: white;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.editor-fullscreen-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    padding: 2rem !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
}

.editor-fullscreen-active .ql-container {
    flex-grow: 1 !important;
    height: auto !important;
    overflow-y: auto !important;
    font-size: 1.2rem !important; /* Aumenta ligeiramente a fonte no modo leitura */
}