/* ================================================
   MAKEIT BLOG — CSS (Inspired by enriquedans.com)
   ================================================ */

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

html { scroll-behavior: smooth; }

body {
    font-family: "Merriweather", Georgia, serif;
    color: #333;
    background: #f8f8f8;
    line-height: 1.8;
    font-size: 16px;
}

a { color: #0258FC; text-decoration: none; transition: color 0.2s; }
a:hover { color: #1a1a2e; }

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


/* ================================================
   HEADER
   ================================================ */
.blog-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 3px solid #0e1872;
    padding: 0 2rem;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

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

.blog-nav {
    display: flex;
    gap: 2rem;
}

.blog-nav a {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.blog-nav a:hover,
.blog-nav a.active {
    color: #0e1872;
    border-bottom-color: #0258FC;
}


/* ================================================
   BLOG HERO
   ================================================ */
.blog-hero {
    background: linear-gradient(135deg, #0e1872 0%, #1a237e 50%, #0258FC 100%);
    padding: 50px 2rem;
    text-align: center;
}

.blog-hero-inner {
    max-width: 700px;
    margin: 0 auto;
}

.blog-hero h1 {
    font-family: "Merriweather", serif;
    font-weight: 900;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.blog-tagline {
    font-family: "Source Sans 3", sans-serif;
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    font-weight: 300;
}


/* ================================================
   AI CONTROL PANEL
   ================================================ */
.ai-panel {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 2rem;
}

.ai-panel-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ai-panel-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-badge {
    background: linear-gradient(135deg, #0258FC, #7c3aed);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ai-info {
    font-family: "Source Sans 3", sans-serif;
    color: #777;
    font-size: 0.85rem;
}

.ai-panel-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topic-select {
    font-family: "Source Sans 3", sans-serif;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #333;
    background: #fff;
    cursor: pointer;
    min-width: 180px;
}

.topic-select:focus {
    outline: none;
    border-color: #0258FC;
    box-shadow: 0 0 0 3px rgba(2, 88, 252, 0.15);
}

.generate-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #0258FC, #2570FF);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(2, 88, 252, 0.3);
    white-space: nowrap;
}

.generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(2, 88, 252, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.generate-btn.loading .btn-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-icon {
    font-size: 1.1rem;
    display: inline-block;
}

/* Status Bar */
.ai-status {
    max-width: 1100px;
    margin: 12px auto 0;
    padding: 12px 18px;
    border-radius: 8px;
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: all 0.3s;
}

.ai-status.hidden { display: none; }

.ai-status.success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

.ai-status.error {
    background: #fce4ec;
    border: 1px solid #ef9a9a;
    color: #c62828;
}

.ai-status.info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #1565c0;
}


/* ================================================
   MAIN LAYOUT — enriquedans.com style
   ================================================ */
.blog-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 2rem;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}


/* ================================================
   ARTICLE CARDS
   ================================================ */
.article-card {
    background: #fff;
    margin-bottom: 32px;
    border-bottom: 1px solid #eee;
    padding-bottom: 32px;
    animation: fadeInUp 0.5s ease;
}

.article-card:last-child {
    border-bottom: none;
}

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

.article-category {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0258FC;
    margin-bottom: 8px;
    display: inline-block;
}

.article-title {
    font-family: "Merriweather", serif;
    font-weight: 900;
    font-size: 1.6rem;
    line-height: 1.3;
    color: #1a1a2e;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.article-title a {
    color: #1a1a2e;
    transition: color 0.2s;
}

.article-title a:hover {
    color: #0258FC;
}

.article-meta {
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.article-excerpt {
    font-size: 1rem;
    line-height: 1.85;
    color: #444;
    margin-bottom: 16px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tag {
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0258FC;
    background: rgba(2, 88, 252, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.2s;
}

.article-tag:hover {
    background: rgba(2, 88, 252, 0.18);
    color: #0e1872;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.read-more {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #0258FC;
    display: flex;
    align-items: center;
    gap: 6px;
}

.read-more:hover { color: #0e1872; }


/* ================================================
   EMPTY STATE
   ================================================ */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    color: #555;
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.empty-state p {
    font-family: "Source Sans 3", sans-serif;
    color: #888;
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto 8px;
    line-height: 1.6;
}

.empty-note {
    font-size: 0.85rem !important;
    color: #aaa !important;
    font-style: italic;
}


/* ================================================
   LOADING SKELETON
   ================================================ */
.skeleton-card {
    background: #fff;
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 8px;
    display: flex;
    gap: 20px;
}

.skeleton-img {
    width: 200px;
    height: 140px;
    background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
    flex-shrink: 0;
}

.skeleton-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.w100 { width: 100%; }
.w90 { width: 90%; }
.w80 { width: 80%; }
.w70 { width: 70%; }
.w60 { width: 60%; }

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}


/* ================================================
   SIDEBAR
   ================================================ */
.blog-sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-widget {
    background: #fff;
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.sidebar-widget h3 {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a1a2e;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0258FC;
}

.sidebar-widget p {
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

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

.category-list li {
    margin-bottom: 6px;
}

.category-list a {
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.9rem;
    color: #555;
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.category-list a:hover {
    background: rgba(2, 88, 252, 0.06);
    color: #0258FC;
}

.schedule-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f5f7ff;
    border-radius: 8px;
}

.schedule-icon {
    font-size: 1.3rem;
}

.schedule-row div {
    display: flex;
    flex-direction: column;
}

.schedule-row strong {
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.85rem;
    color: #333;
}

.schedule-row span {
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.8rem;
    color: #888;
}

.last-run {
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 12px;
    text-align: center;
    font-style: italic;
}

.sidebar-cta {
    background: linear-gradient(135deg, #0e1872, #0258FC) !important;
    border: none !important;
}

.sidebar-cta h3 {
    color: #fff !important;
    border-bottom-color: rgba(255,255,255,0.3) !important;
}

.sidebar-cta p {
    color: rgba(255,255,255,0.8) !important;
}

.sidebar-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 22px;
    background: #fff;
    color: #0e1872;
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.2s;
}

.sidebar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: #0e1872;
}


/* ================================================
   FOOTER
   ================================================ */
.blog-footer {
    text-align: center;
    padding: 30px 2rem;
    background: #1a1a2e;
    color: #888;
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.85rem;
}


/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 900px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    .blog-sidebar {
        position: static;
    }
    .ai-panel-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .ai-panel-right {
        width: 100%;
        flex-wrap: wrap;
    }
    .topic-select { flex: 1; min-width: 150px; }
    .generate-btn { flex: 1; justify-content: center; }
}

@media (max-width: 600px) {
    .blog-hero h1 { font-size: 1.8rem; }
    .article-title { font-size: 1.3rem; }
    .header-inner { padding: 0 1rem; }
    .blog-nav { gap: 1rem; }
    .blog-nav a { font-size: 0.8rem; }
    .article-image { height: 200px; }
}

.hidden { display: none !important; }
