/*
Theme Name: Marxist Education Portal
Description: Eduma-inspired education theme for Marxist studies
Version: 1.4
Author: Your Name
Text Domain: marxist-education
*/



/* ===== RESET & VARIABLES ===== */
:root {
    --primary-red: #d32f2f;
    --dark-red: #b71c1c;
    --dark-gray: #2c3e50;
    --medium-gray: #34495e;
    --light-gray: #ecf0f1;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ===== HEADER ===== */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 30px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

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

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-red);
    line-height: 1.2;
}

.logo-subtitle {
    display: block;
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--text-light);
}

.header-search {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.header-search input[type="search"] {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.header-search button {
    padding: 0.8rem 1.5rem;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

.main-navigation .primary-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: var(--primary-red);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: 
        linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98)),
        var(--hero-bg-image, url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.03"><rect width="100" height="100" fill="%23d32f2f"/></svg>'));
    background-size: cover, 300px;
    background-position: center;
    background-repeat: no-repeat;
    padding: 180px 0 100px;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--primary-red);
}

.hero-text p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: var(--primary-red);
    opacity: 0.9;
    line-height: 1.6;
    font-weight: 500;
}

.search-filters {
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--medium-gray) 100%);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.filter-group select {
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-group select:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
}

.filter-group select:focus {
    border-color: var(--primary-red);
    background: rgba(255, 255, 255, 0.25);
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.3);
}

.filter-group select option {
    background: var(--dark-gray);
    color: var(--white);
    padding: 1rem;
    font-size: 1rem;
}

.search-button {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-button:hover {
    background: var(--dark-red);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.4);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(211, 47, 47, 0.2);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-red);
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 1.1rem;
    color: var(--primary-red);
    font-weight: 600;
    opacity: 0.9;
    margin-top: 0.8rem;
}

.hero-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.cutout-image-container {
    position: relative;
    height: 100%;
    min-height: 600px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cutout-image-transparent {
    height: 100%;
    width: auto;
    max-width: 100%;
    max-height: 700px;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.15));
}

/* ===== FEATURES SECTION ===== */
.features-section {
    padding: 100px 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.8rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    font-size: 1.3rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.feature-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-red);
}

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

.feature-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: var(--white);
    font-size: 2.5rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
    font-size: 1.5rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== COURSES SECTION - UPDATED FOR PHP STRUCTURE ===== */
.courses-section {
    padding: 100px 0;
    background: var(--light-gray);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.course-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-red);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(45deg, var(--primary-red), var(--dark-red));
}

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

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

.course-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 500;
    font-size: 1.1rem;
    text-align: center;
    padding: 1rem;
}

.course-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-category {
    color: var(--primary-red);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-title {
    margin-bottom: 1rem;
    color: var(--dark-gray);
    font-size: 1.3rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.course-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex: 1;
}

/* UPDATED COURSE QUOTE STYLING - FIXED FOR PHP OUTPUT */
.course-quote {
    margin-top: auto;
    padding: 1.2rem;
    background: rgba(211, 47, 47, 0.08);
    border-left: 4px solid var(--primary-red);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.5;
    font-size: 0.95rem;
    position: relative;
    display: block;
    min-height: 60px;
}

/* Add quotation marks for PHP-generated content */
.course-quote:before {
    content: '"';
    font-size: 2rem;
    color: var(--primary-red);
    position: absolute;
    left: 0.8rem;
    top: 0.5rem;
    opacity: 0.7;
    font-family: serif;
    line-height: 1;
}

.course-quote:after {
    content: '"';
    font-size: 2rem;
    color: var(--primary-red);
    position: absolute;
    right: 0.8rem;
    bottom: 0.2rem;
    opacity: 0.7;
    font-family: serif;
    line-height: 1;
}

/* Ensure quote content has proper padding */
.course-quote {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

/* Alternative: If you want to add author styling, update your PHP to include spans */
.course-quote .quote-author {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    font-weight: 600;
    color: var(--primary-red);
    font-size: 0.85rem;
    text-align: right;
}

.course-quote .quote-author:before {
    content: "— ";
}

.no-courses-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-style: italic;
    background: var(--white);
    border-radius: 10px;
    border: 2px dashed var(--border-color);
    grid-column: 1 / -1;
}

.no-courses-message p {
    font-size: 1.1rem;
    margin: 0;
}

/* ===== EVENTS SECTION ===== */
.events-section {
    padding: 100px 0;
    background: var(--white);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.event-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
}

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

.event-date {
    background: var(--primary-red);
    color: var(--white);
    padding: 1.5rem;
    text-align: center;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.event-month {
    font-size: 1rem;
    opacity: 0.9;
}

.event-content {
    padding: 1.5rem;
    flex: 1;
}

.event-content h3 {
    margin-bottom: 1rem;
    color: var(--dark-gray);
    font-size: 1.2rem;
}

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

.event-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.cta-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 80px 0 20px;
}

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

.footer-widget h4 {
    color: var(--primary-red);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-about p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

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

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

.footer-widget a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: var(--primary-red);
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .header-search {
        max-width: 300px;
    }
    
    .cutout-image-container {
        min-height: 500px;
    }
    
    .courses-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 150px 0 80px;
        min-height: auto;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .cutout-image-container {
        min-height: 400px;
        order: -1;
        margin-bottom: 2rem;
    }
    
    .main-navigation {
        display: none;
    }
    
    .header-search {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .cta-content h2 {
        font-size: 2.2rem;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .features-grid,
    .courses-grid,
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .course-quote {
        padding: 1rem 1.5rem;
        min-height: 50px;
    }
    
    .course-quote:before,
    .course-quote:after {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .cutout-image-container {
        min-height: 300px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .header-container {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .site-branding {
        flex: 1;
    }
    
    .course-card {
        margin-bottom: 1rem;
    }
    
    .courses-grid {
        gap: 1.5rem;
    }
    
    .course-quote {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Animation for course cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card {
    animation: fadeInUp 0.6s ease forwards;
}

.course-card:nth-child(1) { animation-delay: 0.1s; }
.course-card:nth-child(2) { animation-delay: 0.2s; }
.course-card:nth-child(3) { animation-delay: 0.3s; }
.course-card:nth-child(4) { animation-delay: 0.4s; }
.course-card:nth-child(5) { animation-delay: 0.5s; }
.course-card:nth-child(6) { animation-delay: 0.6s; }
.course-card:nth-child(7) { animation-delay: 0.7s; }
.course-card:nth-child(8) { animation-delay: 0.8s; }
.course-card:nth-child(9) { animation-delay: 0.9s; }
.course-card:nth-child(10) { animation-delay: 1.0s; }
.course-card:nth-child(11) { animation-delay: 1.1s; }
.course-card:nth-child(12) { animation-delay: 1.2s; }



/* Content wrapper - Flexbox layout */
.content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Main content area */
.main-content {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

/* Sidebar */
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* Page content styles */
.page-content {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.page-title {
    margin: 0;
    color: #333;
    font-size: 2em;
}

.entry-content {
    line-height: 1.6;
    font-size: 16px;
}

/* Responsive design */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .sidebar {
        width: 100%;
        order: -1; /* Optional: put sidebar above content on mobile */
    }
    
    .container {
        padding: 0 15px;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .page-title {
        font-size: 1.5em;
    }
}

/* Comments section */
.comments-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.page-links {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 3px;
}