/* Estilos Gerais */
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
    overflow-y: auto;
    transition: background-color 0.3s, color 0.3s;
}

:root {
    --background-color: #0d1117;
    --text-color: #c9d1d9;
    --header-bg: #161b22;
    --header-border: #30363d;
    --post-bg: #161b22;
    --link-hover: #f8f0ba;
    
    /* Nova Paleta de Gradiente */
    --gradient-main: linear-gradient(70deg, #c2903d, #eccf7a);
    --gradient-accent-color: #c2903d;
}

body.light-theme {
    --background-color: #fdfdfd;
    --text-color: #333;
    --header-bg: #fff;
    --header-border: #eee;
    --post-bg: #f8f9fa;
    --link-hover: #c2903d;
}

/* Classe Mágica para Texto em Gradiente */
.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}


/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo .logo-light {
    display: none;
}

body.light-theme .logo .logo-light {
    display: block;
}

body.light-theme .logo .logo-dark {
    display: none;
}

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

.main-nav a {
    color: #000;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--gradient-accent-color);
    border-radius: 25px;
    transition: all 0.4s ease;
    background: var(--gradient-main);
    background-size: 200% auto;
}

.main-nav a:hover {
    background-position: right center;
    box-shadow: 0 0 20px #c2903d;
    color: #000;
}

.header-right-panel {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Theme Switcher */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}
.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
}
.theme-switch input {
    display:none;
}
.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}
.slider:before {
    background-color: #fff;
    bottom: 2px;
    content: "";
    height: 20px;
    left: 2px;
    position: absolute;
    transition: .4s;
    width: 20px;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #2b2b2b;
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.slider svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #fff;
}

/* Overlay de Conteúdo */
#content-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

/* Carousel Container */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 3rem;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.carousel-item {
    min-width: 100%;
    position: relative;
    display: none;
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}

.carousel-item img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 20%, transparent);
    color: #fff;
    padding: 4rem 2rem 2rem;
    text-align: left;
}

.carousel-caption h2 {
    font-size: 3rem;
    margin: 0 0 0.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.carousel-caption p {
    font-size: 1.2rem;
}

/* Prev/Next Buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 1rem;
    color: white;
    transition: 0.3s ease;
    border-radius: 50%;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev {
    left: 1rem;
}

.next {
    right: 1rem;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.6);
}

.prev svg, .next svg {
    width: 32px;
    height: 32px;
}



/* Search Bar */
.search-container {
    width: 100%;
    max-width: 800px;
    margin-bottom: 2.5rem;
}

#search-bar {
    width: 100%;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    border-radius: 25px;
    border: 2px solid var(--header-border);
    background-color: var(--header-bg);
    color: var(--text-color);
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

#search-bar:focus {
    border-color: var(--gradient-accent-color);
}

/* Seção de Posts */
#blog-posts {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

/* Estilo dos Cards de Post */
.post-card {
    background-color: var(--post-bg);
    border-radius: 15px;
    overflow: hidden; /* Garante que a imagem não ultrapasse as bordas arredondadas */
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid var(--header-border);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.post-card-image {
    width: 100%;
    height: 350px; /* Altura fixa para a imagem */
    object-fit: cover; /* Garante que a imagem cubra o espaço sem distorcer */
    display: block;
}

.post-card-content {
    padding: 1.5rem 2rem;
}

.post-card h2 {
    color: var(--text-color);
    margin-top: 0;
    font-size: 1.8rem;
}

.post-card .meta {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 1rem;
    font-style: italic;
}

.post-card p {
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--gradient-accent-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

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

/* Footer */
footer {
    margin-top: 4rem;
    padding: 1rem;
    color: #888;
    font-size: 0.9rem;
    text-align: center;
}

/* Paginação */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-controls button {
    color: #000;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--gradient-accent-color);
    border-radius: 25px;
    transition: all 0.4s ease;
    background: var(--gradient-main);
    background-size: 200% auto;
    cursor: pointer;
}

.pagination-controls button:hover {
    background-position: right center;
    box-shadow: 0 0 20px var(--gradient-accent-color);
    color: #000;
}

.pagination-controls button:disabled {
    background: #30363d;
    color: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
    border-color: #30363d;
}

#page-info {
    font-weight: 600;
}

/* --- NOVOS ESTILOS PARA A PÁGINA INICIAL --- */

.home-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.home-hero {
    padding: 4rem 1rem;
}

.home-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.home-hero p {
    font-size: 1.2rem;
    color: #8b949e;
    max-width: 650px;
    margin: 0 auto;
}

body.light-theme .home-hero p {
    color: #555;
}

.home-cta-container {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    justify-content: center;
}

.home-cta-card {
    background-color: var(--post-bg);
    border: 1px solid var(--header-border);
    border-radius: 15px;
    padding: 2.5rem;
    width: 40%;
    max-width: 400px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-cta-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.home-cta-card .card-icon {
    margin-bottom: 1.5rem;
    font-size: 48px; /* Tamanho do ícone */
    color: var(--gradient-accent-color);
}

.home-cta-card h2 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.home-cta-card p {
    line-height: 1.6;
    flex-grow: 1; /* Faz o parágrafo ocupar o espaço para alinhar os botões */
}

.cta-button {
    display: inline-block;
    color: #000;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.8rem 1.8rem;
    border: 1px solid var(--gradient-accent-color);
    border-radius: 25px;
    transition: all 0.4s ease;
    background: var(--gradient-main);
    background-size: 200% auto;
    margin-top: 1.5rem;
}

.cta-button:hover {
    background-position: right center;
    box-shadow: 0 0 20px var(--gradient-accent-color);
    color: #000;
}

.home-about {
    margin-top: 6rem;
    padding: 3rem 1rem;
    background-color: var(--post-bg);
    border-radius: 15px;
    border: 1px solid var(--header-border);
}

.home-about h3 {
    font-size: 1.5rem;
    margin-top: 0;
}

.home-about p {
    line-height: 1.7;
    color: #8b949e;
}

body.light-theme .home-about p {
    color: #555;
}

.cta-button-outline {
    display: inline-block;
    color: var(--gradient-accent-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.8rem 1.8rem;
    border: 1px solid var(--gradient-accent-color);
    border-radius: 25px;
    transition: all 0.3s ease;
    background: transparent;
    margin-top: 1rem;
}

.cta-button-outline:hover {
    background: var(--gradient-main);
    color: #000;
}


/* Responsividade */
@media (max-width: 900px) {
    .home-hero h1 {
        font-size: 2.8rem;
    }
    .home-cta-container {
        flex-direction: column;
        align-items: center;
    }
    .home-cta-card {
        width: 80%;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .home-hero h1 {
        font-size: 2.2rem;
    }
    .home-hero p {
        font-size: 1rem;
    }
    .home-cta-card {
        width: 100%;
        padding: 2rem;
    }
}