/* ============================================
   WebĐẹpNhanh - Premium 3D Landing Page CSS
   ============================================ */

:root {
    /* Colors */
    --primary: #3B82F6;
    --primary-dark: #1D4ED8;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --accent-green: #10B981;
    --accent-amber: #F59E0B;
    --accent-purple: #8B5CF6;

    --bg-dark: #050A18;
    --bg-card: rgba(15, 23, 42, 0.6);
    --bg-card-hover: rgba(20, 30, 55, 0.8);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-white: #F1F5F9;
    --text-muted: #94A3B8;
    --text-dim: #64748B;

    /* Spacing & Sizing */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;
    --transition: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Background effects */
.bg-grid {
    position: fixed; inset: 0; z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}
.glow-1 { top: -15%; left: -10%; width: 600px; height: 600px; background: rgba(59,130,246,0.3); animation: drift1 25s ease-in-out infinite; }
.glow-2 { bottom: 10%; right: -5%; width: 500px; height: 500px; background: rgba(16,185,129,0.25); animation: drift2 30s ease-in-out infinite; }
.glow-3 { top: 50%; left: 40%; width: 400px; height: 400px; background: rgba(139,92,246,0.2); animation: drift3 20s ease-in-out infinite; }

@keyframes drift1 { 0%,100%{ transform: translate(0,0); } 50%{ transform: translate(60px,40px); } }
@keyframes drift2 { 0%,100%{ transform: translate(0,0); } 50%{ transform: translate(-50px,-30px); } }
@keyframes drift3 { 0%,100%{ transform: translate(0,0); } 50%{ transform: translate(40px,-60px); } }

/* Container */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* Section */
.section { padding: 100px 0; position: relative; }
.section-dark::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(59,130,246,0.03) 50%, transparent 100%);
    pointer-events: none;
}

.section-header { text-align: center; margin-bottom: 64px; }
.section-badge {
    display: inline-block;
    font-size: 0.75rem; font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 16px;
}
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: white; line-height: 1.2; margin-bottom: 16px; }
.section-subtitle { font-size: 1.125rem; color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #60A5FA, #34D399, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 28px;
    border-radius: var(--radius-full);
    font-weight: 600; font-size: 0.95rem;
    border: none; cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 0 24px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px var(--primary-glow); }

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.15);
}
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.3); }

.btn-glow {
    background: linear-gradient(135deg, var(--primary), #6366F1);
    color: white;
    box-shadow: 0 0 20px rgba(59,130,246,0.3), 0 0 60px rgba(59,130,246,0.1);
    animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow {
    0%,100% { box-shadow: 0 0 20px rgba(59,130,246,0.3), 0 0 60px rgba(59,130,246,0.1); }
    50% { box-shadow: 0 0 30px rgba(59,130,246,0.5), 0 0 80px rgba(59,130,246,0.2); }
}
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* Logo */
.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.35rem; font-weight: 800;
    letter-spacing: -0.5px;
}
.logo em { font-style: normal; }
.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), #6366F1);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1rem; color: white;
}

/* ======= NAVBAR ======= */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}
.navbar.scrolled {
    padding: 12px 0;
    background: rgba(5,10,24,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.nav-links { display: flex; gap: 36px; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; transition: var(--transition); }
.nav-links a:hover { color: white; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.hamburger {
    display: none; background: none; border: none; cursor: pointer;
    width: 28px; height: 20px; position: relative; flex-direction: column; justify-content: space-between;
}
.hamburger span {
    display: block; width: 100%; height: 2px; background: white; border-radius: 2px;
    transition: var(--transition);
}

/* ======= HERO ======= */
.hero { padding: 160px 0 100px; min-height: 100vh; display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.hero-text { position: relative; z-index: 2; }
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.15);
    font-size: 0.75rem; font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 28px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%,100%{ opacity:1; } 50%{ opacity:0.3; } }

.hero-title { font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 900; line-height: 1.15; margin-bottom: 24px; letter-spacing: -1px; }
.hero-desc { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 40px; max-width: 520px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 48px; }

.hero-stats { display: flex; gap: 32px; align-items: center; }
.stat-num { display: block; font-size: 1.75rem; font-weight: 800; color: white; }
.stat-label { font-size: 0.8rem; color: var(--text-dim); }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Hero 3D visual */
.hero-visual { perspective: 1000px; display: flex; justify-content: center; align-items: center; }
.hero-card-3d { position: relative; width: 100%; max-width: 420px; height: 420px; }

/* Floating cards */
.floating-card {
    position: absolute;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 20px;
    background: rgba(15,23,42,0.8);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.9rem; color: white;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 3;
    animation: float-card 6s ease-in-out infinite;
}
.fc-1 { top: 10%; left: -10%; animation-delay: 0s; }
.fc-2 { top: 50%; right: -5%; animation-delay: -2s; }
.fc-3 { bottom: 5%; left: 5%; animation-delay: -4s; }
@keyframes float-card { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-12px); } }

