/* CloudHostReview - Cyan/Teal Theme */
:root {
    --primary: #0891b2;
    --primary-light: #06b6d4;
    --gradient: linear-gradient(135deg, #0891b2, #22d3ee);
    --bg: #0a0f14;
    --bg-card: rgba(255,255,255,0.04);
    --bg-card-hover: rgba(255,255,255,0.07);
    --glass: rgba(255,255,255,0.06);
    --glass-border: rgba(255,255,255,0.1);
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --text-heading: #fafafa;
    --border: rgba(255,255,255,0.08);
    --radius: 12px;
    --max-width: 1200px;
}

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

html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: #67e8f9; }

img { max-width: 100%; height: auto; border-radius: var(--radius); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

.site-header {
    background: rgba(10,15,20,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}
.site-header .container { display: flex; align-items: center; gap: 2rem; }
.logo {
    font-size: 1.4rem; font-weight: 800;
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    white-space: nowrap;
}
.main-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.main-nav a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.main-nav a:hover { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.search-form input {
    background: var(--glass); border: 1px solid var(--glass-border); border-radius: 8px;
    padding: 0.5rem 1rem; color: var(--text); font-size: 0.85rem; width: 180px; outline: none;
}
.search-form input:focus { border-color: var(--primary); }
.mobile-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }

.hero { text-align: center; padding: 4rem 0 2rem; }
.hero h1 {
    font-size: 2.5rem; font-weight: 800;
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-tagline { color: var(--text-muted); font-size: 1.1rem; margin-top: 0.5rem; }

.card {
    background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: var(--radius);
    overflow: hidden; transition: all 0.3s; backdrop-filter: blur(10px);
}
.card:hover {
    background: var(--bg-card-hover); border-color: var(--primary);
    transform: translateY(-2px); box-shadow: 0 8px 30px rgba(8,145,178,0.15);
}
.card img { width: 100%; height: 200px; object-fit: cover; border-radius: 0; }
.card-body { padding: 1.25rem; }
.card h3 { font-size: 1.1rem; color: var(--text-heading); margin-bottom: 0.5rem; line-height: 1.4; }
.card h3 a { color: inherit; }
.card h3 a:hover { color: var(--primary-light); }
.card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.featured-card { display: grid; grid-template-columns: 1fr 1fr; }
.featured-card img { height: 100%; }
.featured-card .card-body { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.featured-card h2 { font-size: 1.5rem; color: var(--text-heading); margin-bottom: 0.75rem; }
.featured-card h2 a { color: inherit; }

.badge {
    display: inline-block; background: var(--gradient); color: #fff;
    font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 4px;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.5rem;
}

.meta { display: flex; gap: 0.75rem; font-size: 0.8rem; color: var(--text-muted); }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 1.5rem; }
.section-title { font-size: 1.5rem; color: var(--text-heading); margin-top: 2rem; }

.pagination { display: flex; justify-content: center; gap: 0.5rem; margin: 3rem 0; }
.pagination a { padding: 0.5rem 1rem; border-radius: 8px; background: var(--glass); border: 1px solid var(--glass-border); color: var(--text); font-size: 0.9rem; }
.pagination a:hover, .pagination a.active { background: var(--gradient); color: #fff; border-color: transparent; }

.article-page { max-width: 800px; padding-top: 2rem; padding-bottom: 3rem; }
.breadcrumbs { display: flex; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumbs a { color: var(--primary-light); }
.breadcrumbs span:last-child { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.article-hero { width: 100%; height: 400px; object-fit: cover; margin-bottom: 2rem; }
.article-page h1 { font-size: 2.2rem; color: var(--text-heading); line-height: 1.3; margin-bottom: 1rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.tag { background: var(--glass); border: 1px solid var(--glass-border); padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.8rem; color: var(--text-muted); }
.tag:hover { border-color: var(--primary); color: var(--primary-light); }

.toc { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem; }
.toc h3 { font-size: 1rem; color: var(--text-heading); margin-bottom: 0.75rem; }
.toc ul { list-style: none; }
.toc li { margin-bottom: 0.4rem; }
.toc li a { color: var(--text-muted); font-size: 0.9rem; }
.toc li a:hover { color: var(--primary-light); }
.toc li.toc-sub { padding-left: 1.25rem; }

.article-content { margin-bottom: 2rem; }
.article-content h2 { font-size: 1.5rem; color: var(--text-heading); margin: 2rem 0 1rem; padding-top: 1rem; }
.article-content h3 { font-size: 1.2rem; color: var(--text-heading); margin: 1.5rem 0 0.75rem; }
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { margin: 1rem 0; padding-left: 1.5rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content blockquote { border-left: 3px solid var(--primary); padding: 1rem 1.5rem; background: var(--glass); border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.article-content th, .article-content td { padding: 0.75rem; border: 1px solid var(--border); text-align: left; }
.article-content th { background: var(--glass); color: var(--text-heading); font-weight: 600; }
.article-content pre { background: rgba(0,0,0,0.3); padding: 1rem; border-radius: var(--radius); overflow-x: auto; margin: 1rem 0; }
.article-content code { font-size: 0.9em; }
.article-content img { margin: 1.5rem 0; }

.share-buttons { display: flex; gap: 1rem; align-items: center; margin: 2rem 0; padding: 1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.share-buttons span { color: var(--text-muted); font-weight: 600; }
.share-buttons a { background: var(--glass); border: 1px solid var(--glass-border); padding: 0.4rem 1rem; border-radius: 8px; font-size: 0.85rem; color: var(--text); }
.share-buttons a:hover { border-color: var(--primary); color: var(--primary-light); }

.cta-box { background: var(--gradient); border-radius: var(--radius); padding: 2rem; text-align: center; margin: 2rem 0; }
.cta-box h3 { color: #fff; font-size: 1.3rem; margin-bottom: 0.5rem; }
.cta-box p { color: rgba(255,255,255,0.9); }

.related-articles { margin-top: 3rem; }
.related-articles h2 { font-size: 1.3rem; color: var(--text-heading); margin-bottom: 1rem; }
.related-articles .article-grid { grid-template-columns: repeat(3, 1fr); }

.search-page-form { display: flex; gap: 0.75rem; margin: 1.5rem 0 2rem; }
.search-page-form input { flex: 1; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 8px; padding: 0.75rem 1rem; color: var(--text); font-size: 1rem; outline: none; }
.search-page-form input:focus { border-color: var(--primary); }
.search-page-form button { background: var(--gradient); color: #fff; border: none; padding: 0.75rem 1.5rem; border-radius: 8px; font-weight: 600; cursor: pointer; }

.page-content { max-width: 800px; padding: 2rem 1.5rem 3rem; }
.page-content h1 { font-size: 2rem; color: var(--text-heading); margin-bottom: 1.5rem; }
.category-desc { color: var(--text-muted); margin-bottom: 1rem; }

.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-grid h4 { color: var(--text-heading); margin-bottom: 0.75rem; }
.footer-grid p { color: var(--text-muted); font-size: 0.9rem; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid a { color: var(--text-muted); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--primary-light); }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }

.admin-login { max-width: 360px; margin: 15vh auto; text-align: center; }
.admin-login h1 { font-size: 1.5rem; color: var(--text-heading); margin-bottom: 1.5rem; }
.admin-login input { width: 100%; padding: 0.75rem; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 8px; color: var(--text); margin-bottom: 1rem; font-size: 1rem; }
.admin-login button { width: 100%; padding: 0.75rem; background: var(--gradient); color: #fff; border: none; border-radius: 8px; font-weight: 600; font-size: 1rem; cursor: pointer; }
.error { color: #ef4444; margin-bottom: 1rem; }

.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.admin-header h1 { font-size: 1.5rem; color: var(--text-heading); }
.admin-header nav { display: flex; gap: 1rem; align-items: center; }
.btn { background: var(--gradient); color: #fff; padding: 0.5rem 1.25rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem; border: none; cursor: pointer; display: inline-block; }
.alert { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3); color: #22c55e; padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1.5rem; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.stat-card h3 { font-size: 1.8rem; color: var(--text-heading); background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card p { color: var(--text-muted); font-size: 0.85rem; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.admin-table th { color: var(--text-heading); font-weight: 600; }
.admin-table td a { margin-right: 0.75rem; }
.status-published { color: #22c55e; }
.status-draft { color: #f59e0b; }
.actions { white-space: nowrap; }

.editor-form { max-width: 900px; }
.form-row { display: flex; gap: 1rem; margin-bottom: 1rem; }
.form-group { flex: 1; }
.form-group.full { flex: 0 0 100%; }
.form-group label { display: block; color: var(--text-heading); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.6rem 0.8rem; background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: 8px; color: var(--text); font-family: inherit; font-size: 0.95rem; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; }

@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-toggle { display: block; }
    .main-nav.active { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(10,15,20,0.95); padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
    .article-grid { grid-template-columns: 1fr; }
    .featured-card { grid-template-columns: 1fr; }
    .featured-card img { height: 220px; }
    .hero h1 { font-size: 1.8rem; }
    .article-page h1 { font-size: 1.6rem; }
    .article-hero { height: 250px; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .related-articles .article-grid { grid-template-columns: 1fr; }
    .search-form input { width: 120px; }
    .site-header .container { flex-wrap: wrap; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .article-grid { grid-template-columns: repeat(2, 1fr); }
}
