/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #fff;
    background-color: #0a1628;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: #0c203a;
    padding: 20px 0 0 0;
    top: 0;
    z-index: 1000;
}

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

.tagline-left,
.tagline-right {
    flex: 1;
    font-size: 1rem;
    color: #d4af37;
    font-style: italic;
}

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

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

.logo-center {
    flex: 0 0 auto;
    text-align: center;
    padding: 0 40px;
}

.logo-center img {
    max-height: 120px;
    width: auto;
}

/* Navigation */
.main-nav {
    background-color: #0c203a;
    border-bottom: 2px solid #1a2a45;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 0px 30px 10px 30px;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.nav-menu > li > a:hover {
    background-color: rgba(212, 175, 55, 0.2);
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}

.has-dropdown > a::after {
    content: ' ▼';
    font-size: 0.7em;
    margin-left: 5px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(10, 22, 40, 0.98);
    min-width: 200px;
    list-style: none;
    padding: 0;
    margin: 0;
    border: 2px solid #d4af37;
    border-top: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.dropdown-menu li {
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

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

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #d4af37;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: rgba(212, 175, 55, 0.2);
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin: 10px auto;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: #d4af37;
    margin: 4px 0;
    transition: 0.3s;
}

/* Content Sections */
.content-section {
    padding: 20px 20px;
    background-image: url('images/bg_map.webp');
    background-attachment: fixed;
    background-size: 100% auto;
    background-position: center top;
    background-repeat: repeat-y;
}

.content-box {
    background-color: rgba(10, 22, 40, 0.85);
    border: 3px solid #d4af37;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.odd-section {
    background-color: #143051;
}

.content-box h1 {
    color: #d4af37;
    font-size: 2.2rem;
    margin-bottom: 20px;
    text-align: center;
}

.content-box h2 {
    color: #d4af37;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.content-box h3 {
    color: #d4af37;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.content-box p {
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.content-box a {
    color: #5b9bd5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.content-box a:hover {
    color: #7fb3e8;
}

.content-box em {
    color: #d4af37;
    font-style: italic;
}

/* Book Covers Grid */
.book-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px 0;
}

/* Single centered image in middle column */
.book-covers img {
    max-width: 100%;
    height: auto;
}

/* When only one image, center it in the middle column */
.book-covers img:only-child {
    grid-column: 2;
}

.book-covers img:hover {
    transform: scale(1.05);
}

/* Book Detail Page */
.book-detail {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.book-cover-large {
    flex: 0 0 350px;
    text-align: center;
}

.book-cover-large img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    margin-bottom: 15px;
}

.coming-soon {
    color: #5b9bd5;
    font-size: 1.5rem;
    font-weight: bold;
    font-style: italic;
}

.book-description {
    flex: 1;
}

.book-description h1 {
    text-align: left;
    margin-bottom: 15px;
}

.book-tagline {
    font-size: 1.2rem !important;
    color: #d4af37 !important;
    font-style: italic;
    margin-bottom: 25px !important;
}

.book-final {
    margin-top: 25px !important;
}

/* Social Icons */
.social-icon {
    text-align: center;
    margin: 20px 0;
}

.social-icon img {
    max-width: 100px;
    height: auto;
    transition: transform 0.3s ease;
}

.social-icon img:hover {
    transform: scale(1.1);
}

/* Community Cards */
.community-links {
    display: flex;
    gap: 30px;
    padding-bottom: 20px;
}

.community-card {
    flex: 1;
    text-align: center;
}

.community-card h2 {
    margin-bottom: 10px;
}

.social-icon-large {
    max-width: 75px;
    height: auto;
    transition: transform 0.3s ease;
}

.social-icon-large:hover {
    transform: scale(1.1);
}

/* Map Preview */
.map-preview {
    text-align: center;
    margin: 20px 0;
}

.map-preview img {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.map-preview img:hover {
    transform: scale(1.05);
}

.blog_paragraph {
    margin-top: 10px;
}

#blog-latest-content ul,
#blog-latest-content ol {
    padding-left: 30px;
    margin: 10px 0;
}

#blog-latest-content li {
    padding-left: 0px;
    margin-bottom: 5px;
}

