/*
Theme Name: GeoShake News
Theme URI: https://geoshake.org
Template: generatepress
Description: GeoShake News child theme — earthquake & volcano news, Google News optimized, mobile app promotion
Author: GeoShake
Author URI: https://geoshake.org
Version: 2.0.0
Text Domain: geoshake-news
*/

/* ===================================================================
   0. CSS VARIABLES
   =================================================================== */

:root {
    --color-bg: #FFFFFF;
    --color-surface: #F5F5F7;
    --color-text: #1D1D1F;
    --color-text-secondary: #6E6E73;
    --color-accent: #E94560;
    --color-accent-hover: #C73650;
    --color-border: #E8E8ED;
    --color-tag-bg: #F5F5F7;
    --color-tag-text: #1D1D1F;
    --font-stack: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;
    --max-width: 800px;
    --header-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
}

/* ===================================================================
   1. RESET & BASE
   =================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-stack);
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ===================================================================
   2. HEADER — Sticky Frosted Glass
   =================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.site-header .inside-header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.site-header .site-title,
.site-header .main-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin: 0;
    padding: 0;
}

.site-header .site-title a {
    color: var(--color-text);
    text-decoration: none;
}

.site-header .site-title a:hover {
    color: var(--color-text);
}

/* Site description / tagline — hide */
.site-header .site-description {
    display: none;
}

/* Navigation */
.site-header .main-navigation,
.site-header .main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-header .main-navigation a,
.main-nav ul li a {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-header .main-navigation a:hover,
.main-nav ul li a:hover {
    color: var(--color-accent);
}

/* Language switcher in header */
.geoshake-lang-switcher {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.geoshake-lang-active {
    color: var(--color-text);
    font-weight: 700;
}

.geoshake-lang-link {
    color: var(--color-text-secondary) !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.geoshake-lang-link:hover {
    color: var(--color-accent) !important;
}

.geoshake-lang-sep {
    color: var(--color-border);
}

.menu-item-lang {
    margin-left: 8px;
}

/* Hide GeneratePress menu toggle button styling */
.menu-toggle {
    display: none;
}

/* ===================================================================
   3. MAIN CONTENT CONTAINER
   =================================================================== */

.site-content,
.inside-article,
#primary {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Remove GeneratePress default sidebar */
.sidebar,
#secondary,
#right-sidebar,
#left-sidebar {
    display: none !important;
}

/* Full width content area */
.content-area,
#primary {
    width: 100%;
    float: none;
}

/* ===================================================================
   4. HOMEPAGE — NEWS LIST
   =================================================================== */

/* Post listing */
.home .site-main article,
.archive .site-main article,
.blog .site-main article {
    padding: 40px 0;
    border-bottom: 1px solid var(--color-border);
    margin: 0;
    background: transparent;
    box-shadow: none;
}

.home .site-main article:first-child,
.archive .site-main article:first-child,
.blog .site-main article:first-child {
    padding-top: 48px;
}

.home .site-main article:last-child,
.archive .site-main article:last-child,
.blog .site-main article:last-child {
    border-bottom: none;
}

/* Category + Date line */
.entry-meta,
.post-meta {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.entry-meta a {
    color: var(--color-text-secondary);
}

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

/* Title in listing */
.home .entry-title,
.archive .entry-title,
.blog .entry-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin: 0 0 12px;
    padding: 0;
}

.home .entry-title a,
.archive .entry-title a,
.blog .entry-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.home .entry-title a:hover,
.archive .entry-title a:hover,
.blog .entry-title a:hover {
    color: var(--color-accent);
}

/* Excerpt in listing */
.home .entry-summary,
.archive .entry-summary,
.blog .entry-summary,
.home .entry-content p:first-child,
.archive .entry-content p:first-child {
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin: 0 0 16px;
}

/* Featured image in listing */
.home .post-image img,
.archive .post-image img,
.blog .post-image img {
    width: 100%;
    border-radius: var(--radius);
    margin-top: 16px;
    margin-bottom: 4px;
}

/* Hide read more button — whole card is clickable feel */
.home .read-more,
.archive .read-more,
.blog .read-more {
    display: none;
}

/* ===================================================================
   5. ARTICLE DETAIL PAGE
   =================================================================== */

.single .entry-header {
    text-align: center;
    padding-top: 48px;
    margin-bottom: 32px;
}

.single .entry-meta {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.single .entry-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--color-text);
    margin: 0 0 32px;
    padding: 0;
}

/* Featured image */
.single .post-image img,
.single .wp-post-image,
.single .entry-content > .wp-block-image:first-child img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 40px;
}

/* Article body */
.single .entry-content {
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text);
}

.single .entry-content p {
    margin: 0 0 24px;
}

.single .entry-content h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin: 48px 0 16px;
    padding: 0;
}

