/* ===================================
   Church Tech Insider - Main Styles
   Distinctive, professional design for affiliate conversion
   =================================== */

/* CSS Variables for Theme */
:root {
    /* Colors - Warm, trustworthy palette */
    --primary: #D97706;
    --primary-dark: #B45309;
    --primary-light: #FCD34D;
    --secondary: #1E40AF;
    --secondary-dark: #1E3A8A;
    
    --text-dark: #1F2937;
    --text-medium: #4B5563;
    --text-light: #6B7280;
    
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --bg-cream: #FFFBEB;
    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;
    
    --success: #059669;
    --warning: #DC2626;
    
    /* Typography */
    --font-display: 'Bitter', serif;
    --font-body: 'Work Sans', sans-serif;
    
    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px 0;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

/* ===================================
   Reset & Base Styles
   =================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

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

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

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

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================================
   Buttons
   =================================== */

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: var(--transition-medium);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-medium);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-cream);
}

.btn-sticky {
    background: var(--secondary);
    color: white;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
}

.btn-sticky:hover {
    background: var(--secondary-dark);
    color: white;
}

/* ===================================
   Header
   =================================== */

.site-header {
    background: white;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
}

.logo-icon {
    font-size: 28px;
    color: var(--primary);
}

.logo:hover {
    color: var(--text-dark);
}

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

.main-nav a {
    font-weight: 500;
    color: var(--text-medium);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-medium);
}

.main-nav a:hover {
    color: var(--primary);
}

.main-nav a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition-fast);
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-light) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(217, 119, 6, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-medium);
    margin-bottom: 32px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===================================
   Trust Bar
   =================================== */

.trust-bar {
    background: white;
    border-bottom: 1px solid var(--border-light);
    padding: 24px 0;
}

.trust-items {
    display: flex;
    justify-content: space-around;
    gap: 32px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-medium);
}

.trust-icon {
    color: var(--success);
    font-weight: 700;
    font-size: 18px;
}

/* ===================================
   Featured Section
   =================================== */

.featured-section {
    padding: var(--section-padding);
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
    font-size: 2.5rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

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

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

.article-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.article-image {
    position: relative;
    background: var(--bg-cream);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.article-card.featured .article-image {
    aspect-ratio: auto;
}

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

.article-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-badge.coming-soon {
    background: var(--text-light);
}

.article-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 14px;
}

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

.read-time {
    color: var(--text-light);
}

.article-content h3 {
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.article-content h3 a {
    color: var(--text-dark);
}

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

.article-content p {
    color: var(--text-medium);
    margin-bottom: 20px;
    flex: 1;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

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

.read-more:hover {
    color: var(--primary-dark);
}

.updated, .coming-soon-text {
    font-size: 13px;
    color: var(--text-light);
}

/* ===================================
   Categories Section
   =================================== */

.categories-section {
    padding: var(--section-padding);
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--bg-light);
    padding: 32px;
    border-radius: 12px;
    border: 2px solid var(--border-light);
    text-align: center;
    transition: var(--transition-medium);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card:hover {
    border-color: var(--primary);
    background: var(--bg-cream);
    transform: translateY(-2px);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.category-card h3 {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.category-card p {
    color: var(--text-medium);
    font-size: 14px;
    margin-bottom: 12px;
}

.category-count {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
}

/* ===================================
   Newsletter Section
   =================================== */

.newsletter-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    color: white;
    margin-bottom: 16px;
}

.newsletter-content p {
    font-size: 1.1rem;
    margin-bottom: 32px;
    opacity: 0.95;
}

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

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-family: var(--font-body);
}

.newsletter-form button {
    padding: 14px 32px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: var(--bg-cream);
    transform: translateY(-2px);
}

.privacy-note {
    font-size: 13px;
    opacity: 0.8;
}

/* ===================================
   Footer
   =================================== */

.site-footer {
    background: var(--text-dark);
    color: var(--bg-light);
    padding: 60px 0 30px;
}

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

.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-col p {
    color: var(--border-light);
    font-size: 14px;
    line-height: 1.6;
}

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

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--border-light);
    font-size: 14px;
    transition: var(--transition-fast);
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--border-light);
    margin-bottom: 4px;
}

.disclosure-text {
    font-size: 12px;
    opacity: 0.7;
}

/* ===================================
   Email Modal
   =================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    padding: 48px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-lg);
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 32px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-content h2 {
    margin-bottom: 12px;
    font-size: 1.75rem;
}

.modal-content > p {
    color: var(--text-medium);
    margin-bottom: 24px;
}

.email-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.email-form input {
    padding: 14px 20px;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    font-size: 16px;
    font-family: var(--font-body);
    transition: var(--transition-fast);
}

.email-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.email-form button {
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.email-form button:hover {
    background: var(--primary-dark);
}

/* ===================================
   Sticky CTA Bar
   =================================== */

.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid var(--primary);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    padding: 16px 0;
    z-index: 99;
    transition: transform var(--transition-medium);
}

.sticky-cta.hidden {
    transform: translateY(100%);
}

.sticky-cta .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sticky-cta-text {
    font-weight: 600;
    color: var(--text-dark);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .article-card.featured {
        grid-template-columns: 1fr;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
    
    .sticky-cta .container {
        flex-direction: column;
        text-align: center;
    }
    
    .sticky-cta .btn-sticky {
        width: 100%;
    }
    
    .modal-content {
        padding: 32px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .trust-items {
        flex-direction: column;
        gap: 16px;
    }
}
