/**
 * Windham Legacy Core - Main Stylesheet
 * 
 * @package WindhamLegacyCore
 * @version 1.0.0
 */

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

/* Base Styles */
body {
    background-color: #eae0d5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Black Ops One', cursive;
    font-weight: 400;
    text-transform: uppercase;
    color: #000;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    letter-spacing: 0.05em;
}

h2 {
    font-size: 2rem;
    letter-spacing: 0.04em;
}

h3 {
    font-size: 2rem;
    letter-spacing: 0.03em;
}

h4 {
    font-size: 1.5rem;
    letter-spacing: 0.02em;
}

h5 {
    font-size: 1.25rem;
    letter-spacing: 0.01em;
}

h6 {
    font-size: 1.1rem;
    letter-spacing: 0.01em;
}

p {
    margin-bottom: 1.5rem;
}

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

a:hover {
    color: #333;
}

/* Layout Container */
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

/* Main content area for sticky footer */
main {
    flex: 1 0 auto;
}

/* Header Styles */
.site-header {
    background-color: #061e29;
    padding: 1rem 0;
    border-bottom: 2px solid #000;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Site Identity */
.site-identity {
    flex: 0 0 auto;
}

.site-title {
    font-family: 'Black Ops One', cursive;
    font-size: 1.5rem;
    margin: 0;
    line-height: 1;
}

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

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

.custom-logo-link {
    display: block;
    line-height: 1;
}

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

/* Navigation */
.main-navigation {
    flex: 1 1 auto;
    text-align: right;
}

.primary-menu {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.primary-menu li {
    position: relative;
}

.primary-menu a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.primary-menu a:hover {
    color: #ccc;
}

.primary-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s ease;
}

.primary-menu a:hover::after {
    width: 100%;
}

/* Main Content */
.site-main {
    padding: 4rem 0;
    flex: 1;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-item {
    background-color: #fff;
    border: 2px solid #061e29;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.post-item .entry-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.post-item .entry-title a {
    color: #061e29;
    text-decoration: none;
}

.post-item .entry-title a:hover {
    color: #333;
}

.post-item .entry-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

.post-item .post-thumbnail {
    margin-bottom: 1rem;
    overflow: hidden;
}

.post-item .post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-item .entry-content {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.post-item .entry-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

.post-item .cat-links,
.post-item .tags-links {
    font-family: 'Inter', sans-serif;
}

.post-item .cat-links a,
.post-item .tags-links a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.post-item .cat-links a:hover,
.post-item .tags-links a:hover {
    border-bottom-color: #000;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    font-family: 'Inter', sans-serif;
}

.pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 2px solid #061e29;
    background-color: #fff;
    color: #061e29;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: #000;
    color: #fff;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    padding: 0.5rem 1.5rem;
}

/* Footer */
.site-footer {
    background-color: #061e29;
    color: #fff;
    padding: 2rem 0;
    margin-top: auto;
    flex-shrink: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.footer-content .copyright {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

/* Button Styles */
.btn-legacy {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #000;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: 2px solid #000;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-legacy:hover {
    color: #000;
    background-color: transparent;
    transform: translateY(-2px);
}

.btn-legacy::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: #000;
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-legacy:hover::before {
    left: 0;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.added_to_cart,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #061E29;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: 2px solid #061E29;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 0;
    line-height: 1.2;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.added_to_cart:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce #respond input#submit.alt:hover {
    color: #061E29;
    background-color: transparent;
    transform: translateY(-2px);
}

.woocommerce .woocommerce-ordering select,
.woocommerce-page .woocommerce-ordering select {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid #061E29;
    background-color: #fff;
    color: #061E29;
    padding: 0.65rem 1rem;
    border-radius: 0;
    height: auto;
}

.woocommerce .woocommerce-ordering select:focus,
.woocommerce-page .woocommerce-ordering select:focus {
    outline: 2px solid #061E29;
    outline-offset: 2px;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 2px solid #061E29;
    background: #061E29;
}

.woocommerce-MyAccount-navigation li {
    margin: 0;
}

.woocommerce-MyAccount-navigation li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: #ffffff;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.woocommerce-MyAccount-navigation li a:hover,
.woocommerce-MyAccount-navigation li a:focus,
.woocommerce-MyAccount-navigation li.is-active a {
    background: #ffffff;
    color: #3c311e;
}

.woocommerce-MyAccount-navigation li a::before {
    font-family: dashicons;
    font-size: 18px;
    line-height: 1;
    display: inline-block;
    text-decoration: none;
    width: 18px;
    height: 18px;
}

.woocommerce-MyAccount-navigation-link--dashboard a::before {
    content: "\f226";
}

.woocommerce-MyAccount-navigation-link--orders a::before {
    content: "\f174";
}

.woocommerce-MyAccount-navigation-link--downloads a::before {
    content: "\f316";
}

.woocommerce-MyAccount-navigation-link--edit-address a::before {
    content: "\f230";
}

.woocommerce-MyAccount-navigation-link--edit-account a::before {
    content: "\f464";
}

.woocommerce-MyAccount-navigation-link--customer-logout a::before {
    content: "\f14a";
}

/* Post/Page Styles */
.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    margin-bottom: 1rem;
}

.entry-meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

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

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content blockquote {
    border-left: 4px solid #061E29;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0 16px;
        position: relative;
        text-align: left;
    }

    .site-identity {
        display: flex;
        align-items: center;
        flex: 1 1 auto;
        min-width: 0;
    }

    .custom-logo {
        max-width: 220px;
        height: auto;
    }
    
    .main-navigation {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        flex: 0 0 auto;
        position: static;
        text-align: right;
    }
    
    .site-header .main-navigation .primary-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: #061E29;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        margin: 0;
        z-index: 1001;
    }
    
    .site-header .main-navigation .primary-menu.mobile-open {
        display: flex;
    }

    .site-header .main-navigation .primary-menu li {
        width: 100%;
        margin: 0;
    }

    .site-header .main-navigation .primary-menu li a {
        display: block;
        width: 100%;
        padding: 0.85rem 1rem;
        color: #ffffff;
        text-align: left;
    }

    .site-header .main-navigation .primary-menu li a:hover,
    .site-header .main-navigation .primary-menu li a:focus {
        background: #ffffff;
        color: #061E29;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: #ffffff;
        cursor: pointer;
        padding: 0.5rem;
    }
    
    .hamburger {
        display: block;
        width: 25px;
        height: 3px;
        background: #ffffff;
        position: relative;
        transition: all 0.3s ease;
    }
    
    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        left: 0;
        width: 25px;
        height: 3px;
        background: #ffffff;
        transition: all 0.3s ease;
    }
    
    .hamburger::before {
        top: -8px;
    }
    
    .hamburger::after {
        top: 8px;
    }
    
    .mobile-menu-toggle.active .hamburger {
        background: transparent;
    }
    
    .mobile-menu-toggle.active .hamburger::before {
        top: 0;
        transform: rotate(45deg);
    }
    
    .mobile-menu-toggle.active .hamburger::after {
        top: 0;
        transform: rotate(-45deg);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .site-main {
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    .primary-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .btn-legacy {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Hide mobile menu toggle on desktop */
@media (min-width: 1025px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .primary-menu {
        display: flex;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
