/*
 * MYTHICAL ARCHIVES - Site-Wide Styling
 * Version: 2.0.0
 * Applies mythical design to all WordPress elements
 */

/* ========================================
   HEADER STYLING
   ======================================== */
header[data-id="type-1"],
.ct-header,
#masthead {
    background: linear-gradient(180deg, var(--myth-bg-primary) 0%, transparent 100%) !important;
    border-bottom: 1px solid rgba(201,162,39,0.1) !important;
}

.ct-header a,
.site-branding a {
    color: var(--myth-text-primary) !important;
}

.ct-header a:hover {
    color: var(--myth-gold) !important;
}

/* Logo glow effect */
.site-logo img,
.custom-logo {
    filter: drop-shadow(0 0 10px rgba(201,162,39,0.3));
    transition: filter var(--myth-transition-med);
}

.site-logo img:hover,
.custom-logo:hover {
    filter: drop-shadow(0 0 20px rgba(201,162,39,0.5));
}

/* Navigation */
.ct-menu > li > a,
.main-navigation a {
    font-family: var(--myth-font-heading) !important;
    color: var(--myth-text-primary) !important;
    transition: all var(--myth-transition-fast) !important;
    position: relative;
}

.ct-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--myth-gold);
    transition: all var(--myth-transition-med);
    transform: translateX(-50%);
}

.ct-menu > li > a:hover::after,
.ct-menu > li.current-menu-item > a::after {
    width: 80%;
}

.ct-menu > li > a:hover,
.ct-menu > li.current-menu-item > a {
    color: var(--myth-gold) !important;
}

/* Dropdown menus */
.sub-menu,
.ct-menu .sub-menu {
    background: var(--myth-bg-secondary) !important;
    border: 1px solid rgba(201,162,39,0.2) !important;
    box-shadow: var(--myth-shadow-lg) !important;
}

.sub-menu a {
    color: var(--myth-text-secondary) !important;
}

.sub-menu a:hover {
    color: var(--myth-gold) !important;
    background: rgba(201,162,39,0.1) !important;
}

/* ========================================
   FOOTER STYLING
   ======================================== */
footer[data-id="type-1"],
.ct-footer,
.site-footer {
    background: linear-gradient(180deg, transparent 0%, var(--myth-bg-secondary) 100%) !important;
    border-top: 1px solid rgba(201,162,39,0.1) !important;
}

.ct-footer a,
.site-footer a {
    color: var(--myth-text-secondary) !important;
}

.ct-footer a:hover,
.site-footer a:hover {
    color: var(--myth-gold) !important;
}

/* ========================================
   SINGLE POST/PAGE STYLING
   ======================================== */
.entry-header {
    text-align: center;
    padding: 4rem 2rem;
    background: radial-gradient(ellipse at center, rgba(201,162,39,0.03) 0%, transparent 70%);
    position: relative;
}

.entry-title {
    font-family: var(--myth-font-display) !important;
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
    color: var(--myth-text-primary) !important;
    text-shadow: 0 0 30px rgba(201,162,39,0.2);
}

.entry-meta {
    color: var(--myth-text-muted) !important;
    font-family: var(--myth-font-heading) !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem !important;
}

.entry-meta a {
    color: var(--myth-gold) !important;
}

/* Content styling */
.entry-content {
    font-size: 1.15rem;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content blockquote {
    border-left: 3px solid var(--myth-gold);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: rgba(201,162,39,0.05);
    font-style: italic;
    color: var(--myth-text-secondary);
}

.entry-content blockquote cite {
    display: block;
    margin-top: 1rem;
    color: var(--myth-gold);
    font-style: normal;
}

/* Images in content */
.entry-content img {
    border-radius: 8px;
    box-shadow: var(--myth-shadow-md);
    border: 1px solid rgba(201,162,39,0.1);
}

.entry-content figure {
    margin: 2rem 0;
}

.entry-content figcaption {
    text-align: center;
    color: var(--myth-text-muted);
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

/* ========================================
   ARCHIVE/CATEGORY PAGE STYLING
   ======================================== */
.archive-title,
.page-title {
    font-family: var(--myth-font-display) !important;
    text-align: center;
    padding: 3rem 0;
    color: var(--myth-gold) !important;
}

.archive-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--myth-text-secondary);
}

