/*
Theme Name: Elegant Boxed
Theme URI: https://elegantboxed.com
Author: Elegant Themes
Description: A modern, simple boxed WordPress theme with centered logo, sticky navigation, red/black/white colour scheme with gold accents, and scroll-to-top functionality.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elegantboxed
Tags: custom-background, custom-header, custom-menu, featured-images, sticky-menu, responsive, translation-ready, boxed-layout
*/

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

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #2a2a2a;
    background: #f0f0f3;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ===== Boxed Layout ===== */
.site-box {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* ===== Header & Logo ===== */
.site-header {
    text-align: center;
    padding: 40px 20px 30px;
    background: #ffffff;
    border-bottom: 3px solid #c0392b;
}

.site-logo {
    display: inline-block;
    margin: 0 auto;
}

.site-logo img {
    max-height: 100px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.site-logo .site-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: 1px;
    text-decoration: none;
    display: block;
}

.site-logo .site-title a {
    color: #1a1a1a;
    text-decoration: none;
}

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

.site-tagline {
    font-size: 13px;
    color: #999;
    margin: 5px 0 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== Sticky Menu ===== */
.menu-wrapper {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #1a1a1a;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.menu-wrapper.is-stuck {
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.35);
}

#main-menu {
    text-align: center;
}

#main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-block;
}

#main-menu li {
    display: inline-block;
    position: relative;
    margin: 0;
}

#main-menu > ul > li > a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 18px 28px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.25s ease;
    position: relative;
}

#main-menu > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #c0392b;
    transition: all 0.25s ease;
    transform: translateX(-50%);
}

#main-menu > ul > li > a:hover,
#main-menu > ul > li.current-menu-item > a {
    color: #d4af37;
}

#main-menu > ul > li > a:hover::after,
#main-menu > ul > li.current-menu-item > a::after {
    width: 60%;
}

/* Dropdown */
#main-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a1a;
    min-width: 220px;
    text-align: left;
    display: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-top: 3px solid #c0392b;
    border-radius: 0 0 6px 6px;
}

#main-menu li:hover > .sub-menu {
    display: block;
    animation: fadeInDown 0.2s ease;
}

#main-menu .sub-menu li {
    display: block;
    width: 100%;
}

#main-menu .sub-menu li a {
    display: block;
    color: #cccccc;
    padding: 12px 22px;
    font-size: 13px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

#main-menu .sub-menu li a:hover {
    color: #d4af37;
    background: rgba(192, 57, 43, 0.15);
    padding-left: 28px;
}

#main-menu .sub-menu li:last-child > a {
    border-bottom: none;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 22px;
    padding: 14px 20px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
}

.menu-toggle:hover {
    color: #d4af37;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Content Area ===== */
.site-content {
    padding: 50px 40px;
    min-height: 400px;
}

.content-area {
    max-width: 800px;
    margin: 0 auto;
}

/* Page & Post titles */
.entry-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.3;
}

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

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

.entry-meta {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    letter-spacing: 0.5px;
}

.entry-meta a {
    color: #c0392b;
    text-decoration: none;
}

.entry-meta .separator {
    margin: 0 10px;
    color: #ddd;
}

.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    font-family: 'Playfair Display', Georgia, serif;
    color: #1a1a1a;
    margin: 30px 0 15px;
}

.entry-content h2 { font-size: 26px; }
.entry-content h3 { font-size: 22px; }

.entry-content p {
    margin-bottom: 20px;
}

.entry-content a {
    color: #c0392b;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.entry-content a:hover {
    border-bottom-color: #c0392b;
}

