/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    font-size: 14px;
    overflow-x: hidden;
}

/* Header Image Styles */
img {
    display: block;
    width: 100%;
    height: auto;
}

/* Container for content */
.section1 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section-bg {
    background: url(../img/bg1.png);
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Parallax */
.header-parallax {
    transition: transform 0.1s ease-out, opacity 0.1s ease-out;
    will-change: transform, opacity;
}

/* ==================== ANIMATIONS ==================== */

/* Base animation states */
.animate-on-scroll,
.animate-on-load {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.animate-on-scroll.animated,
.animate-on-load.animated {
    opacity: 1;
}

/* Fade Up */
.fade-up {
    transform: translateY(60px);
}
.fade-up.animated {
    transform: translateY(0);
}

/* Fade Down */
.fade-down {
    transform: translateY(-50px);
}
.fade-down.animated {
    transform: translateY(0);
}

/* Fade Left */
.fade-left {
    transform: translateX(80px);
}
.fade-left.animated {
    transform: translateX(0);
}

/* Fade Right */
.fade-right {
    transform: translateX(-80px);
}
.fade-right.animated {
    transform: translateX(0);
}

/* Scale In */
.scale-in {
    transform: scale(0.7);
}
.scale-in.animated {
    transform: scale(1);
}

/* Scale Fade */
.scale-fade {
    transform: scale(0.8);
}
.scale-fade.animated {
    transform: scale(1);
}

/* Slide Scale (combined) */
.slide-scale {
    transform: translateY(40px) scale(0.95);
    opacity: 0;
}
.slide-scale.animated {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Blur In */
.blur-in {
    filter: blur(15px);
    transform: translateY(30px);
}
.blur-in.animated {
    filter: blur(0);
    transform: translateY(0);
}

/* Rotate In */
.rotate-in {
    transform: rotate(-8deg) scale(0.9);
}
.rotate-in.animated {
    transform: rotate(0) scale(1);
}

/* Delay classes */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Study Title with underline animation */
.study-title {
    position: relative;
    display: inline-block;
}

.study-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #503291, #7b52c7);
    transition: width 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) 0.5s;
}

.study-title.animated::after {
    width: 100%;
}

/* Stagger container */
.stagger-container .stagger-item {
    transition: all 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Hover effects for images */
.stagger-item img:hover {
    transform: translateY(-3px);
    transition: transform 0.3s ease;
}

/* Scroll Button */
.scroll-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #503291, #7b52c7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(80, 50, 145, 0.4);
    z-index: 100;
    animation: float 2s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scroll-btn span {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.scroll-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(80, 50, 145, 0.6);
}

.scroll-btn:active {
    transform: scale(0.95);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #503291, #7b52c7);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #503291;
}

/* Selection color */
::selection {
    background: rgba(80, 50, 145, 0.3);
    color: #503291;
}

/* Mobile Responsive Typography */
@media (max-width: 768px) {
    h2[style*="color: #503291"] {
        font-size: 1.4rem !important;
        padding: 15px !important;
        line-height: 1.3;
    }
    
    h3[style*="color: #503291"] {
        font-size: 1rem !important;
        padding: 10px 15px !important;
        line-height: 1.4;
    }
    
    h2.mb-0.fw-semibold {
        font-size: 1.4rem !important;
        line-height: 1.3;
    }

    .scroll-btn {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }

    .scroll-btn span {
        font-size: 18px;
    }

    /* Reduce animation distances on mobile */
    .fade-up { transform: translateY(30px); }
    .fade-left { transform: translateX(30px); }
    .fade-right { transform: translateX(-30px); }
    .slide-scale { transform: translateY(20px) scale(0.98); }
    .blur-in { filter: blur(8px); transform: translateY(15px); }
}

/* Ensure images are always visible */
.container, .container-fluid {
    overflow: visible;
}

img.img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 480px) {
    h2[style*="color: #503291"] {
        font-size: 1.2rem !important;
        padding: 10px !important;
        line-height: 1.2;
    }
    
    h3[style*="color: #503291"] {
        font-size: 0.9rem !important;
        padding: 8px 10px !important;
        line-height: 1.3;
    }
    
    h2.mb-0.fw-semibold {
        font-size: 1.1rem !important;
        line-height: 1.2;
    }
}
