/* ══════════════════════════════════════════════════════════
   CADEM ONGD Blog - Design Moderne
   ═══════════════════════════════════════════════════════════ */

:root {
    --primary: #0d7c66;
    --primary-dark: #0a6352;
    --primary-light: #3DDBB5;
    --accent: #f4a261;
    --accent-dark: #e76f51;
    --bg: #f0f7f5;
    --bg-card: #ffffff;
    --text: #1a2e28;
    --text-light: #506860;
    --text-muted: #8a9f97;
    --border: #c5d8d0;
    --shadow: 0 4px 20px rgba(13, 124, 102, 0.08);
    --shadow-hover: 0 8px 30px rgba(13, 124, 102, 0.15);
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ═══ HEADER ═══ */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo svg {
    width: 40px;
    height: 40px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--primary);
    color: white;
}

.nav-cta {
    background: var(--accent) !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: var(--radius) !important;
    font-weight: 600 !important;
}

.nav-cta:hover {
    background: var(--accent-dark) !important;
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: var(--transition);
}

/* ═══ HERO ═══ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="3" fill="white" opacity="0.1"/><circle cx="40" cy="80" r="2" fill="white" opacity="0.1"/></svg>');
    opacity: 0.3;
}

.hero .container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* ═══ SEARCH ═══ */
.search-section {
    padding: 2rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

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

.search-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 124, 102, 0.1);
}

.search-form button {
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.search-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ═══ MAIN LAYOUT ═══ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    padding: 3rem 0;
}

/* ══ POST CARDS ═══ */
.posts-grid {
    display: grid;
    gap: 2rem;
}

.post-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.post-card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.placeholder-icon {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.post-card-body {
    padding: 1.5rem;
}

.post-card-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-card-body h2 a {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.post-card-body h2 a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.post-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.read-more {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    transition: var(--transition);
}

.read-more:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

/* ═══ SIDEBAR ═══ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

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

.sidebar-list li {
    margin-bottom: 0.75rem;
}

.sidebar-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-list a:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

.count {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-recent-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-recent-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-recent-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg);
}

.sidebar-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-recent-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sidebar-recent-info h4 a {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-recent-info h4 a:hover {
    color: var(--primary);
}

.sidebar-recent-info .date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.visit-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
}

.visit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ═══ ARTICLE PAGE ═══ */
.article-header {
    padding: 3rem 0;
    text-align: center;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.article-meta span {
    background: var(--bg);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    color: var(--text-light);
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--primary);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 2rem 0;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin: 2rem 0;
}

.cta-box a {
    color: white;
    font-weight: 600;
    text-decoration: none;
    padding: 1rem 2rem;
    background: var(--accent);
    border-radius: var(--radius);
    display: inline-block;
    margin-top: 1rem;
    transition: var(--transition);
}

.cta-box a:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* ═══ SHARE BAR ═══ */
.share-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.share-bar span {
    font-weight: 600;
    color: var(--text);
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn.facebook {
    background: #1877F2;
    color: white;
}

.share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.share-btn.copy-link {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ══ RELATED POSTS ═══ */
.related-posts {
    padding: 3rem 0;
}

.related-posts h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.related-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.related-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-card h4 a {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.related-card h4 a:hover {
    color: var(--primary);
}

.related-card .date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ═══ PAGE HEADER ═══ */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ═══ PAGINATION ═══ */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ═══ NO RESULTS ═══ */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.no-results .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.no-results p {
    color: var(--text-light);
}

/* ═══ FOOTER ═══ */
.footer {
    background: var(--text);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

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

.footer h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.footer p {
    opacity: 0.8;
    line-height: 1.6;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer ul a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer ul a:hover {
    opacity: 1;
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ═══ BACK TO TOP ═══ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(13, 124, 102, 0.3);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 968px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .share-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .share-btn {
        text-align: center;
    }
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card,
.sidebar-widget {
    animation: fadeInUp 0.6s ease-out;
}