/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --gradient-1: #667eea;
    --gradient-2: #764ba2;
    --hamburger-offset: 6px;
}

/* Dark mode color palette */
body.dark-mode {
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --secondary-color: #22d3ee;
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --bg-light: #111827;
    --bg-white: #1f2937;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --gradient-1: #4c1d95;
    --gradient-2: #5b21b6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 10000;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Header & Navigation */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
    backdrop-filter: blur(10px);
}

.navbar {
    padding: 1rem 0;
}

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

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    transition: color 0.3s ease;
}

.nav-brand a {
    text-decoration: none;
    color: inherit;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    padding: 0.5rem;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-menu a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 30px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(var(--hamburger-offset), var(--hamburger-offset));
}

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

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(var(--hamburger-offset), calc(-1 * var(--hamburger-offset)));
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.theme-toggle:hover,
.theme-toggle:focus {
    transform: scale(1.1);
    border-color: var(--primary-color);
    outline: none;
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    position: absolute;
    transition: all 0.3s ease;
}

.sun-icon {
    color: var(--text-primary);
}

.moon-icon {
    color: var(--text-primary);
}

body:not(.dark-mode) .moon-icon {
    opacity: 0;
    transform: rotate(180deg);
}

body.dark-mode .sun-icon {
    opacity: 0;
    transform: rotate(-180deg);
}

body:not(.dark-mode) .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

body.dark-mode .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--gradient-1) 0%, var(--gradient-2) 100%);
    color: white;
    padding: 8rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
    animation: slideInDown 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: slideInUp 0.8s ease-out 0.2s backwards;
}

.cta-button {
    display: inline-block;
    background-color: var(--bg-white);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 1s ease-out 0.4s backwards;
}

body:not(.dark-mode) .cta-button {
    color: var(--gradient-1);
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

/* Hero Particles */
.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    left: 10%;
    top: 20%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 80%;
    top: 40%;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    left: 30%;
    top: 60%;
    animation-delay: 2s;
}

.particle:nth-child(4) {
    left: 70%;
    top: 70%;
    animation-delay: 3s;
}

.particle:nth-child(5) {
    left: 50%;
    top: 30%;
    animation-delay: 4s;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 700;
    transition: color 0.3s ease;
}

/* Products Section */
.products {
    padding: 6rem 0;
    background-color: var(--bg-light);
    transition: background-color 0.3s ease;
}

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

.product-card {
    background-color: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.product-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.product-card:hover .product-icon {
    transform: rotate(5deg) scale(1.1);
}

.product-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.product-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    transition: color 0.3s ease;
}

.product-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.product-link:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: var(--bg-white);
    transition: background-color 0.3s ease;
}

.about-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.about-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    transition: color 0.3s ease;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.feature h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.feature p {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background-color: var(--bg-light);
    transition: background-color 0.3s ease;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-style: normal;
}

.contact-item {
    font-size: 1.125rem;
}

.contact-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 0.5rem;
    transition: color 0.3s ease;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.contact-item a:hover,
.contact-item a:focus {
    color: var(--primary-dark);
    transform: scale(1.05);
}

/* Footer */
.footer {
    background-color: var(--text-primary);
    color: white;
    padding: 1rem 0;
    text-align: center;
}

body.dark-mode .footer {
    background-color: #0f172a;
}

.footer .container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-bottom {
    padding: 0;
    border-top: none;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin: 0;
}

.footer-bottom a:hover {
    color: white;
    text-decoration: underline;
}

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

/* Improve focus visibility */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(-10px) translateX(-10px);
    }
    75% {
        transform: translateY(-25px) translateX(5px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Utility animation classes */
.fade-in {
    animation: fadeIn 1s ease-out;
}

.fade-in-up {
    opacity: 0;
    animation: slideInUp 0.8s ease-out forwards;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.bounce {
    animation: bounce 2s ease-in-out infinite;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hide nav menu by default on mobile */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--bg-white);
        box-shadow: var(--shadow-lg);
        padding: 1.5rem;
        gap: 0.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-top: 1px solid var(--border-color);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    /* Show nav menu when active */
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
    }
    
    .nav-menu a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        font-size: 1.125rem;
    }
    
    .nav-menu a:hover,
    .nav-menu a:focus {
        background-color: var(--bg-light);
        transform: none;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .section-title {
        font-size: 2rem;
    }

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

    .hero {
        padding: 4rem 0;
    }

    .products,
    .about,
    .contact {
        padding: 3rem 0;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    /* Improve touch targets */
    .cta-button {
        padding: 1.25rem 2.5rem;
        font-size: 1.125rem;
    }
    
    .product-card {
        padding: 2rem;
    }
    
    /* Improve readability */
    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        gap: 0.5rem;
    }
    
    .nav-brand h1 {
        font-size: 1.25rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Tablet improvements */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-menu {
        gap: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Improve tap targets for touch devices */
@media (hover: none) and (pointer: coarse) {
    .nav-menu a,
    .product-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ==========================================
   FAQs Section Styles
   ========================================== */

.faqs {
    padding: 6rem 0;
    background-color: var(--bg-light);
    transition: background-color 0.3s ease;
}

.faqs-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    transition: color 0.3s ease;
}

.faqs-grid {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background-color: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: var(--bg-light);
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    padding-right: 1rem;
    transition: color 0.3s ease;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    transition: color 0.3s ease;
}

.faq-answer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.faq-answer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==========================================
   Responsive Footer
   ========================================== */

@media (max-width: 768px) {
    .footer {
        padding: 1rem 0;
    }

.legal-page {
    padding: 4rem 0;
    background-color: var(--bg-white);
    min-height: calc(100vh - 200px);
    transition: background-color 0.3s ease;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.last-updated {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.3s ease;
}

.legal-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
    transition: color 0.3s ease;
}

.legal-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.legal-section ul {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    transition: color 0.3s ease;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

.legal-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-section a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-details {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-style: normal;
    transition: background-color 0.3s ease;
}

.contact-details p {
    margin-bottom: 0.5rem;
}

.contact-details p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   Responsive Footer
   ========================================== */

@media (max-width: 768px) {
    .footer {
        padding: 1rem 0;
    }

    .faqs {
        padding: 3rem 0;
    }

    .faq-question {
        padding: 1rem 1.25rem;
    }

    .faq-question h3 {
        font-size: 1rem;
    }

    .faq-item.active .faq-answer {
        padding: 0 1.25rem 1.25rem;
    }

    .legal-header h1 {
        font-size: 2rem;
    }

    .legal-section h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .faq-question h3 {
        font-size: 0.95rem;
    }

    .legal-header h1 {
        font-size: 1.75rem;
    }
}
