/* ========================================
   opin.news - Main Stylesheet
   ======================================== */

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

:root {
    --primary-color: #1a1a1a;
    --accent-color: #2563eb;
    --secondary-accent: #0ea5e9;
    --light-gray: #f8f9fa;
    --border-color: #e5e7eb;
    --text-secondary: #6b7280;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--primary-color);
    background-color: #ffffff;
}

/* ========================================
   Scroll Progress Bar (Article Pages)
   ======================================== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-accent));
    z-index: 1001;
    transition: width 0.1s ease;
}

/* ========================================
   Header
   ======================================== */
header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

/* ========================================
   Share Button (Article Pages)
   ======================================== */
.share-container {
    position: relative;
}

.share-button {
    background: var(--light-gray);
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.share-button:hover {
    background: var(--border-color);
}

.share-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: none;
    min-width: 200px;
    z-index: 100;
}

.share-menu.active {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    color: var(--primary-color);
}

.share-option:hover {
    background: var(--light-gray);
}

.share-icon {
    width: 20px;
    height: 20px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.5rem;
    opacity: 0.95;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-cta {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--accent-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

/* ========================================
   Featured Article Section (Homepage)
   ======================================== */
.featured-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.featured-article {
    background: var(--light-gray);
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.featured-content .category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-content h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-content h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.featured-content h3 a:hover {
    color: var(--accent-color);
}

.featured-excerpt {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.meta-separator {
    color: var(--border-color);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.2s ease;
}

.read-more:hover {
    gap: 1rem;
}

.featured-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    border-radius: 12px;
    padding: 3rem;
}

.featured-image svg {
    width: 100%;
    height: auto;
    max-width: 300px;
}

/* ========================================
   Categories Section (Homepage)
   ======================================== */
.categories-section {
    background: var(--light-gray);
    padding: 5rem 0;
}

.categories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: var(--accent-color);
}

.category-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.category-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* ========================================
   About Preview Section (Homepage)
   ======================================== */
.about-preview {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
    text-align: center;
}

.about-preview h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.about-preview p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 2rem;
}

.about-cta {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.about-cta:hover {
    background: var(--secondary-accent);
}

/* ========================================
   Newsletter Section (Homepage)
   ======================================== */
.newsletter-section {
    background: var(--primary-color);
    color: white;
    padding: 5rem 0;
}

.newsletter-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.newsletter-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.newsletter-section p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-form button {
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.newsletter-form button:hover {
    background: var(--secondary-accent);
}

/* ========================================
   Article Container (Article Pages)
   ======================================== */
.article-container {
    max-width: 750px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

/* Category Badge */
.category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-separator {
    color: var(--text-secondary);
}

/* Article Title */
h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Subtitle */
.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 2rem;
}

/* Meta Info */
.meta-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.author {
    font-weight: 600;
    color: var(--primary-color);
}

.date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.reading-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========================================
   Article Content
   ======================================== */
.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content strong {
    font-weight: 600;
    color: var(--primary-color);
}

.article-content em {
    font-style: italic;
}

/* Research Reference Box */
.research-reference {
    background: var(--light-gray);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.research-reference p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.research-reference a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.research-reference a:hover {
    text-decoration: underline;
}

/* Lists */
.article-content ul, .article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Divider */
.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}

/* ========================================
   Content Section (Standard Pages)
   ======================================== */
.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.content h2:first-child {
    margin-top: 0;
}

.content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--primary-color);
}

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

.content li {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

.content strong {
    font-weight: 600;
}

/* ========================================
   Values Grid (About Page)
   ======================================== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.value-card {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.value-card h3 {
    color: var(--accent-color);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    margin-top: 0 !important;
}

.value-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0;
}

/* CTA Section */
.cta-section {
    background: var(--light-gray);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
}

.cta-section h2 {
    margin-top: 0 !important;
    margin-bottom: 1rem;
}

.cta-section p {
    margin-bottom: 2rem;
}

/* ========================================
   Contact Section (Contact Page)
   ======================================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.contact-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.contact-section a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-section a:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-button {
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 100%;
}

.submit-button:hover {
    background: var(--secondary-accent);
}

/* ========================================
   Legal Pages (Privacy, Terms)
   ======================================== */
.page-header {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.legal-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.legal-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

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

.legal-content li {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: var(--primary-color);
    color: #ffffff;
    padding: 3rem 0 1.5rem;
    margin-top: 5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 2;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #ffffff;
}

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

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.25rem;
    }

    .featured-article {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
    }

    .featured-image {
        order: -1;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    /* Article Pages */
    h1 {
        font-size: 1.875rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content p,
    .article-content li {
        font-size: 1.05rem;
    }

    .article-container {
        margin: 2rem auto;
    }

    .header-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .share-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .meta-info {
        font-size: 0.85rem;
    }

    .share-menu {
        right: -1rem;
    }
}
