/*
Theme Name: POTA Field Log
Theme URI: https://example.com/pota-field-log
Author: Craig
Author URI: https://example.com
Description: A rugged outdoor-themed WordPress theme for ham radio operators and POTA activators. Designed for blogging about Parks on the Air activations and showcasing field photography.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pota-field-log
Tags: blog, photography, one-column, custom-menu, featured-images, post-formats

POTA Field Log — built for the trail, tuned for the air.
*/

/* =========================================
   CSS CUSTOM PROPERTIES
   ========================================= */
:root {
    /* Primary palette — deep forest */
    --color-pine:         #1B3A2D;
    --color-canopy:       #2D5E3F;
    --color-fern:         #4A7C5C;
    --color-moss:         #6B9A7B;
    --color-sage:         #A8C5B0;

    /* Accent — trail marker amber */
    --color-amber:        #D4883E;
    --color-amber-light:  #E6A85C;
    --color-amber-glow:   #F5C882;

    /* Earth tones */
    --color-bark:         #3D2B1F;
    --color-soil:         #5C3D2E;
    --color-stone:        #8B8178;
    --color-sand:         #C4B5A0;
    --color-parchment:    #F0EAE0;
    --color-cream:        #FAF7F2;

    /* Utility */
    --color-text:         #2A2420;
    --color-text-light:   #6B6560;
    --color-text-inv:     #FAF7F2;
    --color-border:       #D6CDBF;
    --color-border-light: #E8E2D8;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-heading: 'DM Serif Display', Georgia, serif;
    --font-body:    'Source Sans 3', 'Segoe UI', sans-serif;
    --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

    /* Spacing scale */
    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2.5rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Layout */
    --content-width:  780px;
    --wide-width:    1100px;
    --site-width:    1280px;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(27,58,45,0.08);
    --shadow-md:  0 4px 12px rgba(27,58,45,0.1);
    --shadow-lg:  0 8px 30px rgba(27,58,45,0.14);

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-cream);
    line-height: 1.7;
}

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

a {
    color: var(--color-canopy);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-amber);
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-pine);
    line-height: 1.2;
    font-weight: 400;
}

h1 { font-size: 2.6rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem;   letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: var(--space-md);
}

blockquote {
    border-left: 4px solid var(--color-amber);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-xl) 0;
    background: var(--color-parchment);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--color-text-light);
}

pre, code {
    font-family: var(--font-mono);
    font-size: 0.88rem;
}

pre {
    background: var(--color-bark);
    color: var(--color-sage);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--space-xl) 0;
}

code {
    background: var(--color-parchment);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

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

/* =========================================
   LAYOUT CONTAINERS
   ========================================= */
.site-container {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.content-width {
    max-width: var(--content-width);
    margin: 0 auto;
}

.wide-width {
    max-width: var(--wide-width);
    margin: 0 auto;
}

/* =========================================
   SITE HEADER
   ========================================= */
.site-header {
    background: var(--color-pine);
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(74,124,92,0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(212,136,62,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-lg);
    max-width: var(--site-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.site-logo-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.site-logo-icon svg {
    width: 100%;
    height: 100%;
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--color-cream);
    letter-spacing: 0.01em;
    font-weight: 700;
}

.site-title a {
    color: inherit;
}

.site-title a:hover {
    color: var(--color-amber-glow);
}

.site-tagline {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--color-sage);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 2px;
}

/* =========================================
   NAVIGATION
   ========================================= */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: var(--space-xs);
}

.main-navigation a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-sage);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--color-cream);
    background: rgba(255,255,255,0.08);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-sage);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-sm);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-pine);
        padding: var(--space-md) var(--space-lg);
        border-top: 1px solid rgba(255,255,255,0.08);
        z-index: 100;
    }

    .main-navigation.toggled ul {
        display: flex;
    }
}

/* =========================================
   HERO / BANNER AREA
   ========================================= */
