/*
Theme Name: MaluEdu Blog
Theme URI: https://github.com/maluedu/blog
Author: MaluEdu
Author URI: https://instagram.com/maluedu
Description: Tema personalizado para o blog da MaluEdu sobre BBB
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: maluedu
*/

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');

:root {
    /* Cores do tema */
    --color-sand-light: #f5e1c9;
    --color-sand: #e6d0b5;
    --color-sand-dark: #d4a373;
    --color-text: #2d2d2d;
    --color-accent: #b08968;
    --color-sidebar: #faf6f1;
    --color-sidebar-text: #4a4a4a;
    --color-sidebar-title: #b08968;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    
    /* Variáveis para controle de crop da imagem - ajuste no inspetor */
    --mobile-image-height: 56.25vw; /* Altura para proporção 16:9 (9/16 = 0.5625) */
    --mobile-image-position-x: center; /* Posição horizontal: left, center, right, ou valor em % */
    --mobile-image-position-y: top; /* Posição vertical: top, center, bottom, ou valor em % */
    --mobile-text-padding: 15px;
    --mobile-text-gradient: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
}

/* Estilos gerais */
body {
    font-family: 'Merriweather', serif;
    background-color: var(--color-sand-light);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

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

/* Header */
header {
    background-color: white;
    padding: 25px 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

@media (max-width: 767px) {
    /* No mobile, reposicionamos o header para depois da imagem */
    body.home header {
        position: relative;
        top: auto;
        z-index: 100;
    }
}

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

.site-title {
    margin: 0;
    font-size: 2.2rem;
    color: var(--color-accent);
    font-weight: 700;
    text-decoration: none;
}

/* Navigation */
.main-navigation ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    margin: 0;
}

.main-navigation ul li {
    margin-left: 20px;
}

.main-navigation ul li a {
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 4px;
}

.main-navigation ul li a:hover {
    color: var(--color-accent);
    background-color: var(--color-sand-light);
}

/* Featured Image - Responsive */
.featured-image-container {
    width: 100%;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.featured-image-wrapper {
    position: relative;
    width: 100%;
}

.featured-image-wrapper picture,
.featured-image {
    width: 100%;
    display: block;
}

.featured-image {
    height: auto;
    object-fit: cover;
    object-position: center;
}

.featured-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 20px;
    z-index: 2;
    text-align: center;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.featured-text h1 {
    font-size: 3rem;
    margin: 0 0 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.featured-text h2 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    margin: 0 auto;
}

/* Media Queries para Header Responsivo */
@media (max-width: 1023px) {
    /* Estilos para tablet */
    .featured-text h1 {
        font-size: 2.5rem;
    }
    
    .featured-text h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    /* Estilos para smartphone - Layout estilo app */
    body {
        padding-top: 0; /* Remove qualquer padding no topo */
        margin-top: 0;
    }
    
    /* Garantir que a imagem seja o primeiro elemento visível */
    body.home .featured-image-container {
        margin-top: 0;
        padding-top: 0;
    }
    
    /* Ajuste para a imagem - controlado por variáveis para fácil edição no inspetor */
    .featured-image-container {
        margin-bottom: 0; /* Remove margem inferior */
        border-bottom: 1px solid var(--color-sand-dark); 
        overflow: hidden; /* Garante que a imagem não ultrapasse o container */
    }
    
    .featured-image-wrapper {
        width: 100%;
        /* Altura definida para manter proporção 16:9 */
        height: var(--mobile-image-height); 
        overflow: hidden;
        position: relative;
    }
    
    .featured-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* Posição ajustável via variáveis CSS para fácil edição */
        object-position: var(--mobile-image-position-x) var(--mobile-image-position-y);
        display: block;
    }
    
    /* Ajustes para o texto - também controlados por variáveis */
    .featured-text {
        padding: var(--mobile-text-padding);
        background: var(--mobile-text-gradient);
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 2;
    }
    
    .featured-text h1 {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }
    
    .featured-text h2 {
        font-size: 0.9rem;
    }
    
    /* Ajustes para o header em mobile */
    header {
        position: relative; /* Remove sticky positioning em mobile */
        top: auto;
        box-shadow: none;
        border-bottom: 1px solid var(--color-sand);
        padding: 15px 0;
    }
    
    header .container {
        flex-direction: column; /* Empilha logo e menu */
        align-items: flex-start;
    }
    
    .site-title {
        margin-bottom: 10px;
        font-size: 1.8rem;
    }
    
    .main-navigation ul {
        flex-wrap: wrap;
    }
    
    .main-navigation ul li {
        margin-left: 0;
        margin-right: 15px;
        margin-bottom: 5px;
    }
}

/* Content Area */
main {
    display: flex;
    margin-top: 40px;
}

.content {
    flex: 2;
    margin-right: 40px;
}

/* Posts */
.post {
    background-color: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s;
}

.post:hover {
    transform: translateY(-3px);
}

.post h2 {
    margin-top: 0;
    margin-bottom: 15px;
}

.post h2 a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 1.8rem;
}

