/* Reset and Basic Styles */
:root {
    --primary-color: #53b96a;   /* Lively Green */
    --secondary-color: #3a824a; /* Playful Teal/Aqua */
    --accent-color: #F88379;    /* Vibrant Orange for CTAs */
    --accent-color-lighter: #f7968d;
    --accent-color-darker: #eb6c61;
    --text-color: #333;
    --light-text-color: #f8f9fa;
    --bg-color: #ffffff;
    --light-gray-bg: #f4f7f6;
    --border-radius: 12px;
    --box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    --font-heading: 'Nunito', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); color: var(--text-color); line-height: 1.7; background-color: var(--bg-color); overflow-x: hidden; }
.container { width: 90%; max-width: 1160px; margin: 0 auto; padding: 0 15px; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 800; color: var(--primary-color); margin-bottom: 0.7em; }
h1 { font-size: 3rem; line-height: 1.2; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.6rem; }
p { margin-bottom: 1.2em; color: #555; font-size: 1.05rem; }
a { text-decoration: none; color: var(--secondary-color); transition: color 0.3s ease; }
a:hover { color: var(--accent-color); }

.btn {
    display: inline-block; padding: 12px 24px;
    background-color: var(--accent-color); color: var(--light-text-color) !important; /* Important for overriding general 'a' color */
    font-family: var(--font-heading); font-weight: 700;
    border-radius: 50px; text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: none;
    cursor: pointer;
}
.btn:hover { background-color: var(--accent-color-darker); transform: translateY(-4px); box-shadow: 0 6px 15px rgba(0,0,0,0.2); }
.btn-primary { background-color: var(--primary-color); }
.btn-primary:hover { background-color: #429b56; }
.btn-secondary { background-color: var(--accent-color); } /* Kept for consistency, main .btn style handles color */
.btn-secondary:hover { background-color: var(--accent-color-darker); }
.btn-outline { background-color: transparent; color: var(--primary-color) !important; border: 2px solid var(--primary-color); }
.btn-outline:hover { background-color: var(--primary-color); color: var(--light-text-color) !important; }

/* Utility Classes */
.bg-light-gray { background-color: var(--light-gray-bg); }

.btn-explore-packs {
    margin-top: 20px;
    background-color: var(--light-text-color);
    color: var(--primary-color) !important; /* Ensure text color overrides */
}
.btn-explore-packs:hover {
    background-color: #e9e9e9;
}

.btn-large {
    font-size: 1.3rem;
    padding: 20px 45px;
}

.carousel-swipe-hint {
    text-align:center;
    margin-top: 20px;
    font-style:italic;
    color: #777;
}


/* Header & Navigation */
.main-header {
    background-color: rgba(255,255,255,0.95); backdrop-filter: blur(5px);
    padding: 15px 0; position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.main-header .container { display: flex; justify-content: space-between; align-items: center; }

.logo { font-family: var(--font-heading); font-size: 2rem; font-weight: 900; color: var(--primary-color); }
.logo img { display: flex; vertical-align: start;}
.logo span { color: var(--secondary-color); }
.main-nav ul { list-style: none; display: flex; }
.main-nav ul li { margin-left: 30px; }
.main-nav ul li a { display: inline-block; font-weight: 700; font-family: var(--font-heading); color: var(--text-color); font-size: 1rem; }
.main-nav ul li a:not(.btn):hover, /* Exclude .btn from this hover style */
.main-nav ul li a:not(.btn).active { /* Exclude .btn from this active style */
    color: var(--accent-color);
    border-bottom: 3px solid var(--accent-color);
}

.nav-toggle { display: none; cursor: pointer; background: none; border: none; }
.nav-toggle .bar { display: block; width: 28px; height: 3px; background-color: var(--primary-color); margin: 6px 0; border-radius: 2px; transition: all 0.3s ease-in-out; }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%,#3a824a 100%);
    color: var(--light-text-color); padding: 80px 0 100px;
    text-align: center; position: relative; overflow: hidden;
}
.hero > .container {
    position: relative;
    z-index: 1;
}
.hero h1 { color: var(--light-text-color); font-size: 3.8rem; font-weight: 900; margin-bottom: 0.5em; text-shadow: 2px 2px 5px rgba(0,0,0,0.2); animation: fadeInDown 1s ease-out; }
.hero p { font-size: 1.3rem; color: rgba(255,255,255,0.95); max-width: 750px; margin: 0 auto 35px auto; animation: fadeInUp 1s ease-out 0.3s; animation-fill-mode: backwards; }
.hero .btn { font-size: 1.2rem; padding: 18px 40px; margin: 10px 10px; animation: zoomIn 0.8s ease-out 0.6s; animation-fill-mode: backwards; }
.app-stores { margin-top: 20px; }
.app-stores img { height: 45px; margin: 0 10px; transition: transform 0.2s ease-in-out; }
.app-stores img:hover { transform: scale(1.05); }
.hero-visuals { margin-top: 50px; animation: popIn 1s ease-out 0.9s; animation-fill-mode: backwards; position: relative; height: 400px; }
.phone-mockup { position: absolute; bottom: 0; width: 220px; max-width: 35%; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2)); transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.phone-mockup.left { left: 15%; transform: rotate(-10deg) translateY(10px); }
.phone-mockup.center { left: 50%; transform: translateX(-50%) scale(1.15) translateY(-10px); z-index: 10; }
.phone-mockup.right { right: 15%; transform: rotate(10deg) translateY(10px); }
.hero:hover .phone-mockup.left { transform: rotate(-12deg) translateY(0px) translateX(-5px); }
.hero:hover .phone-mockup.center { transform: translateX(-50%) scale(1.18) translateY(-15px); }
.hero:hover .phone-mockup.right { transform: rotate(12deg) translateY(0px) translateX(5px); }

/* Hero Question Mark Animations */
.hero-q-animations {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
}
.hero-q-animations .q-mark {
    position: absolute;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.73);
    animation-name: floatQuestionMark;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

@keyframes floatQuestionMark {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 0.1; }
    25% { transform: translateY(-20px) rotate(15deg) scale(1.1); opacity: 0.3; }
    50% { transform: translateY(10px) rotate(-10deg) scale(0.9); opacity: 0.2; }
    75% { transform: translateY(-15px) rotate(5deg) scale(1.05); opacity: 0.3; }
    100% { transform: translateY(0) rotate(0deg) scale(1); opacity: 0.1; }
}

