/*
Theme Name: MyBlog Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A modern, clean blog theme with featured post carousel and optimized layouts
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: myblog-theme
*/

/* ===============================================
   CSS RESET & BASE STYLES
   =============================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

a {
    color: #1A73E8;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #1557b0;
}

ul {
    list-style: none;
}

/* ===============================================
   CONTAINER & LAYOUT
   =============================================== */

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

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
    padding: 40px 0;
}

/* ===============================================
   HEADER STYLES
   =============================================== */

.site-header {
    background: #FFFFFF;
    border-bottom: 1px solid #E8E8E8;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-logo {
    flex-shrink: 0;
}

.site-logo img {
    height: 55px;
    width: auto;
}

.main-navigation {
    flex: 1;
    margin: 0 30px;
}

.main-navigation ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

.main-navigation a {
    color: #1D1D1F;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
}

.main-navigation a:hover,
.main-navigation a.current {
    color: #1A73E8;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #1A73E8;
    transition: width 0.3s ease;
}

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

.header-search {
    flex-shrink: 0;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #1D1D1F;
    font-size: 20px;
    transition: all 0.3s ease;
}

.search-toggle:hover {
    color: #1A73E8;
    transform: scale(1.1);
}

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

/* Search Modal */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.search-modal.active {
    display: flex;
}

.search-modal-content {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search-modal .search-form {
    display: flex;
    gap: 10px;
}

.search-modal input[type="search"] {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #E8E8E8;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
}

.search-modal button[type="submit"] {
    padding: 15px 30px;
    background: #1A73E8;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-modal button[type="submit"]:hover {
    background: #1557b0;
}

.search-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
}

/* ===============================================
   FEATURED POSTS CAROUSEL
   =============================================== */

.featured-carousel {
    background: linear-gradient(135deg, #1A73E8 0%, #1557b0 100%);
    padding: 60px 0;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    display: flex;
    align-items: center;
    gap: 50px;
}

.carousel-image {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.carousel-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.carousel-content {
    flex: 1;
    color: #FFFFFF;
}

.carousel-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    opacity: 0.9;
}

.carousel-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.carousel-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    color: #FFFFFF;
}

.carousel-title a {
    color: #FFFFFF;
}

.carousel-title a:hover {
    opacity: 0.8;
}

.carousel-excerpt {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 20px;
}

.carousel-read-more {
    display: inline-block;
    padding: 12px 30px;
    background: #FFFFFF;
    color: #1A73E8;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.carousel-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.carousel-controls {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid #FFFFFF;
    color: #FFFFFF;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: #FFFFFF;
    color: #1A73E8;
}

.carousel-dots {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #FFFFFF;
    width: 30px;
    border-radius: 6px;
}

/* ===============================================
   MAIN CONTENT AREA
   =============================================== */

.content-area {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ===============================================
   POST CARD STYLES
   =============================================== */

.post-card {
    display: flex;
    gap: 25px;
    padding: 25px;
    background: #FFFFFF;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #F0F0F0;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #1A73E8;
}

.post-thumbnail {
    flex-shrink: 0;
    width: 330px;
    height: 186px;
    border-radius: 8px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.post-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-category {
    display: inline-block;
    padding: 4px 12px;
    background: #E8F0FE;
    color: #1A73E8;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-title a {
    color: #1D1D1F;
}

.post-title a:hover {
    color: #1A73E8;
}

.post-excerpt {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-top: auto;
}

/* ===============================================
   SIDEBAR STYLES
   =============================================== */

.sidebar {
    width: 350px;
    flex-shrink: 0;
}

.widget {
    background: #F9F9F9;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.widget-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1D1D1F;
    position: relative;
    padding-bottom: 12px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #1A73E8;
}

/* Search Widget */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #E8E8E8;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.search-form button {
    padding: 12px 20px;
    background: #1A73E8;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* Recent Posts Widget */
.recent-posts-widget .post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E8E8E8;
}

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

.recent-posts-widget .post-thumb {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-posts-widget .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-posts-widget .post-info {
    flex: 1;
}

.recent-posts-widget .post-info h4 {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.recent-posts-widget .post-info h4 a {
    color: #1D1D1F;
}

.recent-posts-widget .post-info h4 a:hover {
    color: #1A73E8;
}

.recent-posts-widget .post-date {
    font-size: 12px;
    color: #999;
}

/* Categories Widget */
.categories-list li {
    margin-bottom: 12px;
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: #FFFFFF;
    border-radius: 6px;
    color: #1D1D1F;
    transition: all 0.3s ease;
}

.categories-list a:hover {
    background: #1A73E8;
    color: #FFFFFF;
    transform: translateX(5px);
}

.categories-list .count {
    color: #999;
}

.categories-list a:hover .count {
    color: #FFFFFF;
}

/* Tags Widget */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-list a {
    padding: 8px 16px;
    background: #FFFFFF;
    border: 2px solid #E8E8E8;
    border-radius: 20px;
    font-size: 13px;
    color: #1D1D1F;
    transition: all 0.3s ease;
}

.tags-list a:hover {
    background: #1A73E8;
    color: #FFFFFF;
    border-color: #1A73E8;
}

/* ===============================================
   SINGLE POST STYLES
   =============================================== */

.single-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.single-post-header {
    margin-bottom: 30px;
}

.single-post-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #1D1D1F;
}

.single-post-meta {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    font-size: 15px;
    color: #666;
    padding-bottom: 20px;
    border-bottom: 2px solid #F0F0F0;
}

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

.single-post-meta .author-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.single-featured-image {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
}

.single-featured-image img {
    width: 100%;
    height: 394px;
    object-fit: cover;
}

.single-post-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.single-post-content h1,
.single-post-content h2,
.single-post-content h3,
.single-post-content h4,
.single-post-content h5,
.single-post-content h6 {
    margin: 30px 0 20px;
    font-weight: 700;
    color: #1D1D1F;
    line-height: 1.3;
}

.single-post-content h2 { font-size: 32px; }
.single-post-content h3 { font-size: 26px; }
.single-post-content h4 { font-size: 22px; }

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

.single-post-content ul,
.single-post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.single-post-content li {
    margin-bottom: 10px;
    list-style: disc;
}

.single-post-content ol li {
    list-style: decimal;
}

.single-post-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    background: #F9F9F9;
    border-left: 4px solid #1A73E8;
    font-style: italic;
    font-size: 20px;
}

.single-post-content img {
    margin: 30px 0;
    border-radius: 8px;
}

.single-post-content a {
    color: #1A73E8;
    text-decoration: underline;
}

.post-tags {
    margin: 40px 0;
    padding: 25px 0;
    border-top: 2px solid #F0F0F0;
    border-bottom: 2px solid #F0F0F0;
}

.post-tags h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1D1D1F;
}

/* ===============================================
   PAGINATION STYLES
   =============================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 50px 0;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 2px solid #E8E8E8;
    border-radius: 8px;
    color: #1D1D1F;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination span.current {
    background: #1A73E8;
    color: #FFFFFF;
    border-color: #1A73E8;
    transform: translateY(-2px);
}

.pagination .dots {
    border: none;
}

/* ===============================================
   FOOTER STYLES
   =============================================== */

.site-footer {
    background: #1D1D1F;
    color: #FFFFFF;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.footer-widget p {
    line-height: 1.8;
    color: #B8B8B8;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.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%;
    color: #FFFFFF;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #1A73E8;
    transform: translateY(-3px);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #B8B8B8;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #1A73E8;
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input[type="email"] {
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
}

.newsletter-form input[type="email"]::placeholder {
    color: #B8B8B8;
}

.newsletter-form button {
    padding: 12px 20px;
    background: #1A73E8;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: #1557b0;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #B8B8B8;
    font-size: 14px;
}

/* ===============================================
   RESPONSIVE STYLES
   =============================================== */

@media (max-width: 1024px) {
    .carousel-item {
        flex-direction: column;
        gap: 30px;
    }
    
    .carousel-title {
        font-size: 28px;
    }
    
    .content-area {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: #FFFFFF;
        padding: 80px 30px 30px;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }
    
    .main-navigation.active {
        left: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation li {
        width: 100%;
        border-bottom: 1px solid #F0F0F0;
    }
    
    .main-navigation a {
        display: block;
        padding: 15px 0;
    }
    
    .post-card {
        flex-direction: column;
    }
    
    .post-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .single-post-title {
        font-size: 32px;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .carousel-title {
        font-size: 24px;
    }
    
    .carousel-image img {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .single-post-title {
        font-size: 26px;
    }
    
    .post-title {
        font-size: 18px;
    }
    
    .header-container {
        padding: 12px 15px;
    }
    
    .site-logo img {
        height: 40px;
    }
}

/* ===============================================
   UTILITY CLASSES
   =============================================== */

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

.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