/* Post grid cards */
.entries,
.ct-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

article.post,
article.page,
.ct-post-card {
    background: var(--myth-bg-card) !important;
    border: 1px solid rgba(201,162,39,0.1) !important;
    border-radius: 8px !important;
    overflow: hidden;
    transition: all var(--myth-transition-med) !important;
}

article.post:hover,
article.page:hover,
.ct-post-card:hover {
    transform: translateY(-5px);
    border-color: rgba(201,162,39,0.3) !important;
    box-shadow: var(--myth-shadow-lg) !important;
}

.ct-post-card .entry-title a,
article .entry-title a {
    color: var(--myth-text-primary) !important;
    font-family: var(--myth-font-heading) !important;
}

.ct-post-card .entry-title a:hover,
article .entry-title a:hover {
    color: var(--myth-gold) !important;
}

/* Featured images */
.ct-post-card .ct-image-container,
article .post-thumbnail {
    position: relative;
    overflow: hidden;
}

.ct-post-card .ct-image-container::after,
article .post-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(13,13,21,0.8) 100%);
    pointer-events: none;
}

/* ========================================
   SIDEBAR STYLING
   ======================================== */
.sidebar,
.widget-area {
    background: transparent !important;
}

.widget {
    background: var(--myth-bg-card) !important;
    border: 1px solid rgba(201,162,39,0.1) !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    margin-bottom: 2rem !important;
}

.widget-title {
    font-family: var(--myth-font-heading) !important;
    color: var(--myth-gold) !important;
    font-size: 1.1rem !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(201,162,39,0.2);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem !important;
}

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

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.widget a {
    color: var(--myth-text-secondary) !important;
}

.widget a:hover {
    color: var(--myth-gold) !important;
}

/* ========================================
   SEARCH STYLING
   ======================================== */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-field {
    flex: 1;
    background: var(--myth-bg-tertiary) !important;
    border: 1px solid rgba(201,162,39,0.2) !important;
    border-radius: 4px !important;
    padding: 0.75rem 1rem !important;
    color: var(--myth-text-primary) !important;
    font-family: var(--myth-font-body) !important;
}

.search-field:focus {
    outline: none;
    border-color: var(--myth-gold) !important;
    box-shadow: 0 0 15px rgba(201,162,39,0.2);
}

.search-submit {
    background: rgba(201,162,39,0.2) !important;
    border: 1px solid rgba(201,162,39,0.3) !important;
    color: var(--myth-gold) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: all var(--myth-transition-med);
}

.search-submit:hover {
    background: rgba(201,162,39,0.3) !important;
    border-color: var(--myth-gold) !important;
}

/* ========================================
   PAGINATION STYLING
   ======================================== */
.pagination,
.ct-pagination,
.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 1rem;
    background: var(--myth-bg-card) !important;
    border: 1px solid rgba(201,162,39,0.2) !important;
    border-radius: 4px !important;
    color: var(--myth-text-secondary) !important;
    font-family: var(--myth-font-heading) !important;
    transition: all var(--myth-transition-med);
}

.pagination a:hover,
.page-numbers:hover,
.page-numbers.current {
    background: rgba(201,162,39,0.2) !important;
    border-color: var(--myth-gold) !important;
    color: var(--myth-gold) !important;
}

/* ========================================
   COMMENTS STYLING
   ======================================== */
.comments-area {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(201,162,39,0.1);
}

.comments-title {
    font-family: var(--myth-font-display) !important;
    color: var(--myth-gold) !important;
    text-align: center;
    margin-bottom: 2rem;
}

.comment {
    background: var(--myth-bg-card);
    border: 1px solid rgba(201,162,39,0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-author {
    font-family: var(--myth-font-heading);
    color: var(--myth-text-primary);
}

.comment-metadata {
    color: var(--myth-text-muted);
    font-size: 0.85rem;
}

.comment-content {
    margin-top: 1rem;
    color: var(--myth-text-secondary);
}

.comment-reply-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--myth-gold) !important;
}