.hero-q-animations .q1 { font-size: 100px; top: 10%; left: 5%; animation-duration: 12s; }
.hero-q-animations .q2 { font-size: 60px; top: 60%; left: 15%; animation-duration: 10s; animation-delay: -2s; }
.hero-q-animations .q3 { font-size: 120px; top: 20%; right: 8%; animation-duration: 15s; animation-delay: -5s; }
.hero-q-animations .q4 { font-size: 70px; top: 75%; right: 20%; animation-duration: 9s; animation-delay: -3s; }
.hero-q-animations .q5 { font-size: 90px; top: 40%; left: 45%; animation-duration: 13s; animation-delay: -7s; }
.hero-q-animations .q6 { font-size: 50px; bottom: 5%; left: 30%; animation-duration: 11s; animation-delay: -1s; }
.hero-q-animations .q7 { font-size: 80px; bottom: 10%; right: 35%; animation-duration: 14s; animation-delay: -6s; }


/* Section Styling */
section { padding: 80px 0; }
section:nth-child(even) { background-color: var(--light-gray-bg); }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { position: relative; display: inline-block; padding-bottom: 15px; }
.section-title h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80px; height: 5px; background-color: var(--accent-color); border-radius: 3px; }
.section-title p.subtitle { font-size: 1.15rem; color: #666; max-width: 700px; margin: 10px auto 0 auto; }

/* Why UpTalk / Features Section */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 35px; }
.feature-card {
    background: var(--bg-color); padding: 35px 25px; border-radius: var(--border-radius);
    box-shadow: var(--box-shadow); text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover { transform: translateY(-12px); box-shadow: 0 10px 30px rgba(83, 185, 106, 0.2); }
.feature-card .icon {
    font-size: 3.5rem; color: var(--primary-color); margin-bottom: 20px; display: inline-block;
    background: var(--primary-color);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.feature-card h3 { margin-bottom: 10px; font-size: 1.4rem; }

/* Game Showcase Section */
.game-showcase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.game-card {
    background: var(--primary-color);
    color: var(--light-text-color); padding: 30px; border-radius: var(--border-radius);
    box-shadow: var(--box-shadow); text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}
.game-card:hover { transform: translateY(-10px) scale(1.03); box-shadow: 0 12px 25px rgba(0,0,0,0.2); }
.game-card .game-icon {
    width: 100px; height: 100px; border-radius: 50%; background-color: rgba(255,255,255,0.2);
    margin: 0 auto 20px auto; display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: var(--light-text-color); border: 3px solid rgba(255,255,255,0.5);
}
.game-card h3 { color: var(--light-text-color); font-size: 1.5rem; }
.game-card p { font-size: 0.95rem; color: rgba(255,255,255,0.9); }

/* Question Pack Highlight / Interactive Demo */
.question-pack-highlight {
    background-color: var(--primary-color); padding: 60px; border-radius: 20px;
    color: var(--light-text-color); display: flex; flex-wrap: wrap;
    align-items: center; gap: 40px;
}
.question-pack-highlight .text-content { flex: 1 1 50%; }
.question-pack-highlight h2 { color: var(--light-text-color); }
.question-pack-highlight p { color: rgba(255,255,255,0.9); }

.question-card-demo {
    flex: 1 1 40%; background-color: var(--bg-color); border-radius: var(--border-radius);
    padding: 30px; color: var(--text-color); box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    transform: rotate(13deg); transform-origin: center;
    transition: transform 0.4s ease;

}
.question-card-demo:hover{ transform: rotate(0deg); transform-origin: center; transition: transform 0.4s ease 0.2s;}
.question-card-demo .q-icon { font-size: 2.5rem; color: var(--accent-color); margin-bottom: 15px; }
.question-card-demo p.question-text { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; color: var(--primary-color); margin-bottom: 20px; min-height: 60px; }


/* Testimonials Section */
.testimonial-carousel-wrapper { overflow: hidden; }
.testimonial-grid { display: flex; gap: 30px; overflow-x: auto; padding: 10px 0 30px 10px; -ms-overflow-style: none; scrollbar-width: none; }
.testimonial-grid::-webkit-scrollbar { display: none; }
.testimonial-card {
    flex: 0 0 320px; background: var(--bg-color); padding: 30px 25px;
    border-radius: var(--border-radius); border-top: 6px solid var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.07); position: relative; transition: transform 0.3s ease;
}
.testimonial-card:hover { transform: translateY(-8px); }
.testimonial-card p.quote { font-style: italic; margin-bottom: 20px; color: #444; }
.testimonial-card .author { font-weight: 700; font-family: var(--font-heading); color: var(--primary-color); text-align: left; display: flex; align-items: center; }
.author img { width: 45px; height: 45px; border-radius: 50%; margin-right: 12px; object-fit: cover; border: 2px solid var(--primary-color); }


/* Call to Action Section */
.cta-section { background: var(--light-gray-bg) url('https://www.transparenttextures.com/patterns/otis-redding.png'); padding: 80px 0; text-align: center; }
.cta-section h2 { margin-bottom: 20px; font-size: 2.8rem; }
.cta-section p { color: #555; margin-bottom: 35px; max-width: 650px; margin-left: auto; margin-right: auto; font-size: 1.1rem; }
.cta-section .app-stores {
    margin-top: 25px;
}

/* Footer */
.main-footer { background-color: #2c3e50; color: var(--light-text-color); padding: 60px 0 20px 0; text-align: center; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; margin-bottom: 40px; text-align: left; }
.footer-column h4 { color: var(--light-text-color); margin-bottom: 20px; font-family: var(--font-heading); font-size: 1.2rem; border-bottom: 2px solid var(--primary-color); padding-bottom: 10px; display: inline-block; }
.footer-column > p {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}
.footer-column ul { list-style: none; }
.footer-column ul li a { color: rgba(255,255,255,0.8); font-size: 0.95rem; display: block; margin-bottom: 10px; transition: padding-left 0.3s ease, color 0.3s ease; }
.footer-column ul li a:hover { color: var(--primary-color); padding-left: 8px; }
.footer-column .social-icons {
    margin-top: 20px;
}
.social-icons a { color: var(--light-text-color); font-size: 1.6rem; margin-right: 18px; }
.social-icons a:hover { color: var(--primary-color); transform: scale(1.1); }

.footer-column .app-stores {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}
.footer-column .app-stores img {
    height: 40px;
    margin: 0;
}

.copyright { margin-top: 40px; padding-top: 25px; border-top: 1px solid rgba(255,255,255,0.2); font-size: 0.9rem; }
.copyright p {color: rgba(255, 255, 255, .47);} /* Adjusted original to not be overwritten by general p */
.fas.fa-heart { color: red; }
.fas.fa-comment-dots {color: var(--secondary-color);}

/* Animations */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-25px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.5); } 70% { opacity: 1; transform: scale(1.05); } 100% { transform: scale(1); } }

/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1.15rem; }
    .features-grid, .game-showcase-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .phone-mockup { width: 180px; }
    .phone-mockup.left { left: 5%; }
    .phone-mockup.right { right: 5%; }
    .question-pack-highlight { flex-direction: column; text-align: center; }
    .question-card-demo { transform: rotate(0deg); margin-top: 20px; }
    .hero-q-animations .q1 { font-size: 80px; }
    .hero-q-animations .q3 { font-size: 100px; }
}

