/*
Theme Name: Military Security Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: Professional WordPress theme with military/security color scheme, Google Fonts (IBM Plex Serif, Atkinson Hyperlegible, Roboto Mono) and Material Symbols icons. Optimized for HD displays and mobile responsiveness.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: military-theme
Tags: military, security, responsive, custom-colors, blog, one-column, two-columns, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks
*/

/* ========================================
   GLOBAL FIXES - Mobile Overflow
   ======================================== */

html {
    /* overflow-x: hidden; */
}

body {
    /* overflow-x: hidden; */
    max-width: 100vw;
}

/* WordPress wymusza czasem width na img */
.epost-article-content img[width],
.epost-article-content img[height] {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
}

/* Tabele też mogą powodować overflow */
.epost-article-content table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

/* Pre/code bloki */
.epost-article-content pre {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
}



/* ========================================
   1. CSS Variables - Military Color Scheme
   ======================================== */

:root {
    /* Primary Colors */
    --primary-color: #4B5320;
    --secondary-color: #6B8E23;
    --accent-color: #8B9556;
    
    /* Complementary Colors */
    --gunmetal: #404040;
    --desert-sand: #D4B896;
    --steel-blue: #4682B4;
    
    /* Functional Colors */
    --success-color: #5d7a3a;
    --warning-color: #c12112;
    --info-color: #d18b36;
    --text-dark: #1a1a1a;
    --text-light: #555;
    --dark-bg: #1a1a1a;
    --light-bg: #e8e8e0;
    
    /* Spacing */
    --container-max-width: 1200px;
}

/* ========================================
   2. Reset & Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
	font-family: 'Atkinson Hyperlegible', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        repeating-linear-gradient(
            90deg,
            rgba(0,0,0,0.04) 0,
            rgba(0,0,0,0.04) 1px,
            transparent 1px,
            transparent 40px
        ),
        #ffffff;
}



body {
    background:
        linear-gradient(to right, #f3f3f3 0%, #ffffff 15%, #ffffff 85%, #f3f3f3 100%);
}

#wrapper {
    position: relative;
    max-width: 1680px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 0 60px rgba(0,0,0,0.08);
    z-index: 1;
}

#wrapper::before,
#wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;

    width: 22px;

    background:
        linear-gradient(
            180deg,
            rgba(0,0,0,0.15) 0%,
            rgba(0,0,0,0.05) 50%,
            rgba(0,0,0,0.15) 100%
        );

    opacity: 0.4;   /* regulacja siły efektu */
    z-index: -1;
}

#wrapper::before {
    left: -28px;
}

#wrapper::after {
    right: -28px;
}

@media (max-width: 1750px)
{

#wrapper::before,
#wrapper::after {
    width: 0px;
}

#wrapper::before {
    left: 0;
}

#wrapper::after {
    right: 0;
}

}


/* ========================================
   3. Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'IBM Plex Serif', serif;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; font-weight: 700; }
h2 { font-size: 2.5rem; font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 700; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Material Symbols Configuration */
.material-symbols-outlined {
    font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
    vertical-align: middle;
}

/* ========================================
   4. Navigation
   ======================================== */

/* ============================
   NYT STYLE TOP NAV
============================ */

.nyt-nav {
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.18);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.nyt-container {
    max-width: 1980px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* LOGO / BRAND */
.nyt-brand {
    font-family: "IBM Plex Serif", serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #111;
    text-decoration: none;
}

.nyt-brand span {
    vertical-align: middle;
}

/* DESKTOP MENU */
.nyt-menu-desktop {
    display: flex;
}

.nyt-menu-list {
    display: flex;
    gap: 1.8rem;
}

.nyt-menu-list > li > a {
    font-family: "IBM Plex Serif", serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: #111;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

.nyt-menu-list > li > a:hover {
    border-bottom: 2px solid #111;
}

/* MOBILE BURGER */
.nyt-burger {
    display: none;
    width: 32px;
    height: 28px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.nyt-burger span {
    display: block;
    height: 3px;
    background: #111;
    margin-bottom: 6px;
    border-radius: 2px;
    transition: 0.3s ease;
}

/* ===================================
   MOBILE OVERLAY FULLSCREEN MENU
=================================== */

.nyt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 15, 0.96);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.nyt-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nyt-overlay-inner {
    padding: 4rem 2rem;
}

.nyt-overlay-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nyt-overlay-menu > li {
    margin: 1.4rem 0;
}

.nyt-overlay-menu > li > a {
    color: #ffffff;
    font-family: "IBM Plex Serif", serif;
    font-size: 1.8rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
}

/* BURGER ANIMATION → X */
.nyt-burger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nyt-burger.active span:nth-child(2) {
    opacity: 0;
}

.nyt-burger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ukrywanie na desktopie */
@media (min-width: 992px) {
    .hide-on-desktop {
        display: none !important;
    }
}


.nyt-overlay-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    z-index: 10001;
}

.nyt-overlay-close .material-symbols-outlined {
    font-size: 2rem;
}

.nyt-overlay-close:hover {
    color: var(--desert-sand);
}



/* ============================
   RESPONSIVE
============================ */

@media (max-width: 992px) {

    .nyt-menu-desktop {
        display: none; /* hide normal menu */
    }

    .nyt-burger {
        display: block;
    }
}


/* ========================================
   5. Hero Section
   ======================================== */

.hero-section {
  position: relative;
  overflow: hidden;
  color: white;
  padding: 2rem 0;
  background: none;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--light-bg) 0%,
    var(--secondary-color) 50%,
    var(--gunmetal) 100%
  );
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.hero-section > * {
  position: relative;
  z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: slideDown 0.8s ease-out;
}

