/*
Theme Name: Modern Portfolio
Theme URI: https://yoursite.com
Description: A modern, mobile-first WordPress theme with clean design and smooth animations
Version: 1.0.0
Author: Your Name
Author URI: https://yoursite.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modern-portfolio
Tags: portfolio, blog, responsive, mobile-first, clean
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */

:root {
    --primary-color: #0cc29c;
    --secondary-color: #1c2437;
    --text-dark: #333;
    --text-light: #777;
    --border-color: #e5e5e5;
    --bg-light: #f5f5f5;
    --white: #fff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--secondary-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: 1.5rem;
}

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

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

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

.site-logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
}

.site-logo:hover {
    color: var(--secondary-color);
}

/* Navigation */
.main-navigation {
    display: none;
}

.main-navigation.active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.nav-menu li {
    padding: 0;
}

.nav-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    color: var(--primary-color);
    background: rgba(12, 194, 156, 0.05);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--white);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--white);
    color: var(--primary-color);
    font-weight: 700;
    border-radius: 50px;
    border: 2px solid var(--white);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn:hover {
    background: transparent;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

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

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

/* ==========================================================================
   Main Content
   ========================================================================== */

.site-main {
    padding: 4rem 0;
}

.content-area {
    margin-bottom: 2rem;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.125rem;
}

/* Blog Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Post Card */
.post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    padding-top: 60%;
    background: var(--bg-light);
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

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

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

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

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

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.read-more:hover {
    gap: 0.75rem;
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features-section {
    background: var(--bg-light);
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.feature-box {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-light);
    line-height: 1.8;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--secondary-color);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 1rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

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

.footer-widget ul li {
    margin-bottom: 0.75rem;
}

.footer-widget a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-widget a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

/* ==========================================================================
   Responsive Design - Tablet
   ========================================================================== */

@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .main-navigation {
        display: block !important;
        position: static;
        box-shadow: none;
    }
    
    .nav-menu {
        flex-direction: row;
        padding: 0;
    }
    
    .nav-menu a {
        padding: 0.5rem 1rem;
    }
}

/* ==========================================================================
   Responsive Design - Desktop
   ========================================================================== */

@media (min-width: 1024px) {
    .hero-section {
        padding: 6rem 0;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-widgets {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.py-4 { padding-top: 4rem; padding-bottom: 4rem; }
.hidden { display: none; }
