/*
Theme Name: Float Blog
Description: A modern, responsive blog theme inspired by Float with clean typography and elegant design
Version: 1.0
Author: Your Name
*/

/* CSS Variables */
:root {
    --primary-color: #007acc;
    --secondary-color: #764ba2;
    --text-color: #333333;
    --background-color: #fafafa;
    --card-background: #ffffff;
    --primary-hover: #005a9e;
    --border-color: #e0e0e0;
    --text-muted: #666666;
    --shadow-light: rgba(0,0,0,0.08);
    --shadow-medium: rgba(0,0,0,0.12);
}

/* Dark Mode Variables - Now controlled by customizer */
.dark-mode {
    --shadow-light: rgba(0,0,0,0.5);
    --shadow-medium: rgba(0,0,0,0.6);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
}

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

/* Header */
.site-header {
    background: var(--card-background);
    box-shadow: 0 2px 10px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}

.site-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-navigation a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle:hover {
    background: var(--shadow-light);
    color: var(--primary-color);
}

.dark-mode-toggle .sun-icon {
    display: block;
}

.dark-mode-toggle .moon-icon {
    display: none;
}

.dark-mode .dark-mode-toggle .sun-icon {
    display: none;
}

.dark-mode .dark-mode-toggle .moon-icon {
    display: block;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

/* Blog Posts */
.post {
    background: var(--card-background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-light);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-medium);
}

.post-thumbnail {
    width: 100%;
    height: 250px;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure post content appears above the overlay when enabled */
.post-content {
    position: relative;
    z-index: 2;
}

.post-content {
    padding: 2rem;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.post-title a {
    color: var(--text-color) !important;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    visibility: visible;
}

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

/* Enhanced text readability for titles over images - controlled by customizer */
.post.has-thumbnail .post-content .post-title a {
    transition: all 0.3s ease;
}

.post.has-thumbnail .post-content .post-title a:hover {
    transform: translateY(-1px);
}

/* Dark mode adjustments for text over images */
.dark-mode .post.has-thumbnail .post-content .post-title a {
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.3),
        0 0 20px rgba(255, 255, 255, 0.2),
        0 0 30px rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.dark-mode .post.has-thumbnail .post-content .post-title a:hover {
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.4),
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 30px rgba(255, 255, 255, 0.2);
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: var(--text-muted);
    line-height: 1.7;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Sidebar */
.sidebar {
    background: var(--card-background);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow-light);
    height: fit-content;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.widget {
    margin-bottom: 2rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-color);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.widget a {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.widget a:hover {
    color: var(--primary-color);
}

/* Footer */
.site-footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-widget p {
    color: #ccc;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .post-content {
        padding: 1.5rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
}

/* Search Form */
.search-form {
    margin-bottom: 1rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    background: var(--card-background);
    color: var(--text-color);
}

.search-field:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-submit {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.search-submit:hover {
    color: var(--primary-color);
}

/* Single Post Styles */
.single-post .post-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.single-post .post-header {
    padding: 1rem 1.5rem 0.5rem;
}

.single-post .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.single-post .post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Enhanced single post content spacing */
.single-post .post-content {
    padding: 1rem 1.5rem;
    line-height: 1.8;
}

.single-post .post-content p {
    margin-bottom: 2rem;
}

.single-post .post-content h1,
.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4,
.single-post .post-content h5,
.single-post .post-content h6 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.single-post .post-content ul,
.single-post .post-content ol {
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.single-post .post-content li {
    margin-bottom: 0.5rem;
}

.single-post .post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 2rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
}

.post-navigation {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.single-post .post-footer {
    padding: 0 1.5rem 1rem;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 1rem;
    background: var(--card-background);
    border-radius: 8px;
    transition: background-color 0.3s ease;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.nav-previous a:hover,
.nav-next a:hover {
    background: var(--shadow-light);
    border-color: var(--primary-color);
}

/* Dark mode navigation styling */
.dark-mode .nav-previous a,
.dark-mode .nav-next a {
    background: #1a1a1a;
    border-color: #333333;
    color: #e5e5e5;
}

.dark-mode .nav-previous a:hover,
.dark-mode .nav-next a:hover {
    background: #333333;
    border-color: #4da6ff;
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 4rem 0;
}

.error-title {
    font-size: 6rem;
    font-weight: 700;
    color: #007acc;
    margin-bottom: 1rem;
}

.error-subtitle {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: white;
}

.btn-secondary {
    background: var(--card-background);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--shadow-light);
    color: var(--text-color);
}

/* Pagination */
.pagination {
    margin-top: 3rem;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-link {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--shadow-light);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: var(--primary-color);
    color: white;
}

/* Category Count */
.category-count {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Hero Section CTA Button */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

/* Button Theming */
.btn,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
    transform: translateY(0);
}

/* Button Variants */
.btn-secondary {
    background: var(--card-background);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--shadow-light);
    color: var(--text-color);
    border-color: var(--primary-color);
}

/* Comment Form Styling */
.comment-form {
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.comments-area {
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.comment-list {
    margin-bottom: 1rem;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Dark mode specific comment styling */
.dark-mode .comment {
    background: #1a1a1a;
    border-color: #333333;
}

.dark-mode .comment-form input[type="text"],
.dark-mode .comment-form input[type="email"],
.dark-mode .comment-form input[type="url"],
.dark-mode .comment-form textarea {
    background: #1a1a1a;
    border-color: #333333;
    color: #e5e5e5;
}

.dark-mode .comment-form input[type="text"]:focus,
.dark-mode .comment-form input[type="email"]:focus,
.dark-mode .comment-form input[type="url"]:focus,
.dark-mode .comment-form textarea:focus {
    border-color: #4da6ff;
    background: #1a1a1a;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--card-background);
    color: var(--text-color);
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form .form-submit {
    margin-top: 1rem;
}

/* Comment Navigation */
.comment-navigation {
    margin: 2rem 0;
}

.comment-navigation a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.comment-navigation a:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Reply Links */
.comment-reply-link {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.comment-reply-link:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }
