/*
Theme Name: Custom Blog Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A custom WordPress theme with custom header support for blogging
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: custom-blog-theme
*/

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

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

main {
    padding: 0 0 40px 0 !important;
}

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

.site-header {
    background: #f8f9fbcc;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon-link {
    text-decoration: none;
    display: flex;
}

.site-text-link {
    text-decoration: none;
    color: #1a1a1a;
}

.logo-icon {
    font-size: 40px;
    color: #0d7377;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
}

.site-name {
    font-size: 18px;
    font-weight: 700;
    color: #0f192e;
    line-height: 1.75rem;
}

.site-tagline {
    font-size: 12px;
    color: #626d84;
    font-weight: 400;
    line-height: 1.2;
}

.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo-link img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
}

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

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

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

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

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 35px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    text-decoration: none;
    color: #626d84;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.main-navigation a:hover {
    color: #0b64f4;
}

.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
    color: #0b64f4;
}

.main-navigation li:nth-last-child(2) a {
    color: #0b64f4;
}

.main-navigation li:last-child a {
    background: linear-gradient(135deg, hsl(217, 91%, 50%) 0%, hsl(200, 100%, 45%) 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px #0b64f459;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-navigation li:last-child a:hover {
    background: linear-gradient(135deg, hsl(217, 91%, 45%) 0%, hsl(200, 100%, 40%) 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px #0b64f459;
}

.hero-header {
    background: #0a0f1a;
    background-size: cover;
    background-position: center;
    padding: 128px 32px;
    color: #fff;
    margin-bottom: 40px;
    overflow: hidden;
    position: relative;
}

.hero-title {
    font-size: 48px;
    color: #ffffff;
    text-shadow: none;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 20px;
    color: #fffc;
    text-shadow: none;
    width: 60%;
}

.hero-grid {
    background-image: linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    opacity: 0.3;
    background-size: 60px 60px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-circle-1 {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    position: absolute;
    top: -80px;
    left: -80px;
    width: 400px;
    height: 400px;
}

.hero-circle-2 {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
}

main {
    padding: 40px 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-navigation {
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        height: auto;
        max-height: calc(100vh - 72px);
        background: #ffffff;
        flex-direction: column;
        justify-content: flex-start;
        padding: 32px;
        transition: top 0.3s ease;
        z-index: 999;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    
    .main-navigation.active {
        top: 72px;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
        align-items: flex-start;
    }
    
    .main-navigation li {
        width: 100%;
    }
    
    .main-navigation a {
        display: block;
        padding: 16px 0;
        font-size: 16px;
    }
    
    .main-navigation li:nth-last-child(2) a {
        color: #0b64f4;
    }
    
    .main-navigation li:last-child {
        margin-top: 16px;
    }
    
    .main-navigation li:last-child a {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        display: block;
        border-radius: 8px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-description {
        width: 100%;
    }
}

.post {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-thumbnail-link {
    display: block;
    overflow: hidden;
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

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

.post-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-category {
    display: inline-block;
    background: #edeff3;
    color: #0f192e;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    text-transform: capitalize;
    width: fit-content;
}

.post-title {
    font-size: 18px;
    color: #0f192e;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: #0b64f4;
}

.post-excerpt {
    color: #626d84;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #626d84;
    font-size: 12px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-author::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23626d84' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.post-read-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-read-time::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23626d84' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.site-footer {
    background: #0f192e;
    color: #f8f9fbb3;
    padding: 64px 0 32px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo-icon {
    font-size: 24px;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
}

.footer-brand {
    font-size: 18px;
    font-weight: 700;
    color: #dadee7;
    margin: 0;
    line-height: 1.2;
}

.footer-brand-subtitle {
    font-size: 12px;
    color: #f8f9fbb3;
    margin: 0;
    line-height: 1.2;
}

.footer-description {
    font-size: 14px;
    color: #f8f9fbb3;
    line-height: 1.6;
    margin: 0;
}

.footer-title {
    font-size: 18px;
    font-weight: 700;
    color: #dadee7;
    margin: 0 0 16px 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #f8f9fbb3;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #f8f9fbb3;
}

.footer-contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f8f9fbb3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact-link:hover {
    color: #ffffff;
}

.footer-contact-link:hover .footer-icon {
    stroke: #ffffff;
}

.footer-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: #f8f9fbb3;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid rgba(248, 249, 251, 0.1);
}

.footer-copyright {
    font-size: 14px;
    color: #f8f9fbb3;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: #f8f9fbb3;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #ffffff;
}

.footer-wrapper {
    padding: 128px 32px;
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .footer-wrapper {
        padding: 64px 32px;
    }
}

/* Single Post Styles */
.single-post-header {
    margin-bottom: 64px;
}

.single-post-header-image {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.single-post-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-post-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
}

.single-post-back-link {
    position: absolute;
    bottom: 32px;
    left: 32px;
    z-index: 10;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #626d84;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.back-to-blog:hover {
    color: #0b64f4;
}

.back-to-blog svg {
    stroke: currentColor;
}

.single-post-header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 0 0 0;
    text-align: start;
}

.single-post-category {
    display: inline-block;
    background: #0b64f4;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 16px;
    text-transform: capitalize;
}

.single-post-title {
    font-size: 48px;
    font-weight: 700;
    color: #0f192e;
    line-height: 1.2;
    margin: 0 0 16px 0;
}

.single-post-excerpt {
    font-size: 18px;
    color: #626d84;
    line-height: 1.6;
    margin: 0;
}

.single-post-article {
    margin-bottom: 80px;
}

.single-post-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.single-post-content-wrapper .post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #1a1a1a;
    margin-bottom: 48px;
}

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

.single-post-content-wrapper .post-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: #0f192e;
    margin: 48px 0 24px 0;
    line-height: 1.3;
}

.single-post-content-wrapper .post-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #0f192e;
    margin: 36px 0 20px 0;
    line-height: 1.4;
}

.single-post-content-wrapper .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 32px 0;
}

.single-post-content-wrapper .post-content ul,
.single-post-content-wrapper .post-content ol {
    margin: 24px 0;
    padding-left: 32px;
}

.single-post-content-wrapper .post-content li {
    margin-bottom: 12px;
}

.single-post-content-wrapper .post-content a {
    color: #0b64f4;
    text-decoration: underline;
}

.single-post-content-wrapper .post-content a:hover {
    color: #0952c9;
}

.post-meta-footer {
    display: flex;
    gap: 32px;
    padding: 24px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 48px;
}

.post-author-info,
.post-date-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #626d84;
    font-size: 14px;
}

.post-meta-icon {
    width: 16px;
    height: 16px;
    stroke: #626d84;
}

@media (max-width: 768px) {
    .single-post-header-image {
        height: 300px;
    }
    
    .single-post-back-link {
        top: 16px;
        left: 16px;
    }
    
    .single-post-header-content {
        padding-top: 32px;
    }
    
    .single-post-title {
        font-size: 32px;
    }
    
    .single-post-excerpt {
        font-size: 16px;
    }
    
    .post-meta-footer {
        flex-direction: column;
        gap: 16px;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    background: #fff;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background: #0073aa;
    color: #fff;
}

.pagination .current {
    background: #0073aa;
    color: #fff;
}