@media (max-width: 768px) {
    .main-header .container { position: relative; }
    .main-nav { position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--bg-color); box-shadow: 0 5px 10px rgba(0,0,0,0.1); flex-direction: column; align-items: center; max-height: 0; overflow: hidden; transition: max-height 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); }
    .main-nav.active { max-height: 350px; padding: 10px 0; }
    .main-nav ul { flex-direction: column; width: 100%; }
    .main-nav ul li { margin: 12px 0; text-align: center; }
    .main-nav ul li a { width: 100%; display: block; }
    .nav-toggle { display: block; }
    .hero { padding: 60px 0 80px; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .hero .btn { margin-bottom: 15px; display: block; width: 80%; margin-left: auto; margin-right: auto;}
    .hero-visuals { height: 300px; margin-top: 30px;}
    .phone-mockup { width: 130px; }
    .phone-mockup.center { transform: translateX(-50%) scale(1.1) translateY(-5px); }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-column h4 { display: block; }
    .footer-column > p { text-align: center; }
    .footer-column .social-icons { text-align: center; }
    .footer-column .app-stores { align-items: center; }
    .testimonial-grid { gap: 20px; }
    .testimonial-card { flex: 0 0 280px; }
    .hero-q-animations .q1 { font-size: 60px; }
    .hero-q-animations .q2 { font-size: 40px; }
    .hero-q-animations .q3 { font-size: 70px; top: 15%; right: 5%;}
    .hero-q-animations .q4 { font-size: 50px; top: 70%; right: 10%;}
    .hero-q-animations .q5, .hero-q-animations .q6, .hero-q-animations .q7 { display: none; }
}

