/*
Theme Name: Twenty Twenty-Five Child
Template: twentytwentyfive
Description: Custom child theme for ecahill.com - AI and .NET development blog
Author: Elaine Cahill
Version: 1.0.0
Text Domain: twentytwentyfive-child
*/

/* ==========================================================================
   Custom Styles for ecahill.com
   ========================================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Open+Sans:wght@400;600&family=Fira+Code:wght@400;500&display=swap');

/* --------------------------------------------------------------------------
   CSS Custom Properties (Variables)
   -------------------------------------------------------------------------- */
:root {
    --ec-primary: #2563eb;
    --ec-secondary: #7c3aed;
    --ec-accent: #10b981;
    --ec-text: #1f2937;
    --ec-text-light: #6b7280;
    --ec-text-muted: #4b5563;
    --ec-background: #ffffff;
    --ec-light-gray: #f3f4f6;
    --ec-border: #e5e7eb;
    --ec-shadow: rgba(0, 0, 0, 0.1);
    --ec-shadow-hover: rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ec-text);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

code, pre, .wp-block-code {
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */
a {
    color: var(--ec-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--ec-secondary);
}

/* --------------------------------------------------------------------------
   Recent Posts Grid (for shortcode)
   -------------------------------------------------------------------------- */
.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.post-card {
    background: var(--ec-background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--ec-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--ec-shadow-hover);
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card h3 {
    padding: 20px 20px 10px;
    margin: 0;
    font-size: 1.4rem;
}

.post-card h3 a {
    color: var(--ec-text);
    text-decoration: none;
}

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

.post-meta {
    padding: 0 20px;
    font-size: 0.875rem;
    color: var(--ec-text-light);
    margin-bottom: 10px;
}

.post-excerpt {
    padding: 0 20px 15px;
    color: var(--ec-text-muted);
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    padding: 0 20px 20px;
    color: var(--ec-primary);
    font-weight: 600;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Reading Time Display
   -------------------------------------------------------------------------- */
.reading-time {
    color: var(--ec-text-light);
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Code Blocks Styling
   -------------------------------------------------------------------------- */
pre[class*="language-"] {
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

code[class*="language-"] {
    font-size: 0.9rem;
}

/* Inline Code */
:not(pre) > code {
    background: var(--ec-light-gray);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--ec-secondary);
}

/* WordPress Block Editor Code Block */
.wp-block-code {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 20px;
}

.wp-block-code code {
    color: #f8f8f2;
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .recent-posts-grid {
        grid-template-columns: 1fr;
        padding: 20px 15px;
    }

    .post-card h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .post-thumbnail img {
        height: 150px;
    }
}

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

.text-primary {
    color: var(--ec-primary);
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
/* Share Buttons */
.post-share-buttons {
margin: 30px 0;
padding: 15px 0;
border-top: 1px solid var(--ec-border, #e5e7eb);
display: flex;
gap: 15px;
align-items: center;
flex-wrap: wrap;
}

.post-share-buttons strong {
color: var(--ec-text, #1f2937);
}

.post-share-buttons a {
color: var(--ec-primary, #2563eb);
text-decoration: none;
padding: 5px 10px;
border-radius: 4px;
transition: background-color 0.2s ease;
}
.post-share-buttons a:hover {
background-color: var(--ec-light-gray, #f3f4f6);
text-decoration: underline;}
.copy-link-btn {
    background: none;
    border: none;
    color: var(--ec-primary, #2563eb);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: inherit;
    font-family: inherit;
    transition: background-color 0.2s ease;
}

.copy-link-btn:hover {
    background-color: var(--ec-light-gray, #f3f4f6);
    text-decoration: underline;
}
/* Remove grey background from tags */
.post-tags,
.wp-block-post-terms,
.taxonomy-post_tag {
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
}