/* Global Styles */
body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: Arial, sans-serif;
}

:root {
    --primary-yellow: #FFEB3B;
    --primary-green: #0A783C;
    --dark-green: #004d00;
    --text-black: #000000;
    --white: #ffffff;
    --gold-hover: #FFD700;
    --light-bg: #f5f5f5;
    --gray-border: #ccc;
    --input-bg: #f9f9f9;
}

/* Header Styles */
header {
    background-color: var(--primary-yellow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}





.logo-container img {
    height: 50px;
    width: auto;
    display: block;
}

nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--primary-green);
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
}

.join-btn {
    background-color: var(--primary-green);
    color: var(--primary-yellow);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

.join-btn:hover {
    background-color: var(--dark-green);
}

/* Hero Image Styles */
.hero-container {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Footer Styles */
footer {
    background-color: #0A783C;
    background-image: url('../assets/aronai-pattern.png');
    background-repeat: repeat-x;
    background-position: bottom;
    padding: 50px 40px;
    color: var(--white);
    display: flex;
    justify-content: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    position: relative;
}

.footer-logo {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.footer-logo img {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
    filter: none;
}

.footer-text {
    flex-grow: 0;
    text-align: center;
    margin: 0 20px;
}

.footer-text p {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.footer-action {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.join-btn-footer {
    background-color: var(--primary-yellow);
    color: var(--primary-green);
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 18px;
    display: inline-block;
}

.join-btn-footer:hover {
    background-color: var(--gold-hover);
}

/* Join Page Styles */
.join-page-body {
    background-image: url('../assets/hero.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    position: relative;
}

.join-page-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 235, 59, 0.3);
    /* Yellow overlay tint similar to reference */
    z-index: 0;
}

/* Hero Form Overlay Styles */
.hero-container {
    width: 100%;
    position: relative;
    /* Ensure we can position the overlay */
}

.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 480px;
    z-index: 10;
}

.join-card {
    background-color: var(--white);
    padding: 30px 40px;
    /* Reduced top padding, increased side padding */
    border-radius: 15px 15px 0 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    padding-top: 60px;
    /* Space for logo */
}

.floating-logo {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Added border to match image */
}

.floating-logo img {
    width: 130px;
    height: auto;
}

.join-card h2 {
    margin: 10px 0 30px;
    color: #333;
    font-size: 22px;
    font-weight: 500;
}

.mobile-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0 10px;
    background-color: #f9f9f9;
}

.flag-icon {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    color: #555;
    padding-right: 10px;
    border-right: 1px solid #eee;
    white-space: nowrap;
}

.flag-icon img {
    width: 20px;
    height: auto;
}

.mobile-input-group .form-control {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 12px;
    font-size: 16px;
    outline: none;
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0;
    text-align: left;
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

.checkbox-group input {
    margin-top: 0;
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

/* Button styling */
.btn-verify {
    width: 100%;
    padding: 15px;
    background-color: #E8EAF6;
    /* Light grey/blueish */
    color: #333;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: background-color 0.2s;
}

.btn-verify::after {
    content: '›';
    font-size: 24px;
    position: absolute;
    right: 20px;
    font-weight: 300;
    line-height: 0;
    top: 50%;
}

.btn-verify:hover {
    background-color: #dbe0eb;
}

/* Custom Checkbox */
.checkbox-group .custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-green);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    margin-top: 0;
}

.checkbox-group .custom-checkbox:checked {
    background-color: var(--primary-green);
}

.checkbox-group .custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--primary-yellow);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Custom Alert */
.custom-alert {
    position: fixed;
    bottom: 20px;
    /* "right below on screen" likely implies near where interaction happened or bottom of screen */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    border-left: 5px solid var(--primary-green);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden;
    min-width: 300px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    pointer-events: none;
    /* Allows clicking through when hidden, JS toggles this or display */
}

.custom-alert.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
    pointer-events: auto;
}

.alert-content {
    padding: 15px 20px;
    position: relative;
}

.alert-text {
    color: var(--primary-green);
    font-weight: bold;
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.alert-timer-line {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: var(--primary-yellow);
    width: 100%;
    transform-origin: left;
}

.custom-alert.show .alert-timer-line {
    animation: timer 3s linear forwards;
}

@keyframes timer {
    0% {
        width: 100%;
    }

    100% {
        width: 0%;
    }
}

/* Login Prompt (Footer of Card) */
.login-prompt {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 20px;
    border-radius: 0 0 15px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.login-prompt span {
    font-size: 16px;
    font-weight: 500;
}

.btn-login-yellow {
    background-color: var(--primary-yellow);
    color: var(--primary-green);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: opacity 0.2s;
}

.btn-login-yellow:hover {
    opacity: 0.9;
}

.desktop {
    display: none;
}
.mobile {
    display: block;
}
.login-prompt {
    border-radius: 0;
    box-shadow: none;
}

@media (min-width: 1024px) {
    .desktop {
        display: block;
    }
    .mobile {
        display: none;
    }
    .login-prompt {
        border-radius: 0 0 15px 15px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 15px 20px;
        gap: 15px;
    }

    .logo-container {
        margin-bottom: 5px;
    }

    nav {
        position: static;
        transform: none;
        gap: 20px;
        margin-bottom: 5px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .join-btn {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    /* Fix for Join Page Mobile Layout */
    .hero-container {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: auto;
        overflow: visible;
        /* Allow content to flow */
    }

    .hero-overlay {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        margin-top: -40px;
        /* Slight overlap with image */
        padding: 0 20px 40px;
        /* Side padding and bottom space */
        box-sizing: border-box;
    }

    .join-card {
        padding: 50px 20px 30px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        /* Adjusted shadow */
    }

    .floating-logo {
        width: 80px;
        height: 80px;
        top: -40px;
    }

    .floating-logo img {
        width: 100px;
    }

    .desktop {
        display: none;
    }
    .mobile {
        display: block;
    }
    
    .login-prompt {
        border-radius: 0;
        box-shadow: none;
    }

    .join-card h2 {
        font-size: 20px;
        margin-top: 5px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        justify-content: center;
        padding-bottom: 20px;
        padding-top: 20px;
        /* Add breathing room */
    }

    .footer-logo,
    .footer-action {
        position: static;
        transform: none;
    }

    .footer-text {
        margin: 10px 0;
    }

    .footer-action {
        margin-left: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .join-btn-footer {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        max-width: 300px;
    }
}