/* 3D Cube */
.hero-3d-cube {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    perspective: 600px;
}
.cube {
    width: 140px; height: 140px;
    position: relative;
    transform-style: preserve-3d;
    animation: spin-cube 20s linear infinite;
}
.face {
    position: absolute;
    width: 140px; height: 140px;
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 16px;
}
.front  { background: rgba(59,130,246,0.06); transform: translateZ(70px); }
.back   { background: rgba(16,185,129,0.06); transform: rotateY(180deg) translateZ(70px); }
.right  { background: rgba(139,92,246,0.06); transform: rotateY(90deg) translateZ(70px); }
.left   { background: rgba(245,158,11,0.06); transform: rotateY(-90deg) translateZ(70px); }
.top    { background: rgba(59,130,246,0.04); transform: rotateX(90deg) translateZ(70px); }
.bottom { background: rgba(16,185,129,0.04); transform: rotateX(-90deg) translateZ(70px); }

@keyframes spin-cube {
    0%   { transform: rotateX(0) rotateY(0); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* ======= 3D CARD SYSTEM ======= */
.card-3d {
    perspective: 800px;
    cursor: default;
}
.card-3d-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    transform-style: preserve-3d;
    will-change: transform;
}
.card-3d:hover .card-3d-inner {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 30px rgba(59,130,246,0.1);
}

/* ======= SERVICE CARDS ======= */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; color: white; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; }
.service-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
}
.si-blue   { background: rgba(59,130,246,0.1); color: var(--primary); border: 1px solid rgba(59,130,246,0.15); }
.si-green  { background: rgba(16,185,129,0.1); color: var(--accent-green); border: 1px solid rgba(16,185,129,0.15); }
.si-purple { background: rgba(139,92,246,0.1); color: var(--accent-purple); border: 1px solid rgba(139,92,246,0.15); }

/* ======= PRODUCT CARDS ======= */
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.product-card { display: block; }
.product-card .card-3d-inner { padding: 40px; }
.product-glow {
    position: absolute; top: -60px; right: -60px;
    width: 200px; height: 200px; border-radius: 50%;
    filter: blur(80px); opacity: 0.15;
    transition: var(--transition);
}
.p-glow-green { background: var(--accent-green); }
.p-glow-amber { background: var(--accent-amber); }
.product-card:hover .product-glow { opacity: 0.3; }

.product-badge {
    display: inline-block;
    padding: 6px 14px; border-radius: var(--radius-full);
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px;
    margin-bottom: 20px;
}
.pb-green { background: rgba(16,185,129,0.12); color: var(--accent-green); border: 1px solid rgba(16,185,129,0.2); }
.pb-amber { background: rgba(245,158,11,0.12); color: var(--accent-amber); border: 1px solid rgba(245,158,11,0.2); }

.product-icon-wrap {
    width: 64px; height: 64px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
}
.pi-green { background: rgba(16,185,129,0.1); color: var(--accent-green); border: 1px solid rgba(16,185,129,0.15); }
.pi-amber { background: rgba(245,158,11,0.1); color: var(--accent-amber); border: 1px solid rgba(245,158,11,0.15); }

.product-card h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 10px; color: white; }
.product-tagline { color: var(--text-muted); margin-bottom: 24px; font-size: 0.95rem; min-height: 44px; }

.feature-chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 32px;
}
.feature-chips li {
    padding: 6px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8rem; font-weight: 500; color: var(--text-muted);
}

