/*
Theme Name: Istropolitana
Theme URI: https://github.com/yourusername/istropolitana
Author: Your Name
Author URI: https://yourwebsite.com
Description: A minimalistic WordPress blog theme focusing on clean typography and content readability. Perfect for personal blogs and writers who value simplicity.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.7
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: istropolitana
Tags: blog, minimal, clean, simple, responsive, accessibility-ready, one-column, custom-logo, custom-menu, featured-images, threaded-comments
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 CSS Reset & Normalize
2.0 Typography
3.0 Elements
4.0 Forms
5.0 Navigation
6.0 Accessibility
7.0 Layout
8.0 Header
9.0 Content
10.0 Footer
11.0 Media Queries
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 CSS Reset & Normalize
--------------------------------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
menu,
nav,
section {
    display: block;
}

/*--------------------------------------------------------------
2.0 Typography
--------------------------------------------------------------*/
body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #000000;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #000000;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5,
h6 {
    font-size: 1rem;
}

p {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

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

a:hover,
a:focus {
    color: #004999;
    text-decoration: underline;
}

a:focus {
    outline: 2px dotted #0066cc;
    outline-offset: 2px;
}

strong,
b {
    font-weight: 700;
}

em,
i {
    font-style: italic;
}

blockquote {
    margin: 2rem 0;
    padding-left: 2rem;
    border-left: 4px solid #666666;
    font-style: italic;
    color: #666666;
}

blockquote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-size: 0.9rem;
}

code,
pre {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f5f5f5;
}

code {
    padding: 0.2rem 0.4rem;
    font-size: 0.9em;
}

pre {
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

pre code {
    padding: 0;
    background-color: transparent;
}

/*--------------------------------------------------------------
3.0 Elements
--------------------------------------------------------------*/
hr {
    border: 0;
    border-top: 1px solid #e0e0e0;
    margin: 3rem 0;
}

ul,
ol {
    margin: 0 0 1.5rem 2rem;
}

ul {
    list-style: disc;
}

ol {
    list-style: decimal;
}

li {
    margin-bottom: 0.5rem;
}

ul ul,
ol ol,
ul ol,
ol ul {
    margin-bottom: 0;
    margin-top: 0.5rem;
}

dt {
    font-weight: 700;
}

dd {
    margin: 0 0 1.5rem 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

th,
td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    font-weight: 700;
    background-color: #f5f5f5;
}

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

figure {
    margin: 2rem 0;
}

figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666666;
    font-style: italic;
}

/*--------------------------------------------------------------
4.0 Forms
--------------------------------------------------------------*/
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus {
    border-color: #0066cc;
    outline: none;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

button,
input[type="button"],
input[type="submit"] {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #000000;
    color: #ffffff;
    border: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

button:focus,
input[type="button"]:focus,
input[type="submit"]:focus {
    outline: 2px dotted #0066cc;
    outline-offset: 2px;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/*--------------------------------------------------------------
5.0 Navigation
--------------------------------------------------------------*/
.site-navigation {
    margin-bottom: 3rem;
    display: none; /* Hidden until pages are added */
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 1rem;
}

.main-navigation a:hover,
.main-navigation a:focus {
    color: #0066cc;
    text-decoration: none;
}

.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
    color: #0066cc;
}

/* Pagination */
.pagination,
.navigation {
    margin: 3rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pagination .nav-links,
.navigation .nav-links {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: space-between;
}

.pagination a,
.navigation a,
.pagination .current,
.navigation .current {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pagination a:hover,
.navigation a:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

.pagination .current {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Post navigation */
.post-navigation {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation a {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/*--------------------------------------------------------------
6.0 Accessibility
--------------------------------------------------------------*/
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f5f5f5;
    border: 2px solid #0066cc;
    clip: auto !important;
    color: #000000;
    display: block;
    font-size: 1rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 1rem;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/*--------------------------------------------------------------
7.0 Layout
--------------------------------------------------------------*/
.site {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.site-content {
    margin: 3rem 0;
}

/*--------------------------------------------------------------
8.0 Header
--------------------------------------------------------------*/
.site-header {
    text-align: center;
}

.site-branding {
    margin-bottom: 2rem;
}

.site-title {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 700;
}

.site-title a {
    color: #000000;
}

.site-title a:hover,
.site-title a:focus {
    color: #0066cc;
    text-decoration: none;
}

.site-description {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #666666;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.custom-logo-link {
    display: inline-block;
    margin-bottom: 1rem;
}

.custom-logo {
    max-width: 200px;
    height: auto;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 1000;
    transform: scale(0.75);
}

/* Footer Inner */
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}


/*--------------------------------------------------------------
9.0 Content
--------------------------------------------------------------*/
.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.entry-title a {
    color: #000000;
}

.entry-title a:hover,
.entry-title a:focus {
    color: #0066cc;
    text-decoration: none;
}

.entry-meta {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    color: #666666;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.byline a {
    color: #333333;
}

.entry-meta a {
    color: #666666;
}

.entry-meta a:hover,
.entry-meta a:focus {
    color: #0066cc;
}

.entry-meta > span {
    margin-right: 0.1rem;
}

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

.entry-content > *:last-child {
    margin-bottom: 0;
}

.entry-footer {
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    color: #666666;
}

.entry-footer a {
    color: #666666;
}

.entry-footer a:hover,
.entry-footer a:focus {
    color: #0066cc;
}

.cat-links,
.tags-links {
    display: inline-block;
    margin-right: 1rem;
}

/* Blog posts listing */
.hentry {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #e0e0e0;
}

.hentry:last-child {
    border-bottom: none;
}

.post-thumbnail {
    margin-bottom: 2rem;
}

.post-thumbnail img {
    width: 100%;
}

.more-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #000000;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
}

.more-link:hover,
.more-link:focus {
    background-color: #333333;
    color: #ffffff;
    text-decoration: none;
}

/* Archive & Search */
.page-header {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #000000;
}

.page-title {
    font-size: 2rem;
    margin: 0;
}

.archive-description {
    margin-top: 1rem;
    color: #666666;
}

/* 404 Page */
.error-404 .page-content {
    margin-top: 2rem;
}

.error-404 .search-form {
    margin-top: 2rem;
}

/*--------------------------------------------------------------
10.0 Footer
--------------------------------------------------------------*/
.site-footer {
    margin-top: 2rem;
    padding: 1.5rem 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    color: #666666;
}

.site-info a {
    color: #666666;
}

.site-info a:hover,
.site-info a:focus {
    color: #0066cc;
}

/*--------------------------------------------------------------
11.0 Media Queries
--------------------------------------------------------------*/

/* Tablets and below */
@media screen and (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .site {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

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

    .main-navigation ul {
        gap: 1rem;
    }

    .post-navigation .nav-links {
        flex-direction: column;
    }

    .post-navigation .nav-next {
        text-align: left;
    }
    
    .site-content {
    margin: 0;
}
}

/* Mobile phones */
@media screen and (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .site {
        padding: 1rem 0.75rem;
    }

    .site-header {
        padding-top: 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

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

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

    blockquote {
        padding-left: 1rem;
        margin: 1.5rem 0;
    }
}

.error-404 h1 {
    text-align: center;
}
