/* --- Homepage General Styles --- */
/* Custom outline style */
.btn-outline-blue {
  color: #003366;                /* text color */
  border: 2px solid #003366;     /* border color */
}

.btn-outline-blue:hover,
.btn-outline-blue:active,
.btn-outline-blue:focus {
  background-color: #003366;     /* fill background on hover/click */
  color: rgb(250, 250, 250);                 /* text becomes yellow */
}

.toast.text-bg-success,
.toast.text-bg-danger,
.toast.text-bg-info,
.toast.text-bg-warning {
    background: #003366 !important;
    color: #FFD700 !important;
}

body.bg-light {
    background: linear-gradient(135deg, #f0f2f5 0%, #e0e5ec 100%) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container.py-5 {
    padding-top: 6rem !important; /* Adjust for potential fixed header */
    padding-bottom: 6rem !important;
    flex-grow: 1;
}

h2.text-center.mb-4.text-primary {
    font-size: 2.8rem !important;
    font-weight: 700 !important;
    color: #003366 !important;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem !important;
    position: relative;
    animation: fadeInDown 1s ease-out forwards;
}

h2.text-center.mb-4.text-primary::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #FFD700;
    margin: 15px auto 0;
    border-radius: 2px;
}

/* --- Toast Notifications --- */
#toastContainer {
    top: 1rem !important;
    right: 1rem !important;
    z-index: 1080 !important; /* Ensure it's above modals */
}

.toast {
    border-radius: 0.75rem !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    padding: 0.75rem 1rem !important;
    animation: slideInRight 0.5s ease-out forwards;
    min-width: 250px;
}

.toast.text-bg-success {
    background: linear-gradient(45deg, #28a745, #218838) !important;
    color: white !important;
}

.toast.text-bg-danger {
    background: #003366 !important;
    color: #FFD700 !important;
}

.toast-body {
    font-weight: 500 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast .btn-close {
    filter: invert(71%) sepia(93%) saturate(409%) hue-rotate(9deg) brightness(102%) contrast(102%) !important; /* Yellow close */
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.toast .btn-close:hover {
    opacity: 1;
}

/* --- Form Cards --- */
.card.shadow-sm.p-4.mb-3.rounded-4 {
    border: none !important;
    border-radius: 1.25rem !important; /* More rounded */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important; /* Stronger, softer shadow */
    background: white;
    padding: 2.5rem !important;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card.shadow-sm.p-4.mb-3.rounded-4:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

h4.text-center.text-secondary.mb-3 {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    color: #34495e !important;
    margin-bottom: 1.5rem !important;
    position: relative;
}

h4.text-center.text-secondary.mb-3::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #FFD700;
    margin: 10px auto 0;
    border-radius: 1.5px;
}

/* Form Inputs */
.form-control {
    border-radius: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid #ced4da !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #FFD700 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 215, 0, 0.4) !important;
    outline: none !important;
}

/* --- Toggle Buttons (Login/Register) --- */
.text-center.mb-3 button.btn {
    font-size: 1.1rem !important;
    padding: 0.75rem 2rem !important;
    border-radius: 2rem !important; /* Pill shape */
    font-weight: 600 !important;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#showLogin.btn-outline-primary {
    border-color: #007bff !important;
    border-color: #003366 !important;
    color: #003366 !important;
}

#showLogin.btn-outline-primary:hover {
    background-color: #003366 !important;
    color: #FFD700 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.3);
}

#showLogin.btn-outline-primary,
#showRegister.btn-outline-success {
    border-color: #003366 !important;
    color: #003366 !important;
    background-color: transparent !important;
}

#showLogin.btn-outline-primary:hover,
#showRegister.btn-outline-success:hover {
    background-color: #003366 !important;
    color: #FFD700 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.3);
}

/* Active state for toggle buttons (if you add a class via JS) */
.text-center.mb-3 button.btn.active-toggle {
    background-color: #003366 !important;
    color: #FFD700 !important;
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}

/* --- Submit Buttons --- */
.btn.btn-primary.w-100.rounded-pill,
.btn.btn-success.w-100.rounded-pill {
    background: #003366 !important;
    color: #FFD700 !important;
    font-size: 1.1rem !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: none !important;
}

.btn.btn-primary.w-100.rounded-pill {
    background: #003366 !important;
    color: #FFD700 !important;
}

.btn.btn-primary.w-100.rounded-pill:hover {
    transform: translateY(-3px);
    background: #002244 !important; /* darker navy */
    color: #FFD700 !important;
}

