html {
    scroll-behavior: smooth;
}

/* Scoped to this page's own content only — a bare `*` reset here would leak
   box-sizing:border-box onto the shared header/footer from layouts/app.blade.php
   (loaded after this stylesheet), shrinking the mobile header's fixed height. */
.cards-container,
.cards-container * {
    box-sizing: border-box;
}

.cards-container {
    display: grid;
    gap: 2rem;
    width: 90%;
    max-width: 100%;
    margin: 2rem auto;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    box-sizing: border-box;
}

.card-container {
    width: 90%;
    max-width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0 1.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 20px rgba(11, 102, 158, 0.12),
                0 0 0 1px rgba(11, 102, 158, 0.08);
    border-radius: 1rem;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    overflow: hidden;
}

.card-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(53, 184, 224, 0.1), transparent);
    transition: left 0.6s ease;
}

.card-container:hover::before {
    left: 100%;
}

.card-container:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(11, 102, 158, 0.2),
                0 0 0 1px rgba(11, 102, 158, 0.15);
    border-color: rgba(53, 184, 224, 0.3);
}

.icon-container {
    position: relative;
    margin-top: 2rem;
    width: 7rem;
    height: 7rem;
    transition: transform 0.3s ease;
}

.card-container:hover .icon-container {
    transform: scale(1.1) rotateY(10deg);
}

.card-shape {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.card-container:hover .card-shape {
    transform: rotate(15deg) scale(1.05);
    opacity: 0.9;
}

.card-icon {
    position: absolute;
    width: 4.1875rem;
    height: 4.1875rem;
    z-index: 99;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(11, 102, 158, 0.15));
}

.card-container:hover .card-icon {
    transform: translate(-50%, -50%) scale(1.15);
    filter: drop-shadow(0 6px 12px rgba(11, 102, 158, 0.25));
}

.card-title {
    font-size: 1.125rem;
    color: #0d689d;
    font-weight: bold;
    margin-top: 1rem;
    text-shadow: 0 2px 4px rgba(13, 104, 157, 0.1);
    transition: all 0.3s ease;
}

.card-container:hover .card-title {
    transform: scale(1.05);
    color: #0B669E;
}

.major-info {
    display: flex;
    width: 100%;
    max-width: 100%;
    justify-content: space-around;
    margin-top: 1rem;
    gap: 0.5rem;
    box-sizing: border-box;
}

