/* === Variables & Reset === */
:root {
    --primary-color: #10b981;
    --secondary-color: #059669;
    --accent-color: #2563eb;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-color); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--secondary-color); }
img { max-width: 100%; height: auto; }

/* === Layout === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.main-content { min-height: calc(100vh - 160px); padding-top: 80px; }
.text-center { text-align: center; }
.text-light { color: var(--text-light); }

/* === Header === */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: var(--bg-color);
    box-shadow: var(--shadow);
}
.header-container {
    display: flex; align-items: center; justify-content: space-between;
    height: 70px;
}
.header-logo {
    font-size: 1.35rem; font-weight: 700; color: var(--text-color); text-decoration: none;
    transition: transform 0.3s;
}
.header-logo:hover { transform: scale(1.03); color: var(--text-color); }
.header-logo span { color: var(--primary-color); }
.header-nav { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
    color: var(--text-color); font-weight: 500; text-decoration: none;
    transition: color 0.3s; font-size: 0.95rem; background: none; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 0.3rem;
}
.nav-link:hover { color: var(--primary-color); }
.nav-external { font-size: 0.85rem; color: var(--text-light); }
.nav-cta {
    background: var(--primary-color); color: white !important; padding: 0.45rem 1rem;
    border-radius: 6px; font-weight: 500; font-size: 0.9rem;
}
.nav-cta:hover { background: var(--secondary-color); color: white !important; }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background: var(--bg-color); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg); min-width: 200px; padding: 0.5rem 0; z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block; padding: 0.6rem 1.2rem; color: var(--text-color);
    font-size: 0.95rem; transition: background 0.2s;
}
.nav-dropdown-menu a:hover { background: var(--bg-light); color: var(--primary-color); }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
    width: 26px; height: 3px; background: var(--text-color);
    border-radius: 2px; transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* === Hero === */
.hero {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 4rem 0; text-align: center;
}
.hero__title { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.75rem; line-height: 1.1; }
.hero__subtitle { font-size: 1.15rem; color: var(--text-light); max-width: 600px; margin: 0 auto; }

/* === Posts Grid === */
.posts-section { padding: 3rem 0 4rem; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 2.5rem; }

/* === Post Card === */
.post-card {
    background: var(--bg-color); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14); }
