
/* ------------------- CSS Variables ------------------- */
:root {
    --primary-color: #1a237e;  /* Deep blue */
    --secondary-color: #c62828; /* Rich red */
    --accent-color: #ffc107;   /* Gold accent */
    --text-color: #f5f5f5;     /* Light text */
    --text-dark: #212121;      /* Dark text */
    --bg-color: #2c3e50;       /* Deep blue-gray background */
    --card-bg: #34495e;        /* Lighter blue-gray for cards */
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    --gradient-bg: linear-gradient(135deg, #5b9bd5, #4682B4);
}
/* 
Attempt 1: linear-gradient(135deg, #2c3e50, #3498db) 
Attempt 2: --gradient-bg: linear-gradient(135deg, #ffffff, #e8f0fe);
*/

/* ------------------- General Styles ------------------- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "Lato", sans-serif;
    font-weight: 400;
    font-style: normal;
    margin: 0;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
    width: 100%;
}

.center-container {
    flex: auto;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1rem;
    padding: 0 20px;
}

.navbar, .footer, .text-bg-secondary {
    background-color: #004B98;
}

/* CS310 Logo in Footer */
#cs310 {
    height: 40px;
    width: 40px;
}


/* ------------------- Navbar CSS ------------------- */

/* Set minimum height for tabs */
.tab-content {
    min-height: 300px;
}

/* navbar search size fix  */
.navbar .d-flex.spacing {
    width: auto;
    margin-right: 10rem;
}

.navbar .search-size {
    width: 200px;
}

#profilePicturePreview {
    width: 50px;
    height: 50px;
    display: block;
    border-radius: 50%;
}

.hidden {
    display: none;
}


/* ------------------- Button Styles ------------------- */

.btn-outline-success {
    --bs-btn-color: #3DB5E6;
    --bs-btn-border-color: #3DB5E6;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #3DB5E6;
    --bs-btn-hover-border-color: #3DB5E6;
    --bs-btn-focus-shadow-rgb: 25,135,84;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #3DB5E6;
    --bs-btn-active-border-color: #3DB5E6;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #3DB5E6;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #3DB5E6;
    --bs-gradient: none;
}

.btn-clubhub {
    --bs-btn-color: #fff;
    --bs-btn-bg: #3DB5E6;
    --bs-btn-border-color: #3DB5E6;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #004B98;
    --bs-btn-hover-border-color: #0a58ca;
    --bs-btn-focus-shadow-rgb: 49,132,253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0a58ca;
    --bs-btn-active-border-color: #004B98;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #3DB5E6;
    --bs-btn-disabled-border-color: #3DB5E6;
}


/* ------------------- Text and Links ------------------- */

.text-body-secondary {
    color: rgba(255, 255, 255, 0.55) !important;
}

.text-body-secondary:hover {
    color: rgba(255, 255, 255, 0.75) !important;
}

.inline-display {
    display: inline !important;
}

.col-md-4.mb-0.text-body-secondary, .nav-link.px-2.text-body-secondary {
    padding: 0 10px;
}

/* TODO: old (look into) */

.spacing {
    margin: auto;
}


/* ------------------- Forms ------------------- */
.form-floating > .form-control,
.form-floating > .form-control-plaintext {
    padding: 1rem 0.75rem;
}

.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating > .form-control:-webkit-autofill {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-control-plaintext ~ label,
.form-floating > .form-select ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-floating > .form-control:-webkit-autofill ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-floating > .form-control:focus,
.form-floating > .form-control:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #86b7fe;
}

.form-floating > label {
    padding: 1rem 0.75rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #0d6efd;
}


/* ------------------- Carousel Custom Edit ------------------- */
.custom-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: gray;
    border-radius: 2%;
    padding-bottom: 10px;
}

.custom-container .carousel-item, .col .custom-container {
    max-height: 450px; 
}

.custom-container .carousel-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #e9ecef; 
}

.custom-container img {
    height: auto;
    max-height: 50%;
    width: auto;
    max-width: 50%;
    object-fit: contain;
}

.custom-container .carousel-caption {
    background-color: rgba(0, 0, 0, 0.5); 
    padding: 10px;
    border-radius: 5px;
}

.carousel-control-prev, .carousel-control-next {
    margin-top: 58px;
}

/* custom col margins */
.col-margin {
    margin: 1rem 0 1rem 0;
}

.custom-container table {
    margin: 1rem 1rem 1rem 1rem
}

/* heading on carousel */
/* Semi-transparent background */
#clubCarousel h2, .custom-container h2 {
    top: 10px;
    left: 15px;
    z-index: 10;
    color: #000; 
    background-color: rgba(255, 255, 255, 0.7);
    padding: 5px 10px;
    border-radius: 5px;
}

.inline-display {
    display: inline !important;
}

.col-md-4.mb-0.text-body-secondary, .nav-link.px-2.text-body-secondary{
    padding: 0px 10px 0px 10px;
}


