/* ===================================
   Research Pro Theme - Scientific Research Services
   =================================== */

/* Reset & Base */
:root {
    --gh-font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --gh-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --primary: #1a56db;
    --primary-dark: #1e40af;
    --secondary: #0f172a;
    --accent: #06b6d4;
    --text: #334155;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--gh-font-body), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

/* Header */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.site-logo img {
    height: 40px;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.main-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text);
    font-weight: 500;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #1e3a5f 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-title {
    font-family: var(--gh-font-heading), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Services Section */
.services {
    padding: 80px 0;
    background: var(--bg);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 50px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--bg);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.service-icon {
    color: var(--primary);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Advantages Section */
.advantages {
    padding: 80px 0;
    background: var(--bg-light);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.advantage-item {
    padding: 30px;
}

.advantage-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.advantage-item h3 {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.advantage-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Latest Posts */
.latest-posts {
    padding: 80px 0;
    background: var(--bg);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

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

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

.post-image {
    height: 200px;
    overflow: hidden;
}

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

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

.post-content {
    padding: 20px;
}

.post-content time {
    color: var(--text-light);
    font-size: 0.85rem;
}

.post-content h3 {
    margin: 10px 0;
    font-size: 1.1rem;
}

.post-content h3 a {
    color: var(--secondary);
}

.post-content h3 a:hover {
    color: var(--primary);
}

.post-content p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.cta p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.cta .btn {
    background: white;
    color: var(--primary);
}

.cta .btn:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

/* Footer */
.site-footer {
    background: var(--secondary);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.footer-brand p {
    opacity: 0.8;
    font-size: 0.95rem;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    color: white;
    opacity: 0.8;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.footer-contact p {
    opacity: 0.8;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

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

/* Post & Page */
.post-header,
.page-header {
    background: var(--bg-light);
    padding: 60px 0;
    text-align: center;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.post-title,
.page-title {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.post-excerpt {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.post-feature-image {
    max-height: 500px;
    overflow: hidden;
}

.post-feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content,
.page-content {
    max-width: 800px;
    margin: 40px auto;
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content p,
.page-content p {
    margin-bottom: 1.5rem;
}

.post-content h2,
.page-content h2 {
    font-size: 1.75rem;
    color: var(--secondary);
    margin: 2rem 0 1rem;
}

.post-content h3,
.page-content h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin: 1.5rem 0 1rem;
}

.post-content ul,
.post-content ol,
.page-content ul,
.page-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content li,
.page-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote,
.page-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-light);
    font-style: italic;
}

.post-content img,
.page-content img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.post-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.post-tags .tag {
    background: var(--bg-light);
    color: var(--text);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
}

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

.post-share {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.post-share h4 {
    margin-bottom: 15px;
    color: var(--secondary);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-buttons a {
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.share-buttons a:hover {
    background: var(--primary-dark);
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
    .services-grid,
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }

    .main-nav.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .services-grid,
    .advantages-grid,
    .posts-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .post-title,
    .page-title {
        font-size: 1.75rem;
    }
}

/* Ghost Editor Cards - Wide & Full Width */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    max-width: 100%;
    margin: auto calc(50% - 42.5vw);
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
}

.kg-card figcaption {
    padding: 0.75em 1.25em;
    font-size: 0.85em;
    color: var(--text-light);
    text-align: center;
}

/* Bookmark Card */
.kg-bookmark-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: var(--text);
}

.kg-bookmark-content {
    flex: 1;
    padding: 20px;
}

.kg-bookmark-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
}

.kkg-bookmark-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.kg-bookmark-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.kg-bookmark-thumbnail {
    width: 160px;
    min-height: 160px;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gallery Card */
.kg-gallery-container {
    display: flex;
    flex-direction: column;
}

.kg-gallery-row {
    display: flex;
    gap: 8px;
}

.kg-gallery-image {
    flex: 1;
}

.kg-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .kg-width-wide {
        width: 100%;
        margin: 0;
    }

    .kg-bookmark-container {
        flex-direction: column;
    }

    .kg-bookmark-thumbnail {
        width: 100%;
        height: 200px;
    }
}
