/* ===============================================
   NŨR AI Quran - Landing Page Styles
   =============================================== */

/* --- 1. Global Reset & CSS Variables --- */
:root {
    /* NUR AI Brand Colors - Purple to Pink Gradient */
    --primary-color: #8B5CF6;        /* Purple */
    --primary-dark: #7C3AED;         /* Darker purple */
    --secondary-color: #EC4899;      /* Pink */
    --gradient-start: #8B5CF6;       /* Purple start */
    --gradient-end: #EC4899;         /* Pink end */

    /* Base Colors */
    --dark-color: #1a1a2e;
    --light-color: #ffffff;
    --bg-light-gray: #f9f9f9;
    --bg-ai-section: #FAF5FF;        /* Very light purple */
    --text-color: #333;
    --text-light: #555;
    --border-color: #e0e0e0;
    --transition: all 0.3s ease;

    /* Gradient Definition */
    --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 2. Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2.5rem;
    color: #1a1a1a;
    font-weight: 800;
}
h3 { font-size: 1.75rem; color: var(--primary-color); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

ul {
    list-style: none;
    margin-bottom: 1rem;
}

ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

/* --- 3. Buttons & CTAs --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--light-color);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #DB2777 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background-color: var(--light-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: #f4f7ff;
    transform: translateY(-2px);
}

/* Store Buttons */
.store-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #000;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.store-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.store-btn svg {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.store-btn div {
    text-align: left;
    font-size: 0.75rem;
    line-height: 1.2;
}

.store-btn span {
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
}

/* --- 4. Header & Navigation --- */
.navbar {
    background-color: var(--light-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.navbar .logo:hover {
    transform: scale(1.05);
}

.navbar .logo-image {
    height: 94px;
    width: auto;
    object-fit: contain;
}

.navbar .logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark-color);
}

.navbar .logo-text span {
    color: var(--primary-color);
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar nav a:not(.btn):hover {
    color: var(--primary-color);
}

.navbar nav a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar nav a:not(.btn):hover::after {
    width: 100%;
}

/* Navbar Button - Ensure white text */
.navbar nav a.btn-primary {
    color: #ffffff !important;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    transition: var(--transition);
    border-radius: 3px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* --- 5. Hero Section --- */
.hero {
    padding: 5rem 0;
    text-align: center;
    background: #ffffff;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    color: #1a1a1a;
    font-weight: 800;
    animation: fadeInDown 0.8s ease;
}

.hero .subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 1.5rem auto 2rem;
    color: var(--text-light);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero .store-buttons {
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-image {
    margin-top: 3rem;
    width: 100%;
    max-width: 900px;
    animation: fadeInUp 0.8s ease 0.6s both;
}

/* --- 6. Image Containers --- */
.image-container {
    width: 100%;
    min-height: 400px;
    background-color: #f0f0f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.image-placeholder {
    border: 2px dashed var(--border-color);
    color: #aaa;
    font-weight: 500;
    font-size: 1.1rem;
    text-align: center;
    padding: 2rem;
}

.hero .image-container {
    min-height: 500px;
}

/* AI Features Section Images - Reduced Size */
.ai-features .image-container {
    min-height: auto;
    background-color: transparent;
}

.ai-features .image-container img {
    width: 75%;
    height: auto;
    object-fit: contain;
    max-width: 600px;
}

/* --- 7. AI Features Section (FLAGSHIP) --- */
.ai-features {
    padding: 5rem 0;
    background: #ffffff;
}

.ai-features h2 {
    color: var(--dark-color);
}

.ai-features h2 span {
    color: var(--primary-color);
}

.ai-features .intro-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
    font-size: 1.1rem;
}

.feature-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    margin-bottom: 5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.feature-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-item:nth-child(even) .feature-text {
    order: 1;
}

.feature-item h3 {
    font-size: 2rem;
}

.feature-item .tagline {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    display: block;
}

.ai-features ul li::before {
    content: '⚡';
    color: var(--secondary-color);
}

/* AI Features Grid */
.ai-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.ai-features-grid .grid-item {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.ai-features-grid .grid-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.ai-features-grid .grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* --- 8. Core Features Section --- */
.core-features,
.islamic-tools,
.knowledge-base {
    padding: 5rem 0;
}

.core-features {
    background: linear-gradient(180deg, #ffffff 0%, rgba(249, 250, 251, 0.5) 100%);
}

.islamic-tools {
    background: linear-gradient(180deg, rgba(249, 250, 251, 0.8) 0%, rgba(243, 244, 246, 0.5) 100%);
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

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

.feature-card {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.07);
}

.feature-card .icon-placeholder {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.feature-card h4 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* --- 9. Knowledge Base Section --- */
.knowledge-base .content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.knowledge-base .image-container {
    min-height: 450px;
}

.knowledge-base ul li::before {
    content: '📚';
}

/* --- 10. CTA Section --- */
.cta-section {
    background: var(--gradient-primary);
    padding: 5rem 0;
    text-align: center;
    color: var(--light-color);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s infinite;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section h2,
.cta-section p {
    color: var(--light-color);
}

.cta-section h2 {
    font-size: 2.75rem;
}

.cta-section p {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 1rem auto 2rem;
    opacity: 0.9;
}

/* --- 11. Footer --- */
.footer {
    padding: 3rem 0;
    background-color: var(--dark-color);
    color: #aab;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer .footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer .footer-links a {
    text-decoration: none;
    color: #aab;
    transition: var(--transition);
}

.footer .footer-links a:hover {
    color: var(--light-color);
}

.footer .copyright {
    font-size: 0.9rem;
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Scroll animations utility */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 13. Responsive Design --- */
@media (max-width: 992px) {
    .feature-item {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .feature-item:nth-child(even) .feature-text {
        order: 0;
    }

    .feature-item .image-container {
        min-height: 300px;
    }

    .ai-features .image-container img {
        width: 70%;
        max-width: 350px;
    }

    .knowledge-base .content-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ai-features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .hero { padding: 3rem 0; }
    .hero h1 { font-size: 2.5rem; }

    .navbar .logo-image {
        height: 70px;
    }

    .navbar .logo-text {
        font-size: 1.5rem;
    }

    .navbar nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--light-color);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
    }

    .navbar nav.active {
        left: 0;
    }

    .navbar nav a::after {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .store-buttons {
        flex-direction: column;
        align-items: center;
    }

    .store-btn {
        width: 200px;
        justify-content: center;
    }

    .ai-features .image-container img {
        width: 90%;
        max-width: 300px;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .hero h1 { font-size: 2rem; }
    .hero .subtitle { font-size: 1rem; }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}
