/*
Theme Name: Lightfall
Theme URI: https://example.com/lightfall
Author: Your Name
Author URI: https://example.com
Description: A minimal, clean blog theme inspired by Fairy Light. Perfect for travel, food, technology, and fashion blogs. Features include customizer settings, slider, featured posts, social icons, sidebar options, and more.
Version: 1.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lightfall
Tags: blog, one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-logo, custom-menu, featured-images, footer-widgets, theme-options, threaded-comments, translation-ready
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    background-color: #f5f5f5;
}

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

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

a:hover {
    color: #e85555;
}

/* Container & Layout */
.site-container {
    max-width: 1170px;
    margin: 0 auto;
    background-color: #fff;
}

.site-inner {
    padding: 30px;
}

.content-sidebar-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.sidebar {
    flex: 0 0 350px;
}

/* Header */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 20px 0;
}

.header-inner {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    flex: 1;
}

.site-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: #2c3e50;
}

.site-description {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
    font-weight: 400;
}

/* Navigation */
.main-navigation {
    background-color: #2c3e50;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 30px;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 18px 22px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

.main-navigation a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #34495e;
    min-width: 220px;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.main-navigation li:hover > ul {
    display: flex;
}

/* Slider Section */
.slider-section {
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.slider-item {
    position: relative;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-content {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px;
    max-width: 600px;
    text-align: center;
}

.slider-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: #222;
}

.slider-excerpt {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.slider-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #0066cc;
    color: #fff;
    border-radius: 3px;
}

.slider-button:hover {
    background-color: #004499;
}

/* Category Boxes */
.category-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-box {
    position: relative;
    min-height: 200px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    overflow: hidden;
}

.category-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
}

.category-box:hover::before {
    background-color: rgba(0, 0, 0, 0.5);
}

.category-box-title {
    position: relative;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    z-index: 1;
}

/* Posts */
.posts-wrapper {
    margin-bottom: 50px;
}

.post {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e8e8e8;
}

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

.post-thumbnail {
    margin-bottom: 25px;
}

.post-thumbnail img {
    border-radius: 0;
}

.entry-header {
    margin-bottom: 20px;
}

.entry-title {
    font-size: 30px;
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 700;
}

.entry-title a {
    color: #2c3e50;
}

.entry-title a:hover {
    color: #ff6b6b;
}

.entry-meta {
    font-size: 13px;
    color: #95a5a6;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entry-meta a {
    color: #95a5a6;
}

.entry-meta a:hover {
    color: #ff6b6b;
}

.entry-content,
.entry-summary {
    margin-bottom: 25px;
    line-height: 1.8;
    font-size: 16px;
}

.read-more {
    display: inline-block;
    padding: 12px 28px;
    background-color: #ff6b6b;
    color: #fff;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.read-more:hover {
    background-color: #e85555;
    color: #fff;
}

/* Sidebar */
.sidebar .widget {
    background-color: #f9f9f9;
    padding: 30px;
    margin-bottom: 35px;
    border-radius: 0;
    border: 1px solid #e8e8e8;
}

.sidebar .widget-title {
    font-size: 18px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #ff6b6b;
    font-weight: 700;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar .widget ul {
    list-style: none;
}

.sidebar .widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
}

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

.sidebar .widget a {
    color: #555;
    transition: color 0.3s ease;
}

.sidebar .widget a:hover {
    color: #ff6b6b;
}

/* Featured Posts Widget */
.featured-posts-list {
    padding: 0;
    margin: 0;
}

.featured-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.featured-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.featured-post-thumbnail {
    flex: 0 0 80px;
}

.featured-post-thumbnail img {
    border-radius: 3px;
}

.featured-post-content {
    flex: 1;
}

.featured-post-title {
    font-size: 15px;
    margin: 0 0 8px 0;
    line-height: 1.4;
    font-weight: 600;
}

.featured-post-title a {
    color: #2c3e50;
}

.featured-post-title a:hover {
    color: #ff6b6b;
}

.featured-post-date {
    font-size: 12px;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Author Widget */
.author-widget {
    display: flex;
    gap: 20px;
}

.author-avatar {
    flex: 0 0 80px;
}

.author-avatar img {
    border-radius: 50%;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 16px;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.author-name a {
    color: #2c3e50;
}

.author-name a:hover {
    color: #ff6b6b;
}

.author-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* Social Icons Widget */
.social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #2c3e50;
    color: #fff;
    border-radius: 3px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: #ff6b6b;
    transform: translateY(-3px);
}

/* Footer */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 30px;
    margin-top: 70px;
}

.footer-widgets {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-widget .widget {
    margin-bottom: 30px;
}

.footer-widget .widget-title {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.footer-widget a {
    color: #ecf0f1;
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: #fff;
}

.site-info {
    max-width: 1170px;
    margin: 0 auto;
    padding: 25px 30px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.site-info a {
    color: #ecf0f1;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #ff6b6b;
    color: #fff;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    font-size: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #e85555;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
}

.pagination a,
.pagination span {
    padding: 12px 18px;
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    color: #555;
    font-weight: 600;
}

.pagination .current {
    background-color: #ff6b6b;
    color: #fff;
    border-color: #ff6b6b;
}

.pagination a:hover {
    background-color: #ff6b6b;
    color: #fff;
    border-color: #ff6b6b;
}

/* Mobile Menu Toggle - Hidden by default on desktop */
.menu-toggle {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .content-sidebar-wrap {
        flex-direction: column;
    }
    
    .sidebar {
        flex: 1;
    }
    
    /* Mobile Menu Toggle Button */
    .menu-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        background-color: transparent;
        border: none;
        color: #fff;
        padding: 18px 30px;
        cursor: pointer;
        font-size: 15px;
        font-weight: 500;
    }
    
    .menu-toggle-icon {
        display: block;
        width: 24px;
        height: 2px;
        background-color: #fff;
        position: relative;
    }
    
    .menu-toggle-icon::before,
    .menu-toggle-icon::after {
        content: '';
        display: block;
        width: 24px;
        height: 2px;
        background-color: #fff;
        position: absolute;
        left: 0;
        transition: all 0.3s ease;
    }
    
    .menu-toggle-icon::before {
        top: -8px;
    }
    
    .menu-toggle-icon::after {
        bottom: -8px;
    }
    
    .menu-toggle.toggled .menu-toggle-icon {
        background-color: transparent;
    }
    
    .menu-toggle.toggled .menu-toggle-icon::before {
        top: 0;
        transform: rotate(45deg);
    }
    
    .menu-toggle.toggled .menu-toggle-icon::after {
        bottom: 0;
        transform: rotate(-45deg);
    }
    
    /* Mobile Menu List */
    .main-navigation .primary-menu,
    .main-navigation ul {
        display: none;
        flex-direction: column;
        padding: 0;
        width: 100%;
    }
    
    .main-navigation .primary-menu.toggled,
    .main-navigation ul.toggled {
        display: flex;
    }
    
    .main-navigation li {
        width: 100%;
    }
    
    .main-navigation a {
        padding: 15px 30px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.2);
        min-width: 100%;
    }
    
    .main-navigation ul ul a {
        padding-left: 50px;
    }
    
    .slider-title {
        font-size: 24px;
    }
    
    .entry-title {
        font-size: 22px;
    }
}

/* Desktop - hide toggle button */
@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
    
    .main-navigation .primary-menu,
    .main-navigation ul {
        display: flex !important;
        flex-direction: row !important;
    }
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 2px solid #e8e8e8;
}

.related-posts h3 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #2c3e50;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.related-post {
    background-color: #f9f9f9;
    border: 1px solid #e8e8e8;
    overflow: hidden;
}

.related-post-thumbnail {
    margin-bottom: 15px;
}

.related-post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.related-post h4 {
    font-size: 16px;
    margin: 0;
    padding: 0 20px 20px;
    line-height: 1.4;
    font-weight: 600;
}

.related-post h4 a {
    color: #2c3e50;
}

.related-post h4 a:hover {
    color: #ff6b6b;
}
