/* ========================================
   Insightinfo - Global Styles (Optimized)
   ======================================== */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent-color: #ff6b35;
    --primary-color: var(--accent-color);
    --primary-hover: #e85a2a;
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    min-height: 100vh;
    font-size: 1rem;
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

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

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary-color), #ff8f65);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.4rem;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.nav {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.nav a {
    text-decoration: none;
    color: var(--text-medium);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 1rem;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    border: 1px solid transparent;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    background: var(--white);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 200px;
    font-size: 1rem;
    color: var(--text-dark);
}

.search-box input::placeholder {
    color: var(--text-light);
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-box button:hover {
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========================================
   Main Content Container
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 3rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3.5rem;
    padding: 0 1rem;
}

.page-header .site-tagline {
    font-size: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    font-weight: 900;
    margin-bottom: 1.5rem;
}

.page-header .site-description {
    color: var(--text-medium);
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 650px;
    margin: 0 auto;
}

/* ========================================
   Article Grid Layout
   ======================================== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.article-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 3rem;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.card-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    display: inline-block;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.9rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.9rem;
    width: fit-content;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.9rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.card-excerpt {
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #eee;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    padding: 0.85rem 1.75rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    width: fit-content;
    margin-top: auto;
}

.read-more-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* ========================================
   Category Page Filter
   ======================================== */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    border: 2px solid #eee;
    color: var(--text-medium);
    padding: 0.7rem 1.75rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255, 107, 53, 0.05);
}

/* ========================================
   Article Detail Page
   ======================================== */
.article-detail {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.article-hero {
    width: 100%;
    height: 450px;
    object-fit: cover;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    padding: 3.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2.5rem;
}

.article-header .card-category {
    margin-bottom: 1.2rem;
}

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

.article-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: var(--text-light);
    font-size: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-medium);
}

.article-content h2 {
    color: var(--text-dark);
    font-size: 1.75rem;
    margin: 2.5rem 0 1.2rem;
}

.article-content h3 {
    color: var(--text-dark);
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
}

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

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.8rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-medium);
    font-size: 1.1rem;
}

.article-tags {
    display: flex;
    gap: 0.6rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-light);
    color: var(--text-medium);
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: var(--white);
}

.share-section {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid #eee;
}

.share-section h4 {
    margin-bottom: 1.2rem;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}
.share-btn.facebook {
    background: #4267b2;
    color: white;
}
.share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.share-btn:hover {
    opacity: 0.9;
    transform: translateY(-3px);
}

/* ========================================
   Static Pages (About, Privacy)
   ======================================== */
.static-content {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 3.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.static-content h1 {
    font-size: 2.25rem;
    color: var(--text-dark);
    margin-bottom: 1.75rem;
    padding-bottom: 1.2rem;
    border-bottom: 3px solid var(--primary-color);
}

.static-content h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 2.5rem 0 1.2rem;
}

.static-content h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

.static-content p {
    color: var(--text-medium);
    margin-bottom: 1.2rem;
    line-height: 1.85;
    font-size: 1.05rem;
}

.static-content ul,
.static-content ol {
    color: var(--text-medium);
    margin: 1.2rem 0;
    padding-left: 2rem;
}

.static-content li {
    margin-bottom: 0.6rem;
    line-height: 1.7;
}

.static-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.static-content a:hover {
    text-decoration: underline;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3.5rem 3rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    color: var(--white);
}

.footer-section p,
.footer-section a {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.85;
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--primary-color);
}

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

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

.footer-bottom {
    max-width: 1400px;
    margin: 2.5rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid #444;
    text-align: center;
    color: #777;
    font-size: 0.9rem;
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin-top: 3rem;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: var(--white);
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow);
    font-size: 1rem;
}

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

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

/* ========================================
   Back to Top Button
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    width: 55px;
    height: 55px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-hover);
    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-hover);
    transform: translateY(-3px);
}

/* ========================================
   Responsive Design - Large Screens
   ======================================== */
@media (min-width: 1600px) {
    .container,
    .header-content,
    .footer-content {
        max-width: 1600px;
    }
    
    .article-grid {
        gap: 3rem;
    }
    
    .page-header h1 {
        font-size: 3rem;
    }
}

/* ========================================
   Responsive Design - Tablet
   ======================================== */
@media (max-width: 1200px) {
    .container {
        padding: 2rem;
    }
    
    .header-content {
        padding: 1rem 2rem;
    }
    
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Responsive Design - Mobile
   ======================================== */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .header-content {
        padding: 1rem 1.25rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-container {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding-top: 1rem;
    }
    
    .nav-container.active {
        display: flex;
    }
    
    .nav {
        flex-direction: column;
        width: 100%;
    }
    
    .nav a {
        padding: 0.8rem 1rem;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .container {
        padding: 1.5rem 1.25rem;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
    
    .page-header {
        margin-bottom: 2rem;
    }
    
    .page-header .site-tagline {
        font-size: 1.4rem;
        letter-spacing: 0.08em;
        font-weight: 900;
    }
    
    .page-header .site-description {
        font-size: 1rem;
        line-height: 1.6;
    }
    

    
    .card-image {
        height: 200px;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .card-title {
        font-size: 1.15rem;
    }
    
    .article-hero {
        height: 280px;
    }
    
    .article-body {
        padding: 2rem 1.5rem;
    }
    
    .article-header h1 {
        font-size: 1.75rem;
    }
    
    .article-meta {
        flex-wrap: wrap;
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.4rem;
    }
    
    .footer {
        padding: 2.5rem 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-section ul {
        padding: 0;
    }
    
    .static-content {
        padding: 2rem 1.5rem;
    }
    
    .static-content h1 {
        font-size: 1.75rem;
    }
    
    .static-content h2 {
        font-size: 1.3rem;
    }
    
    .category-filter {
        gap: 0.6rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .pagination {
        gap: 0.4rem;
    }
    
    .pagination a {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }
}

/* ========================================
   Responsive Design - Small Mobile
   ======================================== */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .container {
        padding: 1.25rem 1rem;
    }
    

    
    .card-image {
        height: 180px;
    }
    
    .card-content {
        padding: 1.25rem;
    }
    
    .card-title {
        font-size: 1.05rem;
    }
    
    .card-excerpt {
        font-size: 0.9rem;
    }
    
    .read-more-btn {
        padding: 0.7rem 1.4rem;
        font-size: 0.9rem;
    }
    
    .article-hero {
        height: 220px;
    }
    
    .article-body {
        padding: 1.5rem 1.25rem;
    }
    
    .article-header h1 {
        font-size: 1.5rem;
    }
    
    .article-content {
        font-size: 0.95rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        text-align: center;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.loading::after {
    content: '';
    width: 45px;
    height: 45px;
    border: 3px solid #eee;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .header,
    .footer,
    .back-to-top,
    .share-section,
    .pagination {
        display: none;
    }
    
    body {
        background: white;
        font-size: 12pt;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .article-card {
        box-shadow: none;
        break-inside: avoid;
    }
}