.post h2 a:hover {
    color: var(--color-sand-dark);
}

.post-meta {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--color-sand);
    padding-bottom: 15px;
}

.post-images {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.post-images img {
    flex: 1;
    max-width: calc(50% - 7.5px);
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.post-images img:hover {
    transform: scale(1.02);
}

.read-more {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 15px;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

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

.read-more::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transition: transform 0.3s, background-color 0.3s;
}

.read-more:hover::after {
    transform: scaleX(1);
    background-color: var(--color-sand-dark);
}

/* Sidebar */
.sidebar {
    flex: 1;
}

.sidebar-section {
    background-color: var(--color-sidebar);
    padding: 30px;
    border-radius: 12px;
    color: var(--color-sidebar-text);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.sidebar h3 {
    margin-top: 0;
    color: var(--color-sidebar-title);
    font-size: 1.4rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-sand);
    margin-bottom: 20px;
}

/* Categories List */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 12px;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: white;
    display: flex;
    align-items: center;
    border: 1px solid var(--color-sand);
    position: relative;
}

.categories-list li:hover {
    transform: translateX(5px);
    background-color: var(--color-sand-light);
    border-color: var(--color-accent);
}

.categories-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
    margin-right: 12px;
    transition: transform 0.3s ease;
}

.categories-list li:hover::before {
    transform: scale(1.5);
}

.categories-list a {
    color: var(--color-sidebar-text);
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.category-count {
    background-color: var(--color-sand-light);
    color: var(--color-accent);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    min-width: 25px;
    text-align: center;
}

/* Latest Posts */
.latest-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.latest-posts li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-sand);
    transition: all 0.3s ease;
}

.latest-posts li:last-child {
    border-bottom: none;
}

.latest-posts li:hover {
    padding-left: 8px;
    background-color: var(--color-sand-light);
    border-radius: 4px;
}

.latest-posts a {
    color: var(--color-sidebar-text);
    text-decoration: none;
    display: block;
    position: relative;
    padding-left: 15px;
}

.latest-posts a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.latest-posts li:hover a::before {
    transform: translateY(-50%) scale(1.3);
}

.latest-posts a:hover {
    color: var(--color-accent);
}

/* Contributors */
.contributor {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 4px;
}

