/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a1a2e;
    --primary-light: #16213e;
    --secondary: #0f3460;
    --accent: #e94560;
    --accent-light: #f06a7a;
    --text: #e0e0e0;
    --text-light: #a0a0a0;
    --bg: #0f0f1a;
    --card-bg: #1e1e32;
    --card-border: #2a2a44;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --radius: 12px;
    --transition: 0.3s ease;
    --glass-bg: rgba(30, 30, 50, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* Header */
header {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(26, 26, 46, 0.92);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    transition: transform var(--transition);
}

.logo:hover {
    transform: scale(1.02);
}

.logo span {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

nav ul li a {
    color: var(--text);
    font-size: 0.95rem;
    padding: 5px 0;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav ul li a:hover {
    color: #fff;
}

nav ul li a.active {
    color: #fff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: transform var(--transition);
}

.menu-toggle:hover {
    transform: rotate(90deg);
}

.dark-toggle {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: transform var(--transition);
}

.dark-toggle:hover {
    transform: rotate(20deg);
}

/* Hero Section with Gradient Banner */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 40%, #e94560 100%);
    padding: 100px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: gradientShift 8s ease infinite alternate;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(233,69,96,0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(15,52,96,0.2) 0%, transparent 50%);
    pointer-events: none;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    max-width: 700px;
    margin: 0 auto 30px;
    position: relative;
    animation: fadeInUp 0.8s ease 0.1s both;
}

/* Buttons */
.btn-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233,69,96,0.3);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(233,69,96,0.5);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
}

/* Sections */
section {
    padding: 70px 0;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }
section:nth-child(8) { animation-delay: 0.7s; }
section:nth-child(9) { animation-delay: 0.8s; }
section:nth-child(10) { animation-delay: 0.9s; }
section:nth-child(11) { animation-delay: 1s; }

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px;
    color: #fff;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-title span {
    color: var(--accent);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Cards with Glassmorphism */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    transition: left 0.5s;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 8px 30px rgba(233,69,96,0.15);
}

.card h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
    transition: transform var(--transition);
}

.card:hover .icon {
    transform: scale(1.1);
}

/* About Section */
.about-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Product Items */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.product-item {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(233,69,96,0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition);
}

.product-item:hover::before {
    opacity: 1;
}

.product-item:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(233,69,96,0.1);
}

.product-item h4 {
    color: #fff;
    margin: 15px 0 10px;
}

.product-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.product-item .icon {
    font-size: 2.5rem;
    display: block;
    transition: transform var(--transition);
}

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

/* Testimonials */
.testimonial {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-left: 4px solid var(--accent);
    padding: 25px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 20px;
    transition: all var(--transition);
    border: 1px solid var(--glass-border);
    border-left-width: 4px;
}

.testimonial:hover {
    transform: translateX(5px);
    border-left-color: var(--accent-light);
}

.testimonial p {
    font-style: italic;
    margin-bottom: 10px;
}

.testimonial .author {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid var(--card-border);
    padding: 15px 0;
    cursor: pointer;
    transition: background var(--transition);
}

.faq-item:hover {
    background: rgba(255,255,255,0.02);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #fff;
    user-select: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent);
    transition: all var(--transition);
}

.faq-item.active .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding-top: 0;
    color: var(--text-light);
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-top: 15px;
}

/* HowTo Steps */
.howto-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    transition: transform var(--transition);
}

.howto-step:hover {
    transform: translateX(5px);
}

.step-num {
    background: var(--accent);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform var(--transition);
    box-shadow: 0 4px 10px rgba(233,69,96,0.3);
}

.howto-step:hover .step-num {
    transform: scale(1.1);
}

.step-content h4 {
    color: #fff;
    margin-bottom: 5px;
}

.step-content p {
    color: var(--text-light);
}

/* Contact */
.contact-info p {
    margin-bottom: 10px;
}

.contact-info strong {
    color: #fff;
}

/* Footer */
footer {
    background: var(--primary);
    padding: 50px 0 30px;
    margin-top: 70px;
    border-top: 1px solid var(--card-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1rem;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--accent);
    margin-top: 8px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: all var(--transition);
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid var(--card-border);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.footer-bottom a {
    color: var(--text-light);
    margin-left: 15px;
    transition: color var(--transition);
}

.footer-bottom a:hover {
    color: var(--accent);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    border: none;
    z-index: 99;
    box-shadow: 0 4px 15px rgba(233,69,96,0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(233,69,96,0.5);
}

/* Dark Mode */
.dark-mode {
    --primary: #0d0d1a;
    --primary-light: #111122;
    --secondary: #0a1a3a;
    --accent: #ff6b81;
    --accent-light: #ff8a9e;
    --text: #f0f0f0;
    --text-light: #c0c0c0;
    --bg: #08080f;
    --card-bg: #14142a;
    --card-border: #1e1e3a;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
    --glass-bg: rgba(20, 20, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
}

.dark-mode header {
    background: rgba(13, 13, 26, 0.95);
}

.dark-mode .hero {
    background: linear-gradient(135deg, #0d0d1a 0%, #0a1a3a 40%, #ff6b81 100%);
}

.dark-mode .card,
.dark-mode .product-item,
.dark-mode .testimonial {
    background: var(--glass-bg);
}

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

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

/* Scroll-triggered animations using Intersection Observer */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
        gap: 15px;
        background: rgba(26, 26, 46, 0.98);
        border-radius: 0 0 var(--radius) var(--radius);
    }
    
    nav ul.open {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .btn-group {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 35px;
    }
    
    .hero {
        padding: 80px 20px 60px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        bottom: 20px;
        right: 20px;
    }
}

/* Print Styles */
@media print {
    header,
    .back-to-top,
    .menu-toggle,
    .dark-toggle {
        display: none !important;
    }
    
    body {
        background: #fff;
        color: #000;
    }
    
    .card,
    .product-item,
    .testimonial {
        background: #f5f5f5;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus Styles */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--accent);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}