/* Aesthetic Enhancements for arjankc.com.np */

:root {
    --primary-red: #d63031;
    --hover-red: #e74c3c;
    --glass-bg: rgba(245, 246, 247, 0.7);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 15px 35px rgba(0, 0, 0, 0.1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glassmorphism for Sidebar */
#sidebar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

/* Hero Section Enhancements */
#banner h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
}

#banner .image.object img {
    border-radius: 1rem;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-smooth);
}

#banner .image.object img:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Typography Refinements */
body {
    line-height: 1.8;
}

#main p {
    margin-bottom: 1.5em;
}

/* Service Cards */
.features article {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    height: 100%;
}

.features article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(214, 48, 49, 0.1);
}

.features article .icon {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--primary-red);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3.5em;
    width: 3.5em;
}

.features article .icon:after {
    height: 3em !important;
    width: 3em !important;
    margin: -1.5em 0 0 -1.5em !important;
}

.features article .icon:before {
    font-size: 1.25rem !important;
}

/* 3-Column Grid for Services */
#services .features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    margin: 0;
}

#services .features article {
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

/* Resource Grid Refinement */
.resource-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100% !important;
    margin: 0 !important;
}

.resource-grid article {
    width: 100% !important;
    margin: 0 !important;
    padding: 1.5rem !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
}

.resource-grid article .icon {
    margin-bottom: 0 !important;
    margin-right: 1.5rem !important;
    height: 3em !important;
    width: 3em !important;
}

.resource-grid article .icon:after {
    height: 2.2em !important;
    width: 2.2em !important;
    margin: -1.1em 0 0 -1.1em !important;
}

.resource-grid article h3 {
    margin-bottom: 0.25rem !important;
    font-size: 1rem !important;
}

.resource-grid article p {
    font-size: 0.9rem !important;
    margin-bottom: 0 !important;
}

/* Resource and Insight Cards */
.posts article,
#student-resources article {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.posts article:hover,
#student-resources article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.posts article .image img,
#student-resources article .image img {
    transition: var(--transition-smooth);
}

.posts article:hover .image img {
    transform: scale(1.05);
}

/* Button Modernization */
.button {
    border-radius: 0.5rem !important;
    text-transform: none;
    font-weight: 600;
    transition: var(--transition-smooth) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(214, 48, 49, 0.2);
}

.button.primary {
    background-image: linear-gradient(135deg, #d63031, #e74c3c);
    border: none;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Feature and Resource Card Clickability (Stretched Link) */
#main .features article {
    position: relative !important;
    cursor: pointer !important;
}

#main .features article h3 a::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 10 !important;
    display: block !important;
}

/* Ensure secondary links (if any) are clickable above the overlay */
#main .features article a:not(h3 a) {
    position: relative !important;
    z-index: 11 !important;
}

/* Sidebar mini-posts enhancements */
#sidebar .mini-posts article .image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: block;
}

#sidebar .mini-posts article .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

#sidebar .mini-posts article:hover .image img {
    transform: scale(1.05);
}

/* Entrance Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeInUp 0.8s ease-out both;
}

section:nth-of-type(1) {
    animation-delay: 0.1s;
}

section:nth-of-type(2) {
    animation-delay: 0.2s;
}

section:nth-of-type(3) {
    animation-delay: 0.3s;
}

section:nth-of-type(4) {
    animation-delay: 0.4s;
}

/* Responsive Adjustments */
@media screen and (max-width: 980px) {
    #sidebar {
        backdrop-filter: none;
        /* Better performance on mobile */
    }
}