.contributor-social {
    display: flex;
    gap: 8px;
    margin-right: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-icon.instagram {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
}

.social-icon.twitter {
    background: #000;
}

.social-icon:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.contributor-info {
    flex: 1;
}

.contributor-info h4 {
    margin: 0;
    font-size: 1em;
    color: #333;
}

.contributor-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.contributor a {
    text-decoration: none;
}

/* Tags do Post */
.post-tags {
    margin: 30px 0;
    padding: 15px;
    background-color: var(--color-sidebar);
    border-radius: 8px;
    line-height: 2;
}

.tags-title {
    font-weight: bold;
    color: var(--color-accent);
    margin-right: 10px;
}

.tag-link {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 5px 5px 0;
    background-color: white;
    border: 1px solid var(--color-sand);
    border-radius: 20px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Tags List na Sidebar */
.tags-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-list li {
    margin: 0;
}

.tags-list a {
    display: inline-block;
    padding: 6px 12px;
    background-color: white;
    border: 1px solid var(--color-sand);
    border-radius: 20px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.tags-list a:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tag-count {
    font-size: 0.8em;
    color: #666;
    margin-left: 4px;
}

/* Nuvem de Tags */
.tags-cloud {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-cloud li {
    margin: 0;
}

.tag-cloud-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: white;
    border: 1px solid var(--color-sand);
    border-radius: 20px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.tag-cloud-link:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tag-cloud-link .tag-count {
    margin-left: 5px;
    font-size: 0.8em;
    color: #777;
}

/* Footer */
footer {
    background-color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.pagination a {
    background-color: var(--color-accent);
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pagination a:hover {
    background-color: var(--color-sand-dark);
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }

    nav ul {
        margin-top: 20px;
    }

    main {
        flex-direction: column;
    }

    .content {
        margin-right: 0;
        margin-bottom: 40px;
    }

    .post-images {
        flex-direction: column;
    }

    .post-images img {
        max-width: 100%;
    }
}

/* Comentários */
.comments-area {
    margin-top: 40px;
    padding: 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
}

.comments-title {
    color: var(--color-accent);
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-sand);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    margin-bottom: 25px;
    padding: 20px;
    background-color: var(--color-sidebar);
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

/* Escondendo o avatar em todos os casos */
.comment-author .avatar,
.comment-author img,
.avatar {
    display: none !important;
}

/* Estilo moderno para os comentários */
.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--color-sand);
    padding-bottom: 10px;
}

.comment-author-name {
    font-weight: bold;
    color: var(--color-accent);
    font-size: 1.1rem;
}

.comment-date-time {
    font-size: 0.85rem;
    color: #777;
}

.comment-content {
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: 15px;
}

.comment-content p {
    margin-top: 0;
    margin-bottom: 1em;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-actions {
    text-align: right;
}

.comment-actions a {
    display: inline-block;
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(176, 137, 104, 0.1);
    transition: all 0.2s ease;
}

.comment-actions a:hover {
    background-color: rgba(176, 137, 104, 0.2);
    color: var(--color-sand-dark);
}

.comment-metadata {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

.comment-metadata a {
    color: #666;
    text-decoration: none;
}

.comment-metadata a:hover {
    color: var(--color-accent);
}

.comment-content {
    line-height: 1.6;
}

.reply {
    margin-top: 10px;
}

.reply a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.reply a:hover {
    text-decoration: underline;
}

/* Botão de Like */
.like-button-container {
    margin: 30px 0 20px;
    text-align: center;
}

.like-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
}

.like-button:hover {
    background-color: var(--color-accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.like-button.liked {
    background-color: var(--color-accent);
    color: white;
}

.like-button i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.like-button.processing {
    opacity: 0.7;
    pointer-events: none;
}

/* Botões de compartilhamento */
.share-buttons {
    margin: 20px 0 30px;
    padding: 20px;
    background-color: var(--color-sidebar);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.share-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--color-accent);
    font-size: 1.2rem;
    font-weight: bold;
}

.share-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.share-facebook {
    background-color: #3b5998;
}

.share-twitter {
    background-color: #1da1f2;
}

.share-whatsapp {
    background-color: #25d366;
}

.share-telegram {
    background-color: #0088cc;
}

.share-email {
    background-color: #777;
}

/* Formulário de comentários */
.comment-respond {
    margin-top: 30px;
    padding: 25px;
    background-color: var(--color-sidebar);
    border-radius: 8px;
}

.comment-reply-title {
    color: var(--color-accent);
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 20px;
}

.comment-form p {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--color-text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-sand);
    border-radius: 4px;
    background-color: white;
    font-family: 'Merriweather', serif;
    transition: border-color 0.3s;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.comment-form textarea {
    min-height: 150px;
}

.comment-form .form-submit {
    margin-top: 20px;
    margin-bottom: 0;
}

.comment-form input[type="submit"] {
    background-color: var(--color-accent);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.comment-form input[type="submit"]:hover {
    background-color: var(--color-sand-dark);
}

.comment-notes {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.required {
    color: #e03131;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
}

.comment-form-cookies-consent input {
    margin-right: 10px;
}

.comment-form-cookies-consent label {
    display: inline;
    margin-bottom: 0;
    font-weight: normal;
}
