/*
Theme Name: GFilotto Theme
Theme URI: https://gfilotto.com
Description: Blog theme for Giuseppe Filotto with dark vintage aesthetic and simplified two-sidebar layout
Version: 1.0
Author: Giuseppe Filotto
Author URI: https://gfilotto.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gfilotto-theme
*/

/* ===========================
   FONTS
   =========================== */

@font-face {
    font-family: 'BlackChancery';
    src: url('fonts/blackchancery.ttf') format('truetype'),
         url('fonts/BLKCHCRY.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ===========================
   RESET & BASE STYLES
   =========================== */

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

html {
    font-size: 16px;
}

body {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background-color: #fff6c1;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    left: 0;
    top: 0;
    width: 148px;
    height: 100%;
    background-image: url('images/left-border-only.jpg');
    background-repeat: repeat-y;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    right: 0;
    top: 0;
    width: 148px;
    height: 100%;
    background-image: url('images/right-border-only.jpg');
    background-repeat: repeat-y;
    z-index: -1;
}

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

a {
    color: #8B4513;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #D2691E;
    text-decoration: underline;
}

/* ===========================
   LAYOUT STRUCTURE
   =========================== */

.site-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background: transparent;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    min-height: 100vh;
}

/* ===========================
   HEADER
   =========================== */

.site-header {
    background: #1a1a1a;
    background-image: url('images/header-bg.jpg');
    background-repeat: repeat-x;
    background-position: center;
    border-bottom: 3px solid #8B4513;
    padding: 30px 0 20px;
}

.header-inner {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 30px;
}

.site-branding {
    text-align: center;
    margin-bottom: 10px;
}

.site-title {
    font-family: 'BlackChancery', Georgia, serif;
    font-size: 3rem;
    font-weight: normal;
    color: #f4e8d0;
    margin: 0 0 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.site-title a {
    color: #f4e8d0;
    text-decoration: none;
}

.site-title a:hover {
    color: #D2691E;
}

.site-description {
    font-size: 1rem;
    color: #f4e8d0;
    font-style: italic;
    margin-top: 5px;
}

/* ===========================
   THREE COLUMN LAYOUT
   =========================== */

.site-content {
    max-width: 1340px;
    margin: 0 auto;
    padding: 40px 30px;
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    gap: 30px;
}

/* Left Sidebar */
.sidebar-left {
    order: 1;
    padding-left: 15px;
}

/* Main Content */
.content-area {
    order: 2;
}

/* Right Sidebar */
.sidebar-right {
    order: 3;
}

/* ===========================
   SIDEBAR STYLING
   =========================== */

.sidebar-left,
.sidebar-right {
    font-size: 0.95rem;
}

.widget {
    background: transparent;
    padding: 15px 10px;
    margin-bottom: 25px;
    border: none;
    box-shadow: none;
    border-right: 2px solid #8B4513;
}

.sidebar-right .widget {
    border-right: none;
    border-left: 2px solid #8B4513;
}

.widget-title {
    font-family: 'BlackChancery', Georgia, serif;
    font-size: 1.5rem;
    font-weight: normal;
    margin-bottom: 12px;
    color: #000000;
    border-bottom: 2px solid #8B4513;
    padding-bottom: 5px;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 5px 0;
    border-bottom: 1px dotted #ddd;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul ul {
    margin-left: 15px;
    margin-top: 5px;
}

.widget ul ul li {
    font-size: 0.9rem;
    padding: 3px 0;
}

.widget a {
    font-family: 'BlackChancery', 'Lucida Handwriting', cursive;
    font-size: 1.1rem;
    color: #000000;
    display: block;
}

.widget ul ul a {
    font-size: 0.95rem;
}

.widget a:hover {
    color: #8B4513;
    text-decoration: none;
    padding-left: 5px;
    transition: padding-left 0.2s ease;
}

/* ===========================
   POSTS & PAGES
   =========================== */

.post,
.page {
    background: transparent;
    padding: 30px 0;
    margin-bottom: 40px;
    border: none;
    box-shadow: none;
    border-bottom: 3px solid #8B4513;
}

.page .entry-content {
    background: transparent;
}

.type-page {
    background: transparent !important;
}

article.page {
    background: transparent !important;
}

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

.entry-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #8B4513;
    padding-bottom: 15px;
}

.entry-title {
    font-family: 'BlackChancery', Georgia, serif;
    font-size: 1.875rem; /* 75% of 2.5rem */
    font-weight: normal;
    margin-bottom: 10px;
    color: #000000;
}

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

.entry-title a:hover {
    color: #8B4513;
}

.entry-meta {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.entry-meta a {
    color: #8B4513;
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.2em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    font-family: 'BlackChancery', Georgia, serif;
    font-weight: normal;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: #2a2a2a;
}

.entry-content h2 {
    font-size: 2rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.3em;
}

.entry-content h3 {
    font-size: 1.7rem;
}

.entry-content h4 {
    font-size: 1.4rem;
}

.entry-content img {
    margin: 1.5em 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.entry-content blockquote {
    margin: 1.5em 2em;
    padding: 15px 20px;
    background: rgba(139, 69, 19, 0.1);
    border-left: 4px solid #8B4513;
    font-style: italic;
}

.entry-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-size: 0.9rem;
    color: #666;
}

.more-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background: #8B4513;
    color: #fff !important;
    border-radius: 3px;
    text-decoration: none;
}

.more-link:hover {
    background: #D2691E;
    text-decoration: none;
}

/* ===========================
   COMMENTS
   =========================== */

.comments-area {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    margin-top: 40px;
    border: 1px solid #ccc;
}

.comments-title {
    font-family: 'BlackChancery', Georgia, serif;
    font-size: 2rem;
    font-weight: normal;
    margin-bottom: 20px;
    color: #2a2a2a;
}

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

.comment {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.comment-author {
    font-weight: bold;
    margin-bottom: 5px;
}

.comment-meta {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 10px;
}

.comment-content {
    margin-left: 20px;
}

/* ===========================
   FOOTER
   =========================== */

.site-footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 30px 0;
    border-top: 3px solid #8B4513;
    text-align: center;
}

.footer-inner {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-text {
    font-size: 0.9rem;
}

.footer-text a {
    color: #D2691E;
}

/* ===========================
   PAGINATION
   =========================== */

.pagination {
    margin: 40px 0;
    text-align: center;
}

.page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background: #8B4513;
    color: #fff;
    border-radius: 3px;
}

.page-numbers:hover,
.page-numbers.current {
    background: #D2691E;
    text-decoration: none;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 1024px) {
    .site-content {
        grid-template-columns: 180px 1fr 180px;
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .site-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar-left {
        order: 2;
    }
    
    .content-area {
        order: 1;
    }
    
    .sidebar-right {
        order: 3;
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: 2.2rem;
    }
    
    .site-content {
        padding: 20px 15px;
    }
    
    .post,
    .page {
        padding: 20px;
    }
    
    .entry-title {
        font-size: 2rem;
    }
}

/* ===========================
   UTILITIES
   =========================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.alignleft {
    float: left;
    margin: 0 1.5em 1em 0;
}

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

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

.clear::after {
    content: "";
    display: table;
    clear: both;
}

/* ===========================
   POLL STYLING
   =========================== */

.gf-poll {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #8B4513;
    border-radius: 5px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.poll-question {
    font-family: 'BlackChancery', Georgia, serif;
    font-size: 1.5rem;
    font-weight: normal;
    color: #2a2a2a;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.poll-form {
    margin: 15px 0;
}

.poll-option {
    display: block;
    padding: 10px 15px;
    margin-bottom: 10px;
    background: rgba(139, 69, 19, 0.05);
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.poll-option:hover {
    background: rgba(139, 69, 19, 0.1);
    border-color: #8B4513;
}

.poll-option input[type="radio"] {
    margin-right: 10px;
}

.poll-submit {
    display: block;
    width: 100%;
    padding: 12px;
    background: #8B4513;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 15px;
}

.poll-submit:hover {
    background: #D2691E;
}

.poll-results {
    margin: 15px 0;
}

.poll-result-item {
    margin-bottom: 15px;
}

.poll-option-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #2a2a2a;
}

.poll-bar-container {
    background: #f0f0f0;
    height: 25px;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.poll-bar {
    background: linear-gradient(to right, #8B4513, #D2691E);
    height: 100%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: bold;
}

.poll-stats {
    font-size: 0.9rem;
    color: #666;
    margin-top: 3px;
}

.poll-total {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-weight: bold;
    color: #2a2a2a;
    text-align: center;
}

/* ===========================
   BOOK BUTTONS WIDGET
   =========================== */

/* Sticky book buttons at top of content */
.sticky-book-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(244, 232, 208, 0.98);
    padding: 8px 15px 10px 15px;
    margin: -10px 0 30px 0;
    z-index: 100;
    border-bottom: 2px solid #8B4513;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.books-title {
    font-family: 'BlackChancery', 'Lucida Handwriting', cursive;
    font-size: 1.5rem;
    color: #000000;
    margin: 0;
}

.books-buttons-row {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
}

.book-buttons-widget {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.book-button {
    display: inline-block;
    padding: 10px 25px;
    text-align: center;
    font-weight: bold;
    font-size: 0.95rem;
    border-radius: 5px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.sticky-book-buttons .book-button {
    flex: 0 1 auto;
}

.books-buttons-row .book-button {
    flex: 0 1 auto;
}

.ebook-button {
    background: linear-gradient(135deg, #FF9900 0%, #FFB84D 100%);
    color: #000 !important;
    border: 2px solid #FF9900;
}

.ebook-button:hover {
    background: linear-gradient(135deg, #FFB84D 0%, #FF9900 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.amazon-button {
    background: linear-gradient(135deg, #FF9900 0%, #FFB84D 100%);
    color: #000 !important;
    border: 2px solid #FF9900;
}

.amazon-button:hover {
    background: linear-gradient(135deg, #FFB84D 0%, #FF9900 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Optional: Add book icon before text */
.book-button::before {
    content: "📚 ";
    font-size: 1.2em;
    margin-right: 8px;
}

/* ===========================
   SEARCH PAGE
   =========================== */

.search-form-container {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    border: 2px solid #8B4513;
}

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-form label {
    flex: 1;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 12px 20px;
    font-size: 1.1rem;
    border: 2px solid #8B4513;
    border-radius: 5px;
    font-family: Georgia, serif;
}

.search-form input[type="submit"],
.search-form button {
    padding: 12px 30px;
    background: #8B4513;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form input[type="submit"]:hover,
.search-form button:hover {
    background: #D2691E;
}

.search-results {
    margin-top: 40px;
}

.search-results h2 {
    font-family: 'BlackChancery', Georgia, serif;
    font-size: 2rem;
    color: #000;
    margin-bottom: 20px;
    border-bottom: 2px solid #8B4513;
    padding-bottom: 10px;
}

.no-results {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
    border: 2px solid #8B4513;
    text-align: center;
}

.no-results h2 {
    font-family: 'BlackChancery', Georgia, serif;
    font-size: 2rem;
    color: #000;
    margin-bottom: 15px;
}

/* Force transparent backgrounds for all page elements */
.page,
.type-page,
article.page,
.page article,
.page .entry-content,
.page .entry-header,
.single .type-page,
div.page,
.hentry.page {
    background: transparent !important;
    background-color: transparent !important;
}

/* Ensure content area on pages is transparent */
.page .content-area,
body.page .content-area {
    background: transparent !important;
    background-color: transparent !important;
}
