/* main.css */

/* =========================================
   PAGE LAYOUT & TYPOGRAPHY
   ========================================= */
.news-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 24px 80px;
    /* Navbar payı + boşluk */
    position: relative;
    z-index: 1;
}

/* Background Decoration (Subtle Tech Grid) */
.news-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 600px;
    background-image:
        radial-gradient(var(--brand-primary) 0.5px, transparent 0.5px),
        radial-gradient(var(--brand-primary) 0.5px, transparent 0.5px);
    background-size: 24px 24px;
    background-position: 0 0, 12px 12px;
    opacity: 0.03;
    z-index: -1;
    mask-image: linear-gradient(to bottom, black, transparent);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent);
}

/* =========================================
   PAGE INTRO
   ========================================= */
.page-intro {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.innovative-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(33, 40, 66, 0.04);
    color: var(--brand-primary);
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid rgba(33, 40, 66, 0.08);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.innovative-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--brand-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--brand-primary);
}

.innovative-title {
    font-size: 4rem;
    color: var(--brand-primary);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(180deg, var(--brand-primary) 0%, rgba(33, 40, 66, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

/* =========================================
   FEATURED SECTION (Bento Grid Style)
   ========================================= */
.featured-section {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 24px;
    height: 550px;
    margin-bottom: 80px;
}

.card-overlay {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: #fff;
    border: 1px solid rgba(33, 40, 66, 0.05);
}

.card-overlay:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: var(--shadow-lg);
}

.featured-main {
    height: 100%;
}

.card-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.card-overlay:hover img {
    transform: scale(1.08);
}

.overlay-gradient-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(33, 40, 66, 0.95) 0%, rgba(33, 40, 66, 0.4) 40%, transparent 100%);
    z-index: 1;
}

.overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 48px;
    z-index: 2;
    color: white;
    width: 100%;
}

.badge {
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    display: inline-block;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Badge colors matched to theme but modernized */
.badge-tech {
    background: rgba(33, 40, 66, 0.8);
}

.badge-science {
    background: rgba(59, 130, 246, 0.8);
}

.badge-space {
    background: rgba(99, 102, 241, 0.8);
}

.badge-inno {
    background: rgba(236, 72, 153, 0.8);
}

.overlay-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.overlay-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.featured-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.side-card {
    flex: 1;
}

.side-card .overlay-content {
    padding: 32px;
}

/* =========================================
   POPULAR SECTION (Clean Horizontal)
   ========================================= */
.popular-section {
    margin-bottom: 100px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(33, 40, 66, 0.06);
}

.section-header h3 {
    font-size: 2rem;
    color: var(--brand-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h3 i {
    font-size: 1.5rem;
    color: var(--brand-light);
}

.view-all {
    color: var(--brand-primary);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    background: rgba(33, 40, 66, 0.03);
    transition: 0.3s;
}

.view-all:hover {
    background: var(--brand-primary);
    color: #fff;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: start;
}

.pop-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 16px;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

/* Shimmer effect */
.pop-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(102, 126, 234, 0.1),
            transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.pop-card:hover::before {
    left: 100%;
}

/* Gradient border on hover */
.pop-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.5),
            rgba(118, 75, 162, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pop-card:hover::after {
    opacity: 1;
}

.pop-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-12px) scale(1.03);
    box-shadow:
        0 25px 50px rgba(102, 126, 234, 0.2),
        0 0 50px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.pop-img {
    position: relative;
    height: 180px;
    min-height: 180px;
    max-height: 180px;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.pop-card:hover .pop-img {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow:
        0 8px 20px rgba(102, 126, 234, 0.3),
        inset 0 0 20px rgba(102, 126, 234, 0.1);
}

/* Holographic overlay */
.pop-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.3) 0%,
            transparent 40%,
            rgba(118, 75, 162, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.pop-card:hover .pop-img::before {
    opacity: 1;
}

.pop-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: brightness(0.95);
}

.pop-card:hover .pop-img img {
    transform: scale(1.15) rotate(3deg);
    filter: brightness(1.1) saturate(1.2);
}

.pop-card h4 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--brand-primary);
    font-weight: 700;
    line-height: 1.4;
    transition: all 0.3s ease;
    position: relative;
    min-height: 3.2rem;
    flex-grow: 1;
}

.pop-card:hover h4 {
    background: linear-gradient(135deg, var(--brand-primary), #667eea);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: translateX(3px);
}

.pop-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: rgba(33, 40, 66, 0.6);
    transition: all 0.3s ease;
}

.pop-meta i {
    color: var(--brand-primary);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.pop-card:hover .pop-meta {
    color: rgba(33, 40, 66, 0.8);
}

.pop-card:hover .pop-meta i {
    opacity: 1;
    transform: scale(1.2);
}

/* =========================================
   RECENT SECTION (Futuristic List)
   ========================================= */
.recent-header-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 50px;
    gap: 30px;
    flex-wrap: wrap;
}

