/* ================= THEME COLORS ================= */

:root{
    --navy:#021B3A;
    --mint:#57D9B3;
    --light-bg:#EDF5F3;
    --white:#ffffff;
    --dark:#1b1b1b;
}

/* Basic Page Setup */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #0b1528;
    color: white;
}

/* ================= Header / Navbar Styling ================= */
header {
    background-color: #0b1a30;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-dot {
    width: 24px;
    height: 24px;
    background-color: #5ce1b6;
    border-radius: 50%;
}

.logo-text {
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    color: white;
}

nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 16px;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 6px;
}

nav a:hover, nav a.active {
    color: #5ce1b6;
    background-color: rgba(92, 225, 182, 0.08);
}

.nav-link.active {
    color: #57D9B3 !important;
    font-weight: 700;
    border-bottom: 2px solid #57D9B3;
}

.auth-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Profile Icon Button Styling */
.profile-icon {
    width: 38px;
    height: 38px;
    background-color: #cbd5e1;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.profile-icon:hover {
    background-color: #5ce1b6;
}

.profile-icon svg {
    width: 22px;
    height: 22px;
    fill: #475569;
}

.sign-in-btn {
    background-color: #4a7c74;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.sign-in-btn:hover {
    background-color: #5ce1b6;
    color: #0b1a30;
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: center;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    nav a {
        padding: 6px 12px;
        font-size: 0.88rem;
    }
}

/* ================= LOGGED-IN PROFILE DROPDOWN ================= */
.profile-dropdown-container {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 48px;
    background-color: #ffffff;
    min-width: 200px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    padding: 10px 0;
    z-index: 1001;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 8px 16px;
    color: #0b1a30;
    display: flex;
    flex-direction: column;
}

.dropdown-header strong {
    font-size: 0.95rem;
}

.dropdown-sub {
    font-size: 0.8rem;
    color: #64748b;
}

.dropdown-menu hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 6px 0;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #334155;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
    color: #4a7c74;
}

.logout-item {
    color: #ef4444;
}

.logout-item:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

/* ================= MODAL & FORM STYLING ================= */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 26, 48, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: #ffffff;
    padding: 30px 28px;
    border-radius: 24px;
    width: 90%;
    max-width: 380px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 26px;
    font-weight: bold;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #0b1a30;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #0b1a30;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
}

.form-group {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
}

.form-group input {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
    color: #1e293b;
}

.form-group input:focus {
    border-color: #5ce1b6;
}

.modal-submit-btn {
    background-color: #4a7c74;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 25px;
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    margin-top: 10px;
}

.modal-submit-btn:hover {
    background-color: #5ce1b6;
    color: #0b1a30;
}

/* Modal Bottom Prompt Link */
.modal-signup-prompt {
    margin-top: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.modal-signup-prompt p {
    color: #64748b;
    margin: 0;
}

#go-to-signup, #go-to-signin {
    color: #4a7c74;
    text-decoration: none;
    font-weight: 700;
    margin-left: 4px;
}

#go-to-signup:hover, #go-to-signin:hover {
    color: #5ce1b6;
    text-decoration: underline;
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(11, 26, 48, 0.4), rgba(11, 26, 48, 0.4)), url('image1.png');
    background-size: cover;
    background-position: center;
    min-height: 350px; 
    width: 100%;
    border-bottom: 5px solid #000000;
}

/* How It Works Section */
.how-it-works {
    background-color: #4fe0a5;
    color: black;
    text-align: center;
    padding: 40px 20px;
}

.how-it-works h2 {
    margin-bottom: 30px;
}

.icons-container {
    display: flex;
    justify-content: space-around;
    max-width: 800px;
    margin: 0 auto;
}

.icon {
    font-size: 40px;
}

/* Footer Section */
footer {
    width: 100%;
    margin-top: auto;
}

.footer-mint-strip {
    background-color: #e8f9f2;
    height: 300px;
    width: 100%;
}

.footer-black-divider {
    background-color: #000000;
    height: 1px;
    width: 100%;
}

.footer-dark-bottom {
    background-color: #0b1528;
    height: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

/* ================= CREATE GROUP PAGE ================= */

.group-form{
    width:600px;
    max-width:90%;
    margin:50px auto;
    background:white;
    padding:30px;
    border-radius:20px;
    box-shadow:0 4px 15px rgba(0,0,0,.1);
}

.group-form input,
.group-form textarea{
    width:100%;
    padding:12px;
    margin:10px 0;
    border:1px solid #ddd;
    border-radius:10px;
}

.submit-btn{
    background:#57D9B3;
    border:none;
    padding:12px 25px;
    border-radius:30px;
    cursor:pointer;
}

/* ================= FIND GROUPS PAGE & MODERN CARDS ================= */

body.find-groups-page {
    background-color: var(--light-bg);
    color: #333;
}

.find-groups-page .page-title {
    text-align: center;
    margin-top: 40px;
    color: var(--navy);
}

.find-groups-page #search {
    width: 320px;
    max-width: 90vw;
    padding: 14px 20px;
    border-radius: 30px;
    border: 1px solid #b0bec5;
    font-size: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin: 0 auto 30px;
    display: block;
}

.find-groups-page #search::placeholder {
    color: #90a4ae;
}

/* Results Grid Container */
.find-groups-page #results,
.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Modern Card Box */
.group-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f4f8;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.group-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

/* Ending-soon urgency indicators */
.group-card.ending-warning {
    border: 1px solid #fd9a30;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.08);
}

.group-card.ending-urgent {
    border: 1px solid #fe4343;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.1);
}

.badge-urgency {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.badge-urgency.ending-warning {
    background-color: #fff7ed;
    color: #c2410c;
}

.badge-urgency.ending-urgent {
    background-color: #fef2f2;
    color: #b91c1c;
}

.meta-content strong.ending-warning {
    color: #c2410c;
}

.meta-content strong.ending-urgent {
    color: #b91c1c;
}

/* Header Elements & Badges */
.card-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.badge-subject {
    background-color: #e6fffa;
    color: #00796b;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cbd5e1;
}

.badge-status.status-active .status-dot {
    background-color: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

/* Typography */
.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 6px 0;
}

.card-dept {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 12px 0;
    font-weight: 500;
}

.card-desc {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.4;
    margin: 0 0 18px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 2-Column Details Box */
.card-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: #f8fafc;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.meta-icon {
    font-size: 1.1rem;
}

.meta-content {
    display: flex;
    flex-direction: column;
}

.meta-content small {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}

.meta-content strong {
    font-size: 0.85rem;
    color: #1e293b;
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.3;
}

/* Action Button */
.btn-join,
.find-groups-page .join-btn {
    width: 100%;
    background-color: var(--mint);
    color: var(--navy);
    border: none;
    padding: 12px 0;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: auto;
}

.btn-join:hover,
.find-groups-page .join-btn:hover {
    background-color: #43c7a1;
    transform: scale(1.02);
}

@media (max-width: 700px) {
    .find-groups-page #results,
    .groups-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
}