/* ============================================================
   Camtek Optisolutions - Custom Ghost Theme CSS
   Design: Dark navy/black header+footer, red accent (#CF5B5B)
   Fonts: Poppins (body), Verdana (headings)
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.8;
    color: #54686E;
    background: #fff;
}

a {
    color: #CF5B5B;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #DC7474;
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: Verdana, sans-serif;
    font-weight: 400;
    color: #02172C;
    line-height: 1.3;
}

h1 { font-size: 2.2rem; margin-bottom: 0.6em; }
h2 { font-size: 2rem; margin-bottom: 0.5em; }
h3 { font-size: 1.5rem; margin-bottom: 0.4em; }
h4 { font-size: 1.1rem; margin-bottom: 0.3em; }

p {
    margin-bottom: 1.2em;
}

/* --- Layout Containers --- */
.top-bar-inner,
.nav-inner,
.hero-inner,
.post-feed-inner,
.post-header-inner,
.page-header-inner,
.tag-header-inner,
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}


/* ============================================================
   TOP BAR - Black with red links
   ============================================================ */
.top-bar {
    background: #000;
    padding: 8px 0;
    font-size: 0.82rem;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    gap: 24px;
    align-items: center;
}

.top-bar-link {
    color: #CF5B5B;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
}

.top-bar-link:hover {
    color: #DC7474;
}

.top-bar-link svg {
    flex-shrink: 0;
}


/* ============================================================
   MAIN NAVIGATION
   ============================================================ */
.main-nav {
    background: #fff;
    border-bottom: 1px solid #ecf0f1;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo img {
    height: 60px;
    width: auto;
}

.site-title-text {
    font-family: Verdana, sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #02172C;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-item a {
    display: block;
    padding: 8px 16px;
    color: #02172C;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-item a:hover {
    background: #ecf0f1;
    color: #02172C;
}

.nav-item.nav-current a {
    background: #CF5B5B;
    color: #fff;
}

/* Hamburger - mobile */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: #02172C;
    transition: all 0.3s;
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }


/* ============================================================
   HERO SECTION - Homepage
   ============================================================ */