/* ------------------- Full Calendar Custom Styles ------------------- */

/* Calendar Header */
.fc-theme-bootstrap5 .fc-toolbar.fc-header-toolbar {
    background-color: #004B98;
    color: #fff;
    padding: 10px;
}

/* Full Height Calendar */
#calendar {
    width: 100%;
    max-width: 1150px; 
    min-height: 600px;
    flex-grow: 1;
    margin: 20px 0;
}

/* Today's Date Highlight */
.fc .fc-day-today {
    background-color: rgba(61, 181, 230, 0.2);
}

.fc .fc-daygrid-day.fc-day-today {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

/* Calendar Buttons */
.fc .fc-button {
    background-color: #3DB5E6;
    border: none;
    color: #fff;
}

.fc .fc-button:hover {
    background-color: #004B98;
}

.fc .fc-button:focus {
    box-shadow: none;
}

.fc .fc-button-primary {
    cursor: pointer !important;
}

.fc .fc-button-primary:not(:disabled) {
    opacity: 1 !important;
}

/* Make calendar cells expand to fit content */
.fc-daygrid-event-harness {
    height: auto !important;
}

.fc-daygrid-day-events {
    min-height: auto !important;
}

.fc-event-title {
    white-space: normal !important;
    overflow: visible !important;
    font-weight: bold;
}

/* Event Colors */
.fc-event {
    background-color: #3DB5E6;
    border: none;
    color: #fff;
    font-weight: bold;
    cursor: pointer !important;
}

/* ------------- Custom Styles for Calendar Buttons ------------------- */
.custom-calendar .fc-button-active {
    background-color: var(--bs-primary-dark, #0056b3) !important;
    border-color: var(--bs-primary-dark, #0056b3) !important;
    color: white !important;
}

.custom-calendar .fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--bs-primary-dark, #0056b3) !important;
    border-color: var(--bs-primary-dark, #0056b3) !important;
    color: white !important;
}

.custom-calendar .fc-button-primary:not(:disabled):active,
.custom-calendar .fc-button-primary:not(:disabled):focus {
    background-color: var(--bs-primary-dark, #0056b3) !important;
    border-color: var(--bs-primary-dark, #0056b3) !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.5) !important;
}

.custom-calendar .fc-button-primary:hover {
    background-color: var(--bs-primary-dark, #0056b3) !important;
    border-color: var(--bs-primary-dark, #0056b3) !important;
}

.custom-calendar .fc-today-button:not(:disabled) {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}


/* ------------- Filter sidebar positioning and styling --------------- */
.filter-sidebar {
    width: 300px;  
    flex-shrink: 0;
    align-self: flex-start;  
    position: sticky;
    top: 20px;     
    margin-top: 20px;
}

.filter-sidebar .dropdown-menu {
    width: 100%;
}

.filter-sidebar .club-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}


/* -------------- Custom Styles for Modal Close Buttons --------------- */
#createEventModal .btn-close,
#eventDetailsModal .btn-close,
#editEventModal .btn-close,
#createNewsModal .btn-close,
#editNewsModal .btn-close,
#createCabinetModal .btn-close,
#createSocialModal .btn-close {
  filter: invert(1);
  opacity: 0.5;
}

#createEventModal .btn-close:hover,
#eventDetailsModal .btn-close:hover,
#editEventModal .btn-close:hover,
#createNewsModal .btn-close:hover,
#editNewsModal .btn-close:hover,
#createCabinetModal .btn-close:hover,
#createSocialModal .btn-close:hover {
  opacity: 0.75;
}

/* Style for date and time input fields */
#createEventModal input[type="date"],
#createEventModal input[type="time"],
#editEventModal input[type="date"],
#editEventModal input[type="time"] {
  color-scheme: dark;
}

/* Adjust the submit button spacing */
#createEventForm .btn-outline-light,
#editEventForm .btn-outline-light {
  margin-right: 10px;
}

/* Ensure text in inputs is visible */
#createEventModal input.form-control,
#editEventModal input.form-control {
  color: white !important;
}

/* Placeholder text color */
#createEventModal input.form-control::placeholder,
#editEventModal input.form-control::placeholder {
  color: #6c757d;
}


/* ------------------- Settings Page CSS ------------------- */
.settings-container {
    display: flex;
    margin: 10rem auto;
}

.settings-menu {
    flex: 0 0 200px;
    max-width: 200px;
    margin-right: 2rem;
}

.settings-content {
    width: 300px;
}

.settings-menu .nav-link {
    color: #343a40;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}

.settings-menu .nav-link.active {
    background-color: #0056b3;
    color: #ffffff;
}

.btn-clubhub {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

.btn-clubhub:hover, .settings-menu .nav-link:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #ffffff;
}

/* Ensure forms are full width */
form, .tab-pane {
    width: 100%;
}

form .form-control {
    width: 100%;
}

/* ------------------- MyClub Pop-Up Forms ------------------- */

.form-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: white;
    border-radius: 10px;
    width: 300px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.btn.save {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
    border-radius: 5px;
}
  
.btn.cancel {
    background-color: red;
}
  
.form-button:hover{
    opacity: 0.8;
}

#preview{
    max-width: 200px; 
    max-height: 200px;
}