.hero-content h1 .material-symbols-outlined {
    font-size: 3.5rem;
    margin-right: 1rem;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: slideUp 0.8s ease-out 0.2s both;
}

.hero-content-dewiza
{
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
}

.hero-content-issn
{
    text-shadow: 2px 2px 8px rgba(255,255,255,0.9);
}

/* Hero Buttons */
.btn-hero {
    background-color: white;
    color: var(--primary-color);
    padding: 0.8rem 2.5rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
    font-size: 1.05rem;
    margin: 0 0.5rem;
    display: inline-block;
    animation: slideUp 0.8s ease-out 0.4s both;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    background-color: var(--desert-sand);
    color: var(--primary-color);
}

.btn-hero-secondary {
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
}

.btn-hero-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

/* ========================================
   6. Animations
   ======================================== */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   7. Status Section
   ======================================== */

.status-section {
    background-color: var(--light-bg);
    padding: 4rem 0;
}

.status-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    border-top: 4px solid var(--primary-color);
}

.status-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.status-card.success {
    border-top-color: var(--success-color);
}

.status-card.warning {
    border-top-color: var(--warning-color);
}

.status-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.status-card.success .status-icon {
    color: var(--success-color);
}

.status-card.warning .status-icon {
    color: var(--warning-color);
}

.status-card h3 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.status-card p {
    color: var(--text-light);
    margin: 0;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .status-section {
        padding: 2rem 0;
    }
    
    .status-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
        border-top: 3px solid var(--primary-color);
    }
    
    .status-card:hover {
        transform: translateY(-4px);
    }
    
    .status-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .status-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .status-card p {
        font-size: 0.9rem;
    }
}


/* ========================================
   8. Responsive Design
   ======================================== */

/* Tablets & Mobile */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content h1 .material-symbols-outlined {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .btn-hero {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
        margin: 0.5rem 0.25rem;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}

/* Small Mobile */
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-content h1 .material-symbols-outlined {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .btn-hero {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        margin: 0.5rem 0.2rem;
    }
    
    .status-card {
        padding: 1.5rem;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.5rem; }
}

/* ========================================
   9. Utility Classes
   ======================================== */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 15px;
}

.site-main {
    min-height: 60vh;
}

/* Accessibility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* WordPress Core Alignment */
.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* */
/* KONIEC GLOBALNYCH */
/* */


/* LIGHT BOX IMG OVERLAY */

@media (max-width: 1000px) {
  #lightbox-image {
    max-width: 80%;
    max-height: 80%;
  }
}

#lightbox-overlay {
  z-index: 100;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

#lightbox-image {
  max-width: 90%;
  max-height: 90%;
  cursor: pointer;
}

#lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 4rem;
  cursor: pointer;
}


/* ========================================
   NOWOCZESNE OBRAZKI – STYL BBC / NYT
   ======================================== */

.epost-article-content img {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;

    /* Minimalistyczna ramka – jak w NYT */
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 4px;

    /* Usunięty cień, minimalna elegancja */
    background: #fff;

    padding: 8px; /* jak lekkie passepartout NYT */
    transition: all 0.25s ease;
}

/* VERY subtle hover allowed (ale NYT prawie tego nie używa) */
.epost-article-content img:hover {
    border-color: rgba(0,0,0,0.25);
}


/* Podpisy dziennikarskie – BBC / NYT look */
.epost-article-content p:has(img.aligncenter) + p[style*="text-align: center"],
.epost-article-content p:has(a > img.aligncenter) + p[style*="text-align: center"],
.epost-article-content figure.aligncenter + p[style*="text-align: center"] {
    font-family: 'IBM Plex Serif', serif;
    font-style: italic;
    font-size: 0.88rem;
    color: var(--text-light);

    text-align: center;
    margin: -28px auto 22px auto;
    max-width: 760px;

    padding: 10px 16px;
    background: #fafafa;

    border: 1px solid rgba(0,0,0,0.1);
    border-top: 3px solid var(--secondary-color);

    border-radius: 0 0 6px 6px;

    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}


.epost-article-content p:has(img.aligncenter) + p[style*="text-align: center"]::before,
.epost-article-content p:has(a > img.aligncenter) + p[style*="text-align: center"]::before,
.epost-article-content figure.aligncenter + p[style*="text-align: center"]::before {
    content: "camera_alt";
    font-family: 'Material Symbols Outlined';

    font-size: 0.9rem;
    margin-right: 6px;
    opacity: 0.45;

    color: var(--secondary-color);
    vertical-align: middle;
}


