/* Leonardo Flores - Static Site Styles */

:root {
    --color-primary: #28303D;
    --color-secondary: #39414D;
    --color-accent: #D1E4DD;
    --color-text: #333;
    --color-text-light: #666;
    --color-background: #FFFFFF;
    --color-background-alt: #F5F5F5;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-heading: Georgia, 'Times New Roman', serif;
    --max-width: 1200px;
    --spacing-unit: 1.5rem;
    --global--elevation: 1px 1px 3px 0 rgba(0, 0, 0, 0.2);
    --global--elevation-medium: 3px 3px 6px 0 rgba(0, 0, 0, 0.15);
    --global--elevation-large: 6px 6px 12px 0 rgba(0, 0, 0, 0.1);
    --thumbnail-height: 200px;
    --post-card-gap: 2rem;
}

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

body {
    font-family: var(--font-main);
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-background);
    padding: 0;
    margin: 0;
}

/* Header */
header {
    background-color: #000000;
    color: white;
    border-bottom: 4px solid var(--color-accent);
    position: relative;
}

.header-top {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title-menu {
    display: contents;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    margin-bottom: 0;
    font-weight: normal;
    line-height: 1.1;
}

header h1 a {
    color: #F2AF29;
    text-decoration: none;
}

header h1 a:hover {
    color: var(--color-accent);
}

header .tagline {
    font-size: 1.5rem;
    color: white;
    margin: 0;
    text-align: center;
    flex: 1;
}

/* Navigation */
header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #000000;
    padding: 1rem 0;
    z-index: 1000;
    flex-direction: column;
    gap: 0;
}

header nav.active {
    display: flex;
}

header nav a {
    padding: 0.75rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid #333;
    transition: background-color 0.2s;
}

header nav a:last-child {
    border-bottom: none;
}

header nav a:hover {
    background-color: #222;
}

/* Hamburger Menu - Always visible */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Main Content */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

article {
    background: white;
    padding: 0;
}

article h1,
article h2,
article h3,
article h4 {
    font-family: var(--font-heading);
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
    color: var(--color-primary);
}

article h1 {
    font-size: 2.5rem;
    margin-top: 0;
}

article h2 {
    font-size: 2rem;
}

article h3 {
    font-size: 1.5rem;
}

article p {
    margin: 1rem 0;
}

article a {
    color: #0066CC;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

article a:hover {
    border-bottom-color: #0066CC;
}

article img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 4px;
}

article ul,
article ol {
    margin: 1rem 0 1rem 2rem;
}

article li {
    margin: 0.5rem 0;
}

article blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--color-background-alt);
    border-left: 4px solid var(--color-accent);
    font-style: italic;
}

article pre {
    background: #F5F5F5;
    padding: 1rem;
    overflow-x: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

article code {
    font-family: 'Courier New', monospace;
    background: #F5F5F5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

article pre code {
    background: none;
    padding: 0;
}

/* Categories */
.categories {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #DDD;
}

.categories a {
    color: var(--color-text-light);
    text-decoration: none;
}

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

/* Post Lists */
.post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-list li {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--color-background-alt);
    border-radius: 4px;
}

.post-list h2 {
    margin-top: 0;
    font-size: 1.75rem;
}

.post-list .post-meta {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.post-list .post-excerpt {
    margin: 1rem 0 0 0;
}

/* Entry Content Specific */
.entry-content {
    margin: 2rem 0;
}

.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Footer */
footer {
    background: var(--color-secondary);
    color: white;
    text-align: center;
    padding: 2rem 1.5rem;
    margin-top: 4rem;
}

footer p {
    margin: 0;
}

footer a {
    color: var(--color-accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #DDD;
}

table th {
    background: var(--color-background-alt);
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .header-top {
        flex-wrap: wrap;
    }

    header h1 {
        font-size: 2.5rem;
        order: 1;
    }

    .menu-toggle {
        order: 2;
    }

    header .tagline {
        font-size: 1rem;
        order: 3;
        flex-basis: 100%;
        text-align: left;
        margin-top: 0.5rem;
    }

    article h1 {
        font-size: 2rem;
    }

    article h2 {
        font-size: 1.5rem;
    }

    main {
        padding: 2rem 1rem;
    }
}

/* WordPress Content Cleanup */
.wp-block-image,
.wp-caption {
    margin: 1.5rem 0;
}

.wp-caption-text {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Utility Classes */
.screen-reader-text {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Post Grid Layout */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--post-card-gap);
}

/* Post Card Styling */
.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--global--elevation);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--global--elevation-large);
}

.post-card-header {
    position: relative;
    width: 100%;
    background: var(--color-background-alt);
}

.post-thumbnail-link {
    display: block;
    width: 100%;
    height: var(--thumbnail-height);
    overflow: hidden;
    text-decoration: none;
}

