/* ===== BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { overflow-x: hidden; }
::selection { background: rgba(37, 112, 244, 0.2); color: #062468; }

/* ===== NAVIGATION ===== */
#header.scrolled {
    background: rgba(3, 20, 66, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.3s;
    text-decoration: none;
}

.nav-link:hover, .nav-link.active {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, #4A8BF6, #2570F4);
    border-radius: 2px;
    transition: transform 0.3s;
}

.nav-link:hover::after, .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.mobile-nav-link {
    display: block;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s;
    text-decoration: none;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
    color: #fff;
    background: rgba(37, 112, 244, 0.15);
    padding-left: 2rem;
}

/* ===== CAROUSEL ===== */
.carousel-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out, transform 6s ease-out;
    transform: scale(1.05);
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
}

#carousel-dots button {
    width: 10px;
    height: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.4s;
}

#carousel-dots button.active {
    width: 32px;
    background: #fff;
}

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

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

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

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

/* Scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ===== IDEA CARDS ===== */
.idea-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.idea-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 112, 244, 0.03), rgba(107, 82, 244, 0.03));
    opacity: 0;
    transition: opacity 0.4s;
}

.idea-card:hover {
    border-color: transparent;
    box-shadow: 0 20px 60px rgba(37, 112, 244, 0.12), 0 8px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-8px);
}

.idea-card:hover::before {
    opacity: 1;
}

.idea-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.idea-card-letter {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
    opacity: 0.12;
    position: absolute;
    right: 1.5rem;
    top: 1rem;
}

/* ===== TIMELINE ===== */
.timeline-item {
    position: relative;
    padding-left: 3.5rem;
}

@media (min-width: 768px) {
    .timeline-item { padding-left: 4.5rem; }
}

.timeline-dot {
    position: absolute;
    left: 1.25rem;
    top: 0.25rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A8BF6, #2570F4);
    box-shadow: 0 0 0 4px rgba(37, 112, 244, 0.15);
    z-index: 1;
}

@media (min-width: 768px) {
    .timeline-dot { left: 1.75rem; }
}

.timeline-content {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    transition: all 0.3s;
}

.timeline-content:hover {
    border-color: #9EBEFA;
    box-shadow: 0 4px 20px rgba(37, 112, 244, 0.08);
}

.timeline-year {
    display: inline-block;
    background: linear-gradient(135deg, #2570F4, #1247B5);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
}

/* ===== PROVINCE FILTER ===== */
.province-filter {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s;
}

.province-filter:hover {
    color: #2570F4;
    border-color: #9EBEFA;
}

.province-filter.active {
    color: #fff;
    background: linear-gradient(135deg, #2570F4, #1A5BDB);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 112, 244, 0.3);
}

/* ===== STORE CARDS ===== */
.store-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    transition: all 0.3s;
}

.store-card:hover {
    border-color: #C5D9FC;
    box-shadow: 0 8px 30px rgba(37, 112, 244, 0.08);
    transform: translateY(-2px);
}

.store-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.store-card-info {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.store-card-info svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #4A8BF6;
}

/* ===== PAGINATION ===== */
.pagination-btn {
    min-width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0 0.5rem;
}

.pagination-btn:hover {
    color: #2570F4;
    border-color: #9EBEFA;
}

.pagination-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #2570F4, #1A5BDB);
    border-color: transparent;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== CONTACT OVERLAY LABEL ===== */
.overlay-label {
    position: relative;
    margin-top: -1.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    padding: 1rem 0.25rem 0.35rem;
    pointer-events: none;
}

/* ===== BACK TO TOP ===== */
#back-to-top.visible {
    transform: translateY(0);
    opacity: 1;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .carousel-slide {
        transform: scale(1.02);
    }
    .carousel-slide.active {
        transform: scale(1);
    }
}

/* ===== STAGGER ANIMATIONS ===== */
.idea-card:nth-child(1) { transition-delay: 0.1s; }
.idea-card:nth-child(2) { transition-delay: 0.2s; }
.idea-card:nth-child(3) { transition-delay: 0.3s; }
.idea-card:nth-child(4) { transition-delay: 0.4s; }

