/*
Theme Name: City College Blog
Description: A modern, responsive WordPress theme for City College blog with blog grid layout
Author: Zaheer Abbas
Author Email: zaheer.257@gmail.com
Version: 1.0
License: GPL v2 or later
Text Domain: citycollege-blog
*/

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

:root {
  --red: #CE4D49;
  --blue: #3099D0;
  --green: #2F9235;
  --black: #000;
  --white: #ffffff;
  --gray: #6c757d;
}

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

/* Header Styles - Matching EduFast Design */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-logo {
    font-size: 28px;
    font-weight: 700;
    color: #1e40af;
    text-decoration: none;
}

.site-logo:hover {
    color: #1d4ed8;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
    position: relative;
}

.main-navigation a:hover {
    color: #1e40af;
}

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

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

/* Main Content */
.site-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-title {
    font-size: 56px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-description {
    font-size: 20px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Category Filter Section - Matching EduFast */
.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
    padding: 20px 0;
}

.category-filter a {
    display: inline-block;
    padding: 12px 24px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-filter a:hover,
.category-filter a.active {
    background: #1e40af;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

/* Blog Grid Layout - Matching Image Design */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.blog-card-image-wrapper {
    position: relative;
    overflow: hidden;
}

.blog-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.05);
}

/* Green Action Button */
.blog-card-action-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: #22c55e;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.blog-card-action-btn:hover {
    background: #16a34a;
    transform: scale(1.1);
}

.blog-card-action-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    transform: rotate(45deg);
}

.blog-card-content {
    padding: 25px;
}

/* Metadata with Icons */
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.blog-card-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-card-meta-icon {
    width: 16px;
    height: 16px;
    fill: #666;
}

.blog-card-meta-separator {
    width: 3px;
    height: 3px;
    background: #666;
    border-radius: 50%;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
    color: #1a1a1a;
}

.blog-card-title a {
  color:inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
  color:var(--green);
}

.blog-card-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 15px;
}

/* Single Post Styles */
/* Target only the article element, not the body */
article.single-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Override any body-level constraints */
body.single-post .site-header,
body.single-post .site-footer {
    max-width: none !important;
    width: 100% !important;
}

body.single-post .header-container,
body.single-post .footer-container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* Ensure main content area is not constrained by body class */
body.single-post .site-main {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 60px 20px !important;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.post-title {
    font-size: 42px;
    font-weight: 700;
    background: -webkit-linear-gradient(var(--red), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
    
    margin-bottom: 20px;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 16px;
    color: #666;
    flex-wrap: wrap;
}

.post-category {
    background: linear-gradient(45deg, var(--red), var(--blue));
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.post-date, .post-author, .post-comments {
    color: #666;
    font-size: 15px;
}

.post-featured-image-wrapper {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.post-featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

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

.post-content h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1e40af;
    margin: 40px 0 20px;
}

.post-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 30px 0 15px;
}

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

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

.post-content li {
    margin-bottom: 10px;
}

/* Footer Styles - Matching City College site */
.site-footer {
    background: #1e40af;
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 80px;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-section p, .footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    line-height: 1.6;
}

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

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
}

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

.social-links a {
    display: inline-block;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #3b82f6;
    padding-top: 20px;
    text-align: center;
    color: #cbd5e1;
}

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

.pagination a, .pagination span {
    padding: 12px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--green);
    color: #fff;
    border-color:  var(--green);
}