.recent-title-box h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--brand-primary);
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.recent-title-box p {
    color: rgba(33, 40, 66, 0.6);
    font-size: 1.1rem;
}

/* Futuristic Filter Bar */
.create-news-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(33, 40, 66, 0.2);
}

.create-news-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(33, 40, 66, 0.3);
    background: #1a2035;
    /* dark blue */
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(33, 40, 66, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 10px 20px;
    border-radius: 14px;
    width: 240px;
    border: 1px solid rgba(33, 40, 66, 0.08);
    transition: 0.3s;
}

.search-box:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(33, 40, 66, 0.1);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: inherit;
    color: var(--brand-primary);
}

.filter-tags {
    display: flex;
    gap: 6px;
}

.filter-btn {
    border: none;
    background: transparent;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    color: rgba(33, 40, 66, 0.6);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.9rem;
}

.filter-btn:hover {
    color: var(--brand-primary);
    background: rgba(33, 40, 66, 0.03);
}

.filter-btn.active {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(33, 40, 66, 0.2);
}

/* Recent Grid - Futuristic Cards */
.recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    align-items: start;
}

.blog-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid transparent;
}

/* Animated gradient border */
.blog-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 2px;
    background: linear-gradient(135deg,
            var(--brand-primary),
            #667eea,
            #764ba2,
            var(--brand-light));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

.blog-card:hover::before {
    opacity: 1;
}

/* Glowing effect on hover */
.blog-card::after {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle at center,
            rgba(102, 126, 234, 0.3),
            transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    filter: blur(30px);
}

.blog-card:hover::after {
    opacity: 1;
}

.blog-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 30px 60px rgba(102, 126, 234, 0.25),
        0 0 40px rgba(102, 126, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.blog-img {
    height: 220px;
    min-height: 220px;
    max-height: 220px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: brightness(0.95);
}

.blog-card:hover .blog-img img {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(1.05) contrast(1.1);
}

/* Holographic overlay on image */
.blog-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.2) 0%,
            transparent 50%,
            rgba(118, 75, 162, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.blog-card:hover .blog-img::after {
    opacity: 1;
}

.blog-img .badge {
    position: absolute;
    top: 16px;
    left: 16px;
    margin: 0;
    font-size: 0.7rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform-origin: center;
    transition: all 0.3s ease;
}

.blog-card:hover .blog-img .badge {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.blog-content {
    padding: 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.8),
            rgba(255, 255, 255, 0.95));
}

/* Futuristic scan line effect */
.blog-content::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent,
            rgba(102, 126, 234, 0.1),
            transparent);
    transition: top 0.6s ease;
}

.blog-card:hover .blog-content::before {
    top: 100%;
}

.blog-content h3 {
    font-size: 1.35rem;
    margin-bottom: 16px;
    color: var(--brand-primary);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    position: relative;
    transition: all 0.3s ease;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    min-height: 3.6rem;
}

.blog-card:hover .blog-content h3 {
    background: linear-gradient(135deg, var(--brand-primary), #667eea);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: translateX(5px);
}

.blog-content p {
    color: rgba(33, 40, 66, 0.7);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-content p {
    color: rgba(33, 40, 66, 0.85);
}

.blog-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(102, 126, 234, 0.15);
    position: relative;
}

.blog-footer .author {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-footer .author {
    transform: translateX(5px);
}

.blog-footer .author span {
    font-weight: 600;
    color: var(--brand-primary);
    font-size: 0.9rem;
    position: relative;
}

.founder-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blog-card:hover .founder-avatar {
    border-color: var(--brand-primary);
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.6);
    transform: scale(1.1);
}

.founder-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.read-more {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.9),
            rgba(102, 126, 234, 0.1));
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* Rotating gradient background */
.read-more::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg,
            transparent,
            var(--brand-primary),
            transparent 100deg);
    animation: spin 2s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.read-more:hover::before {
    opacity: 1;
}

.read-more i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.read-more:hover {
    background: linear-gradient(135deg,
            var(--brand-primary),
            #667eea);
    color: #fff;
    border-color: transparent;
    transform: rotate(-45deg) scale(1.15);
    box-shadow:
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 0 30px rgba(102, 126, 234, 0.3);
}

.read-more:hover i {
    transform: scale(1.1);
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1024px) {
    .featured-section {
        grid-template-columns: 1fr;
        height: auto;
    }

    .featured-main {
        height: 400px;
    }

    .featured-side {
        flex-direction: row;
        height: 250px;
    }

    .recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-intro {
        margin-bottom: 40px;
    }

    .innovative-title {
        font-size: 2.5rem;
    }

    .featured-side {
        flex-direction: column;
        height: auto;
    }

    .side-card {
        height: 250px;
    }

    .recent-header-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-bar {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box {
        width: 100%;
    }

    .filter-tags {
        overflow-x: auto;
        width: 100%;
        padding-bottom: 5px;
    }

    .recent-grid {
        grid-template-columns: 1fr;
    }

    .popular-grid {
        grid-template-columns: 1fr;
    }
}