/* 
    MAIN STYLE - PUBLIC FACING PAGES
    Portal Digital Pencak Silat
*/

/* Core Layout */
html {
    scroll-behavior: smooth;
}

section, header, footer {
    scroll-margin-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background-color: #ffffff;
    box-shadow: var(--box-shadow);
    padding: 10px 0;
    transition: all 0.3s;
}

.navbar-brand {
    color: var(--brand-primary) !important;
    font-weight: bold;
    font-size: 1.3rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 50px;
    width: auto;
    margin-right: 12px;
}

.nav-link {
    color: #555 !important;
    margin-left: 20px;
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-primary) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -5px;
    left: 0;
    background-color: var(--brand-primary);
    border-radius: 2px;
}

/* Buttons */
.btn-brand {
    background-color: var(--brand-primary);
    color: white;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid var(--brand-primary);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-brand:hover {
    background-color: transparent;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* Hero Carousel */
#heroCarousel {
    margin-bottom: 50px;
    position: relative;
    margin-top: 76px;
}

.carousel-item {
    height: 85vh;
    min-height: 500px;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    filter: brightness(0.4);
}

.carousel-caption {
    bottom: 30%;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-title span {
    color: var(--brand-primary);
    text-shadow: 1px 1px 0 #fff;
}

.text-highlight {
    color: var(--brand-primary) !important;
    text-shadow: none;
}

/* Event Cards */
.event-card {
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: white;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    border-bottom: 4px solid transparent;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover);
    border-bottom-color: var(--brand-primary);
}

.event-poster-container {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.event-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.event-card:hover .event-poster {
    transform: scale(1.1);
}

.event-status {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--brand-secondary);
    color: var(--brand-dark);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    z-index: 1;
}

.card-body {
    padding: 25px !important;
}

.event-title {
    font-size: 1.35rem;
    margin-bottom: 15px;
    color: var(--brand-dark);
    font-weight: 700;
    line-height: 1.3;
}

.info-list {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.info-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
}

.info-list i {
    color: var(--brand-primary);
    width: 25px;
    margin-top: 3px;
}

.label-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
}

.value-text {
    font-weight: 500;
    color: #333;
}

/* Section Styling */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--brand-dark);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background-color: var(--brand-primary);
    margin: 15px auto 0;
    border-radius: 2px;
}

.about-section {
    background-color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background-color: rgba(198, 0, 0, 0.03);
    border-radius: 50%;
    z-index: 0;
}

.about-image-stack {
    position: relative;
    z-index: 1;
}

.about-img {
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.stats-badge {
    position: absolute;
    bottom: -30px;
    left: -20px;
    background: white;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stats-number {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1;
}

.stats-text {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.2;
}

.feature-icon-box {
    width: 50px;
    height: 50px;
    background-color: rgba(198, 0, 0, 0.08);
    color: var(--brand-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
    transition: all 0.3s;
}

.feature-item:hover .feature-icon-box {
    background-color: var(--brand-primary);
    color: white;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    padding: 5px;
    background: white;
    border: 1px solid #eee;
}

.search-input {
    border: none;
    box-shadow: none !important;
    padding-left: 20px;
}

.search-btn {
    border-radius: 50px !important;
    padding: 10px 25px;
    font-weight: 600;
}

/* Pagination */
.page-link {
    color: var(--brand-primary);
    border: 1px solid #dee2e6;
}

.page-link:hover {
    color: #8a0000;
    background-color: #f8f9fa;
}

.page-item.active .page-link {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: white;
}

.page-item.disabled .page-link {
    color: #6c757d;
}

/* Footer */
footer {
    background-color: #ffffff;
    color: #333;
    padding: 70px 0 30px;
    border-top: 1px solid #eee;
    margin-top: 60px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--brand-primary);
    margin-bottom: 25px;
    font-weight: bold;
    line-height: 1.2;
}

.footer-brand img {
    height: 60px;
    width: auto;
}

.brand-text {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Back to Top */
#btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    background-color: var(--brand-primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: all 0.3s;
}

#btn-back-to-top:hover {
    transform: translateY(-5px);
    background-color: #a00000;
}

/* Event Detail Specific */
.event-header {
    background-size: cover;
    background-position: center;
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
    border-bottom: 5px solid var(--brand-primary);
}

.breadcrumb-item a {
    color: var(--brand-secondary);
    text-decoration: none;
}

.event-poster-detail {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 4px solid white;
}

.card-result {
    border: none;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.nav-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
}

.nav-tabs .nav-link {
    border: none;
    color: #666;
    font-weight: 600;
    padding: 12px 25px;
    transition: all 0.3s;
}

.nav-tabs .nav-link.active {
    color: var(--brand-primary);
    border-bottom: 3px solid var(--brand-primary);
    background: transparent;
}

.table-custom {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-custom thead th {
    border: none;
    background-color: var(--brand-dark);
    color: white;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 15px;
}

.table-custom tbody tr {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: transform 0.2s;
}

.table-custom tbody tr:hover {
    transform: scale(1.01);
    background-color: #fff9f9;
}

.badge-rank {
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.rank-emas { background-color: #FFD700; color: #000; }
.rank-perak { background-color: #C0C0C0; color: #000; }
.rank-perunggu { background-color: #CD7F32; color: #fff; }

.info-box {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius-md);
    border-left: 5px solid var(--brand-primary);
    margin-bottom: 20px;
}

/* Animations */
.fade-in-item {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 991px) {
    .navbar-collapse {
        background: #ffffff;
        padding: 20px;
        border-radius: 0 0 10px 10px;
        box-shadow: var(--box-shadow);
    }
    .stats-badge {
        left: 0; right: 0; bottom: -20px;
        width: fit-content; margin: 0 auto;
    }
    .about-image-stack {
        margin-bottom: 60px;
    }
}

@media (max-width: 768px) {
    .hero-title { font-size: 1.8rem; margin-bottom: 10px; }
    .carousel-caption { bottom: 15%; padding-bottom: 0; }
    .carousel-caption .lead { font-size: 0.9rem; margin-bottom: 15px; }
    .btn-brand { padding: 8px 25px; font-size: 0.9rem; }
}
