/* 
 * Custom Stylesheet for Masjid Raya Pariaman
 * Premium Bright Emerald & Gold Theme - Fully Responsive
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
    --primary: #10b981;        /* Beautiful Emerald Green */
    --primary-dark: #065f46;   /* Dark Emerald */
    --primary-light: #ecfdf5;  /* Soft Mint Light Background */
    --accent: #d97706;         /* Royal Gold */
    --accent-light: #fef3c7;   /* Soft Gold Background */
    --dark: #0f172a;           /* Dark Slate Text */
    --light: #f8fafc;          /* Slate Light Background */
    --white: #ffffff;
    --gray-light: #f1f5f9;
    --gray: #64748b;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 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);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* CSS RESET & GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* offset for fixed navbar */
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--primary-dark);
}

/* RUNNING TEXT TICKER */
.ticker-container {
    background: linear-gradient(135deg, var(--accent), #b45309);
    color: var(--white);
    padding: 8px 20px;
    overflow: hidden;
    white-space: nowrap;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.ticker-text {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 25s linear infinite;
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* NAVBAR */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    transition: var(--transition);
}

nav.scrolled {
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo span {
    font-size: 24px;
}

.nav-logo h2 {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* NAVBAR LINKS */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 15px;
    align-items: center;
}

.nav-link, .nav-btn {
    color: #334155;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.nav-link:hover, .nav-btn:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.nav-link.active {
    color: var(--primary-dark);
    background-color: var(--primary-light);
}

.nav-login-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white) !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.nav-login-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), #047857);
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
}

/* DROPDOWN MENU */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: var(--white);
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 12px;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(16, 185, 129, 0.1);
    overflow: hidden;
    z-index: 1010;
    animation: slideDown 0.2s ease-out;
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-content a:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    padding-left: 25px;
}

.dropdown.active .dropdown-content {
    display: block;
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* HAMBURGER MENU FOR MOBILE */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-dark);
    transition: var(--transition);
}

/* HERO SECTION */
.hero {
    margin-top: 75px;
    height: 75vh;
    background: linear-gradient(to bottom, rgba(6, 95, 70, 0.4), rgba(15, 23, 42, 0.8)), url('tampilan_masjid.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.hero-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 40px 60px;
    border-radius: 24px;
    max-width: 800px;
    box-shadow: var(--shadow-premium);
    animation: heroFadeIn 1.2s ease-out;
}

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

.hero-tag {
    background: var(--accent);
    color: var(--white);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    color: var(--white);
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 18px;
    color: var(--gray-light);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* SECTION STRUCTURE */
.section {
    padding: 100px 8%;
    text-align: center;
}

.section:nth-child(even) {
    background-color: var(--white);
}

/* BEAUTIFUL SECTION HEADERS */
.section-header {
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: var(--primary-dark);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.section-header h2::before {
    content: "🕌";
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
}

.section-header p {
    color: var(--gray);
    margin-top: 10px;
    font-size: 15px;
    font-weight: 500;
}

/* LAYOUT CONTAINER */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* PREMIUM DYNAMIC CARD */
.card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.08);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(16, 185, 129, 0.2);
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    font-size: 20px;
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-weight: 700;
}

.card p {
    color: #475569;
    font-size: 15px;
    line-height: 1.7;
}

/* SPECIAL CARD: TENTANG */
.tentang-card {
    background: linear-gradient(135deg, var(--white), var(--primary-light));
    border-left: 4px solid var(--primary);
}

/* VISI MISI CARDS */
.visi-card, .misi-card {
    text-align: left;
}

.visi-card h3, .misi-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.misi-list {
    list-style: none;
}

.misi-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    font-size: 15px;
    color: #475569;
}

.misi-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 16px;
}

/* PENGURUS CARDS */
.pengurus-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px;
}

.pengurus-avatar {
    width: 70px;
    height: 70px;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 28px;
    margin-bottom: 10px;
    border: 2px dashed var(--primary);
}

.pengurus-role {
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
}

.pengurus-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
}

/* PRAYER TIMES REAL-TIME WIDGET */
.prayer-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.prayer-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 20px 10px;
    border: 1px solid rgba(16, 185, 129, 0.06);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.prayer-card.next-prayer {
    background: linear-gradient(135deg, var(--primary-light), #d1fae5);
    border: 2px solid var(--primary);
    transform: scale(1.05);
}

.prayer-card.next-prayer h3 {
    color: var(--primary-dark);
}

.prayer-card h3 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    margin-bottom: 8px;
}

