/* assets/css/content.css - Main content and section styles */

.main-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Simple Hero Section */
.hero-simple {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Left Column: Text Content */
.hero-text {
    padding: 2rem 0;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    color: #000000;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1E3A8A;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.hero-description {
    font-size: 1.1rem;
    color: #4B5563;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: #FFD700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6B7280;
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-block;
}

.btn-primary {
    background: #FFD700;
    color: #000000;
    border-color: #000000;
}

.btn-primary:hover {
    background: #000000;
    color: #FFD700;
    border-color: #FFD700;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #1E3A8A;
    border-color: #1E3A8A;
}

.btn-secondary:hover {
    background: #1E3A8A;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Right Column: Card */
.hero-card {
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: #000000;
    color: #ffffff;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.card-icon {
    font-size: 1.5rem;
}

.card-status {
    background: #FFD700;
    color: #000000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.card-content {
    padding: 1.5rem;
}

.problem-preview {
    margin-bottom: 1.5rem;
}

.problem-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.75rem;
}

.problem-description {
    font-size: 0.95rem;
    color: #6B7280;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.code-sample {
    background: #F8F9FA;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.code-header {
    background: #1E3A8A;
    color: #ffffff;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.code-lang {
    color: #FFD700;
}

.code-block {
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #374151;
    background: #ffffff;
    overflow-x: auto;
}

.problem-actions {
    display: flex;
    gap: 0.75rem;
}

.action-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.solve {
    background: #FFD700;
    color: #000000;
    border: 2px solid #000000;
}

.action-btn.solve:hover {
    background: #000000;
    color: #FFD700;
}

.action-btn.discuss {
    background: #1E3A8A;
    color: #ffffff;
    border: 2px solid #1E3A8A;
}

.action-btn.discuss:hover {
    background: transparent;
    color: #1E3A8A;
}

.progress-indicator {
    border-top: 2px solid #F3F4F6;
    padding-top: 1.5rem;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.progress-bar {
    background: #F3F4F6;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #FFD700 0%, #1E3A8A 100%);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Posts Section - Blogger Style */
.posts-header {
    text-align: center;
    margin-bottom: 3rem;
}

.posts-subtitle {
    font-size: 1.1rem;
    color: #6B7280;
    margin-top: 0.75rem;
    font-weight: 500;
}

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

.post-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #F1F5F9;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #FFD700;
}

.post-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 300px;
}

.post-image {
    position: relative;
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.post-card.featured .post-image {
    min-height: 300px;
}

.post-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #FFD700;
    color: #000000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.post-icon {
    font-size: 4rem;
    opacity: 0.3;
}

.post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #6B7280;
    flex-wrap: wrap;
}

.post-author {
    font-weight: 600;
    color: #1E3A8A;
}

.post-date,
.post-read-time {
    font-weight: 500;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    flex-grow: 0;
}

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

.post-excerpt {
    font-size: 0.95rem;
    color: #4B5563;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.post-card.featured .post-excerpt {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: #F1F5F9;
    color: #1E3A8A;
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #E2E8F0;
}

.tag:hover {
    background: #1E3A8A;
    color: #ffffff;
    cursor: pointer;
}

.post-stats {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #F1F5F9;
    margin-top: auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #6B7280;
    font-weight: 500;
}

.stat-icon {
    font-size: 1rem;
}

.stat-count {
    font-weight: 600;
}

.posts-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid #F1F5F9;
}

.load-more-btn {
    background: #1E3A8A;
    color: #ffffff;
    border: 2px solid #1E3A8A;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: transparent;
    color: #1E3A8A;
    transform: translateY(-2px);
}

/* Posts Section Horizontal Layout */
.posts-horizontal {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.post-card-horizontal {
    display: flex;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    min-height: 200px;
}

.post-card-horizontal:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Left Column - 50% width */
.post-left {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
}

/* Right Column - 50% width */
.post-right {
    flex: 1;
    position: relative;
    background: #000000;
    min-height: 200px;
}

/* Post Description - 90% height of left column */
.post-description {
    flex: 9;
    margin-bottom: 1rem;
}

.post-description .post-category {
    margin-bottom: 0.75rem;
}

.post-description .category-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000000;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .post-description .post-title {
        font-size: 1rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    
    .post-description .post-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

/* Post Bottom Meta - 10% height of left column */
.post-bottom-meta {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.author-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1E3A8A;
    white-space: nowrap;
    flex: 1;
    min-width: 80px;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex: 2;
    justify-content: center;
    flex-wrap: wrap;
}

.post-tags .tag {
    background: #f8f9fa;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.post-tags .tag:hover {
    background: #FFD700;
    color: #000000;
    border-color: #FFD700;
}

.view-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666666;
    white-space: nowrap;
    flex: 1;
    text-align: right;
    min-width: 80px;
}

/* Video Container */
.post-right .video-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: #000000;
}