.hero-section {
    background: linear-gradient(135deg, #f5f6f7 0%, #eef1f3 100%);
    padding: 64px 0;
    text-align: center;
    border-bottom: 3px solid #CF5B5B;
}

.hero-title {
    font-family: Verdana, sans-serif;
    font-size: 2.4rem;
    color: #02172C;
    font-weight: 400;
    margin-bottom: 0.5em;
}

.hero-title em {
    color: #CF5B5B;
    font-style: italic;
}

.hero-description {
    font-size: 1.05rem;
    color: #54686E;
    max-width: 600px;
    margin: 0 auto 1.5em;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #CF5B5B;
    color: #fff;
    border-color: #CF5B5B;
}

.btn-primary:hover {
    background: #b84d4d;
    border-color: #b84d4d;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: #CF5B5B;
    border-color: #CF5B5B;
}

.btn-outline:hover {
    background: #CF5B5B;
    color: #fff;
}


/* ============================================================
   POST FEED - Card grid
   ============================================================ */
.post-feed-section {
    padding: 56px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8rem;
    color: #02172C;
}

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

.post-card {
    background: #fff;
    border: 1px solid #ecf0f1;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 8px 24px rgba(2, 23, 44, 0.1);
    transform: translateY(-2px);
}

.post-card-image-link {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.post-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.post-card-content {
    padding: 20px 24px;
}

.post-card-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #CF5B5B;
}

.post-card-title {
    font-size: 1.2rem;
    margin: 8px 0 10px;
    line-height: 1.35;
}

.post-card-title a {
    color: #02172C;
}

.post-card-title a:hover {
    color: #CF5B5B;
}

.post-card-excerpt {
    font-size: 0.88rem;
    color: #54686E;
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-card-meta {
    font-size: 0.78rem;
    color: #8a9ca4;
    display: flex;
    gap: 16px;
}


/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post,
.single-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.post-header,
.page-header {
    padding: 48px 0 24px;
    text-align: center;
}

.post-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #CF5B5B;
    margin-bottom: 12px;
}

.post-title,
.page-title {
    font-size: 2.4rem;
    line-height: 1.2;
    margin-bottom: 16px;
}

.post-excerpt,
.page-excerpt {
    font-size: 1.1rem;
    color: #54686E;
    max-width: 640px;
    margin: 0 auto 16px;
}

.post-meta {
    font-size: 0.82rem;
    color: #8a9ca4;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.post-feature-image,
.page-feature-image {
    margin: 0 0 32px;
    border-radius: 6px;
    overflow: hidden;
}

.post-feature-image img,
.page-feature-image img {
    width: 100%;
}

.post-feature-image figcaption {
    text-align: center;
    font-size: 0.82rem;
    color: #8a9ca4;
    padding: 8px 0;
}

/* --- Post Content Styling --- */
.post-content,
.page-content {
    font-size: 1rem;
    line-height: 1.8;
    padding-bottom: 48px;
}

.post-content h2,
.page-content h2 {
    margin-top: 2em;
    font-size: 1.6rem;
}

.post-content h3,
.page-content h3 {
    margin-top: 1.6em;
    font-size: 1.3rem;
}

.post-content p,
.page-content p {
    margin-bottom: 1.3em;
}

.post-content ul,
.post-content ol,
.page-content ul,
.page-content ol {
    margin: 0 0 1.3em 1.5em;
}

.post-content li,
.page-content li {
    margin-bottom: 0.4em;
}

.post-content blockquote,
.page-content blockquote {
    border-left: 3px solid #CF5B5B;
    padding: 12px 20px;
    margin: 1.5em 0;
    background: #f8f9fa;
    font-style: italic;
    color: #02172C;
}

.post-content img,
.page-content img {
    border-radius: 4px;
    margin: 1.5em auto;
}

.post-content a,
.page-content a {
    color: #CF5B5B;
    text-decoration: underline;
    text-decoration-color: rgba(207, 91, 91, 0.3);
    text-underline-offset: 2px;
}

.post-content a:hover,
.page-content a:hover {
    text-decoration-color: #CF5B5B;
}

.post-content table,
.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.post-content th,
.post-content td,
.page-content th,
.page-content td {
    border: 1px solid #ecf0f1;
    padding: 10px 14px;
    text-align: left;
}

.post-content th,
.page-content th {
    background: #02172C;
    color: #fff;
    font-weight: 500;
}

.post-content tr:nth-child(even),
.page-content tr:nth-child(even) {
    background: #f8f9fa;
}

/* --- Post Footer --- */
.post-footer {
    border-top: 1px solid #ecf0f1;
    padding: 24px 0 48px;
}

.post-tags-footer {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-tag-pill {
    display: inline-block;
    padding: 4px 14px;
    background: #f0f3f5;
    color: #02172C;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 20px;
    transition: background 0.2s;
}

.post-tag-pill:hover {
    background: #CF5B5B;
    color: #fff;
}


/* ============================================================
   TAG ARCHIVE
   ============================================================ */
.tag-header {
    background: #02172C;
    padding: 48px 0;
    text-align: center;
}

.tag-title {
    color: #fff;
    font-size: 2rem;
}

.tag-description {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    max-width: 600px;
    margin: 12px auto 0;
}


/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 32px 0 56px;
    font-size: 0.88rem;
}

.pagination a {
    padding: 8px 20px;
    border: 1px solid #CF5B5B;
    border-radius: 4px;
    color: #CF5B5B;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #CF5B5B;
    color: #fff;
}

.page-number {
    color: #8a9ca4;
}


/* ============================================================
   FOOTER - Dark navy (#02172C)
   ============================================================ */
.site-footer {
    background: #02172C;
    color: #fff;
    padding: 48px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 48px;
    align-items: start;
    padding-bottom: 32px;
}

.footer-logo {
    height: 60px;
    width: auto;
}

.footer-title {
    font-family: Verdana, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
}

.footer-contact {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-contact a {
    color: #F8E81C;
}

.footer-contact a:hover {
    color: #fff;
}

.footer-address {
    margin-top: 16px;
}

.footer-secondary-nav {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px 0;
}

.footer-nav-list {
    display: flex;
    list-style: none;
    gap: 24px;
    justify-content: center;
}

.footer-nav-list a {
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
}

.footer-nav-list a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 24px;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
}

.footer-legal {
    font-size: 0.72rem;
    margin-top: 6px;
    color: rgba(255,255,255,0.4);
}


/* ============================================================
   GHOST CONTENT CARDS (kg-*)
   ============================================================ */
.kg-width-wide {
    margin-left: -80px;
    margin-right: -80px;
    max-width: calc(100% + 160px);
}

.kg-width-full {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

.kg-image-card img,
.kg-gallery-image img {
    border-radius: 4px;
}

.kg-image-card figcaption,
.kg-gallery-card figcaption {
    text-align: center;
    font-size: 0.82rem;
    color: #8a9ca4;
    padding-top: 8px;
}

.kg-bookmark-card {
    border: 1px solid #ecf0f1;
    border-radius: 6px;
    overflow: hidden;
    margin: 1.5em 0;
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
}

.kg-bookmark-content {
    padding: 16px 20px;
    flex: 1;
}

.kg-bookmark-title {
    font-family: Verdana, sans-serif;
    font-size: 1rem;
    color: #02172C;
    font-weight: 500;
}

.kg-bookmark-description {
    font-size: 0.82rem;
    color: #54686E;
    margin-top: 6px;
}

.kg-bookmark-metadata {
    font-size: 0.75rem;
    color: #8a9ca4;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kg-bookmark-thumbnail {
    width: 160px;
    flex-shrink: 0;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Embedded content */
.kg-embed-card {
    margin: 1.5em 0;
}

.kg-embed-card iframe {
    width: 100%;
    border-radius: 4px;
}

/* Callout cards */
.kg-callout-card {
    padding: 20px 24px;
    border-radius: 6px;
    margin: 1.5em 0;
}

/* Video cards */
.kg-video-card {
    margin: 1.5em 0;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .post-feed {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .kg-width-wide {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
}

@media (max-width: 700px) {
    html { font-size: 16px; }

    .nav-toggle {
        display: block;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 12px 24px;
        border-top: 1px solid #ecf0f1;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    }

    .nav-list.is-open {
        display: flex;
    }

    .main-nav .nav-inner {
        position: relative;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .post-title,
    .page-title {
        font-size: 1.8rem;
    }

    .single-post,
    .single-page {
        padding: 0 16px;
    }

    .top-bar-left {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .footer-nav-list {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}


/* Fix navigation helper output */
.nav-list .nav {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}
.nav-list .nav li a {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
}
.nav-list .nav li a:hover {
    color: #CF5B5B;
}
.nav-list .nav li.nav-current a {
    color: #CF5B5B;
}