.prayer-time {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-dark);
    font-family: monospace;
}

.prayer-card.next-prayer .prayer-time {
    color: var(--primary-dark);
}

.prayer-location-info {
    max-width: 1200px;
    margin: 30px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 30px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.prayer-location {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-clock-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
}

/* KEGIATAN (ACTIVITIES) DYNAMIC CARDS */
.kegiatan-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
}

.kegiatan-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: left;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    padding: 0;
}

.kegiatan-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
}

.kegiatan-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.kegiatan-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.kegiatan-card:hover .kegiatan-img {
    transform: scale(1.08);
}

.kegiatan-date-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: rgba(16, 185, 129, 0.95);
    backdrop-filter: blur(4px);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.kegiatan-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.kegiatan-content h3 {
    font-size: 18px;
    color: var(--primary-dark);
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.kegiatan-content p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* FINANCIAL INFAQ SECTION */
.infaq-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.infaq-card {
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    color: var(--white);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.infaq-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.infaq-card .title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 600;
}

.infaq-card .value {
    font-size: 28px;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.masuk {
    background: linear-gradient(135deg, #10b981, #059669);
}

.keluar {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.total {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* RESPONSIVE TABLE */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background-color: var(--white);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

table th, table td {
    padding: 16px 20px;
    text-align: center;
}

table th {
    background-color: var(--primary-dark);
    color: var(--white);
    font-weight: 600;
    font-size: 15px;
}

table tr {
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition);
}

table tr:hover {
    background-color: var(--primary-light);
}

table tr:last-child {
    border-bottom: none;
}

table td {
    color: #475569;
    font-size: 14px;
}

.badge-masuk {
    background-color: #d1fae5;
    color: #065f46;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
}

.badge-keluar {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
}

/* INTERIOR GALLERY */
.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.gallery-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    padding: 0;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
}

.gallery-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-card:hover .gallery-img {
    transform: scale(1.06);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    transition: var(--transition);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay p {
    color: var(--white);
    font-weight: 600;
    font-size: 16px;
}

.gallery-caption {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-dark);
}

/* RICH footer STYLE - REPLACES SEPARATE CONTACT SECTION */
footer {
    background: linear-gradient(135deg, #0f172a, #022c22);
    color: #cbd5e1;
    padding: 80px 8% 30px;
    border-top: 5px solid var(--accent);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 50px;
}

.footer-info h3 {
    color: var(--white);
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-info p {
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-links h4, .footer-contact h4 {
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after, .footer-contact h4::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-menu a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-contact-list {
    list-style: none;
}

.footer-contact-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer-contact-icon {
    font-size: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.footer-contact-list span {
    line-height: 1.5;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
}

.footer-bottom p {
    color: #94a3b8;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.footer-social-btn {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.footer-social-btn:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

/* RESPONSIVE DESIGN - BREAKPOINTS */

@media (max-width: 992px) {
    nav {
        padding: 15px 4%;
    }
    
    .ticker-container {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .hero {
        height: 60vh;
    }
    
    .hero-box {
        padding: 30px 40px;
    }
    
    .hero h2 {
        font-size: 38px;
    }
    
    .hero p {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    /* MOBILE NAVIGATION */
    .hamburger {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 5%;
        right: 5%;
        width: 90%;
        height: auto;
        background-color: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 8px;
        border-radius: 16px;
        box-shadow: var(--shadow-lg);
        border: 1px solid rgba(16, 185, 129, 0.1);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        overflow-y: auto;
        max-height: 80vh;
    }
    
    nav.scrolled .nav-menu {
        top: 100%;
    }
    
    .nav-menu.active {
        transform: translateY(10px);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link, .nav-btn {
        width: 100%;
        padding: 14px 20px;
        border-radius: 8px;
    }
    
    .dropdown-content {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--primary-light);
        margin-left: 20px;
        margin-top: 5px;
        margin-bottom: 5px;
        border-radius: 0;
        background-color: #fafbfc;
    }
    
    .dropdown-content a {
        padding: 10px 15px;
    }
    
    /* SECTION MOBILE PADDING */
    .section {
        padding: 60px 5%;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: 26px;
    }
    
    .hero {
        height: auto;
        padding: 100px 20px 60px;
    }
    
    .hero-box {
        padding: 20px;
        border-radius: 16px;
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .prayer-location-info {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 24px;
    }
    
    .infaq-card .value {
        font-size: 22px;
    }
    
    table th, table td {
        padding: 12px 10px;
        font-size: 13px;
    }
}
