html {
    scroll-behavior: smooth;
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s, visibility 0.3s;
}

.loader-content {
    text-align: center;
}

/* HTML: <div class="loader"></div> */
.loader {
    width: 50px;
    aspect-ratio: 1;
    display: grid;
    border: 4px solid #0000;
    border-radius: 50%;
    border-right-color: rgb(1, 89, 221);
    animation: l15 1s infinite linear;
}
.loader::before,
.loader::after {
    content: "";
    grid-area: 1/1;
    margin: 2px;
    border: inherit;
    border-radius: 50%;
    animation: l15 2s infinite;
}
.loader::after {
    margin: 8px;
    animation-duration: 3s;
}
@keyframes l15{
    100%{transform: rotate(1turn)}
}

.loader-text {
    color: #3176FF;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}


    /* Base input styles */
input[type="text"],
input[type="email"],
input[type="password"] {
    @apply block w-full rounded-md border-gray-300 shadow-sm;
    @apply focus:border-blue-500 focus:ring-blue-500;
    @apply text-gray-700 text-base;
    @apply transition duration-150 ease-in-out;
    padding: 0.625rem 0.75rem;
    line-height: 1.5;
}

/* Disabled input */
input[type="text"]:disabled,
input[type="email"]:disabled,
input[type="password"]:disabled {
    @apply bg-gray-100 text-gray-600 cursor-not-allowed;
    opacity: 0.7;
}

/* Input with error */
input[type="text"].error,
input[type="email"].error,
input[type="password"].error,
input[type="text"].border-red-500,
input[type="email"].border-red-500,
input[type="password"].border-red-500 {
    @apply border-red-500 pr-10;
    @apply focus:border-red-500 focus:ring-red-500;
}

/* Input with success */
input[type="text"].success,
input[type="email"].success,
input[type="password"].success {
    @apply border-green-500;
    @apply focus:border-green-500 focus:ring-green-500;
}

/* Input focus state */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    @apply outline-none ring-2 ring-offset-2;
}

/* File input custom styling */
input[type="file"] {
    @apply block w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-medium;
    @apply file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100;
    @apply cursor-pointer;
}

/* Placeholder styling */
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
    @apply text-gray-400;
}

/* Input labels */
label {
    @apply block text-sm font-medium text-gray-700 mb-1;
}

/* Small helper text */
.input-helper {
    @apply mt-1 text-xs text-gray-500;
}

/* Animation for focusing inputs */
@keyframes input-focus-ring {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
    100% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0); }
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    animation: input-focus-ring 0.3s ease-out;
}

/* Error message styling */
.text-red-500 {
    @apply mt-1 text-xs italic text-red-500;
}

/* For Internet Explorer (which doesn't support :not(:placeholder-shown)) */
input:-ms-input-placeholder {
    opacity: 1;
}

/* Accessible focus indicators */
input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="password"]:focus-visible {
    @apply outline-2 outline-blue-500 outline-offset-2;
}


button,
[role="button"] {
    cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
    cursor: default;
}

.slide-up {
    animation: slideUp 0.6s ease forwards;
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.hover-underline {
    color: #0159dd;
    position: relative;
    display: inline-block;
}

.hover-underline::after,
.hover-underline::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #0159dd, #fb4300);
    bottom: -5px;
    left: 0;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease-out;
}

.hover-underline::before {
    top: -5px;
    transform-origin: left;
}

.hover-underline:hover::after,
.hover-underline:hover::before {
    transform: scaleX(1);
}