.epost-article-content figcaption {
    font-family: 'IBM Plex Serif', serif;
    font-style: italic;
    font-size: 0.88rem;
    color: var(--text-light);

    margin-top: 0.75rem;
    padding: 10px 16px;

    background: #fafafa;

    border-left: 3px solid var(--secondary-color);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;

    max-width: 90%;
}


.epost-article-content figure {
    margin: 2rem auto;
    position: relative;
    max-width: 900px;
}

.epost-article-content figure img {
    display: block;
    width: 100%;
}

.epost-article-content figure.aligncenter {
    margin-left: auto;
    margin-right: auto;
}

.epost-article-content figure.alignleft,
.epost-article-content figure.alignright {
    max-width: 380px;
}

/* ALIGNCENTER - DODANE */
.epost-article-content .aligncenter,
.epost-article-content img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    clear: both;
}

.epost-article-content .alignleft,
.epost-article-content img.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.epost-article-content .alignright,
.epost-article-content img.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

@media (max-width: 768px) {
    .epost-article-content img {
        padding: 6px;
    }

    .epost-article-content figcaption,
    .epost-article-content p:has(img.aligncenter) + p[style*="text-align: center"] {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .epost-article-content .alignleft,
    .epost-article-content .alignright {
        float: none !important;
        margin: 1rem auto;
        max-width: 100%;
    }
}



/* =======================================
   FIELDSET – BBC / New York Times style
   ======================================= */

fieldset {
    border: 2px solid rgba(0,0,0,0.35);
    border-radius: 6px;

    padding: 1.5rem 1.6rem 1.8rem;
    margin: 2.5rem 0;

    background: #f7f7f7;

    /* Wyraźna rama – NYT section box */
    box-shadow:
        0 2px 4px rgba(0,0,0,0.08),
        inset 0 0 0 1px rgba(255,255,255,0.4);
}

fieldset:focus-within {
    border-color: rgba(0,0,0,0.55);
}



legend {
    font-family: 'IBM Plex Serif', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(0,0,0,0.85);

    padding: 0.2rem 0.6rem;
    margin-left: 1rem;

    /* oddzielenie nagłówka od tła */
    background: #f7f7f7;

    position: relative;

    letter-spacing: 0.3px;
    text-transform: uppercase; /* BBC działowe, mocniejsze */
}


legend::before {
    content: "";
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);

    width: 6px;
    height: 70%;
    background: var(--secondary-color); /* Twój kolor akcentu */
    border-radius: 3px;
}


legend::after {
    content: "";
    position: absolute;

    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;

    background: rgba(0,0,0,0.25);
    border-radius: 2px;
}


.epost-category a
{
color: inherit;
text-decoration: none;
font-family: inherit;
}




/* Widget - Najpopularniejsze posty */
.military-popular-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.military-popular-posts li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.military-popular-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.military-popular-posts a {
    display: block;
    font-family: 'IBM Plex Serif', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    margin-bottom: 0.3rem;
}

.military-popular-posts a:hover {
    color: var(--secondary-color);
}

.military-popular-posts .post-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-light);
}



/* */
/* */
/* CIASTECZKA INFO */
/* */
/* */

/* CIASTECZKA INFO */

.cookies-infobar {
    font-size: var(--font-size-root);
    border: 1px solid black;
    box-shadow: inset 0px 1px 0px 0px #ffffff;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.25em;
    text-align: center;
    z-index: 10000;
    pointer-events: auto; /* DODANE */
}

.cookies-infobar.cookies-infobar_accepted {
    display: none;
}

.cookies-infobar_wrapper {
    padding: 0.15em;
}

/* Linki w tekście - DODANE */
.cookies-text {
    margin: 0.75em;
    position: relative;
    z-index: 1; /* DODANE */
}

.cookies-text a {
    color: #FFD700; /* Złoty kolor dla wyróżnienia */
    text-decoration: underline;
    font-weight: 600;
    position: relative;
    z-index: 10001; /* WAŻNE - wyższy niż .cookies-infobar */
    pointer-events: auto; /* DODANE */
}

.cookies-text a:hover {
    color: #FFA500;
    text-decoration: underline;
}

.cookies-infobar_btn {
    padding: 0.5em;
    display: inline-block;
    background: #e94c3d;
    text-decoration: none;
    border-radius: 0.25em;
    color: #fff;
    text-transform: uppercase;
    font-size: var(--font-size-root);
    cursor: pointer; /* DODANE */
    position: relative;
    z-index: 10001; /* DODANE */
}

.cookies-infobar_btn:hover {
    background-color: #ffffff;
    color: #8B008B;
}

/* Wyróżnij link wizualnie */
.cookies-text a {
    color: #FFD700 !important; /* Złoty */
    text-decoration: underline !important;
    font-weight: 600;
    padding: 2px 4px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.cookies-text a:hover {
    color: #FFA500 !important; /* Pomarańczowy */
    background: rgba(255, 165, 0, 0.2);
}
