/**
 * ASILO - Frontend Styles
 */

/* =====================
   CSS Variables
   ===================== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --body-bg: #ffffff;
    --text-color: #334155;
    --heading-color: #1e293b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --font-family: 'Poppins', sans-serif;
}

/* =====================
   Base Styles
   ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--body-bg);
    padding-top: 76px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* =====================
   Navbar
   ===================== */
.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand img {
    max-height: 45px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* =====================
   Hero Section
   ===================== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: 50px 50px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* =====================
   Page Header
   ===================== */
.page-header {
    padding-top: 3rem;
    padding-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.breadcrumb-light {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-light .breadcrumb-item {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-light .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.breadcrumb-light .breadcrumb-item a:hover {
    color: #fff;
}

.breadcrumb-light .breadcrumb-item.active {
    color: #fff;
}

.breadcrumb-light .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* =====================
   Cards
   ===================== */
.card {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
}

.hover-card {
    transition: var(--transition);
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Feature Icon */
.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Icon Circle */
.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* =====================
   News Card
   ===================== */
.news-card .news-image {
    position: relative;
    overflow: hidden;
}

.news-card .news-image img,
.news-card .news-image > div {
    height: 200px;
    object-fit: cover;
}

.news-card .news-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.news-card .news-meta {
    font-size: 0.875rem;
}

/* =====================
   Facility Card
   ===================== */
.facility-card .facility-image {
    position: relative;
    overflow: hidden;
}

.facility-card .facility-image img,
.facility-card .facility-image > div {
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.facility-card:hover .facility-image img {
    transform: scale(1.05);
}

/* =====================
   Gallery
   ===================== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
}

.gallery-item img {
    transition: var(--transition);
    aspect-ratio: 1;
    object-fit: cover;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-info h6 {
    font-size: 0.875rem;
}

/* =====================
   Video Card
   ===================== */
.video-card .video-thumbnail {
    position: relative;
    overflow: hidden;
}

.video-card .video-thumbnail img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(37, 99, 235, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.video-play-btn:hover {
    background: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

/* =====================
   Timeline
   ===================== */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-marker .step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.timeline-content {
    padding-left: 1rem;
}

/* =====================
   Nilai Card
   ===================== */
.nilai-card .nilai-icon {
    flex-shrink: 0;
}

.nilai-card .nilai-content h4 {
    color: var(--primary-color);
}

/* =====================
   Footer
   ===================== */
.footer {
    background: var(--dark-color);
}

.footer h5,
.footer h6 {
    color: #fff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact a:hover {
    color: #fff;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* =====================
   Back to Top
   ===================== */
.btn-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.btn-back-to-top:hover {
    transform: translateY(-5px);
}

/* =====================
   Buttons
   ===================== */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.625rem 1.25rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.1rem;
}

/* =====================
   Forms
   ===================== */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* =====================
   Alerts
   ===================== */
.alert {
    border-radius: 0.5rem;
    border: none;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

/* =====================
   Pagination
   ===================== */
.pagination {
    gap: 0.5rem;
}

.page-item .page-link {
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.page-item .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* =====================
   Tabs
   ===================== */
.nav-tabs-gallery {
    border: none;
    gap: 0.5rem;
}

.nav-tabs-gallery .nav-link {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
}

.nav-tabs-gallery .nav-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.nav-tabs-gallery .nav-link.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* =====================
   Contact Info
   ===================== */
.contact-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* =====================
   Map Container
   ===================== */
.map-container {
    height: 400px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* =====================
   Content Area
   ===================== */
.content-area,
.section-content,
.page-content,
.news-content {
    line-height: 1.8;
}

.content-area p,
.section-content p,
.page-content p,
.news-content p {
    margin-bottom: 1rem;
}

.content-area img,
.section-content img,
.page-content img,
.news-content img {
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.content-area h2,
.section-content h2,
.page-content h2,
.news-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-area ul,
.section-content ul,
.page-content ul,
.news-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* =====================
   Animations
   ===================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll[data-animation="fadeInLeft"] {
    transform: translateX(-30px);
}

.animate-on-scroll[data-animation="fadeInLeft"].animated {
    transform: translateX(0);
}

.animate-on-scroll[data-animation="fadeInRight"] {
    transform: translateX(30px);
}

.animate-on-scroll[data-animation="fadeInRight"].animated {
    transform: translateX(0);
}

.animate-on-scroll[data-animation="fadeIn"] {
    transform: none;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #fff;
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 0.5rem;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-link::after {
        display: none;
    }
    
    .hero-section {
        min-height: auto;
        padding: 6rem 0;
    }
    
    .timeline {
        padding-left: 2.5rem;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-marker {
        left: -2.5rem;
        width: 30px;
        height: 30px;
    }
    
    .timeline-marker .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.875rem;
    }
}

@media (max-width: 767.98px) {
    body {
        padding-top: 70px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .btn-back-to-top {
        width: 40px;
        height: 40px;
        bottom: 1rem;
        right: 1rem;
    }
}

/* =====================
   Utilities
   ===================== */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-muted {
    color: var(--secondary-color) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}