.major-info p {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    color: #3a3838;
    font-weight: 500;
    /* background: linear-gradient(135deg, #edf5fb, #e3f2fb); */
    border-radius: 0.875rem;
    margin: 0;
    box-shadow: 0 2px 6px rgba(11, 102, 158, 0.08);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.card-container:hover .major-info p {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(11, 102, 158, 0.15);
}

.job-opportunities-title {
    width: 100%;
    color: #233b77;
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
    margin-top: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.job-opportunities-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 3rem;
    height: 3px;
    background: linear-gradient(90deg, #35B8E0, #0B669E);
    border-radius: 2px;
}

.job-opportunities {
    width: 100%;
    max-width: 100%;
    margin-top: 0.5625rem;
    padding: 0;
    box-sizing: border-box;
}

.job-opportunities ul {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
    padding: 0 0.5rem;
    box-sizing: border-box;
}

.job-opportunities li {
    color: #3a3838;
    font-size: 0.8125rem;
    font-weight: 500;
    margin: 0;
    padding: 0;
    text-indent: -0.3rem;
}

.job-opportunities li::marker {
    color: #35B8E0;
    margin: 0;
    padding: 0;
}

.card-container:hover .job-opportunities li {
    color: #2a2a2a;
}

.major-buttons {
    display: flex;
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    /* Grid already stretches every card in a row to equal height; job-opportunity
       lists vary in length per major, so pin the button row to the bottom of
       that equal height instead of a fixed top margin — keeps buttons aligned
       across cards regardless of how much content sits above them. */
    margin-top: auto;
    padding-top: 1.5rem;
    gap: 0.5rem;
    box-sizing: border-box;
}

.register-button {
    display: flex;
    background: linear-gradient(135deg, #0f62ac, #0B5A8A);
    border-radius: 0.75rem;
    padding: 0.625rem 1rem;
    text-decoration: none;
    justify-content: center;
    align-items: center;
    height: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    max-width: 100%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(15, 98, 172, 0.25);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.register-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.register-button:hover::before {
    width: 300px;
    height: 300px;
}

.register-button:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 18px rgba(15, 98, 172, 0.4);
    background: linear-gradient(135deg, #35B8E0, #0f62ac);
}

.register-button:active {
    transform: translateY(-1px) scale(1.01);
}

.register-button.bachelor {
    background: linear-gradient(135deg, #51A45C, #3d8a47);
}

.register-button.bachelor:hover {
    box-shadow: 0 6px 18px rgba(81, 164, 92, 0.4);
    background: linear-gradient(135deg, #62BB46, #51A45C);
}

.register-button.disabled {
    background: linear-gradient(135deg, #888888, #666666);
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.6;
}

.register-button img {
    width: 1.125rem;
    height: 1.125rem;
    color: #ffffff;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1);
}

.register-button:hover img {
    transform: scale(1.1);
}

.register-button p {
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: bold;
    margin: 0;
    margin-right: 0.625rem;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.register-button:hover p {
    transform: translateX(-2px);
}

.major-details-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border-radius: 0.75rem;
    padding: 0.625rem;
    border: 2px solid #0f62ac;
    margin-bottom: 1.25rem;
    text-decoration: none;
    flex: 1;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.major-details-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(15, 98, 172, 0.1), transparent);
    transition: left 0.5s ease;
}

.major-details-button:hover::before {
    left: 100%;
}

.major-details-button:hover {
    background: linear-gradient(135deg, rgba(15, 98, 172, 0.08), rgba(15, 98, 172, 0.05));
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 16px rgba(15, 98, 172, 0.2);
    border-color: #35B8E0;
}

.major-details-button:active {
    transform: translateY(-1px) scale(1.01);
}

.major-details-button.bachelor {
    border-color: #51A45C;
}

.major-details-button.bachelor::before {
    background: linear-gradient(90deg, transparent, rgba(81, 164, 92, 0.1), transparent);
}

.major-details-button.bachelor:hover {
    background: linear-gradient(135deg, rgba(81, 164, 92, 0.08), rgba(81, 164, 92, 0.05));
    box-shadow: 0 6px 16px rgba(81, 164, 92, 0.2);
    border-color: #62BB46;
}

.major-details-button.bachelor p {
    color: #51A45C;
}

.major-details-button.disabled {
    border-color: #888888;
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.6;
}

.major-details-button.disabled p {
    color: #888888;
}

.major-details-button p {
    margin: 0;
    color: #0f62ac;
    font-size: 0.9375rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.major-details-button:hover p {
    transform: scale(1.05);
}

.degree-text {
    border-radius: 0 0.75rem 0.75rem 0;
    color: #ffffff;
    font-weight: 600;
    position: absolute;
    top: 1.5rem;
    left: 0;
    padding: 0.375rem 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.card-container:hover .degree-text {
    transform: translateX(4px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

@media (max-width: 992px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .card-container {
        width: 95%;
    }
}

@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: repeat(1, 1fr);
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        gap: 1.5rem;
        box-sizing: border-box;
    }

    .card-container {
        width: 100%;
        max-width: 100%;
        padding: 0 1.25rem;
        box-sizing: border-box;
    }

    .card-container:hover {
        transform: translateY(-4px) scale(1.01);
    }

    .card-container:hover .icon-container {
        transform: scale(1.08) rotateY(8deg);
    }

    .icon-container {
        width: 6rem;
        height: 6rem;
        margin-top: 1.5rem;
    }

    .card-icon {
        width: 3.5rem;
        height: 3.5rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .major-info {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .major-info p {
        font-size: 0.8125rem;
        padding: 0.25rem 0.625rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .job-opportunities ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .job-opportunities li {
        word-break: break-word;
    }

    .major-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .register-button,
    .major-details-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cards-container {
        width: 100%;
        max-width: 100%;
        padding: 0 0.75rem;
        gap: 1.25rem;
        box-sizing: border-box;
    }

    .card-container {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .card-container:hover {
        transform: translateY(-3px) scale(1.005);
    }

    .icon-container {
        width: 5rem;
        height: 5rem;
        margin-top: 1.25rem;
    }

    .card-icon {
        width: 3rem;
        height: 3rem;
    }

    .card-title {
        font-size: 0.9375rem;
    }

    .major-info {
        justify-content: center;
    }

    .major-info p {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        white-space: nowrap;
    }

    .job-opportunities ul {
        gap: 0.5rem;
        padding: 0 0.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .job-opportunities li {
        font-size: 0.75rem;
        word-break: break-word;
    }

    .register-button p,
    .major-details-button p {
        font-size: 0.875rem;
    }

    .register-button {
        padding: 0.5rem 0.75rem;
    }

    .major-details-button {
        padding: 0.5rem 0.75rem;
    }

    .degree-text {
        font-size: 0.875rem;
        padding: 0.25rem 0.75rem;
    }
}
