/* ===========================
   Base Reset & Globals
   =========================== */
html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #ff7e5f #f1f1eb;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #ff7e5f;
    color: #fff;
}

/* ===========================
   Split Layout System
   =========================== */
.split-section {
    display: flex;
    width: 100%;
}

.sticky-panel {
    position: sticky;
    top: 0;
    width: 50%;
    height: 100vh;
    overflow: hidden;
}

.scroll-panel {
    width: 50%;
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    padding: 24px;
}

.scroll-panel .grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* ===========================
   Card Overlay System (Sticky panels)
   =========================== */
.card-overlay {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.card-overlay img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-overlay:hover img {
    transform: scale(1.05);
}

.card-overlay .card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 40%, transparent 100%);
}

.card-overlay .card-content {
    position: relative;
    z-index: 2;
    padding: 24px;
    color: #fff;
    width: 100%;
}

.sticky-panel .card-content {
    padding: 40px;
}

/* ===========================
   Grid Card System (Scroll panels)
   =========================== */
.grid-card {
    display: block;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.grid-card:hover {
    transform: translateY(-4px);
}

.grid-card .grid-card-img {
    width: 100%;
    aspect-ratio: 560 / 700;
    overflow: hidden;
}

.grid-card .grid-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.grid-card:hover .grid-card-img img {
    transform: scale(1.05);
}

/* Staggered Grid Offset (300px down on right side) */
.scroll-panel .grid-2col {
    align-items: start;
}

.grid-card:nth-child(even) {
    margin-top: 50px;
}

.grid-card .grid-card-body {
    padding: 16px 0 24px;
    color: #fff;
}

.grid-card .grid-card-body .grid-card-tag {
    display: inline-block;
    background: #111111;
    color: #fff;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    margin-right: 4px;
}

.grid-card .grid-card-body h3 {
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.grid-card .grid-card-body .grid-card-date {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.5;
}

/* ===========================
   Category Badge
   =========================== */
.cat-badge {
    display: inline-block;
    background: #111111;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* ===========================
   Responsive: Mobile (below 768px)
   =========================== */
@media (max-width: 767px) {
    .split-section {
        flex-direction: column;
    }

    .sticky-panel {
        position: relative;
        width: 100%;
        height: 70vh;
    }

    .scroll-panel {
        width: 100%;
        padding: 16px;
    }

    .scroll-panel .grid-2col {
        grid-template-columns: 1fr;
        gap: 16px;
        align-items: stretch;
    }

    .grid-card:nth-child(even) {
        margin-top: 0;
    }
}

/* ===========================
   Custom Cursor System
   =========================== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    display: none;
    transition: opacity 0.3s ease;
}

.custom-cursor.active {
    display: block;
    opacity: 1;
}

.custom-cursor-img {
    position: absolute;
    width: 60px;
    height: 60px;
    top: -30px;
    left: -30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    z-index: 2;
    filter: drop-shadow(0px 8px 12px rgba(0, 0, 0, 0.2));
}

.custom-cursor-img::before {
    content: "👏";
    /* Start clapping animation right away when active */
}

.custom-cursor.active .custom-cursor-img::before {
    animation: clapping 0.4s ease-in-out infinite alternate;
}

@keyframes clapping {
    0% {
        transform: scale(1) rotate(-10deg);
    }

    100% {
        transform: scale(1.15) rotate(10deg);
    }
}

.custom-cursor-text {
    position: absolute;
    left: 20px;
    top: -20px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 1;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.custom-cursor.active .custom-cursor-text {
    opacity: 1;
    transform: translateX(0);
}

.custom-cursor-area {
    cursor: none !important;
}

.custom-cursor-area * {
    cursor: none !important;
}