.pagination .current {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

/* Responsive Design - Matching EduFast */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .page-title {
        font-size: 36px;
    }
    
    .page-description {
        font-size: 18px;
    }
    
    .category-filter {
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .category-filter a {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-card-title {
        font-size: 18px;
    }
    
    .blog-card-meta {
        gap: 10px;
    }
    
    .blog-card-action-btn {
        width: 40px;
        height: 40px;
        bottom: 10px;
        right: 10px;
    }
    
    .blog-card-action-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .post-title {
        font-size: 28px;
    }
    
    body.single-post .post-title {
        font-size: 32px;
    }
    
    body.single-post .post-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    body.single-post .post-content {
        font-size: 16px;
    }
    
    body.single-post .post-content h2 {
        font-size: 24px;
    }
    
    body.single-post .post-content h3 {
        font-size: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .site-main {
        padding: 20px 15px;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* SEO Optimizations */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Additional Styles for Enhanced Design */

/* Search Form Styles */
.search-form {
    max-width: 400px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-field:focus {
    border-color: #1e40af;
}

.search-submit {
    position: absolute;
    right: 5px;
    background: #1e40af;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background: #1d4ed8;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #1e40af;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #333;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

/* Error 404 Page Styles */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}

.error-number {
    font-size: 120px;
    font-weight: 700;
    color: #1e40af;
    line-height: 1;
    margin-bottom: 20px;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-actions {
    margin: 40px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.recent-posts {
    margin-top: 40px;
    text-align: left;
}

.recent-posts h3 {
    color: #1e40af;
    margin-bottom: 15px;
}

.recent-posts ul {
    list-style: none;
    padding: 0;
}

.recent-posts li {
    margin-bottom: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.recent-posts li:hover {
    background: #f3f4f6;
}

.recent-posts a {
    color: #333;
    text-decoration: none;
}

.recent-posts a:hover {
    color: #1e40af;
}

/* Post Tags Styles */
.post-tags {
    margin: 30px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.post-tags h3 {
    margin-bottom: 15px;
    color: #1e40af;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-link {
    display: inline-block;
    padding: 6px 12px;
    background: #1e40af;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.tag-link:hover {
    background: #1d4ed8;
    color: #fff;
}

/* Post Navigation Styles */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
}

.nav-previous, .nav-next {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.nav-previous:hover, .nav-next:hover {
    background: #f3f4f6;
}

.nav-subtitle {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

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

.nav-next {
    text-align: right;
}

/* Author Bio Styles */
.author-bio {
    display: flex;
    gap: 20px;
    padding: 30px;
    background: #f9fafb;
    border-radius: 12px;
    margin: 40px 0;
}

.author-avatar-large {
    flex-shrink: 0;
}

.author-info h3 {
    color: #1e40af;
    margin-bottom: 10px;
}

.author-info p {
    color: #666;
    line-height: 1.6;
}

/* Related Posts Styles */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e5e7eb;
}

.related-posts h2 {
    
     margin-bottom: 30px;
    text-align: center;
   color: var(--black);
}

/* Mobile Menu Styles */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-icon {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    position: relative;
    transition: all 0.3s ease;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

.menu-toggle[aria-expanded="true"] .menu-icon {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Enhanced Mobile Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        padding: 20px;
        z-index: 1000;
    }
    
    .nav-menu.toggled {
        display: block;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu li {
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 10px;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .post-nav {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .error-number {
        font-size: 80px;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Additional EduFast-style enhancements */
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card {
    position: relative;
}

/* Enhanced typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafbfc;
}

.site-main {
    background: #fff;
    border-radius: 20px;
    margin: 20px auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

/* Ensure header and footer display properly on all pages */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    padding-top: 20px;
    padding-bottom: 20px;
}

.site-footer {
    margin-top: 80px;
    background: #1e40af;
    color: #fff;
    padding: 50px 0 20px;
    width: 100%;
}

/* Ensure header and footer containers are properly sized */
.header-container,
.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Single post specific improvements */
body.single-post .site-main {
    margin-top: 60px !important;
    margin-bottom: 40px !important;
}

/* Ensure the main content area is properly constrained while header/footer are not */
body.single-post .site-main article.single-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

body.single-post .post-content h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--black);
   
    margin: 40px 0 20px;
    border-left: 4px solid var(--blue);
    padding-left: 20px;
}

body.single-post .post-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 30px 0 15px;
}

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

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

body.single-post .post-content li {
    margin-bottom: 10px;
}

body.single-post .post-content blockquote {
    border-left: 4px solid #1e40af;
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

body.single-post .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Loading animation for blog cards */
.blog-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

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

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .post-navigation,
    .related-posts,
    .comments-area {
        display: none;
    }
    
    .post-content {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    .post-title {
        font-size: 18pt;
        color: #000;
    }
}