@media (max-width: 480px) {
    h1 { font-size: 2.4rem; }
    h2 { font-size: 2rem; }
    .hero h1 { font-size: 2.2rem; }
    .container { width: 95%; }
    .btn { padding: 12px 25px; font-size: 1rem; }
    .btn-large { font-size: 1.1rem; padding: 15px 30px; }
    .hero .btn { font-size: 1.1rem; padding: 15px 30px;}
    .feature-card, .game-card, .testimonial-card { padding: 25px 20px; }
    .question-pack-highlight { padding: 40px 20px; }
    .hero-visuals { display: none; }
    .app-stores img { height: 40px; }
    .footer-column .app-stores img { height: 36px; }
    .hero-q-animations .q1 { font-size: 50px; top: 5%; left: 2%; }
    .hero-q-animations .q3 { font-size: 60px; top: 10%; right: 2%; }
    .hero-q-animations .q2, .hero-q-animations .q4 { display: none; }
}
/* Styles for Content Pages (FAQ, Terms, Privacy, Contact) */
.page-content {
    padding: 60px 0; /* Reduced padding compared to main sections */
}

.page-content h1 {
    margin-bottom: 40px; /* More space after main title */
}

.page-content .content-wrapper {
    background-color: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.page-content .content-wrapper h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}
.page-content .content-wrapper h2:first-child {
    margin-top: 0;
}

.page-content .content-wrapper p,
.page-content .content-wrapper ul li {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

.page-content .content-wrapper ul {
    list-style-position: inside;
    padding-left: 20px;
    margin-bottom: 1.2em;
}
.page-content .content-wrapper ul li {
    margin-bottom: 0.5em;
}

/* FAQ Accordion Styles */
.faq-item {
    background-color: var(--light-gray-bg);
    margin-bottom: 15px;
    border-radius: var(--border-radius_half, 8px); /* Use existing or define new */
    border: 1px solid #e0e0e0;
}
.faq-item summary {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--secondary-color);
    list-style: none; /* Remove default marker */
}
.faq-item summary::-webkit-details-marker { display: none; } /* Chrome/Safari */
.faq-item summary::after {
    content: '\f078'; /* Font Awesome down arrow */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform 0.3s ease;
}
.faq-item[open] summary::after {
    transform: rotate(180deg);
}
.faq-item .faq-answer {
    padding: 0 20px 20px 20px;
    color: #555;
    line-height: 1.7;
}
.faq-item .faq-answer p:last-child {
    margin-bottom: 0;
}


/* Contact Form Styles */
.contact-form {
    margin-top: 30px;
}
.contact-form .form-group {
    margin-bottom: 20px;
}
.contact-form label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary-color);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius_half, 8px);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(83, 185, 106, 0.2);
}
.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}
.contact-form .btn {
    background-color: var(--primary-color);
    color: var(--light-text-color) !important;
    padding: 12px 30px;
    font-size: 1.1rem;
}
.contact-form .btn:hover {
    background-color: var(--secondary-color);
}

.contact-details {
    margin-top: 40px;
}
.contact-details p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.contact-details p i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px; /* Ensure alignment */
    text-align: center;
}

/* Breadcrumbs (Optional, but good for subpages) */
.breadcrumbs {
    padding: 15px 0;
    background-color: var(--light-gray-bg);
    font-size: 0.9rem;
    margin-bottom: 30px;
}
.breadcrumbs .container a {
    color: var(--primary-color);
}
.breadcrumbs .container a:hover {
    text-decoration: underline;
}
.breadcrumbs .container span {
    color: #777;
}