/* 
    Wathonul Quran - Main Stylesheet
    Author: Antigravity
*/

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

:root {
    --primary: #064e3b; /* Emerald Green */
    --primary-dark: #022c22;
    --accent: #d4af37; /* Gold */
    --accent-light: #f3e5ab;
    --text-dark: #1f2937;
    --text-light: #f9fafb;
    --bg-light: #ffffff;
    --bg-soft: #f8fafc;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 80px 0;
}

/* --- Navbar --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-nav {
    background: var(--primary);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
}

.btn-nav:hover {
    background: var(--accent);
    color: var(--primary-dark) !important;
    transform: translateY(-2px);
}

.btn-nav-secondary {
    border: 2px solid var(--primary);
    color: var(--primary) !important;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
}

.btn-nav-secondary:hover {
    background: var(--primary);
    color: white !important;
    transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(to right, rgba(6, 78, 59, 0.9), rgba(6, 78, 59, 0.3)), url('assets/images/hero.png');
    background-size: cover;
    background-position: center;
    color: white;
    margin-top: 0;
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.btn:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- Features/About --- */
.about {
    background: var(--bg-soft);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-header .divider {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

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

.card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: block;
}

/* --- Gallery & Video --- */
.media-section {
    background: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 4rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    aspect-ratio: 1;
}

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

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

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    background: #000;
}

.video-container iframe, 
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

/* --- Chatbot Widget --- */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 2000;
    transition: var(--transition);
}

.chatbot-toggle:hover {
    transform: scale(1.1) rotate(5deg);
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    z-index: 2000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInUp 0.3s ease-out;
}

.chat-window.active {
    display: flex;
}

.chat-header {
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

.message.bot {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.message.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.chat-footer {
    padding: 1rem;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
}

.chat-footer input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    outline: none;
}

.chat-footer button {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Dashboard --- */
.dashboard-container {
    padding-top: 100px;
}

.dashboard-container .card {
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.dashboard-container table th {
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    .nav-links {
        display: none;
    }
    .dashboard-container {
        padding-top: 80px;
    }
    .grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* --- Mobile App Look --- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    z-index: 3000;
    padding: 0.75rem 0;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    footer {
        padding-bottom: 100px; /* Space for bottom nav */
    }

    .hero {
        text-align: center;
        padding-top: 40px;
    }

    .card {
        padding: 1.5rem !important;
        border-radius: 15px !important;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    nav {
        padding: 0.5rem 0;
    }
    
    .logo span {
        display: none; /* Only icon on mobile logo if needed */
    }
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 600;
    gap: 0.25rem;
}

.nav-tab i {
    font-size: 1.25rem;
}

.nav-tab.active {
    color: var(--primary);
}
