/* Define your colors using CSS variables */
:root {
    --primary-purple: #6A0DAD; /* Dark Orchid */
    --secondary-black: #1C1C1C;
    --text-white: #FFFFFF;
    --light-gray: #F5F5F5;
    --button-highlight-yellow: #FFFF00; /* Yellow color for highlight */
}

body {
    font-family: sans-serif; /* Use a simple font */
    margin: 0;
    padding: 0;
    background-color: var(--light-gray); /* Default background */
    color: var(--secondary-black); /* Default text color */
    scroll-behavior: smooth; /* Smooth scrolling for links */
    line-height: 1.6; /* Improve readability */
}

.container {
    width: 90%;
    max-width: 1200px; /* Limit content width */
    margin: 0 auto; /* Center content */
    padding: 20px 0;
}

/* Navigation Bar */
header {
    background-color: var(--primary-purple);
    color: var(--text-white);
    padding: 10px 0;
    position: fixed; /* Keep nav visible at the top */
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000; /* Make sure nav is above other content */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Add a subtle shadow */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

nav .logo {
    font-size: 24px;
    font-weight: bold;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease, text-decoration 0.3s ease; /* Animation for hover */
    position: relative; /* Needed for underline animation */
}

/* Underline animation on hover */
nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--text-white);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}


/* Hero Section */
.hero {
    background: url('./img/mainpagebg.png') no-repeat center center/cover; /* Use your background image */
    color: var(--text-white);
    padding: 150px 5% 50px 5%; /* Adjust padding, top padding accounts for fixed nav */
    min-height: 80vh; /* Minimum height */
    display: flex; /* Use Flexbox */
    flex-direction: row; /* Arrange items in a row (text left, image right) */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
    gap: 40px; /* Add space between text and image */
    text-align: left; /* Default text alignment */
}

