#preloader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid #fff;
    border-top: 4px solid #FFDF00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body, html {
    margin: 0;
    padding: 0;
    background: #000;
    color: #fff;
    /*font-family: sans-serif;*/
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
}
.scrolling-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 60px 30px;
    will-change: transform, opacity;
}

.home-logo {
    max-width: 300px;
    margin-top: 30px;
}

/* Initial animation styles */
.animate-title,
.animate-logo,
.animate-subtitle {
    opacity: 0;
    transform: translateY(50px);
}

header {position: fixed; top: 0; left: 0; right: 0; z-index: 999; opacity: .7;}
#logo {opacity: 1;}
.home-logo {display: block; margin: 0 100px 0 auto;}

.scrolling-panel {width: 100%; height: auto; display: flex; align-items: center; flex-wrap: wrap; padding: 50px; overflow: hidden;}
.scrolling-panel.black {background: #000;}
.scrolling-panel.black * {color: #FFF;}
.scrolling-panel.black h3 {color: #FFF !important;}
.scrolling-panel.grey {background: #707070;}
.scrolling-panel.grey * {color: #FFF;}
.scrolling-panel.grey h3 {color: #FFF !important;}
.scrolling-panel.white {background: #FFF;}
.scrolling-panel.white * {color: #000;}
.scrolling-panel.black .yellow * {color: #000;}
.scrolling-panel.yellow {background: #FFDF00;}
.scrolling-panel.yellow * {color: #000;}
.scrolling-panel h1 {font-weight: 700 !important; font-size: 90px; line-height: 100%;}
.scrolling-panel h2 {font-weight: 700 !important; font-size: 48px; line-height: 100%;}


/*.scrolling-panel.panel-1.drugsafety {*/
/*    min-height: 70vh !important;*/
/*}*/

.scrolling-panel.panel-1, .scrolling-panel.panel-2, .scrolling-panel.panel-3, .scrolling-panel.panel-4 {
    height: auto !important;
    min-height: 0 !important;
}

.scrolling-panel.panel-2, .scrolling-panel.panel-3, .scrolling-panel.panel-4 {
    justify-content: space-between;
    flex-direction: row;
}

.scrolling-panel.panel-2 h2, .scrolling-panel.panel-3 h2, .scrolling-panel.panel-4 h2 {
    font-size: 48px;
    /*padding-top: 20px;*/
}
.panel-2 .header-centered, .panel-3 .header-centered, .panel-4 .header-centered {
    margin: 50px 0 0 0;
}
.panel-2 .header, .panel-3 .header, .panel-4 .header {
    margin: 0 30px 0 0;
    transform: translateX(-50px);
}
.panel-2 .infographic, .panel-3 .infographic, .panel-4 .infographic {
    transform: translateX(50px);
}
.panel-2 .header, .panel-2 .infographic, .panel-3 .header, .panel-3 .infographic, .panel-4 .header, .panel-4 .infographic {
    width: 50%;
    opacity:0;
}

.panel-2 .infographic h3, .panel-3 .infographic h3, .panel-4 .infographic h3 {
    /*font-size: 36px !important;*/
    font-size: 21px !important;
    line-height: 110%;
    margin-bottom: 38px;
}

.panel-2 .infographic p, .panel-3 .infographic p, .panel-4 .infographic p {
    font-size: 16px;
    line-height: 110%;
    margin-top: 24px;
    margin-bottom: 0;
}

.panel-2 .block-wrapper, .panel-3 .block-wrapper, .panel-4 .block-wrapper {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding-bottom: 16px;
}


.home-logo,
.animate-title,
.animate-subtitle,
.animate-subtitle2,
.slider-heading{
    opacity: 0;
    transform: translateY(-50px);
}

.scrolling-panel p {font-size: 22px;}

.header-centered {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    transition: opacity 0.3s ease;
    z-index: 20;
    text-align: center;
}

.icon {
    vertical-align: middle;
}

.scrolling-panel.intro-panel {display: block; height: auto !important;}
.scrolling-panel.intro-panel h1 {
    font-weight: 700 !important;
    font-size: 80px;
    line-height: 115%;
    margin: 40px 0 0;
    opacity: 1
}

.scrolling-panel.intro-panel .header p {
    max-width: 700px;
    font-size: 16px;
    line-height: 115%;
    font-weight: 300;
    opacity: 0;
}

/* Mobile Styles - Add to existing <style> section */
@media (max-width: 768px) {
    /* Header adjustments */
    header,
    #logo {
        opacity: 1;
    }

    .home-logo {
        max-width: 150px;
        margin: 20px 0 0 51%;
    }

    /* Base panel styles */
    .scrolling-panel {
        padding: 30px 20px;
        height: auto;
        min-height: 100vh;
    }

    /* Typography */
    .scrolling-panel h1 {
        font-size: 48px !important;
        line-height: 110%;
        margin-bottom: 30px;
    }

    .scrolling-panel h2 {
        font-size: 32px !important;
        line-height: 110%;
    }

    .scrolling-panel p {
        font-size: 16px;
    }

    /* Intro Panel (About page) */
    .scrolling-panel.intro-panel h1 {
        font-size: 32px !important;
        line-height: 120%;
        transform: translateY(-20px);
        margin: 30px 0 -15px;
        opacity: 1;
    }

    .scrolling-panel.intro-panel .header p {
        font-size: 16px;
        max-width: 100%;
        opacity: 1;
    }


    .panel-2 .block-wrapper, .panel-3 .block-wrapper, .panel-4 .block-wrapper {
        flex-direction: column;
        padding-top: 10px;
    }

    .panel-2 .header, .panel-2 .infographic, .panel-3 .header, .panel-3 .infographic, .panel-4 .header, .panel-4 .infographic {
        width: 100%;
    }

    .panel-2 .infographic p, .panel-3 .infographic p, .panel-4 .infographic p {
        margin-top: 12px;
        line-height: 125%;
    }

    .panel-2 .infographic h3, .panel-3 .infographic h3, .panel-4 .infographic h3 {
        line-height: 130%;
        margin-top: 13px;
        margin-bottom: 12px;
    }


    .icon {
        max-height: 50px;
        width: auto;
    }

    /* Panel 3 - Complex dosage forms */
    .scrolling-panel.panel-3 {
        padding: 30px 20px;
    }


    /* Mobile overlay for video backgrounds */
    .mobile-overlay {
        position: absolute;
        inset: 0;
        background: #000;
        opacity: 0.3;
        z-index: 1;
    }

    /* Panel 2  */
    .scrolling-panel.panel-2 {
        padding: 20px;
        min-height: 100vh;
    }

    .scrolling-panel.panel-2 h2,
    .scrolling-panel.panel-3 h2,
    .scrolling-panel.panel-4 h2{
        font-size: 32px !important;
        line-height: 120%;
        text-align: left;
        margin: 0;
    }

    .scrolling-panel.panel-3.drugsafety {
        background: #000000;
    }

    .relative {
        position: relative;
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .scrolling-panel h2,
    .scrolling-panel.panel-4 h2 {
        font-size: 45px;
    }

    .scrolling-panel.panel-4 h2 {
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    .page-title {
        margin-bottom: 14px !important;
    }

    .scrolling-panel.intro-panel .header {
        margin-bottom: 34px;
    }
}

@media (min-width: 1024px) {
    .scrolling-panel.intro-panel .header p {
        margin-top: -60px;
    }
}