.btn.btn-success.w-100.rounded-pill {
    background: linear-gradient(45deg, #28a745, #1e7e34) !important;
}

.btn.btn-primary.w-100.rounded-pill:hover,
.btn.btn-success.w-100.rounded-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
    background: #002244 !important;
    color: #FFD700 !important;
}

/* Forgot Password Link */
.text-center.mt-2 a {
    color: #003366 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s ease;
}

.text-center.mt-2 a:hover {
    color: #FFD700 !important;
    text-decoration: underline !important;
}

/* --- Certificate Verification Form --- */
.card.shadow-sm.p-4.rounded-4 .btn.btn-info {
    background: #003366 !important;
    color: #FFD700 !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card.shadow-sm.p-4.rounded-4 
.btn.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(23, 162, 184, 0.3);
    background: #002244 !important;
    color: #FFD700 !important;
}

/* --- FullCalendar Styling --- */
#calendar {
    padding: 10px;
    border-radius: 1rem;
    background: white;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.fc .fc-toolbar-title {
    font-size: 1.75em !important;
    font-weight: 700 !important;
    color: #34495e !important;
}

.fc .fc-button {
    background-color: #003366 !important;
    border-color: #003366 !important;
    color: #FFD700 !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.fc .fc-button:hover {
    background-color: #002244 !important;
    border-color: #002244 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.fc .fc-daygrid-day-number {
    font-weight: 600 !important;
    color: #34495e !important;
    padding: 8px !important;
}

.fc .fc-day-today {
    background-color: rgba(255, 215, 0, 0.2) !important;
    border-radius: 0.5rem;
}

.fc .fc-event {
    border-radius: 0.3rem !important;
    font-size: 0.85em !important;
    padding: 2px 5px !important;
    margin-bottom: 2px !important;
    transition: transform 0.2s ease;
}

.fc .fc-event:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.fc .fc-event-title {
    color: #FFD700 !important;
    font-weight: 500 !important;
}

/* --- Event Modal Styling --- */
.modal-content.rounded-4.shadow {
    border-radius: 1.25rem !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25) !important;
    border: none !important;
}

.modal-header {
    background: #003366 !important;
    color: #FFD700 !important;
    border-top-left-radius: 1.25rem !important;
    border-top-right-radius: 1.25rem !important;
    padding: 1.5rem !important;
    border-bottom: none !important;
}

.modal-title {
    font-weight: 700 !important;
    font-size: 1.75rem !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem !important;
    font-size: 1rem !important;
    color: #34495e !important;
}

.modal-body p {
    margin-bottom: 0.75rem !important;
}

.modal-body #modalDates {
    font-weight: 600 !important;
    color: #6c757d !important;
    font-size: 0.95rem !important;
}

.modal-footer {
    border-top: 1px solid #e9ecef !important;
    padding: 1.5rem !important;
    background-color: #f8f9fa !important;
    border-bottom-left-radius: 1.25rem !important;
    border-bottom-right-radius: 1.25rem !important;
}

.modal-footer .btn {
    font-weight: 600 !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.75rem !important;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-primary {
    background: #003366 !important;
    color: #FFD700 !important;
    border: none !important;
}

.modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 123, 255, 0.3);
    background: #002244 !important;
    color: #FFD700 !important;
}

.modal-footer .btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

.modal-footer .btn-primary,
.modal-footer .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(108, 117, 125, 0.3);
    background: #002244 !important;
    color: #FFD700 !important;
    border-color: #545b62 !important;
}

/* --- Animations --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Staggered animation for cards (requires adding classes to HTML) */
.col-md-6.mb-4:nth-child(1) > div {
    animation: slideInLeft 0.8s ease-out forwards;
     opacity: 0;
}

.col-md-6.mb-4:nth-child(1) > div:nth-child(1) { animation-delay: 0.2s; } /* Login/Register buttons */
.col-md-6.mb-4:nth-child(1) > div:nth-child(2) { animation-delay: 0.4s; } /* Login form */
.col-md-6.mb-4:nth-child(1) > div:nth-child(3) { animation-delay: 0.6s; } /* Register form (if visible) */
.col-md-6.mb-4:nth-child(1) > div:nth-child(4) { animation-delay: 0.8s; } /* Certificate form */
.col-md-6.mb-4:nth-child(2) > div { animation-delay: 1s; animation-name: slideInRight; } /* Calendar card */

/* Ensure the d-none class still works for forms */
#loginForm.d-none, #registerForm.d-none {
    display: none !important;
    animation: none !important;
}