.hero-content {
    flex: 1; /* Allow text content to take up available space */
    max-width: 600px; /* Limit max width of text block */
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

.hero-image {
    flex: 1; /* Allow image container to take up available space */
    display: flex; /* Use flex to help align the image */
    justify-content: center; /* Center the image horizontally within its container */
    align-items: center; /* Center the image vertically within its container */
}

.hero-image img {
    max-width: 100%; /* Make image responsive */
    height: auto;
    display: block; /* Helps with spacing */
    max-height: 500px; /* Optional: limit image height */
    border-radius: 8px; /* Add some rounded corners to the image */
}

/* Download Button Style */
.btn-download, .btn-submit {
    display: inline-block;
    background-color: var(--primary-purple);
    color: var(--text-white);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Animation for hover and highlight */
    border: none; /* For button element */
    cursor: pointer; /* For button element */
    font-weight: bold;
}

/* Yellow Highlight on Button Hover */
.btn-download:hover, .btn-submit:hover {
    background-color: #5a0cad; /* Slightly darker purple on hover */
    box-shadow: 0 0 15px var(--button-highlight-yellow); /* Yellow glow effect */
}


/* About Section */
.about {
    background-color: var(--light-gray); /* White or light gray */
    padding: 50px 0;
    text-align: center;
    color: var(--secondary-black);
}

.about h2 {
    margin-bottom: 20px;
    color: var(--primary-purple); /* Purple heading */
}

.about p {
    margin-bottom: 30px;
    font-size: 18px;
}

/* App Details Table Styling */
.app-details-table table {
    width: 90%; /* Adjust width */
    margin: 30px auto; /* Center table and add space */
    border-collapse: collapse;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden; /* Ensures rounded corners apply to content */
}

.app-details-table th {
    background-color: var(--primary-purple);
    color: var(--text-white);
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

.app-details-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.app-details-table tr:nth-child(even) {
    background-color: #f2f2f2; /* Alternating row color */
}

.app-details-table tr:last-child td {
    border-bottom: none; /* Remove border from last row */
}


/* Features Section */
.features {
    background-color: var(--secondary-black); /* Purple or dark */
    color: var(--text-white);
    padding: 50px 0;
    text-align: center;
}

.features h2 {
    margin-bottom: 40px;
    color: var(--primary-purple); /* Purple heading */
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 30px;
}

.feature-item {
    background-color: #333; /* Slightly lighter black/dark gray */
    padding: 25px;
    border-radius: 8px;
    text-align: center; /* Center content in feature boxes */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.3s ease; /* Animation for hover */
}

.feature-item:hover {
    transform: translateY(-10px); /* Lift effect on hover */
}

.feature-item .feature-icon {
    font-size: 40px;
    color: var(--button-highlight-yellow); /* Yellow icons */
    margin-bottom: 15px;
}

.feature-item h3 {
    margin-top: 0;
    color: var(--text-white); /* White headlines for features */
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 16px;
    color: #ccc; /* Lighter text color */
}


/* Download CTA Section */
.download-cta {
     background-color: var(--primary-purple); /* Prominent purple */
     color: var(--text-white);
     text-align: center;
     padding: 60px 0;
}
.download-cta h2 {
    margin-bottom: 30px;
    font-size: 36px;
}


/* FAQs Section */
.faqs {
    background-color: var(--light-gray); /* White or light */
    color: var(--secondary-black);
    padding: 50px 0;
    text-align: center;
}

.faqs h2 {
    margin-bottom: 30px;
    color: var(--primary-purple); /* Purple heading */
}

.faq-item {
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
    padding-bottom: 15px;
    text-align: left;
    cursor: pointer; /* Indicate it's clickable */
    transition: background-color 0.3s ease;
}

.faq-item:hover {
    background-color: #eee; /* Slight background change on hover */
}

.faq-item h3 {
    margin: 0;
    font-size: 18px;
    display: flex; /* Use flex to align question and icon */
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.faq-item .faq-icon {
    font-size: 14px;
    transition: transform 0.3s ease; /* Animation for icon rotation */
}

.faq-item .answer {
    margin-top: 10px;
    font-size: 16px;
    color: #555;
    display: none; /* Hide answers by default */
    padding: 0 10px 10px 10px; /* Add padding to the answer */
    overflow: hidden; /* Hide overflow during animation */
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out; /* Animation for expand/collapse */
    max-height: 0; /* Start with max-height 0 for animation */
    opacity: 0; /* Start with opacity 0 for animation */
}

.faq-item.active .answer {
    display: block; /* Show answer when active */
    max-height: 500px; /* Set a max-height large enough to contain content */
    opacity: 1; /* Fade in */
}

.faq-item.active .faq-icon {
    transform: rotate(180deg); /* Rotate icon when active */
}


/* Contact Section */
.contact {
    background-color: var(--secondary-black); /* Purple or dark */
    color: var(--text-white);
    padding: 50px 0;
    text-align: center;
}

.contact h2 {
    margin-bottom: 30px;
    color: var(--primary-purple); /* Purple heading */
}

.contact form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Space between form elements */
    width: 90%;
    max-width: 600px;
    margin: 0 auto 30px auto; /* Center form and add space below */
}

.contact input[type="text"],
.contact input[type="email"],
.contact textarea {
    width: 100%; /* Fill form width */
    padding: 12px;
    border: 1px solid var(--primary-purple); /* Purple border */
    border-radius: 4px;
    background-color: #333; /* Dark input background */
    color: var(--text-white); /* White text color */
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact input[type="text"]:focus,
.contact input[type="email"]:focus,
.contact textarea:focus {
    outline: none; /* Remove default outline */
    border-color: var(--button-highlight-yellow); /* Yellow border on focus */
    box-shadow: 0 0 8px rgba(255, 255, 0, 0.5); /* Yellow glow on focus */
}


.contact textarea {
    resize: vertical; /* Allow vertical resizing */
}

.contact .btn-submit {
    width: 100%; /* Full width button */
    padding: 12px;
    font-size: 18px;
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px; /* Space between icons */
}

.social-icon {
    color: var(--text-white);
    font-size: 24px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
    color: var(--button-highlight-yellow); /* Yellow on hover */
    transform: scale(1.1); /* Slightly enlarge on hover */
}


/* Footer */
footer {
    background: url('./img/footerbg.png') no-repeat center center/cover; /* Use your footer background image */
    color: var(--text-white);
    text-align: center;
    padding: 30px 0;
    /* margin-top: 40px; Space above footer */
    background-color: var(--primary-purple); /* Fallback background */
}

footer p {
    margin: 5px 0;
    font-size: 15px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-purple);
    color: var(--text-white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    opacity: 0; /* Hide by default */
    visibility: hidden; /* Hide completely when not visible */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 900; /* Below fixed nav */
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #5a0cad; /* Slightly darker purple */
    box-shadow: 0 0 10px var(--button-highlight-yellow); /* Yellow glow */
}


/* Animation Styles (using simple fade-in) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px); /* Start slightly below */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0); /* Move to original position */
}


/* Basic Responsiveness */
@media (max-width: 768px) {
    .hero {
        flex-direction: column; /* Stack text and image vertically */
        text-align: center; /* Center text again on small screens */
        padding-left: 20px; /* Adjust padding for small screens */
        padding-right: 20px;
        gap: 30px; /* Adjust gap for small screens */
        min-height: auto; /* Remove min-height restriction */
        padding-top: 100px; /* Adjust top padding for fixed nav */
    }

    .hero-content {
         text-align: center; /* Ensure text is centered */
         max-width: 100%; /* Remove max-width restriction */
    }

    .hero-content h1 {
        font-size: 36px; /* Make heading smaller on small screens */
    }
     .hero-content p {
        font-size: 18px; /* Make paragraph smaller on small screens */
    }

    .hero-image {
        margin-top: 20px; /* Add space between stacked items */
    }

    nav {
        flex-direction: column; /* Stack nav items */
        align-items: center; /* Center nav items */
    }

    nav ul {
        flex-direction: column; /* Stack nav links vertically on small screens */
        margin-top: 10px;
        align-items: center; /* Center nav links */
    }

    nav ul li {
        margin: 5px 0;
    }

    .features-list {
        grid-template-columns: 1fr; /* Single column on small screens */
    }

    .contact form {
        width: 95%;
    }

    .app-details-table table {
        width: 95%; /* Adjust table width */
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 28px;
    }
    .hero-content p {
        font-size: 16px;
    }
    .btn-download, .btn-submit {
        font-size: 16px;
        padding: 10px 20px;
    }
    .features-list {
        gap: 20px;
    }
    .feature-item {
        padding: 20px;
    }
    .feature-item .feature-icon {
        font-size: 35px;
    }
     .contact input[type="text"],
    .contact input[type="email"],
    .contact textarea {
        font-size: 14px;
    }
     .social-icon {
        font-size: 20px;
        gap: 15px;
    }
}

