/* ==========================================================================
   LAYOUT: MAGAZINE (PORTAL)
   ========================================================================== */

.magazine-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Georgia', 'Times New Roman', serif;
    /* Estilo jornal */
}

.mag-container {
    margin-bottom: 40px;
}

.mag-section-title,
.mag-header h2 {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    border-top: 2px solid #000;
    padding-top: 10px;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

/* 1. Highlights (Ticker) */
.mag-highlights {
    border: 1px solid #e0e0e0;
    /* Borda em volta de tudo */
    margin-bottom: 30px;
    padding: 15px 0;
    /* Espaçamento interno vertical */
    background: #fff;
}

.mag-highlights .mag-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0;
    gap: 0;
    /* Remove gap do flex para usar padding/border individual */
}

.mag-highlight-item {
    flex: 1;
    padding: 0 20px;
    /* Espaço interno lateral */
    border-right: 1px solid #eee;
    /* Linha divisória vertical */
    display: flex;
    align-items: center;
}

.mag-highlight-item:last-child {
    border-right: none;
    /* Remove linha do último item */
}

.mag-highlight-item a {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--primary-color);
    font-family: 'Arial', sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.mag-highlight-thumb {
    margin-right: 20px;
    /* Espaço aplicado no container da imagem */
    flex-shrink: 0;
    line-height: 0;
}

.mag-highlight-thumb img {
    width: 70px;
    /* Um pouco maior */
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
}

/* 2. Hero Grid (3 Columns) */
.mag-hero-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    /* 25% 50% 25% */
    gap: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 40px;
}

/* Hero Left (Text List) */
.mag-text-post {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f5f5f5;
}

.mag-text-post:last-child {
    border-bottom: none;
}

.mag-cat {
    font-family: 'Arial', sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--primary-color);
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.mag-title-medium a {
    font-size: 18px;
    line-height: 1.3;
    color: #111;
    text-decoration: none;
    font-weight: 700;
}

.mag-meta {
    font-family: 'Arial', sans-serif;
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

/* Hero Center (Main) */
.mag-main-post {
    position: relative;
}

.mag-main-thumb img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px;
}

.mag-main-content {
    text-align: center;
}

.mag-cat-tag {
    background: #000;
    color: #fff;
    padding: 3px 8px;
    font-family: 'Arial', sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

.mag-title-large a {
    font-size: 32px;
    line-height: 1.1;
    color: #000;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.mag-main-content p {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* Hero Right (Stacked) */
.mag-side-post {
    margin-bottom: 20px;
}

.mag-side-thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 10px;
}

.mag-title-small a {
    font-size: 16px;
    line-height: 1.3;
    color: #111;
    text-decoration: none;
    font-weight: 700;
}

/* 3. News Just In (5 Columns) */
.mag-just-in {
    background: #f9f9f9;
    padding: 30px 0;
    margin-bottom: 40px;
}

.mag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.mag-header h2 {
    border: none;
    margin: 0;
    padding: 0;
}

.mag-view-more {
    font-family: 'Arial', sans-serif;
    font-size: 12px;
    text-decoration: none;
    color: #666;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 3px;
}

.mag-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.mag-card-small {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mag-title-xsmall a {
    font-size: 14px;
    line-height: 1.3;
    color: #000;
    text-decoration: none;
    font-weight: 700;
    margin: 10px 0 5px;
    display: block;
}

.mag-thumb-small img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.mag-meta-small {
    font-family: 'Arial', sans-serif;
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
}

/* 4. World Politics */
.mag-politics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* 66% Main, 33% Sidebar */
    gap: 30px;
    align-items: start;
}

.mag-pol-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.mag-pol-main {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mag-pol-main img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
}

.mag-pol-side-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mag-pol-side {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.mag-thumb-tiny img {
    width: 80px;
    height: 60px;
    object-fit: cover;
}

.mag-cat-tiny {
    font-family: 'Arial', sans-serif;
    font-size: 9px;
    color: #0056b3;
    text-transform: uppercase;
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
}

.mag-title-tiny a {
    font-size: 14px;
    line-height: 1.3;
    color: #111;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .mag-hero-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mag-hero-left {
        display: none;
        /* Esconde lista lateral em tablet */
    }

    .mag-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mag-highlights .mag-container {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
    }

    .mag-highlight-item {
        min-width: 200px;
    }

    .mag-hero-grid {
        grid-template-columns: 1fr;
    }

    .mag-hero-left {
        display: block;
        /* Volta a mostrar em mobile, mas empilhado */
        order: 2;
    }

    .mag-hero-center {
        order: 1;
    }

    .mag-hero-right {
        order: 3;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .mag-grid-5 {
        grid-template-columns: 1fr 1fr;
    }
}

/* 5. Recommended Reading (Grid 4) */
.mag-recommended {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
}

.mag-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mag-card-vertical {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Garante altura uniforme */
}

.mag-thumb-vertical {
    flex-shrink: 0;
    /* Evita que a imagem encolha */
}

.mag-thumb-vertical img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 10px;
}

/* 6. Culture & Entertainment */
.mag-culture {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
}

.mag-culture-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    /* 60% 40% */
    gap: 30px;
}

.mag-culture-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mag-culture-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    margin-bottom: 15px;
}

.mag-culture-card h3 a {
    font-size: 24px;
    line-height: 1.3;
    color: #000;
    text-decoration: none;
    font-weight: 700;
}

.mag-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    /* Alinha cards no topo */
}

.mag-grid-2 .mag-card-small {
    display: flex;
    flex-direction: column;
}

/* 7. Technology (Horizontal List) */
.mag-tech {
    margin-bottom: 40px;
}

.mag-tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.mag-tech-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.mag-tech-thumb img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    flex-shrink: 0;
}

.mag-tech-content {
    flex: 1;
}

/* Responsive Updates */
@media (max-width: 1024px) {
    .mag-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .mag-culture-grid {
        grid-template-columns: 1fr;
    }

    .mag-tech-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mag-grid-4 {
        grid-template-columns: 1fr;
    }

    .mag-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* 8. Most Read (Grid 3x3) */
.mag-most-read {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
}

.mag-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.mag-card-compact {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mag-thumb-compact img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    margin-bottom: 10px;
}

/* Responsive for new section */
@media (max-width: 1024px) {
    .mag-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}
