/* 
   Random Thoughts Blog - Main Stylesheet
   Modern, responsive design for Tony Johnson's blog
*/

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

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

.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-branding h1 {
    font-size: 2rem;
    margin: 0;
    color: white;
}

.site-branding .tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.site-nav a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.site-nav a:hover,
.site-nav a.active {
    background-color: rgba(255,255,255,0.2);
    text-decoration: none;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .site-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Main Content Area */
.content-area {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* Post Listings */
.post-grid {
    display: grid;
    gap: 2rem;
    padding: 2rem;
}

.post-card {
    border-bottom: 1px solid #eee;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.post-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.post-header {
    margin-bottom: 1rem;
}

.post-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.post-title a {
    color: #2c3e50;
    text-decoration: none;
}

.post-title a:hover {
    color: #3498db;
}

.post-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-meta span {
    margin-right: 1rem;
}

.post-meta .date:before {
    content: "📅 ";
}

.post-meta .reading-time:before {
    content: "⏱️ ";
}

.post-meta .categories:before {
    content: "📂 ";
}

.post-excerpt {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background: #2980b9;
    text-decoration: none;
}

/* Single Post */
.single-post {
    padding: 2rem;
}

.single-post .post-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.single-post .post-meta {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.post-content {
    line-height: 1.8;
    color: #444;
}

.post-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.post-content p {
    margin-bottom: 1.2rem;
}

.post-content blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0 5px 5px 0;
}

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

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1rem 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.widget h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #555;
    display: block;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: #3498db;
    text-decoration: none;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
    background: #2980b9;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

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

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    color: #555;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination .current {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.site-footer p {
    margin: 0;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .main-content {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .post-title {
        font-size: 1.5rem;
    }
    
    .single-post .post-title {
        font-size: 1.8rem;
    }
    
    .post-grid,
    .single-post {
        padding: 1.5rem;
    }
    
    .widget {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .site-header {
        text-align: center;
    }
    
    .site-branding h1 {
        font-size: 1.8rem;
    }
    
    .post-grid,
    .single-post {
        padding: 1rem;
    }
    
    .social-links {
        flex-wrap: wrap;
    }
}

/* Category styling */
.category-link {
    background: #3498db;
    color: white !important;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    text-decoration: none !important;
    display: inline-block;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    transition: background-color 0.3s ease;
}

.category-link:hover {
    background: #2980b9;
    color: white !important;
    text-decoration: none !important;
}

.post-meta .categories .category-link {
    margin-left: 0.25rem;
}

.single-post .category-link {
    margin-right: 0.5rem;
}
@media print {
    .site-header,
    .sidebar,
    .site-footer,
    .read-more,
    .pagination {
        display: none;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .content-area {
        box-shadow: none;
    }
}
/* hCaptcha Styling */
.h-captcha {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    min-height: 78px; /* Prevent layout shift */
}

.form-group .h-captcha {
    margin: 0.5rem 0 1rem 0;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .h-captcha {
        transform: scale(0.85);
        transform-origin: center;
        margin: 0.5rem 0;
    }
}

/* Ensure captcha loads properly */
.h-captcha iframe {
    border-radius: 4px;
}