/*
Theme Name: Free Sparks of Light
Theme URI: https://freesparksoflight.com
Author: Captain
Author URI: https://freesparksoflight.com
Description: Custom theme for Free Sparks of Light travel blog with unique three-column layout
Version: 1.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: freesparksoflight
*/

/* ====================================
   RESET & BASE STYLES
==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

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

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

/* ====================================
   HEADER
==================================== */
.site-header {
    height: 150px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #333;
    position: relative;
    overflow: hidden;
}

.header-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-title {
    position: relative;
    z-index: 2;
    font-size: 36px;
    font-weight: 700;
    color: #333;
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
}

/* ====================================
   MAIN LAYOUT - DESKTOP
==================================== */
.main-container {
    display: flex;
    height: calc(100vh - 150px);
    overflow: hidden;
}

/* Categories Sidebar - Left */
.categories-sidebar {
    width: 250px;
    background: #f5f5f5;
    border-right: 2px solid #333;
    overflow-y: auto;
    flex-shrink: 0;
}

.categories-sidebar-inner {
    padding: 20px 15px;
}

.categories-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    padding: 5px 0;
    text-transform: uppercase;
}

.category-list {
    list-style: none;
}

.category-item {
    margin-bottom: 8px;
}

.category-link {
    display: block;
    padding: 12px 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
}

.category-link:hover {
    background: #f0f0f0;
    border-color: #999;
}

.category-link.active {
    background: #4a90e2;
    color: #fff;
    border-color: #4a90e2;
}

/* Posts Column - Second from Left */
.posts-column {
    width: 220px;
    background: #fafafa;
    border-right: 2px solid #333;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.posts-column-title {
    padding: 15px 12px;
    background: #e8e8e8;
    border-bottom: 2px solid #999;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.posts-list {
    flex: 1;
    overflow-y: auto;
}

.post-item {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    transition: background 0.2s;
}

.post-item:hover {
    background: #f0f0f0;
}

.post-item.active {
    background: #4a90e2;
    color: #fff;
}

.post-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #ddd;
    margin-bottom: 8px;
    border-radius: 2px;
}

.post-item-info {
    font-size: 12px;
    line-height: 1.4;
}

.post-item-date {
    font-weight: 600;
    display: inline;
}

.post-item-title {
    display: inline;
    font-weight: normal;
}

.post-item.active .post-item-info {
    color: #fff;
}

/* Content Area - Right Side */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Interactive Map */
.map-container {
    height: 250px;
    background: #e8f4f8;
    border-bottom: 2px solid #333;
    flex-shrink: 0;
    overflow: hidden;
}

.map-container iframe,
.map-container .map-embed {
    width: 100%;
    height: 100%;
    border: none;
}

.map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 16px;
}

/* Post Display Area */
.post-display {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Text Content (2/3) */
.text-content {
    flex: 2;
    overflow-y: auto;
    padding: 40px;
    background: #fff;
}

.post-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.post-date {
    font-size: 14px;
    color: #888;
    margin-bottom: 30px;
}

.post-content {
    font-size: 16px;
    line-height: 1.8;
}

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

.post-content h2 {
    font-size: 24px;
    margin: 30px 0 15px;
}

.post-content h3 {
    font-size: 20px;
    margin: 25px 0 12px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

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

.post-content img {
    margin: 20px 0;
}

/* Photo Gallery (1/3) */
.photo-gallery {
    flex: 1;
    background: #f8f8f8;
    border-left: 2px solid #333;
    overflow-y: auto;
    padding: 20px;
}

.gallery-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.gallery-item {
    margin-bottom: 15px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gallery-item:hover {
    opacity: 0.85;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 2px;
}

/* Empty State */
.empty-state {
    padding: 60px 40px;
    text-align: center;
    color: #999;
}

.empty-state h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 16px;
}

/* Mobile Menu Toggle (hidden on desktop) */
.mobile-menu-toggle {
    display: none;
}

/* ====================================
   MOBILE STYLES
==================================== */
@media (max-width: 768px) {
    .site-header {
        height: 100px;
    }
    
    .site-title {
        font-size: 24px;
    }
    
    .main-container {
        flex-direction: column;
        height: calc(100vh - 100px);
    }
    
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 110px;
        left: 10px;
        z-index: 1000;
        width: 50px;
        height: 50px;
        background: #4a90e2;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: #fff;
        margin: 5px auto;
        transition: 0.3s;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Categories Sidebar - Mobile */
    .categories-sidebar {
        position: fixed;
        top: 100px;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 100px);
        z-index: 999;
        background: #fff;
        box-shadow: 2px 0 8px rgba(0,0,0,0.3);
        transition: left 0.3s;
    }
    
    .categories-sidebar.open {
        left: 0;
    }
    
    /* Posts Column - Mobile */
    .posts-column {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #333;
        max-height: 40vh;
    }
    
    /* Content Area - Mobile */
    .content-area {
        width: 100%;
    }
    
    .map-container {
        height: 200px;
    }
    
    .post-display {
        flex-direction: column;
    }
    
    .text-content {
        flex: none;
        padding: 20px;
        border-bottom: 2px solid #ddd;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .photo-gallery {
        flex: none;
        border-left: none;
        padding: 15px;
    }
}

/* ====================================
   UTILITY CLASSES
==================================== */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}