/* ==========================================================================
   RoasTronix V2 - Shared Styles
   ========================================================================== */

/* ==========================================================================
   Font Faces
   ========================================================================== */

@font-face {
    font-family: 'Conthrax';
    src: url('../fonts/conthrax-rg.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Conthrax';
    src: url('../fonts/conthrax-rg-it.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Conthrax';
    src: url('../fonts/conthrax-sb.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Conthrax';
    src: url('../fonts/conthrax-bd.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Conthrax';
    src: url('../fonts/conthrax-hv.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Conthrax';
    src: url('../fonts/conthrax-lt.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Reset & Variables
   ========================================================================== */

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

:root {
    --bg-dark: #0a0a0a;
    --bg-dark-lighter: #1a1a1a;
    --bg-dark-card: #161616;
    --primary-gold: #A01C2E;
    --primary-gold-dark: #7A1525;
    --accent-gold-light: #C4283A;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --border-dark: #2a2a2a;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 0;
    transition: padding-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Conthrax', 'Inter', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* ==========================================================================
   Body Nav-at-Top Padding
   ========================================================================== */

body.nav-at-top {
    padding-top: 100px;
}

@media (max-width: 768px) {
    body.nav-at-top {
        padding-top: 80px;
    }
}

/* ==========================================================================
   Navigation - Homepage starts at top, moves to bottom on scroll
   ========================================================================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 30px 0;
    border-bottom: none;
    border-top: none;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.scrolled {
    top: auto;
    bottom: 0;
    background: rgba(10, 10, 10, 0.98);
    border-top: 1px solid var(--border-dark);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    padding: 20px 0;
}

/* Inner page nav - always fixed top with bg */
nav.inner-page-nav {
    background: rgba(10, 10, 10, 0.95);
    padding: 25px 0;
    border-bottom: 1px solid var(--border-dark);
}

/* Inner pages need padding for fixed top nav */
body:not(.home) {
    padding-top: 100px;
}

@media (max-width: 768px) {
    body:not(.home) {
        padding-top: 80px;
    }
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 60px;
}

.logo {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 50px;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover {
    color: var(--text-primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: width 0.3s;
}

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

.nav-menu a.active::after {
    width: 100%;
}

.nav-shop {
    color: var(--primary-gold) !important;
    font-weight: 600 !important;
}

.nav-shop:hover {
    color: var(--accent-gold-light) !important;
}

.nav-cta {
    background: var(--primary-gold) !important;
    color: #ffffff !important;
    padding: 10px 25px !important;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: all 0.3s !important;
}

.nav-cta:hover {
    background: var(--primary-gold-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(160, 28, 46, 0.4);
}

.nav-cta::after {
    display: none !important;
}

nav.scrolled .nav-cta {
    background: var(--primary-gold) !important;
    box-shadow: 0 0 20px rgba(160, 28, 46, 0.3);
}

/* ==========================================================================
   Hamburger Menu
   ========================================================================== */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    gap: 6px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   Mobile Menu Overlay & Mobile Menu
   ========================================================================== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 85%;
    height: 100%;
    background: var(--bg-dark-lighter);
    z-index: 1002;
    padding: 100px 40px 40px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    overflow-y: auto;
    border-left: 1px solid var(--border-dark);
    transform: translateX(100%);
    visibility: hidden;
}

.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.mobile-menu-close::before,
.mobile-menu-close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    transition: background 0.3s;
}

.mobile-menu-close::before {
    transform: rotate(45deg);
}

.mobile-menu-close::after {
    transform: rotate(-45deg);
}

.mobile-menu-close:hover {
    border-color: var(--primary-gold);
    background: rgba(160, 28, 46, 0.1);
}

.mobile-menu-close:hover::before,
.mobile-menu-close:hover::after {
    background: var(--primary-gold);
}

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

.mobile-menu ul li {
    margin-bottom: 8px;
}

.mobile-menu-link {
    display: block;
    padding: 15px 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s;
    text-decoration: none;
}

.mobile-menu-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    padding-left: 25px;
}

.mobile-menu-link.active {
    color: var(--primary-gold);
    background: rgba(160, 28, 46, 0.1);
}

.mobile-menu .nav-shop {
    color: var(--primary-gold) !important;
}

.mobile-menu .nav-cta {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding: 15px 25px !important;
    border-radius: 10px;
}

/* ==========================================================================
   Container & Section Headers
   ========================================================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-label {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(160, 28, 46, 0.1);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-gold);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-header h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    background: var(--bg-dark-lighter);
    border-top: 1px solid var(--border-dark);
    padding: 80px 40px 40px;
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-size: 1.75rem;
    margin-bottom: 20px;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 30px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: var(--text-secondary);
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: #ffffff;
    transform: translateY(-3px);
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

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

.footer-section ul li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-section ul a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul a:hover {
    color: var(--primary-gold);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 40px;
    border-top: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Sticky CTA Bar
   ========================================================================== */

.sticky-cta-bar {
    position: fixed;
    bottom: -80px;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-dark);
    padding: 14px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-cta-bar.visible {
    bottom: 0;
}

.sticky-cta-bar p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.sticky-cta-bar p strong {
    color: var(--text-primary);
    font-weight: 700;
}

.sticky-cta-btn {
    display: inline-block;
    background: var(--primary-gold);
    color: #ffffff;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.sticky-cta-btn:hover {
    background: var(--primary-gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(160, 28, 46, 0.4);
}

/* ==========================================================================
   Inner Pages (About, Privacy, Terms, Blog, etc.)
   ========================================================================== */

.inner-page {
    min-height: 60vh;
}

.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px 80px;
}

.page-header {
    padding: 20px 0 40px;
    border-bottom: 1px solid var(--border-dark);
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.post-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-meta time {
    color: var(--primary-gold);
    font-weight: 600;
}

.post-categories a {
    color: var(--text-secondary);
    transition: color 0.3s;
}

.post-categories a:hover {
    color: var(--primary-gold);
}

/* Page Body — WordPress content styles */
.page-body {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.page-body h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin: 50px 0 20px;
}

.page-body h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin: 40px 0 15px;
}

.page-body h4 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 30px 0 10px;
}

.page-body p {
    margin-bottom: 20px;
}

.page-body a {
    color: var(--primary-gold);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s;
}

.page-body a:hover {
    color: var(--accent-gold-light);
}

.page-body ul,
.page-body ol {
    margin: 0 0 25px 25px;
    padding: 0;
}

.page-body li {
    margin-bottom: 8px;
}

.page-body blockquote {
    border-left: 4px solid var(--primary-gold);
    padding: 20px 30px;
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-primary);
}

.page-body img {
    border-radius: 16px;
    margin: 30px 0;
}

.page-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.page-body th,
.page-body td {
    padding: 12px 16px;
    border: 1px solid var(--border-dark);
    text-align: left;
}

.page-body th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-weight: 600;
}

.page-body hr {
    border: none;
    border-top: 1px solid var(--border-dark);
    margin: 40px 0;
}

/* Featured Image */
.post-featured-image {
    margin-bottom: 40px;
    border-radius: 16px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    border-radius: 0;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-dark);
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px 20px;
    background: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.3s;
    max-width: 48%;
}

.post-nav-link:hover {
    border-color: var(--primary-gold);
    transform: translateY(-2px);
}

.post-nav-link.next {
    text-align: right;
    margin-left: auto;
}

.post-nav-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-nav-title {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.blog-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.blog-card:hover {
    border-color: var(--primary-gold);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.blog-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 25px;
}

.blog-card-content time {
    font-size: 0.8rem;
    color: var(--primary-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-content h2 {
    font-size: 1.2rem;
    margin: 10px 0;
    line-height: 1.4;
}

.blog-card-content h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card-content h2 a:hover {
    color: var(--primary-gold);
}

.blog-card-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-read-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-gold);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-read-more:hover {
    color: var(--accent-gold-light);
}

.blog-pagination {
    margin-top: 50px;
    text-align: center;
}

.blog-pagination .nav-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.blog-pagination a,
.blog-pagination span {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.blog-pagination a {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
    text-decoration: none;
}

.blog-pagination a:hover {
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

.blog-pagination .current {
    background: var(--primary-gold);
    color: #ffffff;
}

.no-posts {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    padding: 60px 0;
}

/* WordPress Elementor cleanup — strip leftover inline styles on inner pages */
.page-body .elementor,
.page-body .elementor-section,
.page-body .elementor-container,
.page-body .elementor-row,
.page-body .elementor-column,
.page-body .elementor-widget-wrap,
.page-body .elementor-widget,
.page-body .elementor-element {
    all: unset;
    display: block;
}

.page-body .elementor-widget-text-editor,
.page-body .elementor-text-editor {
    all: unset;
}

/* Inner page responsive */
@media (max-width: 768px) {
    .page-content {
        padding: 0 25px 60px;
    }

    .page-header {
        padding: 15px 0 30px;
    }

    .page-body {
        font-size: 1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

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

    .post-nav-link {
        max-width: 100%;
    }

    .post-nav-link.next {
        text-align: left;
    }
}

/* ==========================================================================
   Global Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 18px 0;
    }

    .nav-container {
        padding: 0 30px;
    }

    .mobile-menu {
        width: 100%;
        max-width: 100%;
        padding: 100px 30px 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .sticky-cta-bar {
        padding: 12px 20px;
        gap: 12px;
    }

    .sticky-cta-bar p {
        display: none;
    }

    .sticky-cta-btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   Scroll Lock for Modals
   ========================================================================== */

body.modal-open {
    overflow: hidden;
}

/* ==========================================================================
   Fade-in Animation
   ========================================================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