.site-hero {
    background: linear-gradient(145deg, var(--color-pine) 0%, var(--color-canopy) 50%, var(--color-fern) 100%);
    padding: var(--space-3xl) var(--space-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.site-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom right, transparent 49.5%, var(--color-cream) 50%);
}

.hero-content {
    max-width: var(--content-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-family: var(--font-display);
    color: var(--color-cream);
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.hero-content p {
    color: var(--color-sage);
    font-size: 1.15rem;
    max-width: 540px;
    margin: 0 auto;
}

/* Topo-line decoration */
.topo-lines {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image:
        repeating-radial-gradient(
            ellipse at 30% 50%,
            transparent 0px,
            transparent 38px,
            rgba(255,255,255,0.5) 39px,
            transparent 40px
        ),
        repeating-radial-gradient(
            ellipse at 70% 40%,
            transparent 0px,
            transparent 55px,
            rgba(255,255,255,0.5) 56px,
            transparent 57px
        );
    pointer-events: none;
}

/* =========================================
   MAIN CONTENT
   ========================================= */
.site-main {
    padding: var(--space-2xl) var(--space-lg);
    max-width: var(--wide-width);
    margin: 0 auto;
}

/* =========================================
   POST CARDS (archive / index)
   ========================================= */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

/* Featured (first) post — full width with large image */
.post-card:first-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.post-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.post-card-thumbnail {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-parchment);
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.03);
}

.post-card:first-child .post-card-thumbnail {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
}

.post-card-body {
    padding: var(--space-lg) var(--space-xl);
}

.post-card:first-child .post-card-body {
    padding: var(--space-lg) 0;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-sm);
}

.post-card-meta .meta-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-amber);
    flex-shrink: 0;
}

.post-card-title {
    font-size: 1.35rem;
    margin-bottom: var(--space-sm);
}

.post-card:first-child .post-card-title {
    font-size: 1.8rem;
}

.post-card-title a {
    color: var(--color-pine);
}

.post-card-title a:hover {
    color: var(--color-amber);
}

.post-card-excerpt {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: var(--space-md);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--color-canopy);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    transition: gap 0.2s ease;
}

.read-more:hover {
    color: var(--color-amber);
    gap: var(--space-sm);
}

.read-more::after {
    content: '→';
}

/* Non-featured post grid (2-up) */
.posts-grid-rest {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

@media (max-width: 768px) {
    .post-card:first-child {
        grid-template-columns: 1fr;
    }

    .posts-grid-rest {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   ACTIVATION BADGE (category / tag style)
   ========================================= */
.activation-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-parchment);
    color: var(--color-canopy);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid var(--color-border-light);
}

.activation-badge.badge-success {
    background: var(--color-canopy);
    color: var(--color-cream);
    border-color: var(--color-canopy);
}

/* =========================================
   SINGLE POST
   ========================================= */
.single-post-header {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg) var(--space-xl);
    max-width: var(--content-width);
    margin: 0 auto;
}

.single-post-header .post-card-meta {
    justify-content: center;
    margin-bottom: var(--space-md);
}

.single-post-header h1 {
    font-family: var(--font-display);
    font-size: 2.6rem;
    margin-bottom: var(--space-md);
}

.single-featured-image {
    max-width: var(--wide-width);
    margin: 0 auto var(--space-2xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.single-featured-image img {
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
}

/* Post content typography */
.post-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.post-content p {
    margin-bottom: var(--space-lg);
}

.post-content h2 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 2px solid var(--color-border-light);
}

.post-content h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.post-content ul,
.post-content ol {
    margin: 0 0 var(--space-lg) var(--space-lg);
}

.post-content li {
    margin-bottom: var(--space-sm);
}

.post-content img {
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-md);
}

.post-content .wp-caption {
    max-width: 100%;
    margin: var(--space-xl) 0;
}

.post-content .wp-caption-text,
.post-content figcaption {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--color-text-light);
    text-align: center;
    margin-top: var(--space-sm);
    letter-spacing: 0.02em;
}

/* Gallery support */
.post-content .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
    margin: var(--space-xl) 0;
}