.post-right .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.post-right .video-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    backdrop-filter: blur(4px);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000000;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

/* Responsive Design for Horizontal Posts */
@media (max-width: 1024px) {
    .posts-horizontal {
        padding: 0 1rem;
    }
    
    .post-card-horizontal {
        min-height: 180px;
    }
    
    .post-left {
        padding: 1.25rem;
    }
    
    .post-description .post-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .post-card-horizontal {
        flex-direction: column;
        min-height: auto;
    }
    
    .post-left {
        flex: none;
        padding: 1rem;
    }
    
    .post-right {
        flex: none;
        min-height: 200px;
    }
    
    .post-bottom-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .author-name,
    .view-count {
        text-align: left;
        flex: none;
    }
    
    .post-tags {
        justify-content: flex-start;
        flex: none;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .posts-horizontal {
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .post-left {
        padding: 0.75rem;
    }
    
    .post-description .post-title {
        font-size: 1rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    
    .post-description .post-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .post-right {
        min-height: 180px;
    }
    
    .post-bottom-meta {
        padding-top: 0.75rem;
        gap: 0.5rem;
    }
    
    .post-tags .tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .author-name,
    .view-count {
        font-size: 0.8rem;
    }
}

/* How It Works Section - Updated for other content */
.how-it-works {
    margin: 6rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.how-it-works-content {
    text-align: left;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    margin-bottom: 2rem;
    color: #000000;
    line-height: 1.1;
    text-align: center;
}

.how-it-works-description {
    font-size: 1.2rem;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Small Stats Grid for How It Works Section */
.stats-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item-small {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #ffffff;
    border-radius: 8px;
    border: 2px solid #F3F4F6;
    transition: all 0.3s ease;
}

.stat-item-small:hover {
    transform: translateY(-3px);
    border-color: #FFD700;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-number-small {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    display: block;
}

.stat-label-small {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6B7280;
}

.features-list {
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(5px);
    border-color: #FFD700;
    background: #FFFBEB;
}

.feature-icon {
    font-size: 1.5rem;
    min-width: 2rem;
}

.feature-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 0.25rem;
}

.feature-content p {
    font-size: 0.9rem;
    color: #6B7280;
    margin: 0;
}

.code-demo {
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    text-align: left;
    border: 2px solid #F3F4F6;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: float 6s ease-in-out infinite;
}

.code-demo:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #FFD700;
}

@keyframes float {
    0%, 100% {
        transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateY(0px);
    }
    50% {
        transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateY(-20px);
    }
}

.code-demo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(90deg, #FF5F57, #FFBD2E, #28CA42);
    border-radius: 12px 12px 0 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    margin-top: 2rem;
    padding: 0 2rem;
}

.code-filename {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #374151;
    background: #F3F4F6;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
}

.code-actions {
    display: flex;
    gap: 0.5rem;
}

.code-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.run-btn {
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    color: white;
}

.run-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.3);
}

.submit-btn {
    background: #FFD700;
    color: #000000;
    border: 1px solid #FFC107;
}

.submit-btn:hover {
    transform: translateY(-2px);
    background: #FFC107;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.code-content {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
    background: #F9FAFB;
    padding: 2rem;
    margin: 1rem 2rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #E5E7EB;
}

.code-result {
    background: #F0FDF4;
    border: 1px solid #22C55E;
    border-radius: 8px;
    padding: 1rem 2rem;
    margin: 1rem 2rem;
    color: #15803D;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-stars {
    background: #FFFBEB;
    border: 1px solid #FFD700;
    border-radius: 8px;
    padding: 1rem 2rem;
    margin: 1rem 2rem 2rem 2rem;
    color: #B45309;
    font-weight: 600;
    text-align: center;
    font-size: 1.1rem;
}

/* Welcome Section (for other content) */
.welcome-section {
    text-align: center;
    padding: 4rem 0;
}

.welcome-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--golden-yellow);
}

.welcome-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.content-section {
    display: none;
    padding: 2rem 0;
}

.content-section.active {
    display: block;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    border: 1px solid #F1F5F9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: #E2E8F0;
}

.card:hover::before {
    transform: scaleX(1);
}

.card h3 {
    color: #1E293B;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.card p {
    color: #64748B;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.card ul {
    margin-left: 0;
    margin-top: 1rem;
    padding-left: 0;
    list-style: none;
}

.card ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
}

.card ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #FFD700;
    font-weight: bold;
    font-size: 1.1rem;
}
