/*
Theme Name: Idomioji Istorija
Theme URI: http://idomioji-istorija.lt
Author: Idomioji Istorija Team
Author URI: http://idomioji-istorija.lt
Description: Lietuvos ir pasaulio istorijos blogas. Atraskite įdomius faktus, paslaptis ir istorines istorijas.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: idomioji-istorija
Tags: blog, news, history, lithuanian, responsive, custom-menu, featured-images, post-formats, threaded-comments, translation-ready
*/

/* ========================================================================== 
   CSS Reset & Base Styles
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: #2C2C2C;
    background-color: #F7F3EC;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1.3;
    color: #1C1C1C;
    font-weight: 700;
}

a {
    color: #8B1A1A;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: #C8A464;
}

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

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

input:focus, textarea:focus, select:focus, button:focus {
    outline: 2px solid #C8A464;
    outline-offset: 2px;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* WordPress alignment classes */
.alignleft {
    float: left;
    margin: 0 1.5em 1em 0;
}

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

.aligncenter {
    display: block;
    margin: 0 auto 1em;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5em;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.visually-hidden { @extend .screen-reader-text; }

/* Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: #8B1A1A;
    z-index: 9999;
    transition: width 0.1s linear;
}

/* Table of Contents numbering */
ol.post-toc__list {
    counter-reset: post-toc-item;
    list-style: none;
    padding-left: 0;
}

ol.post-toc__list > li {
    counter-increment: post-toc-item;
    position: relative;
    padding-left: 2.25rem;
    min-height: 1.65rem;
}

ol.post-toc__list > li::before {
    content: counter(post-toc-item);
    position: absolute;
    left: 0;
    top: 0.05rem;
    width: 1.55rem;
    height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #8B1A1A;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

ol.post-toc__list > li.post-toc__item--sub::before {
    background: #C8A464;
    color: #1C1C1C;
}

/* Whole post card is clickable */
.post-card {
    position: relative;
    cursor: pointer;
}

.post-card__overlay-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

/* Keep intentional inner links above the full-card link. */
.post-card__category {
    z-index: 3;
}

.post-card__img-wrap > a:not(.post-card__category),
.post-card__title,
.post-card__read-more {
    position: relative;
    z-index: 2;
}
