/*
Theme Name: Portfolio Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A clean, modern portfolio theme with full Gutenberg editor support
Version: 1.0
Requires at least: 5.9
Tested up to: 6.4
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: portfolio-theme
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

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

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

a:hover {
    color: #1d4ed8;
}

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

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    color: #111;
}

.site-title a {
    color: #111;
}

.site-title a:hover {
    color: #2563eb;
}

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

.main-navigation a {
    color: #4b5563;
    font-weight: 500;
    padding: 8px 0;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: #2563eb;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #111;
}

/* Main Content */
.site-main {
    min-height: 60vh;
    padding: 60px 0;
}

/* Page Header */
.page-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.page-title,
.entry-title {
    font-size: 36px;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.portfolio-content {
    padding: 20px;
}

.portfolio-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #111;
}

.portfolio-content p {
    color: #6b7280;
    font-size: 14px;
}

/* Posts & Pages */
.entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: #374151;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #111;
    font-weight: 600;
}

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

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

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

/* Footer */
.site-footer {
    background: #111;
    color: #9ca3af;
    padding: 40px 0 20px;
    margin-top: 80px;
}

.footer-content {
    text-align: center;
}

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

.footer-content a {
    color: #d1d5db;
}

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

/* Buttons */
.wp-block-button__link,
.button,
button[type="submit"] {
    background: #2563eb;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    transition: background 0.3s ease;
}

.wp-block-button__link:hover,
.button:hover,
button[type="submit"]:hover {
    background: #1d4ed8;
    color: #fff;
}

/* Blog Posts Grid */
.posts-grid {
    display: grid;
    gap: 40px;
    margin-top: 40px;
}

.blog-post {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.blog-post:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

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

.blog-post .post-content {
    padding: 30px;
}

.entry-meta {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 15px;
}

.entry-meta span {
    margin-right: 15px;
}

.entry-summary {
    margin: 20px 0;
    color: #4b5563;
}

.read-more {
    display: inline-block;
    color: #2563eb;
    font-weight: 600;
    margin-top: 10px;
}

.read-more:hover {
    color: #1d4ed8;
}

/* Post Navigation */
.post-navigation,
.posts-pagination {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e5e7eb;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-subtitle {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 5px;
}

.nav-title {
    display: block;
    font-weight: 600;
    color: #111;
}

/* Portfolio Categories */
.portfolio-categories {
    font-size: 14px;
    color: #6b7280;
    margin-top: 10px;
}

.taxonomy-description {
    color: #6b7280;
    margin-top: 10px;
}

/* Entry Footer */
.entry-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.tags-links {
    color: #4b5563;
}

/* Back to Portfolio Button */
.back-to-portfolio {
    margin-top: 40px;
    text-align: center;
}

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

.page-numbers {
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 4px;
    color: #111;
}

.page-numbers:hover,
.page-numbers.current {
    background: #2563eb;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    }
    
    .main-navigation.toggled {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }
    
    .main-navigation li {
        border-bottom: 1px solid #e5e7eb;
    }
    
    .main-navigation a {
        display: block;
        padding: 15px 0;
    }
    
    .page-title,
    .entry-title {
        font-size: 28px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* Gutenberg Editor Alignment */
.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    max-width: 100%;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