.single .entry-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin: 32px 0 12px;
}

.single .entry-content ul,
.single .entry-content ol {
    margin: 0 0 24px;
    padding-left: 24px;
}

.single .entry-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.single .entry-content strong {
    font-weight: 600;
    color: var(--color-text);
}

.single .entry-content img {
    border-radius: var(--radius-sm);
    margin: 24px 0;
}

.single .entry-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

/* ===================================================================
   6. TAGS — Pill Style
   =================================================================== */

.tags-links,
.tag-links,
.entry-tags,
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.tags-links a,
.tag-links a,
.entry-tags a,
.post-tags a {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-tag-text);
    background: var(--color-tag-bg);
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tags-links a:hover,
.tag-links a:hover,
.entry-tags a:hover,
.post-tags a:hover {
    background: var(--color-accent);
    color: #fff;
}

/* ===================================================================
   7. CTA BLOCK
   =================================================================== */

.geoshake-cta {
    background: var(--color-surface);
    border-left: 4px solid var(--color-accent);
    padding: 24px;
    margin: 32px 0;
    border-radius: var(--radius);
}

.geoshake-cta p {
    margin: 0 0 8px;
    font-size: 16px;
}

.geoshake-cta p:last-of-type {
    margin-bottom: 16px;
}

.geoshake-cta .cta-button {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.2s ease;
}

.geoshake-cta .cta-button:hover {
    background: var(--color-accent-hover);
    color: #fff;
}

/* ===================================================================
   8. STICKY APP BANNER (Mobile Only)
   =================================================================== */

#geoshake-sticky-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(29, 29, 31, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-stack);
    font-size: 14px;
    gap: 12px;
}

#geoshake-sticky-banner .cta-button {
    background: var(--color-accent);
    color: #fff;
    border-radius: 20px;
}

#geoshake-sticky-banner .cta-button:hover {
    background: var(--color-accent-hover);
}

/* ===================================================================
   9. FOOTER
   =================================================================== */

.site-footer,
footer.site-info {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    margin-top: 64px;
}

.site-footer .inside-site-info,
.site-footer .footer-widgets-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 64px 24px;
    text-align: center;
}

.site-footer .site-info,
.site-footer .copyright-bar {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.site-footer a {
    color: var(--color-text-secondary);
}

.site-footer a:hover {
    color: var(--color-accent);
}

/* ===================================================================
   10. PAGINATION
   =================================================================== */

.pagination,
.nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 48px 0;
}

.pagination a,
.nav-links a,
.pagination span,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a,
.nav-links a {
    color: var(--color-text);
    background: var(--color-surface);
}

.pagination a:hover,
.nav-links a:hover {
    background: var(--color-accent);
    color: #fff;
}

.pagination .current,
.nav-links .current {
    background: var(--color-accent);
    color: #fff;
}

/* ===================================================================
   11. MOBILE RESPONSIVE
   =================================================================== */

@media (max-width: 768px) {
    /* Container padding */
    .site-content,
    .inside-article,
    #primary {
        padding: 0 16px;
    }

    /* Header */
    .site-header .inside-header {
        padding: 0 16px;
    }

    /* Hide desktop nav on mobile */
    .site-header .main-navigation .menu > li:not(.lang-switcher),
    .main-nav ul li:not(.lang-switcher) {
        display: none;
    }

    /* Homepage titles */
    .home .entry-title,
    .archive .entry-title,
    .blog .entry-title {
        font-size: 22px;
    }

    /* Article title */
    .single .entry-title {
        font-size: 28px;
    }

    /* Article body */
    .single .entry-content {
        font-size: 17px;
    }

    /* Featured image */
    .single .post-image img,
    .single .wp-post-image {
        border-radius: var(--radius-sm);
    }

    /* Tags */
    .tags-links a,
    .tag-links a {
        font-size: 12px;
    }

    /* Footer */
    .site-footer .inside-site-info,
    .site-footer .footer-widgets-container {
        padding: 48px 16px;
    }

    /* Sticky banner visible */
    #geoshake-sticky-banner {
        display: flex !important;
    }

    body {
        padding-bottom: 60px;
    }

    /* Listing spacing */
    .home .site-main article,
    .archive .site-main article,
    .blog .site-main article {
        padding: 32px 0;
    }
}

/* ===================================================================
   12. UTILITY — HIDE GENERATEPRESS DEFAULTS
   =================================================================== */

/* Hide GeneratePress elements we don't need */
.entry-header .cat-links,
.entry-header .comments-link,
.post-navigation,
.comments-area,
.entry-footer .cat-links {
    display: none;
}

/* Remove GeneratePress content container max-width conflicts */
.container.grid-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Remove any box shadows from GeneratePress */
article,
.inside-article {
    box-shadow: none !important;
    border: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
