/*
Theme Name: Dua9 Theme
Author: Grok
Description: A WordPress theme based on the Dua9 AI Services homepage design
Version: 1.17
Text Domain: dua9
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6e48ff;
    --secondary: #9f7dff;
    --dark: #0f0f1a;
    --light: #f8f9ff;
    --accent: #ff4d7e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--light);
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Infinity Globe/Black Hole Animation */
.infinity-globe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        rgba(110, 72, 255, 0.1) 0%,
        rgba(110, 72, 255, 0.05) 20%,
        transparent 60%
    );
    z-index: 0;
    opacity: 0.6;
}

.infinity-globe::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        transparent 60%,
        rgba(110, 72, 255, 0.3) 100%
    );
    animation: pulse 8s infinite ease-in-out;
}

.infinity-globe::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    border-radius: 50%;
    border: 1px solid rgba(110, 72, 255, 0.2);
    animation: rotate 30s linear infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.9; }
}

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Particle Animation (Flooding Stars) */
#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: transparent;
}

.particles-js-canvas-el {
    width: 100%;
    height: 100%;
    opacity: 0.85;
    animation: starPulse 4s infinite alternate ease-in-out;
}

/* Fallback for particles.js failure (Flooding Stars) */
#particles-js.fallback::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.4)"/></svg>') repeat;
    animation: starFloat 25s linear infinite;
    opacity: 0.6;
}

/* Shooting Stars Effect */
#shooting-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: transparent;
}

.shooting-stars-canvas-el {
    width: 100%;
    height: 100%;
    opacity: 0.9;
}

/* Fallback for shooting stars effect */
#shooting-stars.fallback {
    position: relative;
    overflow: hidden;
}

#shooting-stars.fallback .shooting-star {
    position: absolute;
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
    transform-origin: top;
    animation: shoot 2s linear infinite;
}

#shooting-stars.fallback .shooting-star:nth-child(1) { left: 10%; animation-delay: 0s; }
#shooting-stars.fallback .shooting-star:nth-child(2) { left: 30%; animation-delay: 0.5s; }
#shooting-stars.fallback .shooting-star:nth-child(3) { left: 50%; animation-delay: 1s; }
#shooting-stars.fallback .shooting-star:nth-child(4) { left: 70%; animation-delay: 1.5s; }
#shooting-stars.fallback .shooting-star:nth-child(5) { left: 90%; animation-delay: 2s; }

@keyframes shoot {
    0% {
        transform: translateY(-100%) rotate(-45deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(-45deg);
        opacity: 0;
    }
}

@keyframes starPulse {
    0% { opacity: 0.85; transform: scale(1); }
    100% { opacity: 0.65; transform: scale(1.1); }
}

@keyframes starFloat {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

@media (max-width: 768px) {
    .particles-js-canvas-el, .shooting-stars-canvas-el {
        opacity: 0.75;
        animation: starPulse 3s infinite alternate ease-in-out;
    }

    #shooting-stars.fallback .shooting-star {
        height: 20px;
        animation-duration: 1.5s;
    }
}

/* Gradient Background Animation */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, #0f0f1a, #1a1a2e, #16213e, #0f3460);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header */
header {
    padding: 2rem 5%;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 26, 0.8);
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--light);
    text-shadow: 0 0 10px rgba(110, 72, 255, 0.5);
    display: inline-block;
    line-height: 1;
    z-index: 101;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo img {
    max-height: 50px;
    width: auto;
}

nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul.primary-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    position: relative;
    margin: 0;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary);
}

/* Sub-menu (Dropdown) Styles */
nav ul li ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(15, 15, 26, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    min-width: 200px;
    z-index: 101;
}

nav ul li:hover ul.sub-menu {
    display: block;
}

nav ul li ul.sub-menu li {
    margin-bottom: 0.5rem;
}

nav ul li ul.sub-menu li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

nav ul li ul.sub-menu li a:hover {
    color: var(--primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 102;
    margin-left: auto;
}

/* CTA Button */
.cta-button {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(110, 72, 255, 0.3);
}

/* Contact Form Button */
.contact-button {
    display: block;
    margin: 2rem auto;
    max-width: 300px;
    font-size: 1rem;
}

/* Hero Section */
.hero {
    padding: 5rem 5%;
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    position: relative;
    z-index: 3;
}

.secondary-button {
    background: transparent;
    color: var(--light);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Services Section - Flip Cards (Homepage and Services Page) */
.services {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    background: rgba(15, 15, 26, 0.8);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.6s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    position: relative;
    height: 300px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front, .service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.service-card-back {
    transform: rotateY(180deg);
    padding: 1rem;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    max-width: 90%;
    word-wrap: break-word;
}

.service-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    font-size: 0.9rem;
    max-width: 90%;
}

.service-card-back .cta-button {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

/* Features Section */
.features {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    background: rgba(15, 15, 26, 0.8);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.feature-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Pricing Section */
.pricing {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    background: rgba(15, 15, 26, 0.8);
}

.pricing-tables {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.pricing-card .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.pricing-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.pricing-card .cta-button {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
}

/* Testimonials */
.testimonials {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    margin: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.testimonial-author {
    font-weight: 600;
}

/* FAQ Section */
.faq {
    padding: 5rem 5%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    color: var(--light);
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.1);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.faq-item.active .faq-question::after {
    content: '-';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.contact-form {
    width: 50vw;
    max-width: 600px;
    margin: 2rem auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    grid-column: span 2;
}

.form-group.half {
    grid-column: span 1;
}

input, textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    position: relative;
    z-index: 2;
    background: rgba(15, 15, 26, 0.8);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Styles for Pinterest Automation Page */
.results {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    background: rgba(15, 15, 26, 0.8);
}

.graph-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.graph-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.graph-card:hover {
    transform: translateY(-5px);
}

.graph-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.bar-graph {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar {
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-left: 10px;
    transition: width 1s ease-in-out;
}

.bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: var(--primary);
    z-index: -1;
}

.before-after {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.before-after-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.before-after-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .features-grid, .pricing-tables {
        grid-template-columns: 1fr;
    }

    .contact-form {
        width: 90vw;
        max-width: 100%;
        grid-template-columns: 1fr;
    }

    .form-group.half {
        grid-column: span 2;
    }

    .infinity-globe {
        width: 400px;
        height: 400px;
    }

    .service-card {
        height: auto;
        min-height: 300px;
    }

    .service-card h3 {
        font-size: 1.2rem;
    }

    .service-card p {
        font-size: 0.85rem;
    }

    .service-card-back .cta-button {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .contact-button {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
        max-width: 90%;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .graph-container, .before-after, .pricing-tables {
        grid-template-columns: 1fr;
    }

    .pricing-card {
        min-width: 100%;
        max-width: 100%;
    }

    /* Mobile Menu */
    nav ul.primary-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 15, 26, 0.9);
        flex-direction: column;
        padding: 1rem;
        z-index: 100;
    }

    nav ul.primary-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    nav ul li ul.sub-menu {
        position: static;
        background: rgba(255, 255, 255, 0.05);
        border: none;
        padding: 0.5rem 1rem;
    }

    nav ul li:hover ul.sub-menu {
        display: none;
    }

    nav ul li ul.sub-menu.active {
        display: block;
    }
}