/* Footer */
.site-footer {
    background-color: rgba(10, 22, 40, 0.98);
    padding: 0px 20px 5px;
    border-top: 3px solid #d4af37;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo {
    flex: 0 0 auto;
}

.footer-logo img {
    max-height: 120px;
    width: auto;
}

.footer-links {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 80px;
}

.footer-column h3 {
    color: #d4af37;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #5b9bd5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #7fb3e8;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
}

.footer-bottom p {
    color: #ccc;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #5b9bd5;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Mobile Responsiveness */
@media (max-width: 1200px) {
    .header-top {
        padding: 0 20px 20px;
    }
    
    .tagline-left,
    .tagline-right {
        font-size: 0.9rem;
    }
    
    .logo-center {
        padding: 0 20px;
    }
}

/* Tablet and Mobile - Single comprehensive breakpoint */
@media (max-width: 1024px) {
    /* Hide taglines on tablets and phones */
    .tagline-left,
    .tagline-right {
        display: none !important;
    }
    
    /* Header layout - logo left, menu right */
    .site-header {
        position: static;
    }
    
    .header-top {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 20px !important;
        gap: 0 !important;
        text-align: left !important;
    }
    
    .logo-center {
        flex: 0 0 auto !important;
        padding: 0 !important;
        text-align: left !important;
    }
    
    .logo-center img {
        max-height: 60px !important;
    }
    
    /* Show mobile menu toggle in header */
    .mobile-menu-toggle {
        display: flex !important;
        position: relative !important;
        margin: 0 !important;
        padding: 5px !important;
    }
    
    /* Sticky nav */
    .main-nav {
        position: sticky;
        top: 0;
        border-top: 2px solid #1a2a45;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu > li > a {
        padding: 12px 20px;
    }
    
    .dropdown-menu {
        position: static;
        display: none;
        border: none;
        border-top: 1px solid rgba(212, 175, 55, 0.3);
    }
    
    .has-dropdown.active .dropdown-menu {
        display: block;
    }
    
    /* Book layouts */
    .book-covers {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 20px;
    }
    
    .book-covers img:only-child {
        grid-column: 1; /* Reset to single column */
    }    

    .book-detail {
        flex-direction: column;
    }
    
    .book-cover-large {
        flex: 0 0 auto;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .book-description h1 {
        text-align: center;
    }
    
    /* Community */
    .community-links {
        flex-direction: column;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
    
    /* Content */
    .content-box {
        padding: 25px;
    }
    
    .content-box h1 {
        font-size: 1.8rem;
    }
    
    .content-box h2 {
        font-size: 1.5rem;
    }
    
    /* Fix background for mobile sticky */
    .content-section {
        background-attachment: scroll;
    }

    .blog_paragraph {
        margin-top: 20px;
    }


    #blog-latest-content ul,
    #blog-latest-content ol {
        padding-left: 30px;
        margin: 15px 0;
    }    

    #blog-latest-content li {
        padding-left: 0px;
        margin-bottom: 5px;
    }

}

/* Small phones */
@media (max-width: 480px) {
    .logo-center img {
        max-height: 50px !important;
    }
    
    .content-box {
        padding: 20px;
    }
    
    .content-box h1 {
        font-size: 1.5rem;
    }
    
    .content-box p {
        font-size: 1rem;
    }
    
    .footer-logo img {
        max-height: 80px;
    }
}



/* Spells & Skills Page */
.player-type-selector {
    margin: 30px 0;
    text-align: center;
}

.player-type-selector label {
    font-size: 1.2rem;
    color: #d4af37;
    margin-right: 15px;
    font-weight: 600;
}

.player-type-selector select {
    padding: 10px 20px;
    font-size: 1rem;
    border: 2px solid #d4af37;
    border-radius: 5px;
    background-color: #0c203a;
    color: #fff;
    cursor: pointer;
    min-width: 250px;
}

.player-type-selector select:focus {
    outline: none;
    border-color: #5b9bd5;
    box-shadow: 0 0 5px rgba(91, 155, 213, 0.5);
}

#spells-table-container {
    margin-top: 30px;
    overflow-x: auto;
}

