/*
Theme Name: Recebidos.net
Theme URI: https://recebidos.net
Author: wp@antoniocampos.net
Description: tema para o recebidos.net
Version: 1.3.0
Text Domain: recebidos
*/

:root {
    --primary: #FFD700;
    --primary-alt: #FFC107;
    --accent: #212121;
    --text: #1a1a1a;
    --text-muted: #666666;
    --bg: #fafafa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.site-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-alt));
    padding: 30px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.site-logo {
    margin-bottom: 15px;
}

.site-logo a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent);
    text-transform: lowercase;
}

.smiley-icon {
    width: 36px;
    height: 36px;
    stroke: var(--accent);
    display: block;
}

.nav-links {
    display: flex;
    gap: 15px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    font-weight: 700;
    color: var(--accent);
    padding: 10px 20px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.3);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.6);
}

.main-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 1024px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }
}

.content-area {
    width: 100%;
    min-width: 0;
}

.sidebar-area {
    width: 100%;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    position: relative;
    /* Essential for stretched-link */
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease, opacity 0.5s ease-out, transform 0.5s ease-out;
}

.js .card {
    opacity: 0;
    transform: translateY(15px);
}

.js .card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-link {
    display: block;
    color: inherit;
}

.card-media {
    width: 100%;
    height: 220px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.placeholder-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-gradient span {
    font-size: 5rem;
    font-weight: 900;
    color: white;
    opacity: 0.3;
}

.card-content {
    padding: 24px;
    background: #fff;
}

.card-meta {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary-alt);
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.card-meta a {
    color: var(--primary-alt);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a1a1a !important;
    /* Force visible color in light mode */
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444444 !important;
    /* Force visible color in light mode */
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.btn-read-more {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    text-align: center;
}

.btn-read-more:hover {
    transform: translateY(-2px) scale(1.05);
    /* Slight scale for better hover feel */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

.card:hover .btn-read-more {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Emoji Rain */
.emoji-particle {
    position: absolute;
    top: -30px;
    pointer-events: none;
    z-index: 100;
    font-size: 24px;
    user-select: none;
    animation: emojiFall 1.5s linear forwards;
}

@keyframes emojiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(240px) rotate(360deg);
        opacity: 0;
    }
}

.pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 60px 0;
}

.page-numbers {
    padding: 10px 18px;
    background: #fff;
    border-radius: 50px;
    color: var(--accent);
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.page-numbers.current {
    background: var(--accent);
    color: var(--primary);
}

.site-footer {
    background: var(--accent);
    color: white;
    padding: 60px 5% 40px;
    margin-top: 100px;
}

.widget {
    background: #fff;
    padding: 30px;
    border-radius: 28px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 4px solid var(--primary);
}

#dark-mode-toggle,
#back-to-top {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary);
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

#dark-mode-toggle {
    bottom: 30px;
    right: 30px;
}

#back-to-top {
    bottom: 100px;
    right: 30px;
    display: none;
}

#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-alt));
    width: 0%;
    z-index: 1001;
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .site-logo a {
        font-size: 1.4rem;
    }
}

/* Share Section */
.share-section {
    margin: 40px 0;
    text-align: center;
    background: #fdfdfd;
    padding: 30px;
    border-radius: 24px;
    border: 2px dashed #eee;
}

.share-section h3 {
    margin-bottom: 25px;
    font-weight: 900;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.copy {
    background: #333;
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

/* DARK MODE - HIGH SPECIFICITY */
body.dark-mode {
    --bg: #121212;
    --text: #ffffff;
    --text-muted: #aaaaaa;
    --accent: #FFD700;
    background-color: #121212 !important;
    color: #ffffff !important;
}

body.dark-mode .card,
body.dark-mode .card-content,
body.dark-mode .widget,
body.dark-mode .share-section {
    background: #1e1e1e !important;
    border-color: #333 !important;
}

body.dark-mode .card-title,
body.dark-mode .widget-title {
    color: #ffffff !important;
}

body.dark-mode .card-excerpt {
    color: #cccccc !important;
}

body.dark-mode .nav-links a {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

body.dark-mode .site-header {
    background: linear-gradient(135deg, #FFD700, #FFC107) !important;
}

body.dark-mode .smiley-icon {
    stroke: #000 !important;
}

body.dark-mode .site-logo a {
    color: #000 !important;
}

body.dark-mode .widget-title {
    border-bottom-color: var(--primary) !important;
}