.timeline-item:nth-child(1) { transition-delay: 0.05s; }
.timeline-item:nth-child(2) { transition-delay: 0.1s; }
.timeline-item:nth-child(3) { transition-delay: 0.15s; }
.timeline-item:nth-child(4) { transition-delay: 0.2s; }
.timeline-item:nth-child(5) { transition-delay: 0.25s; }
.timeline-item:nth-child(6) { transition-delay: 0.3s; }
.timeline-item:nth-child(7) { transition-delay: 0.35s; }
.timeline-item:nth-child(8) { transition-delay: 0.4s; }
.timeline-item:nth-child(9) { transition-delay: 0.45s; }
.timeline-item:nth-child(10) { transition-delay: 0.5s; }
.timeline-item:nth-child(11) { transition-delay: 0.55s; }

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s cubic-bezier(0.4, 0, 0.2, 1), backdrop-filter 0.4s;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

.lightbox-overlay.active .lightbox-close {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    transition-delay: 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(0deg);
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.7) translateY(40px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.lightbox-zoomable {
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lightbox-zoomable:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* ===== WELCOME MODAL ===== */
.welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.welcome-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(3, 20, 66, 0.15);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.welcome-card {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    background: linear-gradient(180deg, rgba(240,244,255,0.85) 0%, rgba(230,238,255,0.9) 100%);
    border: 1px solid rgba(74, 139, 246, 0.15);
    border-radius: 1.25rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
    transform: scale(0.85) translateY(30px);
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.welcome-overlay.active .welcome-card {
    transform: scale(1) translateY(0);
}

.welcome-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.welcome-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.welcome-scroll {
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 139, 246, 0.2) transparent;
}

.welcome-scroll::-webkit-scrollbar { width: 4px; }
.welcome-scroll::-webkit-scrollbar-track { background: transparent; }
.welcome-scroll::-webkit-scrollbar-thumb { background: rgba(74, 139, 246, 0.2); border-radius: 4px; }

.welcome-header {
    text-align: center;
    padding: 2.5rem 2rem 1.5rem;
    position: relative;
}

.welcome-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 139, 246, 0.2), transparent);
}

.welcome-badge {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(37, 112, 244, 0.1);
    border: 1px solid rgba(74, 139, 246, 0.2);
    border-radius: 999px;
    color: #2570F4;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.welcome-title {
    color: #0f172a;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.welcome-subtitle {
    color: rgba(15, 23, 42, 0.5);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}

.welcome-body {
    padding: 1.5rem 2rem;
}

.welcome-intro {
    color: rgba(15, 23, 42, 0.6);
    font-size: 0.9rem;
    line-height: 1.7;
    text-align: center;
    margin-bottom: 1.5rem;
}

.welcome-pillars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.pillar-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s;
}

.pillar-card:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(74, 139, 246, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 112, 244, 0.08);
}

.pillar-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.pillar-letter {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    flex-shrink: 0;
    width: 2rem;
    text-align: center;
}

.pillar-i .pillar-letter { color: #60a5fa; }
.pillar-d .pillar-letter { color: #22d3ee; }
.pillar-e .pillar-letter { color: #818cf8; }
.pillar-a .pillar-letter { color: #a78bfa; }

.pillar-name {
    color: #0f172a;
    font-size: 0.85rem;
    font-weight: 600;
}

.pillar-cn {
    color: rgba(15, 23, 42, 0.45);
    font-weight: 400;
    font-size: 0.75rem;
}

.pillar-card p {
    color: rgba(15, 23, 42, 0.55);
    font-size: 0.78rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.pillar-tag {
    color: #2570F4;
    font-size: 0.68rem;
    font-weight: 500;
}

.welcome-promise {
    text-align: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, rgba(37, 112, 244, 0.06), rgba(107, 82, 244, 0.04));
    border: 1px solid rgba(74, 139, 246, 0.12);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.welcome-promise p {
    color: rgba(15, 23, 42, 0.65);
    font-size: 0.88rem;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.welcome-promise p:last-child { margin-bottom: 0; }

.welcome-promise strong {
    color: #0f172a;
}

.welcome-cta-text {
    color: rgba(15, 23, 42, 0.8) !important;
    font-weight: 500;
}

.welcome-enter {
    display: block;
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #2570F4, #1A5BDB);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 30px rgba(37, 112, 244, 0.3);
    margin-bottom: 0;
}

.welcome-enter:hover {
    background: linear-gradient(135deg, #4A8BF6, #2570F4);
    box-shadow: 0 12px 40px rgba(37, 112, 244, 0.4);
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .welcome-pillars { grid-template-columns: 1fr; }
    .welcome-title { font-size: 1.4rem; }
    .welcome-body { padding: 1.25rem 1.25rem; }
    .welcome-header { padding: 2rem 1.25rem 1.25rem; }
}