#spells-table {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(10, 22, 40, 0.85);
    border: 3px solid #d4af37;
    border-radius: 8px;
}

#spells-table thead {
    background-color: #0c203a;
}

#spells-table th {
    padding: 15px;
    text-align: left;
    color: #d4af37;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 2px solid #d4af37;
}

#spells-table td {
    padding: 12px 15px;
    color: #fff;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    vertical-align: top;
}

#spells-table tbody tr:last-child td {
    border-bottom: none;
}

#spells-table tbody tr:hover {
    background-color: rgba(91, 155, 213, 0.15);
}

#spells-table td.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* Level column */
#spells-table td:first-child,
#spells-table th:first-child {
    width: 75px;
    text-align: center;
    font-weight: 600;
    color: #5b9bd5;
}

/* Name column */
#spells-table td:nth-child(2),
#spells-table th:nth-child(2) {
    width: 200px;
    font-weight: 600;
    color: #d4af37;
}

.passive {
    font-size: 13px;
    color: #31677a;
}

/* Effect column */
#spells-table td:nth-child(3),
#spells-table th:nth-child(3) {
    width: 300px;
    font-weight: 600;
    color: #6fd437;
}

/* Description column takes remaining space */
#spells-table td:nth-child(4),
#spells-table th:nth-child(4) {
    width: auto;
}

#spells-table td:nth-child(4) p,
#spells-table td:nth-child(4) > text {
    color: #d7d7d7;
    margin-bottom: 0;
}

#spells-table td:nth-child(4) ul {
    padding-left: 20px;
    margin: 0 0;
    color: #de6161 !important;
}

#spells-table td:nth-child(4) li {
    margin-bottom: 3px;
}


/* Mobile - Card Layout */
@media (max-width: 1024px) {
    .player-type-selector {
        margin: 20px 0;
    }
    
    .player-type-selector label {
        display: block;
        margin-bottom: 10px;
        font-size: 1rem;
    }
    
    .player-type-selector select {
        width: 100%;
        min-width: auto;
    }
    
    #spells-table {
        border: none;
        background-color: transparent;
    }    

    /* Hide table header */
    #spells-table thead {
        display: none;
    }
    
    /* Convert table to blocks */
    #spells-table,
    #spells-table tbody,
    #spells-table tr {
        display: block;
    }
    
    /* Style each row as a card */
    #spells-table tr {
        margin-bottom: 20px;
        border: 2px solid #d4af37;
        border-radius: 8px;
        padding: 15px;
        background-color: rgba(10, 22, 40, 0.95);
    }
    
    /* Style each cell */
    #spells-table td {
        display: block;
        text-align: left;
        padding: 0;
        border: none;
        width: 100% !important;
    }
    
    /* Level and Name on same line */
    #spells-table td:first-child:not(.no-data) {
        display: inline;
        font-size: 1.1rem;
        color: #5b9bd5;
        font-weight: 600;
    }

    #spells-table td:first-child:not(.no-data):before {
        content: "Level ";
        color: #5b9bd5;
    }

    #spells-table td:first-child:not(.no-data):after {
        content: ": ";
    }
    
    #spells-table td:nth-child(2) {
        display: inline;
        font-size: 1.1rem;
        color: #d4af37;
        font-weight: 600;
    }
    
    /* Effect on new line */
    #spells-table td:nth-child(3) {
        display: block;
        color: #6fd437;
        font-weight: 600;
        margin-top: 5px;
        margin-bottom: 10px;
    }

    #spells-table td:nth-child(3) ul {
        padding-left: 20px;
        margin: 5px 0;
    }
    
    #spells-table td:nth-child(3) li {
        margin-bottom: 3px;
    }    
    
    /* Divider line before description */
    #spells-table td:nth-child(4) {
        display: block;
        line-height: 1.6;
        padding-top: 5px;
        margin-top: 10px;
        border-top: 1px solid #d4af37;
    }

    #spells-table td:nth-child(4) p {
        color: #d7d7d7;
        margin-bottom: 0;
    }

    #spells-table td:nth-child(4) ul {
        padding-left: 20px;
        margin: 0 0;
        color: #de6161 !important;
    }

    #spells-table td:nth-child(4) li {
        margin-bottom: 3px;
    }
    
}

