/* ============================================
   Bugy Studios — Components
   Dark Luxe Theme
   ============================================ */

/* ============================================
   Top Bar
   ============================================ */
.top-bar {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    padding: 8px 0;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar a {
    color: var(--color-text-secondary);
    transition: var(--transition);
}

.top-bar a:hover {
    color: var(--color-text);
}

.theme-toggle {
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    color: var(--color-text-secondary);
}
.theme-toggle:hover {
    color: var(--color-text);
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    width: 100%;
    z-index: 100;
    background: var(--color-bg-secondary);
    transition: var(--transition);
    position: sticky;
    top: 0;
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

/* ============================================
   Discount Ribbon
   ============================================ */
.discount-ribbon {
    background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 0;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
}

.nav-container {
    height: 100%;
    padding: 0 30px;
}



.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo img {
    height: 36px;
    width: auto;
}

/* Theme Logo Toggling */
.nav-logo .logo-light {
    display: block; /* Default is light mode */
}
.nav-logo .logo-dark {
    display: none;
}

html[data-theme="dark"] .nav-logo .logo-light {
    display: none;
}
html[data-theme="dark"] .nav-logo .logo-dark {
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    position: relative;
    padding: 24px 0;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-secondary); /* Gold/amber line */
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--color-secondary);
}

/* Dropdown / Mega Menu */
.nav-item-dropdown {
    position: relative;
    display: inline-block;
}

/* Invisible bridge so hover doesn't break when moving mouse to the lowered menu */
.nav-item-dropdown::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    height: 30px;
}

.mega-menu {
    position: absolute;
    top: calc(100% + 24px); /* Pushed down further */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 24px; /* Soft bubble corners */
    box-shadow: var(--shadow-card);
    width: 850px; /* Wider for more breathing room */
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: visible; /* Needed for the bubble arrow */
}

/* Chat Bubble Triangle */
.mega-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent var(--color-border) transparent;
}
.mega-menu::after {
    content: '';
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent var(--color-bg-secondary) transparent;
}

.nav-item-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px); /* Smooth drop down */
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: var(--color-bg-secondary);
    border-radius: 24px 24px 0 0; /* Match bubble corners */
    overflow: hidden;
}

.mega-menu-column {
    padding: 40px; /* Increased padding */
    border-right: 1px solid var(--color-border);
}

.mega-menu-column:last-child {
    border-right: none;
    /* Removed background so it matches the other columns perfectly */
}

.mega-menu-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    margin: 0 0 24px 0; /* More spacing below title */
    font-weight: 600;
}

.mega-menu-list {
    display: flex;
    flex-direction: column;
    gap: 16px; /* Increased gap */
}

.mega-item {
    display: flex;
    align-items: flex-start;
    gap: 20px; /* Increased gap */
    padding: 16px; /* Increased padding */
    margin: -16px;
    border-radius: 16px; /* Softer hover box */
    transition: var(--transition);
    text-decoration: none;
}

.mega-item:hover {
    background: var(--color-card-hover); /* Adapts to light/dark mode */
}

.mega-icon-box {
    width: 48px; /* Larger icons */
    height: 48px;
    border-radius: 12px; /* Softer icon boxes */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.mega-item:hover .mega-icon-box {
    transform: scale(1.1) rotate(5deg); /* Playful hover */
}

.mega-item-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mega-item-title {
    color: var(--color-text);
    font-weight: 600;
    font-size: 1rem; /* Slightly larger text */
}

.mega-item-desc {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Bottom Footer */
.mega-menu-footer {
    /* Removed background so it matches the columns */
    border-top: 1px solid var(--color-border);
    padding: 20px 32px;
}

.mega-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.mega-footer-link {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.mega-footer-link:hover {
    color: #a78bfa;
    transform: translateX(4px);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.lang-switch a {
    transition: var(--transition);
}

.lang-switch a:hover,
.lang-switch a.active {
    color: var(--color-text);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--color-text);
    cursor: pointer;
}

.mobile-menu {
    display: none; /* Hidden by default on desktop */
}

/* ============================================
   Product Card
   ============================================ */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.product-thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: calc(var(--radius-lg) - 4px) calc(var(--radius-lg) - 4px) 0 0;
}

.product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-thumb {
    transform: scale(1.05);
}

.product-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-play-overlay {
    opacity: 1;
}

.play-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    transform: scale(0.8);
    transition: var(--transition);
}

.product-card:hover .play-icon {
    transform: scale(1);
}

.product-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-secondary);
    font-family: var(--font-mono);
}

.product-actions {
    display: flex;
    gap: 8px;
}

/* ============================================
   Team Card
   ============================================ */
.team-card {
    text-align: center;
    padding: 40px 24px;
}

.team-avatar-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--color-border), transparent);
    position: relative;
    transition: var(--transition);
}

.team-card:hover .team-avatar-container {
    background: linear-gradient(135deg, var(--color-primary), transparent);
    box-shadow: var(--shadow-glow);
}

.team-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-bg-secondary);
}

.team-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.team-role {
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.team-bio {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

.team-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-secondary);
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================
   Reference Card
   ============================================ */
.reference-card {
    padding: 24px;
    border-left: 3px solid var(--color-primary);
    position: relative;
}

.reference-card::before {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 4rem;
    font-family: serif;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
}

.ref-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.ref-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.ref-info {
    display: flex;
    flex-direction: column;
}

.ref-name {
    font-weight: 600;
    font-size: 1rem;
}

.ref-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.ref-message {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

/* ============================================
   Stat Card
   ============================================ */
.stat-card {
    text-align: center;
    padding: 32px 24px;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.02);
    z-index: 0;
}

.stat-content {
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Enterprise Card System
   ============================================ */
.glass {
    background: var(--color-card);
    border: 1px solid var(--color-border);
}

.glass-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.glass-card:hover {
    background: var(--color-card-hover);
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

/* ============================================
   FAQ Accordion
   ============================================ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: rgba(15, 15, 25, 0.4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item.active {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(20, 20, 35, 0.6);
}

.faq-question {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    user-select: none;
}

.faq-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

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

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--color-text-secondary);
}

.faq-item.active .faq-answer {
    padding: 0 24px 24px;
    max-height: 500px;
    opacity: 1;
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
}

.badge-featured {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-secondary);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-new {
    background: rgba(139, 92, 246, 0.15);
    color: var(--color-primary);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-free {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-price {
    background: var(--color-bg-secondary);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    font-family: var(--font-mono);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    background: rgba(0, 0, 0, 0.4);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-select option {
    background: var(--color-bg-secondary);
    color: var(--color-text);
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), transparent);
    margin: 24px auto 0;
    border-radius: 2px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: 80px 0 24px;
    margin-top: 80px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.5;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 64px;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: inline-block;
}

.footer-desc {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    max-width: 300px;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-text);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--color-secondary);
    padding-left: 4px;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ============================================
   Video Modal
   ============================================ */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    z-index: 10000;
    transform: scale(0.9);
    transition: var(--transition);
}

.video-modal.active .video-modal-content {
    transform: scale(1);
}

.video-modal-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.3);
    background: #000;
}

.video-modal-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.video-modal-close:hover {
    color: var(--color-danger);
    transform: scale(1.1);
}