@keyframes slide-Up {
    from {
        opacity: 0;
        transform: translateY(200px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-slide-and-float {
    opacity: 0;
    animation:
            slide-Up 0.8s ease-out forwards,
            float 3s ease-in-out infinite 0.8s;
}

.step-active {
    background-color: var(--color-gray-50);
}
.step-active h2, .step-active p {
    color: #000;
}
.step-inactive h2, .step-inactive p {
    color: #6b7280;
}

.ag-format-container {
    width: 1142px;
    margin: 0 auto;
}


.ag-courses_box {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;

    padding: 50px 0;
}
.ag-courses_item {
    -ms-flex-preferred-size: calc(33.33333% - 30px);
    flex-basis: calc(33.33333% - 30px);
    margin: 0 15px 30px;
    overflow: hidden;
    border-radius: 28px;
}
.ag-courses-item_link {
    display: block;
    padding: 30px 20px;
    background-color: oklch(0.967 0.003 264.542);
    overflow: hidden;
    position: relative;
}
.ag-courses-item_link:hover,
.ag-courses-item_link:hover .ag-courses-item_date {
    text-decoration: none;
    color: oklch(1 0 89.876);
}
.ag-courses-item_link:hover .ag-courses-item_bg {
    -webkit-transform: scale(10);
    -ms-transform: scale(10);
    transform: scale(10);
}
.ag-courses-item_title {
    min-height: 87px;
    margin: 0 0 25px;
    overflow: hidden;
    font-weight: bold;
    font-size: 30px;
    color: #595959;
    z-index: 2;
    position: relative;
}

/* Added this rule to change title to white on hover */
.ag-courses-item_link:hover .ag-courses-item_title {
    color: #FFF;
}

.ag-courses-item_date-box {
    font-size: 18px;
    color: #000000;
    z-index: 2;
    position: relative;
}
.ag-courses-item_date {
    color: #656565;
    -webkit-transition: color .5s ease;
    -o-transition: color .5s ease;
    transition: color .5s ease
}
.ag-courses-item_bg {
    height: 128px;
    width: 128px;
    background-color: #f9b234;

    z-index: 1;
    position: absolute;
    top: -75px;
    right: -75px;

    border-radius: 50%;

    -webkit-transition: all .5s ease;
    -o-transition: all .5s ease;
    transition: all .5s ease;
}
.ag-courses_item:nth-child(2n) .ag-courses-item_bg {
    background-color: #3ecd5e;
}
.ag-courses_item:nth-child(3n) .ag-courses-item_bg {
    background-color: #e44002;
}
.ag-courses_item:nth-child(4n) .ag-courses-item_bg {
    background-color: #952aff;
}
.ag-courses_item:nth-child(5n) .ag-courses-item_bg {
    background-color: #cd3e94;
}
.ag-courses_item:nth-child(6n) .ag-courses-item_bg {
    background-color: #4c49ea;
}



@media only screen and (max-width: 979px) {
    .ag-courses_item {
        -ms-flex-preferred-size: calc(50% - 30px);
        flex-basis: calc(50% - 30px);
    }
    .ag-courses-item_title {
        font-size: 24px;
    }
}

@media only screen and (max-width: 767px) {
    .ag-format-container {
        width: 96%;
    }

}
@media only screen and (max-width: 639px) {
    .ag-courses_item {
        -ms-flex-preferred-size: 100%;
        flex-basis: 100%;
    }
    .ag-courses-item_title {
        min-height: 72px;
        line-height: 1;

        font-size: 24px;
    }
    .ag-courses-item_link {
        padding: 22px 40px;
    }
    .ag-courses-item_date-box {
        font-size: 16px;
    }
}

.ag-icon-box {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    z-index: 2;
}

.ag-icon {
    width: 30px;
    height: 30px;
    fill: #595959;
    color: #595959;
    transition: transform 0.3s ease;
}

.ag-courses-item_link:hover .ag-icon {
    transform: scale(1.1);
    color: #FFF;
    fill: #FFF;
}

/* Media queries adjustments */
@media only screen and (max-width: 639px) {
    .ag-icon-box {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }

    .ag-icon {
        width: 24px;
        height: 24px;
    }
}

/* Card */
.card {
    width: 320px;
    height: 200px;
    perspective: 1000px;
    margin: 20px auto;

}

.content {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border-radius: 10px;
}

.card:hover .content {
    transform: rotateY(180deg);
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #111;
}

.back {
    transform: rotateY(180deg);
}

.logo-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.logo-front {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
}

.logo-back {
    position: absolute;
    bottom: 10%;
    left: 10%;
    width: 100px; /* Smaller than the front logo */
}

.nfc-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
}

.instructions {
    text-align: center;
    color: #666;
    margin-top: 20px;
    font-size: 14px;
}

.fade-transition {
    transition: opacity 0.5s ease-in-out;
}

.fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 1;
}

/* Add this CSS to your stylesheet */
.tooltip-container:hover .tooltip-text {
    display: block;
}

.tooltip-text {
    white-space: nowrap;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Home Menu  */
.menu-item {
    position: relative;
    display: inline-block;
    font-weight: 600; /* Bold text */
    font-size: 0.9rem; /* Smaller text */
}

.menu-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #2563eb; /* blue-600 */
    transition: width 0.3s ease;
}

.menu-item:hover::after {
    width: 100%;
}

/* Rounded dropdown styles */
.rounded-dropdown {
    border-radius: 1rem;
    overflow: hidden;
}

#username-edit-input {
    background: transparent;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    color: #111827; /* Same as text-gray-900 */
    min-width: 50px;
    max-width: 200px;
    border: none;
    border-bottom: 1px solid #3b82f6; /* blue-500 */
}


/* Tooltip styles */
.tooltip-trigger {
    position: relative;
}

.tooltip {
    visibility: hidden;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    text-align: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 5px;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.tooltip-trigger:hover .tooltip {
    visibility: visible;
    opacity: 1;
}


#username-edit-input:focus {
    outline: none;
}

#url-prefix {
    margin-right: 0;
}

.url-display {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

/* Animation for toast notifications */
.slide-up {
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    from { transform: translate(-50%, 20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}


.toast-center {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

.modal-center {
    position: fixed;
    inset: auto;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

@media (max-width: 640px) {
    .modal-center {
        right: 5%;
        margin-right: 10px;
        width: min(90%, 400px);
    }
}
