/*
Theme Name: WPNarraV2
Theme URI: https://example.com/wpnarrav2
Author: Olivier Bloch
Author URI: https://example.com
Description: A clean, secure, and minimal WordPress starter theme.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wpnarrav2
Tags: custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5em;
}

a {
    color: #0073aa;
    text-decoration: underline;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: #005177;
}

/* ===== Images ===== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

figure {
    margin: 0 0 1.5em;
}

/* ===== Layout ===== */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ===== Header ===== */
.site-header {
    background-color: #23282d;
    color: #fff;
    padding: 1rem 1.5rem;
}

.site-header a {
    color: #fff;
    text-decoration: none;
}

.site-header a:hover,
.site-header a:focus {
    color: #00b9eb;
}

.site-branding {
    max-width: 1200px;
    margin: 0 auto;
}

.site-title {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.2;
}

.site-description {
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 0.25rem 0 0;
}

/* ===== Navigation ===== */
.main-navigation {
    background-color: #1e1e1e;
    padding: 0 1.5rem;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 0.75rem 1rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: background-color 0.2s ease;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a {
    background-color: #0073aa;
    color: #fff;
}

/* Sub-menus */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background-color: #1e1e1e;
    min-width: 200px;
    flex-direction: column;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
    display: flex;
}

/* ===== Posts & Pages ===== */
.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title {
    font-size: 2rem;
}

.entry-title a {
    text-decoration: none;
    color: #333;
}

.entry-title a:hover {
    color: #0073aa;
}

.entry-meta {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.entry-content {
    margin-bottom: 2rem;
}

.entry-footer {
    font-size: 0.875rem;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 2rem;
}

article.post,
article.page {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #eee;
}

article.post:last-child,
article.page:last-child {
    border-bottom: none;
}

/* ===== Sidebar ===== */
.widget-area {
    padding: 1.5rem 0;
}

.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0073aa;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    padding: 0.25rem 0;
}

/* ===== Footer ===== */
.site-footer {
    background-color: #23282d;
    color: #aaa;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.site-footer a {
    color: #00b9eb;
}

/* ===== Comments ===== */
.comments-area {
    margin-top: 3rem;
}

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

.comment-body {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.comment-meta {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.comment-reply-link {
    font-size: 0.8125rem;
}

/* ===== Forms ===== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

button,
input[type="button"],
input[type="submit"] {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
    background-color: #005177;
}

/* ===== Pagination ===== */
.pagination {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background-color: #f0f0f0;
    text-decoration: none;
    border-radius: 4px;
    color: #333;
}

.pagination .page-numbers.current {
    background-color: #0073aa;
    color: #fff;
}

/* ===== Alignments (WordPress) ===== */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ===== Accessibility ===== */
.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 !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 999999;
}

.skip-link:focus {
    top: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .site-content {
        padding: 1rem;
    }

    .main-navigation ul {
        flex-direction: column;
    }

    .main-navigation ul ul {
        position: static;
        box-shadow: none;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .entry-title {
        font-size: 1.5rem;
    }
}

/* ===== WordPress Core Styles ===== */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5em;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: #666;
    text-align: center;
    padding-top: 0.5rem;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5em;
}

.gallery-item {
    flex: 1 1 calc(33.333% - 0.5rem);
}

.gallery-caption {
    font-size: 0.8125rem;
}

.sticky .entry-title::before {
    content: "★ ";
    color: #0073aa;
}

.bypostauthor .comment-body {
    border-left: 3px solid #0073aa;
}