#blog-latest-content ul,
#blog-latest-content ol {
    padding-left: 40px;
    margin: 10px 0;
}

#blog-latest-content li {
    padding-left: 0px;
    margin-bottom: 5px;
}

/* Blog Page Styles */
.blog-filters {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(20, 48, 81, 0.5);
    border-radius: 8px;
    border: 1px solid #1a2a45;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    color: #d4af37;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.filter-select {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    background-color: #0c203a;
    border: 2px solid #d4af37;
    color: #fff;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #5b9bd5;
}

.tag-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-button {
    padding: 8px 16px;
    background-color: #0c203a;
    border: 2px solid #5b9bd5;
    color: #5b9bd5;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.tag-button:hover {
    background-color: #5b9bd5;
    color: #fff;
}

.tag-button.active {
    background-color: #d4af37;
    border-color: #d4af37;
    color: #0c203a;
}

.blog-post {
    margin-bottom: 20px;
    padding-bottom: 30px;
    border-bottom: 2px solid #1a2a45;
}

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

.blog-post-date {
    color: #5b9bd5;
    font-size: 0.95rem;
    font-weight: 600;
}

.blog-post-title {
    color: #d4af37;
    font-size: 1.8rem;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.blog-post-tags .tag-pill {
    padding: 4px 12px;
    background-color: rgba(91, 155, 213, 0.2);
    color: #5b9bd5;
    border-radius: 12px;
    font-size: 0.85rem;
}

.blog-post-content {
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.8;
}

.blog-post-content p {
    margin-bottom: 10px;
}

.blog-post-content ul,
.blog-post-content ol {
    padding-left: 40px;
    margin: 10px 0;
}

.blog-post-content li {
    margin-bottom: 5px;
}

.blog-post:nth-child(odd) {
    background-color: #1b3863;
    padding: 20px;
    border-radius: 8px;
}

.blog-post:nth-child(even) {
    background-color: #162a47;
    padding: 20px;
    border-radius: 8px;
}

.no-posts-message {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}


@media (max-width: 768px) {
    .filter-select {
        max-width: 100%;
    }
    
    .blog-post-title {
        font-size: 1.5rem;
    }
}


@media (max-width: 768px) {
    .filter-select {
        max-width: 100%;
    }
    
    .blog-post-title {
        font-size: 1.5rem;
    }
    
    /* Fix tag filter buttons spacing on mobile */
    .tag-filter-buttons {
        gap: 8px;
        margin-top: 10px;
    }
    
    .tag-button {
        padding: 6px 12px;
        font-size: 0.85rem;
        margin: 4px; /* Add explicit margin as fallback */
        white-space: nowrap; /* Prevent text wrapping inside buttons */
    }
    
    /* Remove alternating backgrounds on mobile */
    .blog-post:nth-child(odd),
    .blog-post:nth-child(even) {
        background-color: transparent;
        padding: 0;
        padding-bottom: 30px;
    }
    
    /* Reduce filter box padding on mobile */
    .blog-filters {
        padding: 15px;
    }
    
    .filter-group {
        margin-bottom: 15px;
    }    
}


.filter-group label {
    display: block;
    color: #d4af37;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

#all-tags-dropdown {
    max-width: 300px;
}

@media (max-width: 768px) {
    #all-tags-dropdown {
        max-width: 100%;
    }
    .footer-bottom {
        padding-top: 10px;
    }
    .footer-bottom p {
        font-size: 0.55rem;
    }
}