/* Hero section that covers full viewport */
.hero-section {
    background: linear-gradient(45deg, #00695C 0%, #00897B 50%, #4DB6AC 100%);
    min-height: 100vh;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-content {
    padding-top: 120px !important;
    /* Account for fixed navbar */
    /* Trimmed from 5rem to 2rem to buy back the height the logo row below the
       body copy added. The hero is min-height:100vh, so once its content is
       taller than the viewport the page scrolls and the fixed navbar — which
       goes opaque past 50px of scroll — clips the heading. Measured: the hero
       needs 830px with the logos and 5rem here, 782px with 2rem, versus 784px
       before the logos existed. Keep this block under ~784px tall. */
    padding-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.hero-text-col {
    position: relative;
    z-index: 10;
}

/* The scrim panel that used to sit here was removed by request. The copy now
   sits directly on the gradient, so legibility rests on the text shadows
   below — the text column occupies the crimson end of the 45deg gradient,
   where white already clears AA. Keep the shadows if the layout changes. */
.hero-title {
    font-weight: 900;
    font-size: 4rem;
    line-height: 1.1;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 0 2px 12px rgba(74, 12, 8, 0.45), 0 1px 3px rgba(74, 12, 8, 0.35);
}

.hero-description {
    font-size: 1.3rem;
    color: white;
    /* Kept tight: the logo row directly below carries the bottom spacing now,
       and both crests have transparent padding baked into their canvases, which
       adds visual gap on top of this margin. */
    margin-bottom: 0.75rem;
    line-height: 1.6;
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 3px solid rgba(255, 255, 255, 0.8);
    max-width: 500px;
    font-weight: 400;
}


.hero-logos {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: -12px;
    margin-top: -8px;
    margin-bottom: 1rem;
}

.hero-logo {
    display: block;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 55, 48, 0.35));
}

.hero-logo-mara {
    height: 72px;
}

.hero-logo-mrsm {
    height: 104px;
}

.btn-register,
.btn-login {
    background-color: white;
    color: #C62828;
    font-weight: 700;
    padding: 18px 35px;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    margin-right: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-buttons {
    margin: 2rem 0;
}

.btn-register:hover,
.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    color: #C62828;
    background-color: #f8f9fa;
}

/* Star Decorations */
.star {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 100px solid rgba(255, 255, 255, 0.1);
    transform: rotate(35deg);
}

.star::before {
    content: '';
    position: absolute;
    left: -50px;
    top: -70px;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 100px solid rgba(255, 255, 255, 0.1);
    transform: rotate(-70deg);
}

.star1 {
    top: 20%;
    right: 10%;
    transform: scale(1.5) rotate(15deg);
}

.star2 {
    top: 50%;
    right: 25%;
    transform: scale(2) rotate(45deg);
}

.star3 {
    bottom: 10%;
    right: 15%;
    transform: scale(1.2) rotate(-15deg);
}

/* Geometric Triangles */
.triangle {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0.3;
}

.triangle1 {
    top: 15%;
    right: 5%;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-bottom: 260px solid #00897B;
    transform: rotate(25deg);
}

.triangle2 {
    bottom: 20%;
    right: 10%;
    border-left: 120px solid transparent;
    border-right: 120px solid transparent;
    border-bottom: 200px solid #00BFA5;
    transform: rotate(-30deg);
}

.triangle3 {
    top: 40%;
    right: 30%;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 180px solid #26A69A;
    transform: rotate(60deg);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .hero-description {
        font-size: 1.1rem;
        max-width: 100%;
    }

    .hero-logos {
        gap: 0.25rem;
        margin-left: -10px;
        margin-top: -6px;
    }

    .hero-logo-mara {
        height: 58px;
    }

    .hero-logo-mrsm {
        height: 84px;
    }

    .btn-register,
    .btn-login {
        display: block;
        width: 100%;
        margin: 0.8rem 0;
        text-align: center;
        padding: 16px 30px;
    }

    .hero-content {
        padding-top: 120px;
    }

    
    /* Hide decorative elements on mobile for better performance */
    .triangle1, .triangle2, .triangle3 {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .hero-logos {
        gap: 0.25rem;
        margin-left: -8px;
        margin-top: -5px;
    }

    .hero-logo-mara {
        height: 48px;
    }

    .hero-logo-mrsm {
        height: 70px;
    }
}

/* Animation for content entrance */
.hero-content>* {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease forwards;
}

.hero-title {
    animation-delay: 0.2s;
}

.hero-buttons {
    animation-delay: 0.4s;
}

.hero-description {
    animation-delay: 0.6s;
}

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

@media (prefers-reduced-motion: reduce) {
    .hero-content>* {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .btn-register,
    .btn-login {
        transition: none;
    }

    .btn-register:hover,
    .btn-login:hover {
        transform: none;
    }
}

/* Updated background pattern to complement the new gradient */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 60% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 30%);
    z-index: 1;
}

@media (max-width: 991px) {
    .hero-photo-half {
        display: none !important;
    }

    /* Make main content take full width when the photo/logo half is hidden */
    .hero-content .hero-text-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Right half of the hero: the MRSM Sandakan campus photo bleeds to the
   viewport edge, independent of the container so it fills the full section
   height. Sits above the gradient decoration (z-index 1) but below
   hero-content (z-index 10). The photo lives on ::before (not on this
   element directly) so its opacity doesn't also fade the logos. Rendered
   at full opacity so the brand gradient behind it doesn't tint the photo. */
.hero-photo-half {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.hero-photo-half::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/images/vista_student.jpeg');
    background-size: cover;
    background-position: center 55%;
    opacity: 1;
    z-index: 0;
}

.hero-photo-half::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: rgba(31, 164, 147, 0.2);
}

/* Error-page brand mark. vistalogo.svg is navy (#424260) + gold (#ffc800),
   drawn for the white auth panel; on the teal hero the navy falls to ~1.6:1.
   Flattened to solid white, the same treatment and for the same reason as
   .vista-navbar-logo in frontend/vista/header.blade.php.

   No brand conditional needed in the view: this stylesheet only loads on
   Vista pages, so the selector is already scoped by which brand pulled it in.
   index-new.css needs no counterpart — PROPP_MARA-04.png is already white. */
.error-brand-logo {
    filter: brightness(0) invert(1);
}
