/*
Theme Name: Modern Theme
Theme URI: https://example.com/modern-theme
Author: Your Name
Author URI: https://example.com
Description: A modern, responsive WordPress theme with clean design and excellent user experience. Features a beautiful home page, blog layout, and multiple page templates.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modern-theme
Tags: responsive-layout, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --accent-color: #10b981;
    --max-width: 1200px;
    --spacing: 1.5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Header */
.site-header {
    background-color: var(--bg-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--spacing);
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.site-logo a {
    color: var(--text-color);
}

.site-logo a:hover {
    color: var(--primary-color);
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.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-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Main Content */
.site-main {
    min-height: calc(100vh - 200px);
    padding: var(--spacing) 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 5rem var(--spacing);
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 5px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--bg-light);
}

/* Features Section */
.features-section {
    padding: 4rem var(--spacing);
    background-color: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Content Sections */
.content-section {
    padding: 3rem var(--spacing);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-color);
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.post-card h3 {
    margin-bottom: 0.5rem;
}

.post-card h3 a {
    color: var(--text-color);
}

.post-card h3 a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
}

/* Single Post */
.single-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem var(--spacing);
}

.post-header {
    margin-bottom: 2rem;
    text-align: center;
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-meta {
    color: var(--text-light);
    font-size: 0.875rem;
}

.post-content {
    line-height: 1.8;
}

.post-content img {
    margin: 2rem 0;
    border-radius: 8px;
}

/* Page Template */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem var(--spacing);
}

/* Footer */
.site-footer {
    background-color: var(--text-color);
    color: white;
    padding: 3rem var(--spacing) 1.5rem;
    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 ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 0.5rem;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

/* Comments */
.comments-area {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 var(--spacing);
}

.comment-list {
    list-style: none;
    margin-bottom: 2rem;
}

.comment {
    background: var(--bg-light);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Pagination */
.pagination {
    margin: 3rem 0;
    text-align: center;
}

.pagination .nav-links {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Post Tags */
.post-tags {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.post-tags a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    background-color: var(--bg-light);
    border-radius: 3px;
    font-size: 0.875rem;
}

.post-tags a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Post Navigation */
.post-navigation {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
}

.post-navigation .nav-subtitle {
    display: block;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.post-navigation .nav-title {
    font-weight: 600;
    color: var(--text-color);
}

.post-navigation a:hover .nav-title {
    color: var(--primary-color);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.search-form .search-field {
    flex: 1;
    margin-bottom: 0;
}

.search-form .search-submit {
    margin-bottom: 0;
}

input[type="submit"] {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 5px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
    }

    .main-navigation.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }

    .main-navigation.active ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation.active a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .features-grid,
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .header-content {
        position: relative;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

