/* ============================================
   Crescer Junto - Portal Stylesheet
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    background: #f4f6f8;
}

a { color: #0f4c81; text-decoration: none; }
a:hover { color: #1a7a5c; }

img { max-width: 100%; height: auto; }

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

/* ============ HEADER ============ */
.site-header {
    background: linear-gradient(135deg, #0f4c81, #1a7a5c);
    color: #fff;
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBg 20s linear infinite;
}

@keyframes moveBg {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 15px;
}

.logo a {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.8;
    display: block;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.main-nav a {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
}

.search-toggle {
    background: none;
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.search-toggle:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
}

/* Search Bar */
.search-bar {
    background: #fff;
    padding: 15px 0;
    display: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.search-bar.active {
    display: block;
}

.search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
}

.search-form input:focus {
    border-color: #0f4c81;
}

.search-form button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #0f4c81, #1a7a5c);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(15,76,129,0.3);
}

/* ============ HERO ============ */
.hero {
    background: linear-gradient(135deg, #0f4c81, #1a7a5c);
    color: #fff;
    padding: 60px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: moveBg 25s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto 25px;
}

.hero-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.hero-categories a {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.hero-categories a:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* ============ MAIN CONTENT ============ */
.main-content {
    padding: 40px 0;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

@media (max-width: 900px) {
    .content-area {
        grid-template-columns: 1fr;
    }
}

/* ============ POST GRID ============ */
.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f4c81;
    margin-bottom: 10px;
}

.page-subtitle {
    color: #777;
    margin-bottom: 30px;
    font-size: 1rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #e8ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 3rem;
}

.post-card-body {
    padding: 20px;
}

.post-card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.post-card-cats a {
    display: inline-block;
    padding: 3px 12px;
    background: #e8f0fe;
    color: #0f4c81;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s;
}

.post-card-cats a:hover {
    background: #0f4c81;
    color: #fff;
}

.post-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-card-title a {
    color: #222;
}

.post-card-title a:hover {
    color: #0f4c81;
}

.post-card-meta {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 10px;
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* ============ SINGLE POST ============ */
.single-post-header {
    margin-bottom: 30px;
}

.single-post-header .post-cats {
    margin-bottom: 12px;
}

.single-post-header .post-cats a {
    display: inline-block;
    padding: 5px 16px;
    background: #e8f0fe;
    color: #0f4c81;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 6px;
    margin-bottom: 6px;
}

.single-post-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f4c81;
    line-height: 1.3;
    margin-bottom: 15px;
}

.single-post-meta {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.single-post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
}

.single-post-content p {
    margin-bottom: 20px;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    color: #0f4c81;
    margin-top: 30px;
    margin-bottom: 15px;
}

.single-post-content h2 { font-size: 1.5rem; }
.single-post-content h3 { font-size: 1.25rem; }

.single-post-content ul,
.single-post-content ol {
    margin: 0 0 20px 25px;
}

.single-post-content li {
    margin-bottom: 8px;
}

.single-post-content blockquote {
    border-left: 4px solid #1a7a5c;
    padding: 15px 20px;
    margin: 20px 0;
    background: #f8f9fa;
    font-style: italic;
    color: #555;
}

.single-post-content img {
    border-radius: 8px;
    margin: 20px 0;
}

.single-post-content a {
    color: #0f4c81;
    text-decoration: underline;
}

.single-post-content iframe {
    max-width: 100%;
    border-radius: 8px;
}

.post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.post-tags span {
    font-weight: 700;
    color: #555;
    margin-right: 8px;
}

.post-tags a {
    display: inline-block;
    padding: 4px 14px;
    background: #f0f0f0;
    color: #666;
    border-radius: 50px;
    font-size: 0.85rem;
    margin: 3px;
    transition: all 0.3s;
}

.post-tags a:hover {
    background: #0f4c81;
    color: #fff;
}

/* ============ PAGINATION ============ */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.pagination a {
    background: #fff;
    color: #0f4c81;
    border: 2px solid #e0e0e0;
}

.pagination a:hover {
    border-color: #0f4c81;
    background: #e8f0fe;
}

.pagination .current {
    background: #0f4c81;
    color: #fff;
    border: 2px solid #0f4c81;
}

.pagination .dots {
    background: transparent;
    border: none;
    color: #999;
}

/* ============ SIDEBAR ============ */
.sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f4c81;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #e8f0fe;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget ul li {
    margin-bottom: 8px;
}

.sidebar-widget ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: #555;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
}

.sidebar-widget ul li a:hover {
    color: #0f4c81;
    padding-left: 5px;
}

.sidebar-widget ul li a span {
    background: #e8f0fe;
    color: #0f4c81;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-cloud a {
    display: inline-block;
    padding: 5px 14px;
    background: #f0f0f0;
    color: #666;
    border-radius: 50px;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.tag-cloud a:hover {
    background: #0f4c81;
    color: #fff;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-results h2 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 15px;
}

/* ============ PAGE ============ */
.page-content {
    background: #fff;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.page-content h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f4c81;
    margin-bottom: 20px;
}

.page-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

/* ============ FOOTER ============ */
.site-footer {
    background: #1a1a2e;
    color: #aaa;
    padding: 40px 0 30px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #aaa;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #2a2a3e;
    font-size: 0.85rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul {
        justify-content: center;
        gap: 15px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

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

    .single-post-header h1 {
        font-size: 1.5rem;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form button {
        width: 100%;
    }
}
