﻿@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Kanit', sans-serif;
    height: 100%;
    width: 100%;
    color: white;
}

.tagline, .description, .footer-text {
    text-align: justify;
}

.hero {
    position: relative;
    background-image: url('../img/logos/background.png');
    background-size: cover;
    background-position: center;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(128, 0, 0, 0.7); /* Maroon overlay */
    z-index: 1;
}

.login-container-scholar {
    margin-top: 4rem;
}

.top-bar {
    position: relative;
    z-index: 2;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.apply-link {
    font-weight: 700;
    font-size: 16px;
}

.login-btn {
    background-color: white;
    color: #800000;
    font-weight: 700;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 40px;
}

.left-content {
    max-width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .left-content h1 {
        font-size: 48px;
        font-weight: 800;
        margin-bottom: 20px;
    }

    .left-content .tagline {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 30px;
        line-height: 1.6;
    }

    .left-content h2 {
        font-size: 24px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .left-content .description {
        font-size: 14px;
        font-weight: 500;
        line-height: 1.6;
        margin-bottom: 30px;
        max-width: 95%;
    }

    .left-content .footer-text {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.5;
    }

.logo {
    max-width: 300px;
    height: auto;
    object-fit: contain;
}

/* Responsive */
@media (max-width: 768px) {
    .content {
        flex-direction: column-reverse;
        align-items: center;
        padding: 20px;
    }

        .content p {
            text-align: justify;
        }

    .left-content {
        max-width: 100%;
    }

    .right-content {
        margin-bottom: 30px;
    }

    .left-content h1 {
        font-size: 25px;
    }

    .left-content h2 {
        font-size: 18px;
    }

    .logo {
        max-width: 150px;
    }

    .tagline, .description, .footer-text {
        font-size: 12px !important;
    }

    .tagline {
        margin-bottom: 10px !important;
    }
}

.apply-link {
    text-decoration: none;
    text-align: center;
    color: darkred;
    background-color: white;
    padding: 10px 20px;
    width: fit-content;
    margin-top: 20px;
    border-radius: 20px;
    transition: all 0.4s ease-in-out;
    border: 1px solid white;
}

    .apply-link:hover {
        background-color: darkred;
        color: white;
    }

.lang-btn {
    background-color: #800000;
    color: #ffffff;
    font-weight: 700;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Overlay background */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Modal box */
.modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 650px;
    overflow: hidden;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-header {
    background: #b91c1c;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 14px 18px;
}

.modal-body {
    padding: 20px;
    color: #333;
    line-height: 1.6;
    font-size: 0.95rem;
}

    .modal-body a {
        color: darkred;
        text-decoration: underline;
        font-weight: 500;
    }

    .modal-body .highlight {
        font-weight: bold;
        color: #111;
        margin-top: 10px;
    }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

.close-btn {
    background: #b91c1c;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

    .close-btn:hover {
        background: #7f1d1d;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hidden {
    display: none !important;
}


html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* prevent horizontal scroll */
}

main {
    flex: 1; /* pushes footer to bottom */
    padding: 15px;
    box-sizing: border-box;
    overflow-y: auto; /* allows scroll on smaller devices */
}

footer {
    background-color: white;
    padding: 20px 15px;
    text-align: center;
    margin-top: auto; /* stays at bottom */
    border-top: 1px solid #ddd;
}

    footer p {
        color: darkred;
        font-size: 14px;
        line-height: 1.5;
    }

.footer-link {
    text-decoration: none;
    color: darkorange;
    cursor: pointer;
}

@media (max-width: 600px) {
    footer p {
        font-size: 12px; /* smaller text for mobiles */
    }
}