.post-card__image-link { display: block; position: relative; overflow: hidden; }
.post-card__image {
    width: 100%; aspect-ratio: 16/9; object-fit: cover;
    transition: transform 0.3s;
}
.post-card:hover .post-card__image { transform: scale(1.03); }
.post-card__image--placeholder {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    aspect-ratio: 16/9;
}
.post-card__badges { position: absolute; top: 0.75rem; left: 0.75rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.post-card__content { padding: 1.5rem; }
.post-card__title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.post-card__title a { color: var(--text-color); }
.post-card__title a:hover { color: var(--primary-color); }
.post-card__excerpt {
    font-size: 0.92rem; color: var(--text-light); line-height: 1.6; margin-bottom: 1rem;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card__meta {
    display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
    font-size: 0.82rem; color: var(--text-light);
}

/* === Category Badge === */
.category-badge {
    display: inline-block; padding: 0.25rem 0.75rem; border-radius: 50px;
    font-size: 0.8rem; font-weight: 600; text-decoration: none;
    transition: opacity 0.3s;
}
.category-badge:hover { opacity: 0.8; }
.category-badge--lg { font-size: 1rem; padding: 0.4rem 1.2rem; }

/* === Article Page === */
.article { padding: 2rem 0 4rem; }
.article-header { max-width: 800px; margin: 0 auto 2rem; text-align: center; }
.article-categories { margin-bottom: 1rem; display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.article-header__title { font-size: 2.4rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.article-meta {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    color: var(--text-light); font-size: 0.95rem; flex-wrap: wrap;
}
.article-featured-image {
    max-width: 900px; margin: 0 auto 2.5rem; border-radius: var(--radius);
    overflow: hidden;
}
.article-featured-image img { width: 100%; max-height: 500px; object-fit: cover; display: block; }

/* === Article Content === */
.article-content {
    max-width: 800px; margin: 0 auto;
    font-size: 1.08rem; line-height: 1.85;
}
.article-content h2 { font-size: 1.6rem; font-weight: 700; margin: 2.5rem 0 1rem; }
.article-content h3 { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.article-content h4 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.article-content p { margin-bottom: 1.5rem; }
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content img { border-radius: var(--radius-sm); margin: 1rem 0; }
.article-content figure { margin: 2rem 0; }
.article-content figcaption { text-align: center; color: var(--text-light); font-size: 0.9rem; margin-top: 0.5rem; }
.article-content .img-stretched img { width: 100%; }
.article-content blockquote {
    border-left: 4px solid var(--primary-color); background: var(--bg-light);
    padding: 1.25rem 1.5rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1.5rem 0; font-style: italic;
}
.article-content blockquote cite { display: block; margin-top: 0.5rem; font-style: normal; color: var(--text-light); font-size: 0.9rem; }
.article-content pre {
    background: #1e293b; color: #e2e8f0; padding: 1.5rem;
    border-radius: var(--radius-sm); overflow-x: auto; margin: 1.5rem 0;
    font-size: 0.9rem; line-height: 1.6;
}
.article-content code { font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace; font-size: 0.9em; }
.article-content p code, .article-content li code {
    background: #f1f5f9; padding: 0.15rem 0.4rem; border-radius: 4px; color: #e11d48;
}
.article-content hr { border: none; border-top: 2px solid var(--border-color); margin: 2.5rem auto; max-width: 100px; }
.article-content .table-responsive { overflow-x: auto; margin: 1.5rem 0; }
.article-content table { width: 100%; border-collapse: collapse; }
.article-content th, .article-content td {
    padding: 0.75rem 1rem; text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.article-content th { background: var(--bg-light); font-weight: 600; }
.article-content tr:hover td { background: var(--bg-light); }
.article-content .alert {
    background: #eff6ff; border-left: 4px solid var(--accent-color);
    padding: 1rem 1.5rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.5rem 0;
}
.article-content .alert strong { display: block; margin-bottom: 0.25rem; color: var(--accent-color); }
.article-content .embed-container {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
    border-radius: var(--radius-sm); margin: 1.5rem 0;
}
.article-content .embed-container iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.article-content .embed-caption { text-align: center; color: var(--text-light); font-size: 0.9rem; }
.article-content .checklist { margin: 1.5rem 0; }
.article-content .checklist-item {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0;
}
.article-content .checklist-item input[type="checkbox"] { accent-color: var(--primary-color); width: 18px; height: 18px; }
.article-content mark { background: #fef08a; padding: 0.1rem 0.2rem; border-radius: 2px; }

/* === Share Buttons === */
.share-buttons {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
    max-width: 800px; margin: 3rem auto; padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.share-label { font-weight: 600; font-size: 0.95rem; }
.share-btn {
    display: inline-block; padding: 0.5rem 1rem; border-radius: 50px;
    font-size: 0.85rem; font-weight: 500; border: 1px solid var(--border-color);
    background: var(--bg-color); color: var(--text-color); cursor: pointer;
    transition: all 0.3s; text-decoration: none;
}
.share-btn:hover { background: var(--bg-light); transform: translateY(-1px); color: var(--text-color); }
.share-btn--whatsapp:hover { border-color: #25d366; color: #25d366; }
.share-btn--linkedin:hover { border-color: #0077b5; color: #0077b5; }
.share-btn--copy.copied { background: var(--primary-color); color: white; border-color: var(--primary-color); }

/* === Post Navigation === */
.post-navigation {
    display: flex; justify-content: space-between; gap: 1rem;
    max-width: 800px; margin: 2rem auto 0; padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.post-nav__link { text-decoration: none; max-width: 45%; }
.post-nav__label { display: block; font-size: 0.82rem; color: var(--text-light); margin-bottom: 0.25rem; }
.post-nav__title { font-weight: 600; color: var(--text-color); transition: color 0.3s; }
.post-nav__link:hover .post-nav__title { color: var(--primary-color); }
.post-nav__link--next { text-align: right; }

/* === Category Header === */
.category-header { margin-bottom: 2rem; }
.category-header p { margin-top: 0.5rem; }

/* === Search === */
.page-section { padding: 3rem 0 4rem; }
.search-form { display: flex; gap: 0.75rem; margin-bottom: 2rem; max-width: 600px; }
.search-input {
    flex: 1; padding: 0.85rem 1.2rem; border: 2px solid var(--border-color);
    border-radius: var(--radius-sm); font-size: 1rem; transition: border-color 0.2s;
}
.search-input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
.search-count { margin-bottom: 1.5rem; font-size: 0.95rem; }
.search-results { display: flex; flex-direction: column; gap: 1.5rem; }
.search-result { padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); }
.search-result h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.search-result h3 a { color: var(--text-color); }
.search-result h3 a:hover { color: var(--primary-color); }
.search-result p { font-size: 0.92rem; color: var(--text-light); margin-bottom: 0.3rem; }
.search-result mark { background: #fef08a; padding: 0.05rem 0.2rem; border-radius: 2px; }

/* === Pagination === */
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 2rem; }
.pagination__link {
    display: flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 0.5rem;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 500; color: var(--text-color);
    transition: all 0.3s; text-decoration: none;
}
.pagination__link:hover { border-color: var(--primary-color); color: var(--primary-color); }
.pagination__link--active { background: var(--primary-color); color: white; border-color: var(--primary-color); }
.pagination__link--active:hover { color: white; }
.pagination__dots { color: var(--text-light); padding: 0 0.25rem; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem; border-radius: var(--radius-sm);
    font-size: 0.95rem; font-weight: 600; border: none; cursor: pointer;
    transition: all 0.3s; text-decoration: none; line-height: 1.4;
}
.btn--primary { background: var(--primary-color); color: white; box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2); }
.btn--primary:hover { background: var(--secondary-color); transform: translateY(-2px); box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3); color: white; }

/* === Legal Pages === */
.legal-page { padding: 3rem 0 4rem; }
.legal-content { max-width: 800px; margin: 0 auto; padding: 0 2rem; }
.legal-content h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 2rem; color: var(--primary-color); }
.legal-content h2 { font-size: 1.4rem; font-weight: 700; margin: 2rem 0 1rem; }
.legal-content p { margin-bottom: 1rem; line-height: 1.8; }
.legal-content ul, .legal-content ol { padding-left: 2rem; margin-bottom: 1rem; }
.legal-content li { margin-bottom: 0.5rem; line-height: 1.8; }
.contact-info { background: var(--bg-light); padding: 1.5rem 2rem; border-radius: var(--radius); margin: 1.5rem 0; }
.contact-info strong { display: block; margin-bottom: 0.5rem; }

/* === Footer === */
.footer { background: var(--text-color); color: white; padding: 3rem 0 1.5rem; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-section h4 { color: var(--primary-color); margin-bottom: 1rem; }
.footer-section p { color: #9ca3af; font-size: 0.95rem; line-height: 1.6; }
.footer-section a { display: block; color: #9ca3af; margin-bottom: 0.5rem; font-size: 0.95rem; transition: color 0.3s; }
.footer-section a:hover { color: white; }
.footer-bottom { border-top: 1px solid #374151; padding-top: 1.5rem; text-align: center; color: #9ca3af; font-size: 0.85rem; }

/* === Responsive === */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .header-nav {
        display: none; position: fixed; top: 70px; left: 0; right: 0;
        background: var(--bg-color); flex-direction: column; padding: 1.5rem 2rem;
        gap: 0; box-shadow: var(--shadow-lg); z-index: 999;
    }
    .header-nav.active { display: flex; }
    .header-nav .nav-link, .header-nav .nav-dropdown { padding: 0.75rem 0; width: 100%; }
    .nav-dropdown-menu { position: static; box-shadow: none; padding-left: 1rem; }
    .nav-dropdown:hover .nav-dropdown-menu { display: none; }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }
    .hero__title { font-size: 1.8rem; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .article-header__title { font-size: 1.8rem; }
    .post-navigation { flex-direction: column; }
    .post-nav__link { max-width: 100%; }
    .container { padding: 0 1.25rem; }
    .main-content { padding-top: 70px; }
}
@media (max-width: 480px) {
    .posts-grid { grid-template-columns: 1fr; }
    .hero { padding: 2.5rem 0; }
    .hero__title { font-size: 1.5rem; }
    .search-form { flex-direction: column; }
    .share-buttons { justify-content: center; }
    .article-header__title { font-size: 1.5rem; }
}
