/* style.css */
:root {
    --primary-dark: #064635;
    --primary-medium: #0b6e4f;
    --primary-light: #0f8a62;
    --gold: #FFD700;
    --light-bg: #f8f9fa;
    --dark-text: #333;
    --light-text: #fff;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--dark-text);
    padding-top: 56px;
    overflow-x: hidden;
    background-color: #fafafa;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* Header & Navigation */
.navbar {
    background: var(--primary-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1rem;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--light-text);
}

.navbar-brand span {
    color: var(--gold);
}

.custom-icon {
  height: 1em; /* Sesuaikan dengan tinggi teks */
  width: auto; /* Pertahankan aspek rasio */
  vertical-align: middle; /* Align dengan teks */
}
.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    margin: 0 8px;
    padding: 8px 15px !important;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--light-text) !important;
    background: rgba(255, 255, 255, 0.1);
}

.navbar-toggler {
    border: none;
    color: var(--light-text);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    overflow: hidden;
}

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

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(6, 70, 53, 0.8), rgba(11, 110, 79, 0.9));
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text);
    padding: 0 15px;
}

.hero-content {
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

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

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    margin: 0 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-kajian {
    background: var(--gold);
    color: var(--primary-dark);
    border: 2px solid var(--gold);
}

.btn-kajian:hover {
    background: transparent;
    color: var(--gold);
    transform: translateY(-3px);
}

.btn-donasi {
    background: transparent;
    color: var(--light-text);
    border: 2px solid var(--light-text);
}

.btn-donasi:hover {
    background: var(--light-text);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    position: relative;
    margin-bottom: 50px;
    text-align: center;
    color: var(--primary-dark);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gold);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    color: #555;
}

/* About Section */
.about-img {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content {
    padding: 30px;
    border-radius: 12px;
    background: var(--light-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
}

/* Activities */
.activity-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    border: none;
    background: var(--light-bg);
}

.activity-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.activity-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-dark);
    color: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 35px auto 20px;
    font-size: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Schedule */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--light-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.schedule-table th {
    background: var(--primary-dark);
    color: var(--light-text);
    padding: 15px;
    text-align: center;
}

.schedule-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.schedule-table tr:nth-child(even) {
    background: rgba(6, 70, 53, 0.03);
}

.schedule-table tr:hover {
    background: rgba(6, 70, 53, 0.05);
}

.friday-schedule {
    background: rgba(255, 215, 0, 0.1);
    border-left: 4px solid var(--gold);
    padding: 25px;
    border-radius: 12px;
    margin-top: 40px;
}

/* Facilities */
.facility-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 8px;
    background: var(--light-bg);
    transition: all 0.3s ease;
}

.facility-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.facility-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-dark);
    color: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
    flex-shrink: 0;
}

/* Donation */
.donation-box {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-medium));
    color: var(--light-text);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.btn-donate {
    background: var(--gold);
    color: var(--primary-dark);
    padding: 12px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-donate:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.trust-badge {
    display: inline-block;
    background: var(--gold);
    color: var(--primary-dark);
    padding: 5px 15px;
    border-radius: 30px;
    font-weight: 600;
    margin-top: 20px;
    font-size: 0.9rem;
}

/* Location */
.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 400px;
}

.address-box {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

/* Contact */
.contact-info {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-info:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-dark);
    color: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 20px;
    flex-shrink: 0;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: var(--light-text);
    padding: 60px 0 20px;
}

.footer-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-logo span {
    color: var(--gold);
}

.footer-social {
    margin: 25px 0;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-text);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--gold);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

.footer-quote {
    font-style: italic;
    border-left: 3px solid var(--gold);
    padding-left: 15px;
    margin: 25px 0;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
}

/* Floating Buttons */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.scroll-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-dark);
    color: var(--light-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--primary-medium);
    transform: translateY(-3px);
}

/* Loading Spinner */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--gold);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Gallery Carousel */
.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-info {
    padding: 15px;
    background: var(--light-bg);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 160px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-dark);
    color: var(--light-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    background: var(--primary-medium);
    transform: translateY(-3px);
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #121212;
    color: #f0f0f0;
}

body.dark-mode .section {
    background-color: #1e1e1e;
}

body.dark-mode .activity-card,
body.dark-mode .about-content,
body.dark-mode .facility-item,
body.dark-mode .contact-info,
body.dark-mode .address-box,
body.dark-mode .schedule-table,
body.dark-mode .gallery-info {
    background-color: #2a2a2a;
    color: #f0f0f0;
}

body.dark-mode .schedule-table tr:nth-child(even) {
    background: rgba(6, 70, 53, 0.1);
}

body.dark-mode .section-title {
    color: var(--gold);
}

/* Kajian Rutin Section */
.kajian-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.kajian-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 1/1;
    background-color: var(--primary-medium);
}

.kajian-img-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.kajian-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.kajian-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(6, 70, 53, 0.9), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.kajian-item:hover .kajian-info {
    transform: translateY(0);
}

.kajian-item:hover .kajian-img {
    transform: scale(1.1);
}

.kajian-day {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--gold);
}

.kajian-time {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.kajian-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.kajian-ustadz {
    font-size: 0.9rem;
    font-style: italic;
}

/* Dark mode adjustments */
body.dark-mode .kajian-item {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-btn {
        display: block;
        margin: 10px auto;
        width: 80%;
        max-width: 250px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .kajian-grid {
        grid-template-columns: 1fr;
    }
    
    .dark-mode-toggle {
        bottom: 160px;
        right: 20px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
}

/* Safari specific fixes */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) {
        .kajian-item {
            height: 300px;
        }
    }
}


/* Perbaikan untuk bagian informasi footer */
.footer-info h5 {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.footer-info h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gold);
}

.footer-info .list-unstyled li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 15px;
    transition: all 0.3s ease;
}

.footer-info .list-unstyled li::before {
    content: '\f105';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 12px;
}

.footer-info .list-unstyled a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.footer-info .list-unstyled a:hover {
    color: var(--gold);
    transform: translateX(5px);
}