/* ============================================
   SMA IBA Portal - Custom Styles
   Theme: Modern Gen Z - White & Grey
   ============================================ */

:root {
    --primary: #2b7be4;
    --white: #ffffff;
    --grey-light: #f5f6fa;
    --grey-medium: #e4e7eb;
    --grey-dark: #888888;
    --dark: #2d2d2d;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    padding: 0.8rem 0;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.topbar.bg-grey {
    background: #eef1f5;
    border-bottom: 1px solid var(--grey-medium);
}

.topbar .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: var(--transition);
}

.topbar .social-link:hover {
    background: var(--grey-medium);
}

.navbar-grey {
    background: #f9fafc; /* light grey by default */
    border-bottom-color: var(--grey-medium);
}

.navbar-grey.scrolled {
    background: var(--white); /* becomes white when scrolled */
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
    border-bottom-color: var(--grey-medium);
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
    transition: var(--transition);
}

.navbar-brand:hover {
    opacity: 0.8;
}

.navbar-brand img {
    transition: var(--transition);
}

.nav-link {
    color: var(--dark) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--grey-light);
    color: var(--primary);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    border-radius: 20px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #1d6bd4;
    border-color: #1d6bd4;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   HERO SLIDER
   ============================================ */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slide {
    height: 600px;
    position: relative;
    background-size: cover;
    background-position: center;
}

/* Removed overlay to preserve original image colors */
.hero-overlay { display: none; }

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 2rem;
}

.hero-content .btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* Carousel indicators and controls */
.carousel-indicators [data-bs-target] {
    background-color: var(--dark);
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.carousel-indicators .active {
    background-color: var(--primary);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1) grayscale(100%);
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero-slider,
    .hero-slide {
        height: 400px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: 80px 0;
}

section.bg-light {
    background-color: var(--grey-light);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--grey-dark);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text {
    color: var(--grey-dark);
    font-size: 0.9rem;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--grey-dark);
    margin-bottom: 0.75rem;
}

.card-meta i {
    color: var(--primary);
}

/* ============================================
   PEOPLE CARDS (Guru & Tendik)
   ============================================ */
.people-card {
    text-align: center;
    padding: 2rem 1rem;
}

.people-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--grey-light);
    transition: var(--transition);
}

.people-card:hover .people-avatar {
    border-color: var(--primary);
    transform: scale(1.05);
}

.people-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.people-position {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(43, 123, 228, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2.5rem;
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.form-control,
.form-select {
    border: 2px solid var(--grey-medium);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(43, 123, 228, 0.15);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.contact-info {
    background: var(--grey-light);
    padding: 2.5rem;
    border-radius: 12px;
    height: 100%;
}

.contact-info-item {
    display: flex;
    align-items: start;
    margin-bottom: 1.5rem;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-info-content h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-info-content p {
    color: var(--grey-dark);
    margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--dark);
}

.footer h5 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer a {
    transition: var(--transition);
}

.footer a.hover-primary:hover {
    color: var(--primary) !important;
}

.footer .btn-outline-light:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ============================================
   UTILITIES
   ============================================ */
.btn-read-more {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-read-more:hover {
    gap: 0.75rem;
}

.badge-date {
    background: var(--primary);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.btn-back-to-top:hover {
    background: #1d6bd4;
    transform: translateY(-5px);
}

/* ============================================
   ANIMATE.CSS (for hero slider)
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate__animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.animate__fadeInUp {
    animation-name: fadeInUp;
}

.animate__delay-1s {
    animation-delay: 0.3s;
}

.animate__delay-2s {
    animation-delay: 0.6s;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 991px) {
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: none;
        background: var(--grey-light);
    }
}

@media (max-width: 576px) {
    .btn-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-content .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}