/* Comment form */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--myth-bg-tertiary) !important;
    border: 1px solid rgba(201,162,39,0.2) !important;
    border-radius: 4px !important;
    padding: 0.75rem 1rem !important;
    color: var(--myth-text-primary) !important;
    font-family: var(--myth-font-body) !important;
    margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--myth-gold) !important;
}

.comment-form .submit {
    background: rgba(201,162,39,0.2) !important;
    border: 1px solid rgba(201,162,39,0.3) !important;
    color: var(--myth-gold) !important;
    padding: 1rem 2rem !important;
    border-radius: 4px !important;
    font-family: var(--myth-font-heading) !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all var(--myth-transition-med);
}

.comment-form .submit:hover {
    background: rgba(201,162,39,0.3) !important;
    border-color: var(--myth-gold) !important;
    box-shadow: 0 0 20px var(--myth-gold-glow);
}

/* ========================================
   FORMS GENERAL
   ======================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select {
    background: var(--myth-bg-tertiary) !important;
    border: 1px solid rgba(201,162,39,0.2) !important;
    border-radius: 4px !important;
    padding: 0.75rem 1rem !important;
    color: var(--myth-text-primary) !important;
    font-family: var(--myth-font-body) !important;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--myth-gold) !important;
    box-shadow: 0 0 15px rgba(201,162,39,0.2);
}

button,
input[type="submit"],
input[type="button"],
.button,
.wp-block-button__link {
    background: rgba(201,162,39,0.2) !important;
    border: 1px solid rgba(201,162,39,0.3) !important;
    color: var(--myth-gold) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 4px !important;
    font-family: var(--myth-font-heading) !important;
    cursor: pointer;
    transition: all var(--myth-transition-med);
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.button:hover,
.wp-block-button__link:hover {
    background: rgba(201,162,39,0.3) !important;
    border-color: var(--myth-gold) !important;
    box-shadow: 0 0 20px var(--myth-gold-glow);
}

/* ========================================
   BREADCRUMBS
   ======================================== */
.ct-breadcrumbs,
.breadcrumbs,
.yoast-breadcrumbs,
.rank-math-breadcrumb {
    font-family: var(--myth-font-heading);
    font-size: 0.85rem;
    color: var(--myth-text-muted);
    padding: 1rem 0;
}

.ct-breadcrumbs a,
.breadcrumbs a {
    color: var(--myth-text-secondary) !important;
}

.ct-breadcrumbs a:hover,
.breadcrumbs a:hover {
    color: var(--myth-gold) !important;
}

/* ========================================
   TABLE OF CONTENTS (if using plugin)
   ======================================== */
.toc,
.ez-toc-container,
.table-of-contents {
    background: var(--myth-bg-card) !important;
    border: 1px solid rgba(201,162,39,0.2) !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    margin: 2rem 0;
}

.toc-title,
.ez-toc-title {
    font-family: var(--myth-font-heading) !important;
    color: var(--myth-gold) !important;
}

.toc a,
.ez-toc-link {
    color: var(--myth-text-secondary) !important;
}

.toc a:hover,
.ez-toc-link:hover {
    color: var(--myth-gold) !important;
}

/* ========================================
   RELATED POSTS
   ======================================== */
.related-posts,
.ct-related-posts {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(201,162,39,0.1);
}

.related-posts-title {
    font-family: var(--myth-font-display) !important;
    color: var(--myth-gold) !important;
    text-align: center;
    margin-bottom: 2rem;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--myth-bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(201,162,39,0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201,162,39,0.5);
}

/* ========================================
   SELECTION STYLING
   ======================================== */
::selection {
    background: rgba(201,162,39,0.3);
    color: var(--myth-text-primary);
}

::-moz-selection {
    background: rgba(201,162,39,0.3);
    color: var(--myth-text-primary);
}

/* ========================================
   LOADING/PRELOADER
   ======================================== */
.mythical-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--myth-bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.mythical-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-rune {
    font-size: 4rem;
    color: var(--myth-gold);
    animation: loaderPulse 1.5s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
}