.entry-content blockquote {
    border-left: 4px solid #c0392b;
    margin: 25px 0;
    padding: 15px 25px;
    background: #fafafa;
    font-style: italic;
    color: #666;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Post thumbnail */
.post-thumbnail {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post cards */
.post {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

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

/* Read more link */
.read-more {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 28px;
    background: #c0392b;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.25s ease;
}

.read-more:hover {
    background: #1a1a1a;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

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

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 3px;
    color: #1a1a1a;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: #c0392b;
    color: #ffffff;
    border-color: #c0392b;
}

/* Post navigation */
.post-navigation {
    margin: 40px 0;
    padding: 25px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.post-navigation a {
    color: #c0392b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.post-navigation a:hover {
    color: #1a1a1a;
}

.post-navigation .nav-previous {
    text-align: left;
}

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

/* ===== Sidebar ===== */
.site-sidebar {
    max-width: 800px;
    margin: 0 auto;
}

.widget {
    margin-bottom: 35px;
    padding: 25px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 3px solid #c0392b;
}

.widget-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    color: #1a1a1a;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
}

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

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

.widget ul li a {
    color: #444;
    text-decoration: none;
    transition: color 0.2s;
}

.widget ul li a:hover {
    color: #c0392b;
}

/* Search form in sidebar */
.widget .search-form {
    display: flex;
}

.widget .search-field {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.widget .search-submit {
    padding: 10px 20px;
    background: #c0392b;
    color: #ffffff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.widget .search-submit:hover {
    background: #1a1a1a;
}

/* ===== Comments ===== */
.comments-area {
    margin-top: 40px;
}

.comments-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 25px;
}

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

.comment-list .comment {
    padding: 20px;
    margin-bottom: 20px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 3px solid #d4af37;
}

.comment-author {
    font-weight: 600;
    color: #1a1a1a;
}

.comment-meta {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 10px;
}

.comment-reply-link {
    color: #c0392b;
    text-decoration: none;
    font-size: 13px;
}

#respond {
    margin-top: 30px;
}

#respond .comment-reply-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    color: #1a1a1a;
}

#respond input[type="text"],
#respond input[type="email"],
#respond textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 15px;
}

#respond input[type="submit"] {
    padding: 12px 32px;
    background: #c0392b;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.25s ease;
}

#respond input[type="submit"]:hover {
    background: #1a1a1a;
}

/* ===== Footer ===== */
.site-footer {
    background: #1a1a1a;
    color: #999;
    padding: 50px 40px 30px;
    text-align: center;
}

.footer-widgets {
    max-width: 1000px;
    margin: 0 auto 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.footer-widget {
    flex: 1;
    min-width: 250px;
    text-align: left;
}

.footer-widget .widget-title {
    color: #d4af37;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.footer-widget .widget {
    background: transparent;
    border: none;
    padding: 0;
}

.footer-widget ul li {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.footer-widget ul li a {
    color: #999;
}

.footer-widget ul li a:hover {
    color: #d4af37;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    margin-top: 10px;
    font-size: 13px;
    color: #777;
    letter-spacing: 0.5px;
}

.footer-bottom a {
    color: #c0392b;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #d4af37;
}

.footer-menu {
    margin-bottom: 15px;
}

.footer-menu ul {
    list-style: none;
    padding: 0;
    display: inline-block;
}

.footer-menu li {
    display: inline-block;
}

.footer-menu li a {
    color: #999;
    text-decoration: none;
    padding: 0 15px;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-menu li a:hover {
    color: #d4af37;
}

/* ===== Scroll to Top Button ===== */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: #c0392b;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.4);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scroll-to-top:hover {
    background: #1a1a1a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}

#scroll-to-top svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* ===== 404 Page ===== */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 .error-code {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 120px;
    font-weight: 700;
    color: #c0392b;
    line-height: 1;
    margin-bottom: 20px;
}

.error-404 .error-message {
    font-size: 22px;
    color: #666;
    margin-bottom: 30px;
}

.error-404 .search-form {
    max-width: 400px;
    margin: 0 auto 30px;
    display: flex;
}

.error-404 .search-field {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.error-404 .search-submit {
    padding: 12px 24px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.error-404 .search-submit:hover {
    background: #1a1a1a;
}

/* ===== Responsive ===== */
@media only screen and (max-width: 1024px) {
    .site-box {
        max-width: 100%;
        box-shadow: none;
    }
}

@media only screen and (max-width: 768px) {
    .site-header {
        padding: 30px 20px 20px;
    }

    .site-logo .site-title {
        font-size: 28px;
    }

    .menu-toggle {
        display: block;
    }

    #main-menu ul {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: left;
    }

    #main-menu ul.open {
        display: block;
    }

    #main-menu > ul > li {
        display: block;
        width: 100%;
    }

    #main-menu > ul > li > a {
        padding: 14px 22px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    #main-menu > ul > li > a::after {
        display: none;
    }

    #main-menu .sub-menu {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        border-top: none;
        border-left: 3px solid #c0392b;
        border-radius: 0;
    }

    #main-menu li.open-sub > .sub-menu {
        display: block;
    }

    .site-content {
        padding: 30px 20px;
    }

    .entry-title {
        font-size: 24px;
    }

    .post-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .footer-widgets {
        flex-direction: column;
    }

    .footer-widget {
        text-align: center;
    }

    #scroll-to-top {
        width: 42px;
        height: 42px;
        bottom: 20px;
        right: 20px;
        font-size: 18px;
    }
}
