                        :root {
    --primary: #0f2b4a;
    --primary-dark: #081c30;
    --gold: #c9a347;
    --gold-dark: #a88338;
    --light-bg: #f9fbfd;
    --text-dark: #1a2533;
    --text-light: #ffffff;
    --shadow: 0 8px 25px rgba(15,43,74,0.12);
}
main{
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    background-color: var(--light-bg);
    line-height: 1.6;
    margin: 0;
    font-size: 16px;
    overflow-x: hidden;
}
h1, h2, .section-title, .memorial-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}
/* Fade-in animation
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
 */
/* Memorial Hero */
.memorial-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--text-light);
    padding: 4rem 1rem 3rem;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.memorial-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(201,163,71,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.memorial-title {
    font-size: 2.5rem;
    color: var(--gold);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
    letter-spacing: 0.8px;
}

.memorial-subtitle {
    font-size: 1.4rem;
    font-weight: 400;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1rem;
}

.memorial-photo-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 1.2rem auto;
}

.memorial-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid rgba(201,163,71,0.5);
    box-shadow: var(--shadow), inset 0 0 15px rgba(201,163,71,0.2);
    transition: all 0.5s ease;
}

.memorial-photo:hover {
    transform: scale(1.08);
    border-color: var(--gold);
}

.memorial-message {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 300;
    color: rgba(255,255,255,0.95);
    line-height: 1.7;
}

/* Leadership Section */
.mentor-section {
    padding: 3rem 1rem;
    background: linear-gradient(to bottom, #ffffff, #f0f4f8);
}

.section-title {
    color: var(--primary);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.mentor-card {
    background: linear-gradient(-45deg, #ffffff, #fff9e6, #e6f0ff, #ffffff);
background-size: 400% 400%;
animation: cardGradient 6s ease infinite;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    padding: 1.5rem 1rem;
    height: 100%;
}

.mentor-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--gold);
    margin: 1.2rem auto 0.8rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
    display: block;
}

.mentor-name {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.mentor-role {
    font-size: 0.95rem;
    color: #5a7184;
    margin-bottom: 0.6rem;
}

.mentor-desc {
    font-size: 0.92rem;
    padding: 0 1rem 1.2rem;
}

/* Gallery */
.gallery-section {
    width: auto;
    background: white;
}

.carousel-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 320px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center;
}

.carousel-caption {
    background: rgba(15,43,74,0.65);
    border-radius: 8px;
    padding: 0.6rem;
    font-size: 1rem;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .memorial-hero { padding: 6rem 2rem 4rem; }
    .memorial-title { font-size: 3.2rem; }
    .memorial-subtitle { font-size: 1.8rem; }
    .memorial-photo-container { width: 220px; height: 220px; }
    .memorial-message { font-size: 1.2rem; }
    .section-title { font-size: 2.8rem; }
    .mentor-img { width: 150px; height: 150px; }
    .carousel-image-wrapper { max-height: 420px; aspect-ratio: 16 / 9; }
}

@media (min-width: 992px) {
    .memorial-title { font-size: 4rem; }
    .section-title { font-size: 3.2rem; }
}            
                .leaf-card {
            width: 100%;
            padding: clamp(2rem, 8vw, 3.5rem);
            text-align: center;
            position: relative;
            border-radius: 0 80px 0 80px;
            overflow: hidden;
            box-shadow: 0 15px 40px rgba(0, 31, 63, 0.12);
            
            background: linear-gradient(-45deg, #ffffff, #fff9e6, #e6f0ff, #ffffff);
            background-size: 400% 400%;
            animation: cardGradient 6s ease infinite;
            border: 1px solid rgba(212, 175, 55, 0.25);
        }

        @keyframes cardGradient {
            0%   { background-position: 0% 50%; }
            50%  { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .leaf-card::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
            animation: rotateGlow 15s linear infinite;
            z-index: 1;
        }

        @keyframes rotateGlow {
            from { transform: rotate(0deg); }
            to   { transform: rotate(360deg); }
        }

        .content-wrap {
            position: relative;
            z-index: 2;
        }

        .profile-img {
            width: clamp(90px, 28vw, 120px);
            height: clamp(90px, 28vw, 120px);
            border-radius: 0 40px 0 40px;
            object-fit: cover;
            border: 4px solid #001f3f;
            margin-bottom: clamp(1.2rem, 4vw, 1.8rem);
            animation: imageMorph 6s ease-in-out infinite;
            transition: transform 0.4s, border-color 0.6s;
        }

        @keyframes imageMorph {
            0%, 100% { border-radius: 0 40px 0 40px; transform: scale(1); }
            50%      { border-radius: 40px 0 40px 0; transform: scale(1.05); border-color: #d4af37; }
        }

        .msg {
            color: #001f3f;
            font-size: clamp(0.65rem, 2.8vw, 0.75rem);
            margin: 0;
            text-transform: uppercase;
            letter-spacing: 2.2px;
            background: linear-gradient(90deg, #001f3f, #d4af37, #001f3f);
            background-size: 200% auto;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: textShine 4s linear infinite;
        }

        @keyframes textShine {
            to { background-position: 200% center; }
        }

        .msg h1 {
            margin: 0.4em 0 0.8em;
            font-size: clamp(1.4rem, 6vw, 1.9rem);
        }

        .title-line {
            width: 80px;
            height: 3px;
            background: #d4af37;
            margin: clamp(0.8rem, 3vw, 1.2rem) auto clamp(1.2rem, 4vw, 1.8rem);
            position: relative;
            overflow: hidden;
            border-radius: 10px;
        }

        .title-line::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, #ffffff, transparent);
            animation: sweep 2s infinite;
        }

        @keyframes sweep {
            0%   { left: -100%; }
            100% { left: 100%; }
        }

        .message {
            color: #333333;
            line-height: 1.75;
            font-size: clamp(0.95rem, 3.8vw, 1.05rem);
            font-style: italic;
            padding: 0 0.1rem;
        }

        .message p {
            margin: 0 0 1.8rem;
        }
                .signature {
            font-family: 'Brush Script MT', cursive;
            font-size: clamp(1.8rem, 8vw, 2.4rem);
            color: #001f3f;
            display: block;
            margin-bottom: 0.3rem;
        }

        .school-name {
            font-size: clamp(1rem, 4vw, 1.28rem);
            color: black;
            font-weight: bold;
            letter-spacing: 2.5px;
            animation: pulse 3s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50%      { opacity: 0.65; }
        }

        /* Extra safety for very small screens */
        @media (max-width: 360px) {
            .leaf-card {
                border-radius: 0 60px 0 60px;
                padding: 1.8rem 1.2rem;
            }
            .profile-img { border-width: 3px; }
        }
        .bgcard {
            background: #e9ecef;
            display: flex;
            justify-content: center;
            align-items: center;
            width: auto;
            margin: 0;
            padding: 1rem;
            font-family: 'Georgia', serif;
        }