.card-cta {
    display: flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: 0.95rem;
    color: var(--primary);
    transition: var(--transition);
}
.product-card:hover .card-cta { gap: 14px; color: #60A5FA; }

/* ======= CTA ======= */
.cta-section { padding-bottom: 120px; }
.cta-card { max-width: 800px; margin: 0 auto; text-align: center; }
.cta-card .card-3d-inner { padding: 64px 48px; }
.cta-glow {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(59,130,246,0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* ======= FOOTER ======= */
.footer { border-top: 1px solid var(--border); padding: 64px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: var(--text-muted); margin-top: 16px; font-size: 0.9rem; max-width: 280px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { font-size: 1rem; font-weight: 700; color: white; margin-bottom: 8px; }
.footer-col a, .footer-col p { color: var(--text-muted); font-size: 0.9rem; transition: var(--transition); }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; color: var(--text-dim); font-size: 0.85rem; }

/* ======= ANIMATIONS ======= */
.anim-fade-in { opacity: 0; animation: fadeIn 0.9s ease forwards; }
.d1 { animation-delay: 0.1s; } .d2 { animation-delay: 0.25s; } .d3 { animation-delay: 0.4s; } .d4 { animation-delay: 0.55s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.slide-up { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.slide-up.visible { opacity: 1; transform: translateY(0); }
.slide-up.d1 { transition-delay: 0.1s; } .slide-up.d2 { transition-delay: 0.25s; } .slide-up.d3 { transition-delay: 0.4s; }

/* ======= PRODUCT DETAIL PAGE STYLES ======= */
.page-header {
    padding: 140px 0 60px;
    position: relative;
}
.breadcrumb { display: flex; gap: 8px; align-items: center; margin-bottom: 32px; font-size: 0.9rem; color: var(--text-dim); }
.breadcrumb a { color: var(--text-muted); transition: var(--transition); }
.breadcrumb a:hover { color: white; }
.breadcrumb svg { width: 16px; height: 16px; }

.product-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.product-hero-visual {
    perspective: 1000px;
    display: flex; justify-content: center; align-items: center;
    min-height: 400px;
}

.product-detail-icon {
    width: 140px; height: 140px;
    border-radius: 32px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    transform-style: preserve-3d;
    animation: icon-float 6s ease-in-out infinite;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
@keyframes icon-float { 0%,100%{ transform: translateY(0) rotateX(0) rotateY(0); } 50%{ transform: translateY(-15px) rotateX(5deg) rotateY(5deg); } }

.product-detail-icon.pdi-green { background: linear-gradient(135deg, #065F46, #10B981); border: 1px solid rgba(16,185,129,0.3); }
.product-detail-icon.pdi-amber { background: linear-gradient(135deg, #92400E, #F59E0B); border: 1px solid rgba(245,158,11,0.3); }

.product-meta { margin-top: 24px; }
.product-meta h1 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); font-weight: 900; line-height: 1.2; margin-bottom: 16px; }
.product-meta .tagline { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 32px; }

.price-tag {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 24px;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
}
.price-tag .price-label { font-size: 0.85rem; color: var(--text-muted); }
.price-tag .price-value { font-size: 1.3rem; font-weight: 800; color: white; }

.detail-section { padding: 80px 0; }
.detail-section h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 32px; color: white; }

.features-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.feature-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
}
.feature-detail-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.feature-detail-card h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: white; }
.feature-detail-card p { color: var(--text-muted); font-size: 0.9rem; }
.feature-detail-card .fd-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}

.ideal-for {
    display: flex; flex-wrap: wrap; gap: 12px;
    margin-top: 24px;
}
.ideal-for span {
    padding: 10px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9rem; color: var(--text-muted);
}

.how-it-works {
    counter-reset: steps;
}
.step-card {
    display: flex; gap: 24px; align-items: flex-start;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    transition: var(--transition);
}
.step-card:hover { border-color: var(--border-hover); }
.step-num {
    counter-increment: steps;
    flex-shrink: 0;
    width: 44px; height: 44px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.1rem; color: var(--primary);
}
.step-card h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: white; }
.step-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ======= VIDEO & GALLERY ======= */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 12px 48px rgba(0,0,0,0.3);
}
.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.video-thumbnail {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.video-thumbnail img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.video-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0.85;
    transition: var(--transition);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
.video-thumbnail:hover .video-play-btn { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.gallery-item { overflow: hidden; }
.gallery-inner {
    padding: 0 !important;
    overflow: hidden;
}
.gallery-inner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}
.gallery-item:hover .gallery-inner img {
    transform: scale(1.03);
}

/* ======= RESPONSIVE ======= */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .product-hero-grid { grid-template-columns: 1fr; }
    .product-hero-visual { min-height: 250px; }
    .features-detail-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .section { padding: 72px 0; }
    .hero { padding: 130px 0 60px; min-height: auto; }
    .services-grid, .products-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .stat-divider { width: 40px; height: 1px; }

    .nav-links {
        position: fixed; top: 0; right: -100%;
        width: 280px; height: 100vh;
        background: rgba(5,10,24,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 80px 32px;
        gap: 24px;
        transition: var(--transition);
        z-index: 999;
    }
    .nav-links.open { right: 0; }
    .hamburger { display: flex; z-index: 1001; }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }
    .btn-text { display: none; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .cta-card .card-3d-inner { padding: 40px 24px; }
}