/* ------------------- myClub.html Corner/Page Buttons (Edit My Club) ------------------- */

.edit-button:hover{
    background-color: #c43e1f;
    transform: scale(1.1);
}

.add-button:hover{
    background-color: #004085;
    transform: scale(1.1);
}

.delete-button:hover{
    background-color: #a71d2a;
    transform: scale(1.1);
}

.small-header {
    font-size: 1.75rem;
}

.edit-mode-only {
    display: none !important;
}
  
body.edit-mode .edit-mode-only {
    display: inline-flex !important;
}

/* Button that goes to Contact Us Page */
.contact-button-container {
    position: fixed;
    bottom: 80px;
    left: 20px;
    z-index: 1000;
  }

.contact-button:hover{
    background-color: #138496;
    transform: scale(1.1);
}

/* ------------------- Contact Us Page ------------------- */

#contactFormPopup{
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    justify-content: center;
    align-items: center;
    padding: 30px;
}

#contactModalContent{
    background-color: white;
    border-radius: 10px;
    max-width: 600px;  /* Make form larger */
    width: 100%;
    padding: 40px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.1);
}

#contactBody {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;

    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.logo {
    color: #1a73e8;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info {
    padding: 2rem;
}

.section-title {
    color: #1a73e8;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.contact-description {
    color: #5f6368;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.contact-methods {
    display: grid;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.contact-method i {
    font-size: 1.5rem;
    color: #1a73e8;
}

.contact-method-info {
    color: #5f6368;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control.contact {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #FFFFFF;
}

.form-control.contact:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

textarea.form-control.contact {
    min-height: 120px;
    resize: vertical;
}

#contactSubmitButton {
    background: #1a73e8;
    color: white;

    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#contactSubmitButton:hover {
    background: #1D4ED8;
    transform: translateY(-1px);
}

/* ------------------- About Us Page ------------------- */
body#aboutUsBody {
    font-family: 'Lato', sans-serif;
    background: var(--gradient-bg);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

#aboutUsContainer {
    padding: 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

#aboutUsHeader {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    padding: 2rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

#aboutUsTitle {
    color: var(--accent-color);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#aboutUsTitle::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.team-member {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out forwards;
}

.team-member:nth-child(2) {
    animation-delay: 0.2s;
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05));
    pointer-events: none;
}

.team-member:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.member-name {
    color: var(--accent-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    position: relative;
}

.member-role {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.2rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.member-bio {
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.8;
}

.aboutBtn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--accent-color);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--accent-color);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.aboutBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.3s ease;
    z-index: -1;
}

.aboutBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: var(--text-dark);
}

.aboutBtn:hover::before {
    width: 100%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4a304;
}

/* Animation for page load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design for About Us Page */
@media (max-width: 768px) {
    #aboutUsContainer {
        padding: 2rem 1rem;
    }

    #aboutUsTitle {
        font-size: 2.5rem;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .team-member {
        padding: 2rem;
    }

    .member-name {
        font-size: 1.6rem;
    }

    .member-role {
        font-size: 1.1rem;
    }

    .member-bio {
        font-size: 1rem;
    }
}


/* ---------------- About Us Section Home Page ------------------------ */

#aboutUs{
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.home-about-section .team-grid {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 0;
}
  
.home-about-section .team-member {
    background-color: #3e6fa8;
    border-radius: 15px;
    padding: 1rem;
    color: white;
    text-align: center;
    flex: 1;
    max-width: 280px;
}
  
.home-about-section .member-name {
    color: #ffc107;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
  
.home-about-section .member-role {
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
  
.home-about-section .member-bio {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}
  
.home-about-section .aboutBtn {
    background-color: #ffc107;
    color: #000;
    text-transform: uppercase;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    border: none;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
}
  
.home-about-section .aboutBtn:hover {
    background-color: #ffcd39;
    color: #000;
}

/*--------------------- Messaging System CSS ---------------------------*/
.chat-container {
    height: calc(100vh - 200px);
    background: #f8f9fa;
}

.conversations-list {
    height: 100%;
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
}

.chat-messages {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.messages-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
}

.message-input-area {
    border-top: 1px solid #dee2e6;
    padding: 1rem;
    background: white;
}

.message {
    max-width: 80%;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
}

.message.sent {
    margin-left: auto;
    background: #0d6efd;
    color: white;
}

.message.received {
    margin-right: auto;
    background: white;
    border: 1px solid #dee2e6;
}

.conversation-item {
    cursor: pointer;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.conversation-item:hover {
    background: #e9ecef;
}

.conversation-item.active {
    background: #e9ecef;
}

.conversation-item.unread {
    background: #fff3cd;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.8;
}

.message-status {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