.post-thumbnail {
    margin: 0;
    width: 100%;
    height: 100%;
}

.post-thumbnail-image {
    width: 100%;
    height: var(--thumbnail-height);
    object-fit: cover;
    object-position: center;
    margin: 0;
    display: block;
    transition: transform 0.3s ease;
}

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

/* Placeholder for posts without images */
.post-thumbnail-placeholder {
    width: 100%;
    height: var(--thumbnail-height);
    background: linear-gradient(135deg, 
                var(--color-background-alt) 0%, 
                var(--color-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.5;
}

/* Post Card Content */
.post-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card .entry-title {
    font-size: 1.5rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.post-card .entry-title a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-card .entry-title a:hover {
    color: #0066CC;
}

.entry-meta {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #EAEAEA;
}

.entry-meta time {
    font-weight: 500;
}

.meta-sep {
    margin: 0 0.5rem;
    color: #DDD;
}

.entry-meta .categories a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.entry-meta .categories a:hover {
    color: var(--color-primary);
}

.entry-excerpt {
    flex-grow: 1;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.entry-excerpt p {
    margin: 0;
    color: var(--color-text);
}

.read-more {
    align-self: flex-start;
    color: #0066CC;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    border-bottom: 2px solid transparent;
}

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

/* Pagination */
.pagination {
    display: block;
    text-align: center;
    padding: 3rem 0 1rem 0;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.pagination a {
    color: var(--color-text-light);
    text-decoration: none;
    margin: 0 0.5rem;
}

.pagination a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.pagination-current,
.pagination-number,
.pagination-ellipsis {
    display: none;
}

/* Responsive - Post Grid */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
}

/* Search Bar */
.search-container {
    position: relative;
    margin-top: 1rem;
}

#searchInput {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--color-accent);
    border-radius: 25px;
    background-color: white;
    color: var(--color-text);
    font-family: var(--font-main);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#searchInput:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#searchInput::placeholder {
    color: var(--color-text-light);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: 500px;
    margin-top: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--global--elevation-large);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-results.hidden {
    display: none;
}

.search-result-item {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: var(--color-text);
    transition: background-color 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--color-background-alt);
}

.search-result-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--color-primary);
}

.search-result-excerpt {
    font-size: 0.875rem;
    color: var(--color-text-light);
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.search-result-date {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--color-text-light);
}

/* Responsive adjustments for search */
@media (max-width: 768px) {
    #searchInput {
        max-width: 100%;
    }

    .search-results {
        max-width: 100%;
    }
}

/* Featured Image in Blog Posts */
.featured-image-container {
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: center;
}

.post-featured-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    box-shadow: var(--global--elevation-medium);
    /* Images display naturally without filters for cross-browser consistency */
}

/* Post Header Styling */
.post-header {
    background-color: #F2AF29;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: -3rem;
    padding: 1rem 2rem;
    text-align: center;
    margin-bottom: 0;
}

.post-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.2;
}

/* Post Content Styling */
main article {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

main article .post-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 10px 1.5rem 2rem 1.5rem;
}

main article h4 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

main article ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

main article li {
    margin-bottom: 0.5rem;
}

main article p {
    margin-bottom: 1.5rem;
}

main article a {
    color: var(--color-primary);
    text-decoration: underline;
}

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

/* Categories */
.categories {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

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

.categories a:hover {
    text-decoration: underline;
}

/* Ensure consistent footer across all pages */
footer {
    background-color: #000000;
    color: white;
    padding: 1.5rem 2rem;
    margin-top: 4rem;
    border-top: 4px solid var(--color-accent);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-left {
    color: #F2AF29;
}

.footer-center {
    text-align: center;
}

.footer-center a {
    color: #F2AF29;
    text-decoration: none;
}

.footer-center a:hover {
    text-decoration: underline;
}

.footer-right .search-container {
    margin: 0;
}

.footer-right #footerSearchInput {
    width: 200px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: 2px solid #666;
    border-radius: 20px;
    background-color: white;
    color: var(--color-text);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-right #footerSearchInput {
        width: 100%;
        max-width: 250px;
    }
}

footer p {
    margin: 0;
}

/* Search bar in header - inline positioning */
.header-top .search-container {
    margin-top: 0;
}

.header-top #searchInput {
    background-color: white;
    border-color: #666;
    color: var(--color-text);
}

/* Categories at bottom of posts */
.post-categories-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-accent);
    text-align: left;
    font-size: 0.95rem;
}

/* Page Content Styling (matches post styling) */
.page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.entry-content {
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.entry-content a:hover {
    color: var(--color-secondary);
}

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

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

/* Responsive Video Embeds */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 1.5rem 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}
