/* Non-critical styles - loaded async */

html { scroll-behavior: smooth; }

/* Section styles */
.section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 5rem 1rem 4rem;
    position: relative;
    background-size: cover;
    background-position: center;
}

.section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(37, 102, 173, 0.8);
    z-index: 0;
}

.section .container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 1.75rem;
    margin: 0;
}

.logo-up {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

/* Hero visual - logo + image layout seperti asli */
.hero-visual {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-visual img:first-child {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.hero-visual img:last-child {
    max-width: 100%;
}

/* Cards grid */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    padding: 1rem;
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.card h3 {
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
}

.card p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}

/* Section split layout */
.section-split {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.section-content {
    flex: 1 1 320px;
}

.section-content h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-visual {
    flex: 1 1 400px;
}

.section-visual img {
    display: block;
    max-width: 100%;
}

.section-visual img:first-child {
    margin-bottom: 1rem;
    height: auto;
    object-fit: contain;
}

/* Peminatan list */
#list-peminatan-prodi {
    margin: 1rem 0;
}

#list-peminatan-prodi a,
#list-peminatan-prodi .btn {
    display: block;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

/* Carousel */
.carousel {
    position: relative;
    max-width: 900px;
    margin: 2rem auto;
}

.carousel-inner {
    overflow: hidden;
    border-radius: 12px;
}

.carousel-item {
    display: none;
    gap: 2rem;
    align-items: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
}

.carousel-item.active {
    display: flex;
    flex-wrap: wrap;
}

.carousel-item img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
}

.carousel-content {
    flex: 1 1 300px;
}

.carousel-content p {
    margin: 0 0 0.5rem;
}

.carousel-author {
    font-size: 0.9rem;
    opacity: 0.9;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.4);
}

.carousel-prev {
    left: -60px;
}

.carousel-next {
    right: -60px;
}

@media (max-width: 900px) {
    .carousel-prev { left: 0; }
    .carousel-next { right: 0; }
}

/* CTA section */
.section-cta .container {
    text-align: center;
}

.section-cta h1 {
    font-size: 1.5rem;
    margin: 0.5rem 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.social-links a {
    font-size: 2rem;
    text-decoration: none;
    transition: transform 0.2s;
    color: #fff;
}

/* Section testimonial - dua heading seperti asli */
#testimonial .container > h1:first-of-type {
    margin-bottom: 0.25rem;
}

#testimonial .container > h1:nth-of-type(2) {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

#prodi .section-content .input-group select {
    width: 100%;
}

/* Section mengapa & prodi - layout title + logo seperti asli */
#mengapa .section-header,
#prodi .section-split {
    align-items: flex-start;
}

#prodi .section-content .input-group select {
    width: 100%;
}

.social-links a:hover {
    transform: scale(1.1);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal[data-open] {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.modal-dialog {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-sm {
    max-width: 450px;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header-blue {
    background: #2566AD;
    color: #fff;
    border: none;
}

.modal-header-blue .modal-close {
    color: #fff;
    opacity: 0.9;
}

.modal-header-green {
    background: #28a745;
    color: #fff;
    border: none;
}

.modal-header-green .modal-close {
    color: #fff;
}

.modal-header-red {
    background: #dc3545;
    color: #fff;
    border: none;
}

.modal-header-red .modal-close {
    color: #fff;
}

.form-result-success { color: #155724; margin: 0; font-size: 1rem; }
.form-result-error { color: #721c24; margin: 0 0 0.5rem; font-weight: 500; }
.form-result-errors { margin: 0.5rem 0; padding-left: 1.25rem; color: #721c24; }
.form-result-refresh { margin: 1rem 0 0; font-size: 0.9rem; color: #666; }

.modal-title {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-primary {
    background: #2566AD;
    color: #fff;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

#usernameCodeForm label {
    display: block;
    margin: 0.5rem 0 0.25rem;
}

#usernameCodeForm .input-group {
    width: 100%;
}

#usernameCodeForm .input-group input {
    width: 100%;
    padding: .6rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.radio-label {
    display: block;
    margin: 0.5rem 0;
    cursor: pointer;
}

#studentChoiceSection {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Scroll top button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--orange, #FF914D);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: transform 0.2s;
}

.scroll-top:hover {
    transform: translateY(-2px);
}

.scroll-top {
    cursor: pointer;
    font: inherit;
}

