/* Write Ups Page Styles */
.writeups-hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
    display: flex;
    align-items: center;
    margin-top: -100px; /* Offset for fixed navbar */
    padding-top: 100px;
}

/* Hero Background Image */
.writeups-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* Extended height to flow into cards section */
    z-index: 1;
}

.writeups-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

/* Hero Overlay */
.writeups-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(135deg, 
        rgba(0,0,0,0.8) 0%, 
        rgba(0,0,0,0.6) 40%, 
        rgba(0,0,0,0.3) 100%);
    display: flex;
    align-items: center;
}

/* Hero Content */
.writeups-hero-content {
    max-width: 800px;
    padding-left: 40px;
}

.writeups-hero-title {
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 3rem;
    line-height: 1.05;
    letter-spacing: -3px;
    text-transform: uppercase;
}

.writeups-hero-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 0;
    max-width: 500px;
    font-weight: 300;
}

/* Categories Section */
.writeups-categories-section {
    padding: 40px 0 80px 0;
    background: transparent; /* Changed from black to transparent */
    position: relative;
    margin-top: -280px; /* Increased overlap */
    z-index: 10;
}

/* Add gradient fade from image to black */
.writeups-categories-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(0,0,0,0.5) 30%,
        rgba(0,0,0,0.8) 60%,
        #000000 100%);
    z-index: -1;
    pointer-events: none;
}

/* Add black background that starts after the gradient */
.writeups-categories-section::after {
    content: '';
    position: absolute;
    top: 200px;
    left: 0;
    right: 0;
    bottom: -100px;
    background: #000000;
    z-index: -2;
}

/* Category Cards */
.writeup-category-card {
    display: block;
    position: relative;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.writeup-category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Category Image */
.category-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.writeup-category-card:hover .category-image img {
    transform: scale(1.1);
}

/* Category Overlay - Different colors for each category */
.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all 0.4s ease;
}

/* Poetry Card - Burgundy/Pink Theme */
.poetry-card .category-overlay {
    background: linear-gradient(
        to bottom,
        rgba(139, 69, 99, 0.3) 0%,
        rgba(139, 69, 99, 0.6) 50%,
        rgba(139, 69, 99, 0.95) 100%
    );
}

.poetry-card:hover .category-overlay {
    background: linear-gradient(
        to bottom,
        rgba(139, 69, 99, 0.4) 0%,
        rgba(139, 69, 99, 0.7) 50%,
        rgba(139, 69, 99, 0.98) 100%
    );
}

/* Spoken Words Card - Dark Theme */
.spoken-words-card .category-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.95) 100%
    );
}

.spoken-words-card:hover .category-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.98) 100%
    );
}

/* Open-ed Card - Blue Theme */
.open-ed-card .category-overlay {
    background: linear-gradient(
        to bottom,
        rgba(44, 82, 130, 0.3) 0%,
        rgba(44, 82, 130, 0.6) 50%,
        rgba(44, 82, 130, 0.95) 100%
    );
}

.open-ed-card:hover .category-overlay {
    background: linear-gradient(
        to bottom,
        rgba(44, 82, 130, 0.4) 0%,
        rgba(44, 82, 130, 0.7) 50%,
        rgba(44, 82, 130, 0.98) 100%
    );
}

/* Category Content */
.category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.writeup-category-card:hover .category-content {
    transform: translateY(0);
}

/* Category Icon */
.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-icon i {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.writeup-category-card:hover .category-icon {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

.writeup-category-card:hover .category-icon i {
    transform: translate(3px, -3px);
}

/* Category Title */
.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    line-height: 1.2;
}

/* Category Count */
.category-count {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .writeups-hero-title {
        font-size: clamp(1.5rem, 4vw, 4rem);
    }
    
    .category-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .writeups-hero-section {
        height: 80vh;
        min-height: 600px;
    }
    
    .writeups-hero-content {
        padding-left: 20px;
    }
    
    .writeups-hero-title {
        font-size: clamp(1.5rem, 6vw, 3rem);
        letter-spacing: -2px;
    }
    
    .writeups-hero-description {
        font-size: 1rem;
    }
    
    .writeups-categories-section {
        padding: 30px 0 60px 0;
        margin-top: -200px;
    }
    
    .writeups-categories-section::before {
        top: -50px;
        height: 200px;
    }
    
    .writeups-categories-section::after {
        top: 150px;
    }
    
    .writeup-category-card {
        height: 350px;
        margin-bottom: 20px;
    }
    
    .category-content {
        padding: 2rem;
    }
    
    .category-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .writeups-hero-section {
        height: 70vh;
        min-height: 500px;
    }
    
    .writeups-hero-title {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }
    
    .writeup-category-card {
        height: 300px;
    }
    
    .category-content {
        padding: 1.5rem;
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 1rem;
    }
    
    .category-icon i {
        font-size: 20px;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .category-count {
        font-size: 0.9rem;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.writeups-hero-content {
    animation: fadeInUp 1s ease-out;
}

.writeup-category-card {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.writeup-category-card:nth-child(1) {
    animation-delay: 0.2s;
}

.writeup-category-card:nth-child(2) {
    animation-delay: 0.4s;
}

.writeup-category-card:nth-child(3) {
    animation-delay: 0.6s;
}