.post-content .gallery img {
    margin: 0;
    border-radius: var(--radius-sm);
    aspect-ratio: 1;
    object-fit: cover;
}

/* WordPress block alignment */
.post-content .alignwide {
    max-width: var(--wide-width);
    margin-left: calc((var(--content-width) - var(--wide-width)) / 2);
    margin-right: calc((var(--content-width) - var(--wide-width)) / 2);
}

.post-content .alignfull {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
}

/* =========================================
   ACTIVATION LOG BOX (custom styling for
   activation details in posts)
   ========================================= */
.activation-log {
    background: var(--color-parchment);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-amber);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.activation-log dt {
    color: var(--color-text-light);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    margin-top: var(--space-md);
}

.activation-log dt:first-child {
    margin-top: 0;
}

.activation-log dd {
    color: var(--color-pine);
    font-weight: 600;
    margin-left: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* =========================================
   POST NAVIGATION
   ========================================= */
.post-navigation {
    max-width: var(--content-width);
    margin: var(--space-2xl) auto 0;
    padding: var(--space-xl) var(--space-lg) 0;
    border-top: 2px solid var(--color-border-light);
    display: flex;
    justify-content: space-between;
    gap: var(--space-xl);
}

.post-navigation a {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
}

.post-navigation a:hover {
    color: var(--color-amber);
}

.post-navigation .nav-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-pine);
    margin-top: var(--space-xs);
    text-transform: none;
    letter-spacing: 0;
}

/* =========================================
   SIDEBAR / WIDGETS
   ========================================= */
.widget-area {
    padding: var(--space-2xl) 0;
}

.widget {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-light);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-amber);
    margin-bottom: var(--space-md);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.92rem;
}

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

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    color: var(--color-text-light);
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover {
    background: var(--color-parchment);
    color: var(--color-pine);
}

.pagination .page-numbers.current {
    background: var(--color-canopy);
    color: var(--color-cream);
}

/* =========================================
   COMMENTS
   ========================================= */
.comments-area {
    max-width: var(--content-width);
    margin: var(--space-2xl) auto 0;
    padding: var(--space-xl) var(--space-lg) 0;
}

.comments-title {
    font-size: 1.3rem;
    margin-bottom: var(--space-xl);
}

.comment-list {
    list-style: none;
}

.comment-body {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.comment-author .avatar {
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.comment-author .fn {
    font-weight: 600;
    color: var(--color-pine);
}

.comment-metadata {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--color-text-light);
}

.comment-respond {
    margin-top: var(--space-xl);
}

.comment-form label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    margin-bottom: var(--space-xs);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: white;
    transition: border-color 0.2s ease;
    margin-bottom: var(--space-md);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-canopy);
    box-shadow: 0 0 0 3px rgba(45,94,63,0.1);
}

.comment-form .submit {
    background: var(--color-canopy);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-xl);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s ease;
}

.comment-form .submit:hover {
    background: var(--color-amber);
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    background: var(--color-pine);
    color: var(--color-sage);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-amber), var(--color-amber-light), var(--color-amber));
}

.footer-inner {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-2xl);
}

.footer-about p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-sage);
    margin-bottom: var(--space-md);
}

.footer-heading {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-amber-light);
    margin-bottom: var(--space-md);
}

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

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--color-sage);
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-amber-glow);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: var(--space-lg) var(--space-lg);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--color-stone);
    letter-spacing: 0.05em;
}

.footer-bottom a {
    color: var(--color-sage);
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
}

/* =========================================
   SEARCH FORM
   ========================================= */
.search-form {
    display: flex;
    gap: var(--space-sm);
}

.search-form .search-field {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.search-form .search-submit {
    background: var(--color-canopy);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================
   404 PAGE
   ========================================= */
.error-404 {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.error-404 h1 {
    font-family: var(--font-display);
    font-size: 5rem;
    color: var(--color-amber);
}

.error-404 p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 480px;
    margin: var(--space-md) auto var(--space-xl);
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}
