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

:root {
    /* Apple Color System */
    --apple-blue: #007AFF;
    --apple-gray-bg: #F2F2F7;
    --apple-white: #FFFFFF;
    --apple-text-primary: #1D1D1F;
    --apple-text-secondary: #86868B;
    --apple-divider: rgba(0, 0, 0, 0.1);
    --apple-sidebar-bg: rgba(242, 242, 247, 0.8);
    --apple-card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --apple-blur: blur(20px);

    /* Legacy mappings to prevent breaks if I missed one */
    --city-bg-base: #ffffff;
    --city-bg-secondary: #f2f2f7;
    --city-text-primary: #1d1d1f;
    --city-text-secondary: #86868b;
    --city-border: rgba(0, 0, 0, 0.1);
    --bg-input: #f2f2f7;
    --text-input: #1c1c1e;
    --bg-card: #ffffff;
}

[data-theme="dark"] {
    --bg-input: #29292b;
    --text-input: #ffffff;
    --bg-card: #1c1c1e;
}

/* =========================================
   CRITICAL LAYOUT ENFORCEMENT (Moved to Top)
   ========================================= */
body {
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* Default State (Expanded) */
.main-content {
    margin-left: 260px !important;
    width: auto !important;
    max-width: calc(100vw - 260px) !important;
    position: relative !important;
    z-index: 1;
    padding-left: 48px;
    box-sizing: border-box;
    transition: margin-left 0.3s ease, max-width 0.3s ease;
}

.sidebar {
    width: 260px !important;
    transform: none !important;
    z-index: 9999 !important;
    transition: width 0.3s ease;
    overflow-x: hidden;
    /* Hide text when shrinking */
}

/* COLLAPSED STATE (triggered by JS on body) */
body.sidebar-closed .main-content {
    margin-left: 72px !important;
    /* Stretch content */
    width: auto !important;
    max-width: calc(100vw - 72px) !important;
}

body.sidebar-closed .sidebar {
    width: 72px !important;
}

/* Ensure nav items don't overlap the button when logo is hidden in collapsed mode */
body.sidebar-closed .sidebar-nav {
    padding-top: 66px;
    /* Matches Expanded Header Height (24+22+10+10) */
}

body.sidebar-closed .sidebar .nav-item span,
body.sidebar-closed .sidebar .sidebar-section-title {
    opacity: 0;
    pointer-events: none;
    display: none;
}

body.sidebar-closed .sidebar .nav-item {
    justify-content: center;
    padding: 10px 0;
}

body.sidebar-closed .sidebar .nav-item svg {
    margin-right: 0;
}

/* Ensure Hero respects the container width */
.hero-showcase {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 30px 48px !important;
    height: auto !important;
}

/* Reset */
html {
    font-size: 10px;
    font-family: Roboto, Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    background-color: var(--apple-white);
    color: var(--apple-text-primary);
    overflow-x: hidden;
    font-size: 1.4rem;
    line-height: 2rem;
    font-weight: 400;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    padding: 40px 48px;
    min-height: 100vh;
    background-color: var(--apple-white);
}

/* Page Title - Apple Large Title */
.page-title {
    font-size: 40px;
    font-weight: 700;
    margin: 0;
    color: var(--apple-text-primary);
    font-family: 'Outfit', sans-serif;
    /* Applied new geometric font */
    letter-spacing: -0.02em;
    /* Tighter tracking for display look */
    margin-bottom: 24px;
}

/* Header Toolbar (Now inside Main Content) */
.header-toolbar {
    display: flex;
    justify-content: flex-start;
    /* Left align flow */
    align-items: center;
    height: 50px;
    margin-bottom: 32px;
    gap: 20px;
}



/* HERO SECTION - REMOVED / HIDDEN */
.hero-section {
    display: none;
}

/* --- Search Input Styling (Reference: delicate-trifle) --- */

/* Search Container wrapper */
.search-container {
    display: flex;
    align-items: center;
    width: 600px;
    /* Fixed width for toolbar search */
    max-width: 100%;
    position: relative;
    /* Default State: White Pill */
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    /* Subtle border for definition */
    border-radius: 20px !important;
    /* Matches reference */
    padding: 6px 6px;
    /* Inner padding */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    /* Default soft shadow */
    z-index: 100;
    height: 52px;
    /* Matches reference ~50.5px */
    box-sizing: border-box;
}

/* Hover/Focus State for Container: LIFT UP + BLUE RING */
/* Hover/Focus State for Container: LIFT UP (No Blue Ring, Just Shadow) */
/* Hover/Focus State for Container: LIFT UP (Reduced by ~35%) */
.search-container:hover,
.search-container:focus-within {
    background: #FFFFFF !important;
    transform: translateY(-2px) scale(1.005) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
    /* Reduced shadow */
    border-color: transparent !important;
}

/* Search Dropdown (Suggestions) */
.search-dropdown {
    position: absolute;
    top: 60px;
    /* Below search input */
    left: 0;
    width: 600px;
    /* Match container width */
    max-width: 100%;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    z-index: 999;
    display: none;
    overflow: hidden;
}

.search-dropdown.active {
    display: block;
    animation: fadeInDropdown 0.2s ease-out;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 15px;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.1s;
}

.suggestion-item:hover {
    background: #F2F2F7;
}

.suggestion-icon {
    color: #8E8E93;
    font-size: 14px;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-input {
    width: 100%;
    height: 100%;
    background: transparent !important;
    /* Force transparent */
    border: none;
    padding: 0 16px 0 44px;
    /* Reduced right padding since voice icon is gone */
    font-size: 16px;
    color: #1d1d1f;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    outline: none;
    font-weight: 400;
}

.search-input::placeholder {
    color: #8E8E93;
}

/* Icons within search */
.search-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #8E8E93;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.voice-btn {
    display: none !important;
    /* Force hide if HTML still lingers */
}



/* Right Icons (User/Notif) Alignment Fixed */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    /* Push to right */
}

/* Responsive */
@media (max-width: 768px) {
    .header-toolbar {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        gap: 16px;
    }

    .search-container {
        width: 100%;
    }

    .header-right {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}

/* Avatar Pills Row (Circular Icons) */
.avatar-pills-row {
    display: flex;
    justify-content: center !important;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 4px;
    align-items: flex-start;
}

.avatar-pills-row::-webkit-scrollbar {
    display: none;
}

.avatar-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: transparent;
    box-shadow: none;
    width: auto;
    height: auto;
    border-radius: 0;
}

.pill-icon {
    width: 48px;
    /* Slightly smaller (was 60px) */
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.avatar-pill:hover .pill-icon {
    transform: scale(1.05);
}

/* Hidden by default */
.hidden-category {
    display: none !important;
}

/* Dropdown Menu Styles */
.more-wrapper {
    position: relative;
    /* Anchor for absolute dropdown */
    overflow: visible;
    /* Allow dropdown to overflow */
}

.category-dropdown {
    position: absolute;
    top: 80px;
    /* Below the button */
    right: 0;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.category-dropdown.active {
    display: grid;
    animation: fadeIn 0.2s ease-out;
}

.category-dropdown .avatar-pill {
    /* Smaller pills inside dropdown */
    width: 100%;
}

.category-dropdown .pill-icon {
    width: 44px;
    height: 44px;
    font-size: 0.9em;
}

.category-dropdown .pill-label {
    font-size: 11px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active State for Parent Pills */
.avatar-pill.active .pill-icon {
    background-color: var(--apple-blue) !important;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.avatar-pill.active .pill-label {
    color: var(--apple-blue);
    font-weight: 600;
}

.avatar-pill:hover .pill-icon {
    transform: scale(1.05);
}

.pill-label {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--apple-text-primary);
}

/* Specific Colors */
.avatar-pill.home .pill-icon {
    background: #007AFF;
}

/* Blue */
.avatar-pill.work .pill-icon {
    background: #A2845E;
}

/* Brown */
.avatar-pill.food .pill-icon {
    background: #FF9500;
}

/* Orange */
.avatar-pill.shop .pill-icon {
    background: #FF2D55;
}

/* Pink */
.avatar-pill.gas .pill-icon {
    background: #5856D6;
}

/* Purple/Indigo */
.avatar-pill.more .pill-icon {
    background: #E5E5EA;
    color: #8E8E93;
}

/* Gray */

/* Category Pills (Rectangular) */
.category-pills {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 4px;
    justify-content: center !important;
    flex-wrap: wrap;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: var(--city-bg-base);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 2020;
    border-bottom: 1px solid var(--city-border);
    box-shadow: var(--city-shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 1 auto;
}

.menu-btn {
    display: none;
    /* Hiding noise for pure Maps feel? Or keep simplified? Let's keep right icons simplified */
    width: 40px;
    height: 40px;
    padding: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--yt-spec-text-primary);
}

.menu-btn:hover {
    background-color: var(--yt-spec-button-chip-background-hover);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-content {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--city-primary);
    letter-spacing: -0.5px;
}

.logo-tagline {
    font-size: 1rem;
    font-weight: 500;
    color: var(--city-text-secondary);
    letter-spacing: 0.5px;
}

.search-input {
    width: 100%;
    height: 38px;
    background-color: #E3E3E8;
    /* Darker clean gray */
    border: none;
    border-radius: 10px;
    padding: 0 36px 0 36px;
    /* Space for icon */
    font-size: 17px;
    color: var(--apple-text-primary);
    transition: background-color 0.2s ease;
}

.search-input:focus {
    background-color: #D1D1D6;
    outline: none;
}

.search-input::placeholder {
    color: var(--yt-spec-text-disabled);
}

.search-btn {
    position: absolute;
    left: 8px;
    background: none;
    border: none;
    color: #8E8E93;
    width: auto;
    height: auto;
    padding: 0;
    pointer-events: none;
}

.search-btn:hover {
    background-color: var(--yt-spec-button-chip-background-hover);
}

.search-btn svg {
    width: 18px;
    height: 18px;
}

.voice-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #8E8E93;
    padding: 4px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    margin-left: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-btn:hover {
    background-color: var(--yt-spec-button-chip-background-hover);
}

.header-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 16px;
}

.icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #E5E5EA;
    /* Subtle border */
    background: transparent;
    color: var(--apple-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.icon-btn:hover {
    background-color: #F2F2F7;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #cc0000;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.user-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 500;
}



/* Sidebar - Apple Style (Translucent) */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    /* Slightly wider for Apple feel */
    height: 100vh;
    background-color: var(--apple-sidebar-bg);
    backdrop-filter: var(--apple-blur);
    -webkit-backdrop-filter: var(--apple-blur);
    border-right: 1px solid var(--apple-divider);
    padding-top: 20px;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0 16px;
}



/* Sidebar Logo */
.sidebar-header {
    padding: 24px 20px 10px 20px;
    margin-bottom: 10px;
}

/* Logo Toggle Logic */
.logo-text-ru {
    font-family: 'SF Pro Display', -apple-system, sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #007AFF 0%, #00C7BE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.logo-text-ru-short {
    font-family: 'SF Pro Display', -apple-system, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007AFF 0%, #00C7BE 100%);
    color: white;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Hide full logo when collapsed */
body.sidebar-closed .sidebar-header .logo-text-ru {
    display: none;
}

/* Show short logo when collapsed */
body.sidebar-closed .sidebar-header .logo-text-ru-short {
    display: flex;
}

/* Adjust header padding when collapsed */
body.sidebar-closed .sidebar-header {
    padding: 24px 0 10px 0;
    display: flex;
    justify-content: center;
}

/* Toggle Button */
.sidebar-toggle-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    /* Inside the bar */
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    color: var(--apple-text-secondary);
    transition: transform 0.3s ease, background-color 0.2s;
}

.sidebar-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

body.sidebar-closed .sidebar-toggle-btn {
    transform: rotate(180deg);
    right: 22px;
    /* Center it when collapsed (width 72px / 2 approx) or close to center */
}

/* Nav Items */
.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--apple-text-primary);
    font-size: 15px;
    font-weight: 400;
    transition: background-color 0.1s ease;
    cursor: pointer;
    position: relative;
}

.nav-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.nav-item.active {
    background-color: rgba(0, 122, 255, 0.1);
    /* Soft blue bg */
    color: var(--apple-blue);
    font-weight: 500;
}

.nav-item.active svg {
    fill: var(--apple-blue);
}

.nav-item svg {
    margin-right: 12px;
    fill: #8E8E93;
    /* Apple Gray Icons */
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-text-bold {
    font-weight: 500;
    flex: 1;
}

.nav-arrow {
    margin-left: auto;
}

.channel-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-badge {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.sidebar-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 12px 0;
}

.sidebar-section {
    padding: 0;
}

.sidebar-title {
    padding: 8px 12px;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--yt-spec-text-primary);
}

.sidebar-section-title {
    padding: 24px 12px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--apple-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-icon-emoji {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    font-size: 16px;
}


.category-pills::-webkit-scrollbar {
    height: 0;
}

.pill {
    flex-shrink: 0;
    height: 30px;
    padding: 0 14px;
    border: none;
    border-radius: 15px;
    /* Fully rounded caps */
    background-color: #F2F2F7;
    /* Standard Fill */
    color: var(--apple-text-primary);
    font-size: 15px;
    font-weight: 500;
    font-family: Roboto, Arial, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.pill:hover {
    background-color: #E5E5EA;
}

.pill.active {
    background-color: var(--apple-text-primary);
    /* Black active like Maps */
    color: white;
    border-color: #0f0f0f;
}

/* Video Grid */
.video-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
    /* Default Mobile/Fluid */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (min-width: 1024px) {
    .video-grid {
        /* User requested 4 columns always on desktop (regardless of sidebar) */
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Explicit RuHomes Grid Fix */
.ruhomes-grid {
    display: grid !important;
    gap: 24px;
    width: 100%;
}

@media (min-width: 1024px) {
    .ruhomes-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Premium Company Cards ( Replaces Video Card ) */
.company-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.company-card:hover {
    transform: translateY(-4px);
}

.card-image-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Cinematic ratio */
    overflow: hidden;
    border-radius: 12px;
    background-color: #f0f0f0;
    margin-bottom: 12px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.company-card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 0 4px;
    /* Slight optical alignment */
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.company-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--apple-text-primary);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rating-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--apple-text-primary);
    white-space: nowrap;
    margin-left: 8px;
}

.star {
    color: #FF9500;
    /* Apple Orange/Star color */
    font-size: 12px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--apple-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-category {
    color: var(--apple-text-secondary);
}

.meta-separator {
    color: #C7C7CC;
}

/* Ru Services Row */
.ru-services-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.ru-service-pill {
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--apple-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s;
    text-decoration: none;
}

.ru-service-pill:hover {
    color: var(--apple-blue);
}

/* Section Title */
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--apple-text-primary);
    margin-bottom: 16px;
    margin-top: 8px;
}

.meta-location {
    color: var(--apple-text-secondary);
}

/* Video/Service Card Transformation */
.video-card {
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: scale(1.01);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f0f0f0;
    transition: border-radius 0.2s ease;
}

.video-card:hover .video-thumbnail {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.thumbnail-container {
    position: relative;
    border-radius: 12px;
    /* Apple curve */
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    aspect-ratio: 4/3;
    /* More photo-like */
    margin-bottom: 12px;
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 16px;
}

.thumbnail-text {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    color: white;
}

.video-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    padding: 3px 4px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    border-radius: 2px;
    line-height: 1.2rem;
}

.video-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 4px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 2px;
}

.video-info {
    display: flex;
    flex-direction: column;
    padding: 0 4px;
    position: relative;
    align-items: flex-start;
}

.channel-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--apple-text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 4rem;
}

.channel-name {
    font-size: 15px;
    color: var(--apple-text-secondary);
}

.video-metadata {
    font-size: 13px;
    color: var(--apple-text-secondary);
    margin-top: 2px;
    line-height: 1.8rem;
    color: var(--yt-spec-text-secondary);
}

.video-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-watch,
.btn-trial {
    height: 36px;
    padding: 0 16px;
    border: none;
    border-radius: 18px;
    font-size: 1.4rem;
    font-weight: 500;
    font-family: Roboto, Arial, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-watch {
    background-color: transparent;
    color: var(--yt-spec-call-to-action);
    border: 1px solid #065fd4;
}

.btn-watch:active {
    transform: scale(0.95);
}

.btn-watch:hover {
    background-color: rgba(6, 95, 212, 0.1);
}

.btn-trial {
    background-color: var(--yt-spec-call-to-action);
    color: white;
    box-shadow: 0 1px 3px rgba(6, 95, 212, 0.3);
}

.btn-trial:hover {
    background-color: #0553c2;
    box-shadow: 0 2px 6px rgba(6, 95, 212, 0.4);
    transform: translateY(-1px);
}

.btn-trial:active {
    transform: translateY(0) scale(0.98);
}

.video-menu {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--yt-spec-text-primary);
    flex-shrink: 0;
}

.video-menu:hover {
    color: var(--yt-spec-text-secondary);
}

/* Thumbnail Content Styles */
.thumbnail-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.thumbnail-action-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.video-card:hover .thumbnail-action-btn {
    opacity: 1;
}

.thumbnail-action-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Stats Overlay (Video 2) */
.stats-overlay {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.big-number {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.stats-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.chart-icon {
    margin-bottom: 16px;
}

.play-button {
    position: absolute;
    bottom: 16px;
    right: 16px;
}

/* AI Builder Content (Video 5) */
.ai-builder-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-text {
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-align: center;
    line-height: 1.2;
}

.discount-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 70px;
    height: 70px;
    background: #ffeb3b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.discount-text {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    text-align: center;
    line-height: 1.2;
}

.price-tag {
    position: absolute;
    bottom: 16px;
    left: 16px;
    font-size: 12px;
    color: white;
    text-align: left;
    line-height: 1.3;
}

/* YouTube Plus (Video 7) */
.youtube-plus {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plus-icon {
    position: absolute;
    font-size: 80px;
    font-weight: 300;
    color: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.earnings-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    color: #000;
    text-align: center;
}

/* Interview Badge (Video 8) */
.interview-badge {
    color: white;
    text-align: center;
}

/* Responsive */
@media (max-width: 1280px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content {
        margin-left: 72px;
    }

    .sidebar {
        width: 72px;
    }
}

@media (max-width: 600px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   HERO ANIMATION STYLES (Restored)
   ========================================= */

/* Hero Showcase Section */
.hero-showcase {
    background-color: #000;
    color: white;
    padding: 80px 20px;
    /* Reduced side padding */
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;

    /* NARROW WIDTH & CENTER (2.5x smaller approx) */
    margin: 60px auto 0 auto;
    width: 100%;
    max-width: 480px;
    /* Force narrow width */
    border-radius: 24px;
    /* Fully rounded since it's floating */

    /* Ensure no spillover */
    box-sizing: border-box;
}

/* ... (Hero content structure remains same) ... */
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    gap: 60px;
}

/* 3D Text Drum */
.hero-text-container {
    flex: 1;
    height: 200px;
    /* Reduced from 500px (2.5x smaller) */
    position: relative;
    perspective: 1000px;
    /* Masking top/bottom edges slightly */
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.hero-text-drum {
    position: relative;
    height: 100%;
    transform-style: preserve-3d;
}

.hero-text-item {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.6s ease-out;
    transform-origin: center center;
    pointer-events: none;
    display: none;
    /* Hide non-active by default to prevent overlap ghosts */
}

/* ACTIVE (Center) - Row 3 */
.hero-text-item.active {
    display: block;
    opacity: 1;
    filter: blur(0);
    transform: translateY(-50%) scale(1);
    z-index: 10;
}

/* PREV 1 (Immediately Above) - Row 2 */
.hero-text-item.prev {
    display: block;
    opacity: 0.4;
    filter: blur(0px);
    transform: translateY(-150%) scale(1);
    z-index: 5;
}

/* PREV 2 (Top) - Row 1 */
.hero-text-item.prev-2 {
    display: block;
    opacity: 0.2;
    filter: blur(1px);
    transform: translateY(-250%) scale(1);
    /* High up */
    z-index: 1;
}

/* NEXT 1 (Immediately Below) - Row 4 */
.hero-text-item.next {
    display: block;
    opacity: 0.4;
    filter: blur(0px);
    transform: translateY(50%) scale(1);
    z-index: 5;
}

/* NEXT 2 (Bottom) - Row 5 */
.hero-text-item.next-2 {
    display: block;
    opacity: 0.2;
    filter: blur(1px);
    transform: translateY(150%) scale(1);
    /* Low down */
    z-index: 1;
}

/* Typography Enhancements */
.hero-text-item h2 {
    font-size: 2.8rem;
    /* Scaled down */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    color: #fff;
}

.hero-text-item.prev h2,
.hero-text-item.prev-2 h2,
.hero-text-item.next h2,
.hero-text-item.next-2 h2 {
    color: #555;
    font-size: 2.4rem;
}

/* Description text */
.hero-text-item p {
    font-size: 1.4rem;
    color: #aaa;
    max-width: 400px;
    opacity: 1;
    transition: opacity 0.4s;
    line-height: 1.4;
}

.hero-text-item:not(.active) p {
    opacity: 0;
    height: 0;
    margin: 0;
}

/* Phone Mockup */
.hero-phone-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Phone Mockup - Scale down to fit */
.phone-mockup {
    width: 180px;
    /* Smaller phone */
    height: 360px;
    background: #1c1c1e;
    border-radius: 24px;
    border: 8px solid #333;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    /* TRANSFORM REMOVED: Flat presentation */
    transform: none;
    transition: transform 0.5s ease;
}

.phone-notch {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 24px;
    background: #333;
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #F2F2F7;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

/* Screen Slides */
.screen-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 40px 20px 20px;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.screen-slide.active {
    opacity: 1;
    transform: translateY(0);
}

.screen-slide.exit {
    transform: translateY(-100%);
    opacity: 0;
}

/* Mockup Content Styling */
.screen-header {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
}

.screen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.screen-item {
    background: white;
    padding: 16px;
    border-radius: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 1.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Chat Styles */
.chat-bubble {
    display: flex;
    margin-bottom: 12px;
    gap: 8px;
    align-items: flex-end;
}

.chat-bubble.right {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    background: #007AFF;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chat-text {
    background: #E5E5EA;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 1.3rem;
    max-width: 80%;
    color: #000;
}

.chat-bubble.right .chat-text {
    background: #007AFF;
    color: white;
}

.chat-input-mock {
    margin-top: auto;
    background: #E5E5EA;
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #8E8E93;
    font-size: 1.4rem;
}

/* Listings Styles */
.listing-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px;
    border-radius: 16px;
    margin-bottom: 12px;
    gap: 12px;
}

.listing-icon {
    width: 40px;
    height: 40px;
    background: #FFF3E0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.listing-info {
    flex: 1;
}

.listing-title {
    font-weight: 600;
    font-size: 1.5rem;
    color: #000;
}

.listing-sub {
    font-size: 1.2rem;
    color: #8E8E93;
}

/* =========================================
   SAFETY LAYOUT ENFORCEMENT
   ========================================= */
/* =========================================
   SAFETY LAYOUT ENFORCEMENT
   ========================================= */
/* FORCE APPLY EVERYWHERE to solve overlap issue */
body {
    overflow-x: hidden;
}

.main-content {
    margin-left: 260px !important;
    width: auto !important;
    max-width: calc(100vw - 260px) !important;
    position: relative !important;
    z-index: 1;
    padding-left: 48px;
}

.sidebar {
    width: 260px !important;
    transform: none !important;
    z-index: 9999 !important;
}

/* .hero-showcase rules removed to allow animation styles */

/* Limit Visibility Class */
.hidden-by-limit {
    display: none !important;
}

/* --- Premium Listing Page --- */
.listing-page.premium-layout {
    background: #f2f2f7;
    /* iOS Gray Background */
    font-family: 'Outfit', sans-serif;
    color: #1c1c1e;
    min-height: 100vh;
}

.listing-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    /* Let clicks pass through except buttons */
}

.listing-nav-overlay>* {
    pointer-events: auto;
}

.back-btn-circle,
.icon-btn-circle {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: #000;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.back-btn-circle:active,
.icon-btn-circle:active {
    transform: scale(0.95);
}

.nav-actions {
    display: flex;
    gap: 12px;
}

.listing-hero-premium {
    height: 50vh;
    position: relative;
    overflow: hidden;
}

.hero-image-wrapper {
    width: 100%;
    height: 100%;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.05));
}

/* Content Sheet */
.content-sheet {
    position: relative;
    margin-top: -60px;
    /* Overlap hero */
    background: #fff;
    border-radius: 32px 32px 0 0;
    padding: 32px 24px 60px;
    min-height: 50vh;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
}

.drag-handle-mobile {
    width: 40px;
    height: 5px;
    background: #e5e5ea;
    border-radius: 5px;
    margin: 0 auto 24px;
}

.listing-header-premium {
    margin-bottom: 24px;
}

.header-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.premium-pill {
    background: #f2f2f7;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: #8e8e93;
}

.premium-pill.rating {
    background: #fff8e1;
    color: #f5a623;
}

.star-fill {
    font-size: 14px;
}

.listing-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 8px;
    color: #000;
}

.listing-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8e8e93;
    font-size: 15px;
    font-weight: 500;
}

/* Action Row */
.action-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 24px;
    scrollbar-width: none;
}

.action-row::-webkit-scrollbar {
    display: none;
}

.action-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    min-width: 72px;
    cursor: pointer;
}

.chip-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f2f7;
    color: #007AFF;
    transition: transform 0.2s;
}

.action-chip:active .chip-icon {
    transform: scale(0.95);
}

.chip-icon.bg-blue {
    background: #eaf2ff;
    color: #007AFF;
}

.chip-icon.bg-green {
    background: #eaffea;
    color: #34c759;
}

.chip-icon.bg-purple {
    background: #f3eaff;
    color: #af52de;
}

.chip-icon.bg-orange {
    background: #fff0e0;
    color: #ff9500;
}

.action-chip span {
    font-size: 12px;
    font-weight: 500;
    color: #1c1c1e;
}

.divider-line {
    height: 1px;
    background: #f2f2f7;
    margin: 16px 0 24px;
}

.block-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.description-text-premium {
    font-size: 16px;
    line-height: 1.6;
    color: #3a3a3c;
    margin-bottom: 24px;
}

/* Details Grid */
.details-grid-premium {
    display: grid;
    gap: 16px;
}

.detail-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f9f9fc;
    padding: 16px;
    border-radius: 16px;
}

.detail-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e8e93;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.detail-info .label {
    font-size: 12px;
    color: #8e8e93;
    margin-bottom: 2px;
}

.detail-info .value {
    font-size: 15px;
    font-weight: 500;
    color: #1c1c1e;
}

/* =========================================
   BENTO GRID DESIGN SYSTEM
   ========================================= */

body.bento-page {
    background: #f5f5f7;
    font-family: 'Outfit', sans-serif;
    color: #1d1d1f;
    -webkit-font-smoothing: antialiased;
}

.bento-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    z-index: 1000;
    pointer-events: none;
}

.bento-nav * {
    pointer-events: auto;
}

.nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1d1d1f;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-btn.blur {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.nav-btn:active {
    transform: scale(0.9);
}

/* IMMERSIVE HERO */
.hero-immersive {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 55vh;
    z-index: 0;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.0) 40%, #f5f5f7 100%);
}

/* GLASS HEADER CARD */
.glass-header-card {
    position: relative;
    z-index: 10;
    margin-top: 38vh;
    margin-left: 20px;
    margin-right: 20px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.4);
    animation: floatUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes floatUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.bento-pill {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.06);
    color: #86868b;
}

.bento-pill.rating {
    background: #fff;
    color: #f5a623;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.bento-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.05;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.bento-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #86868b;
    font-weight: 500;
}

/* BENTO GRID LAYOUT */
.bento-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
}

.bento-cell {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
}

.bento-cell:hover {
    transform: translateY(-2px);
}

/* ACTIONS CELL */
.bento-cell.actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    padding: 16px;
}

.action-btn-lg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.icon-box {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f7;
    color: #1d1d1f;
    transition: all 0.2s;
}

.icon-box.blue {
    background: #EBF3FF;
    color: #007AFF;
}

.icon-box.green {
    background: #EBFFEF;
    color: #34C759;
}

.icon-box.purple {
    background: #F6EBFF;
    color: #AF52DE;
}

.action-btn-lg:active .icon-box {
    transform: scale(0.92);
}

.btn-label {
    font-size: 13px;
    font-weight: 600;
}

/* STORY CELL */
.bento-cell.story h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
}

.bento-cell.story p {
    font-size: 16px;
    line-height: 1.6;
    color: #424245;
    margin: 0;
}

/* INFO BOX CELL */
.info-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-sm.orange {
    background: #FFF4E5;
    color: #FF9500;
}

.icon-sm.blue {
    background: #EBF3FF;
    color: #007AFF;
}

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

.info-text .label {
    font-size: 12px;
    color: #86868b;
    text-transform: uppercase;
    font-weight: 700;
}

.info-text .val {
    font-size: 16px;
    font-weight: 600;
}

.separator {
    height: 1px;
    background: #f5f5f7;
    margin: 16px 0 16px 56px;
}

/* MAP PREVIEW CELL */
.bento-cell.map-preview {
    height: 200px;
    position: relative;
    overflow: hidden;
    padding: 0;
    background: #e5e5eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/e/ec/World_map_blank_without_borders.svg');
    /* abstract placeholder */
    background-size: cover;
    opacity: 0.3;
    filter: grayscale(1);
}

.map-pin {
    position: relative;
    width: 20px;
    height: 20px;
    background: #007AFF;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
}

.map-expand-btn {
    position: absolute;
    bottom: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 3;
    pointer-events: none;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: 1.5fr 1fr;
        max-width: 1000px;
        margin: 0 auto;
    }

    .hero-immersive {
        height: 60vh;
    }

    .glass-header-card {
        margin-top: 45vh;
        max-width: 960px;
        margin-left: auto;
        margin-right: auto;
    }

    .bento-cell.actions {
        grid-column: span 2;
    }

    .bento-cell.story {
        grid-row: span 2;
    }
}

/* Sidebar Toggle Button Visibility Fix */
.sidebar-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 24px;
    right: 18px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--apple-text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 100000;
}

.sidebar-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--apple-text-primary);
}

/* RuHomes Banner */
.ruhomes-section {
    margin-top: 60px;
    margin-bottom: 40px;
}

.ruhomes-banner {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 40px;
    background: linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%), url('https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.ruhomes-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 500px;
}

.ruhomes-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #FF3B30;
    /* Apple Red */
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.ruhomes-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.ruhomes-subtitle {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0;
}

.ruhomes-btn {
    margin-top: 16px;
    padding: 10px 24px;
    background: white;
    color: black;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
    display: inline-block;
}

.ruhomes-btn:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .ruhomes-banner {
        flex-direction: column;
        height: auto;
        padding: 30px 20px;
        text-align: center;
        align-items: flex-start;
        justify-content: center;
    }

    .ruhomes-content {
        max-width: 100%;
        text-align: left;
    }

    .ruhomes-title {
        font-size: 24px;
    }

    .ruhomes-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .ruhomes-btn {
        width: 100%;
        text-align: center;
    }
}

/* RUHOMES GRID FIX */
.ruhomes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    margin-top: 24px;
}

@media (max-width: 1200px) {
    .ruhomes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ruhomes-grid {
        grid-template-columns: 1fr;
    }
}

/* RUDATES BUMBLE STYLE */
.rudates-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.bumble-card {
    position: relative;
    width: 100%;
    padding-bottom: 140%;
    /* Tall aspect ratio */
    border-radius: 16px;
    overflow: hidden;
    background: #eee;
    transition: transform 0.2s;
}

.bumble-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.bumble-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bumble-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 20px 12px 12px;
    color: white;
}

.bumble-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.bumble-age {
    font-weight: 400;
    opacity: 0.9;
}

.bumble-loc {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

@media (max-width: 1024px) {
    .rudates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .rudates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* RUJOBS STYLES */
.rujobs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 cards per row */
    gap: 20px;
    margin-top: 24px;
    width: 100%;
}

.job-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #007AFF;
}

.job-title {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
    line-height: 1.3;
}

.job-salary {
    display: inline-block;
    background: #E5F1FF;
    color: #007AFF;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.job-desc {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 16px;
    line-height: 1.5;
}

.job-meta {
    font-size: 13px;
    color: #1d1d1f;
    opacity: 0.8;
}

@media (max-width: 1024px) {
    .rujobs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .rujobs-grid {
        grid-template-columns: 1fr;
    }
}


/* RUJOBS GRADIENT UPDATE */
.job-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border: 1px solid rgba(0, 122, 255, 0.1);
}


/* RUAFISHA STYLES */
.ruafisha-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 24px;
    width: 100%;
}

.afisha-card {
    height: 320px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.afisha-card:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.afisha-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    color: white;
}

.afisha-date {
    background: #E91E63;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    align-self: flex-start;
    margin-bottom: 8px;
}

.afisha-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.25;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.afisha-desc {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .ruafisha-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ruafisha-grid {
        grid-template-columns: 1fr;
    }
}


/* RUINFO STYLES */
.ruinfo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 24px;
    width: 100%;
}

.info-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    border: 1px solid #eee;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.info-thumb {
    height: 160px;
    width: 100%;
    overflow: hidden;
}

.info-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.info-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.info-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    color: #1d1d1f;
}

.info-desc {
    font-size: 13px;
    color: #86868b;
    margin-bottom: 12px;
    flex: 1;
    overflow: hidden;
}

.info-readmore {
    font-size: 13px;
    font-weight: 600;
    color: #4CAF50;
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 1024px) {
    .ruinfo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ruinfo-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   APP ANIMATION STYLES (Restored)
   ========================================= */

/* Hero Showcase Section */
.hero-showcase {
    background-color: #000;
    color: white;
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;
    margin: 60px auto 0 auto;
    width: 100%;
    /* max-width: 480px;  REMOVED FIXED WIDTH constraint for desktop layout availability, usually we want it wider */
    /* Wait, the source css had max-width: 480px to force narrow width. Let's see if that's desired. 
       The user said "like mobile device", maybe the section itself is narrow?
       Actually line 1349 says max-width 480px. That seems very narrow for a whole section. 
       Line 1346 says "NARROW WIDTH & CENTER". 
       But line 1336 says padding 80px 20px.
       Let's stick to the source CSS but maybe relax the max-width if it looks too small. 
       Actually, let's keep it as is, maybe it's a specific design choice for a "mobile-first" feel.
    */
    max-width: 1200px;
    /* Changed to standard container width */
    border-radius: 24px;
    box-sizing: border-box;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    gap: 60px;
}

/* 3D Text Drum */
.hero-text-container {
    flex: 1;
    height: 200px;
    position: relative;
    perspective: 1000px;
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.hero-text-drum {
    position: relative;
    height: 100%;
    transform-style: preserve-3d;
}

.hero-text-item {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.6s ease-out;
    transform-origin: center center;
    pointer-events: none;
    display: none;
}

.hero-text-item.active {
    display: block;
    opacity: 1;
    filter: blur(0);
    transform: translateY(-50%) scale(1);
    z-index: 10;
}

.hero-text-item.prev {
    display: block;
    opacity: 0.4;
    filter: blur(0px);
    transform: translateY(-150%) scale(1);
    z-index: 5;
}

.hero-text-item.prev-2 {
    display: block;
    opacity: 0.2;
    filter: blur(1px);
    transform: translateY(-250%) scale(1);
    z-index: 1;
}

.hero-text-item.next {
    display: block;
    opacity: 0.4;
    filter: blur(0px);
    transform: translateY(50%) scale(1);
    z-index: 5;
}

.hero-text-item.next-2 {
    display: block;
    opacity: 0.2;
    filter: blur(1px);
    transform: translateY(150%) scale(1);
    z-index: 1;
}

.hero-text-item h2 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    color: #fff;
}

.hero-text-item.prev h2,
.hero-text-item.prev-2 h2,
.hero-text-item.next h2,
.hero-text-item.next-2 h2 {
    color: #555;
    font-size: 2.4rem;
}

.hero-text-item p {
    font-size: 1.4rem;
    color: #aaa;
    max-width: 400px;
    opacity: 1;
    transition: opacity 0.4s;
    line-height: 1.4;
}

.hero-text-item:not(.active) p {
    opacity: 0;
    height: 0;
    margin: 0;
}

/* Phone Mockup */
.hero-phone-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 280px;
    /* Specific width */
    height: 560px;
    /* Specific height */
    background: #1c1c1e;
    border-radius: 40px;
    border: 12px solid #333;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: none;
    transition: transform 0.5s ease;
}

.phone-notch {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 24px;
    background: #333;
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #F2F2F7;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

.screen-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 60px 20px 20px;
    /* Adjusted padding top for notch */
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.screen-slide.active {
    opacity: 1;
    transform: translateY(0);
}

.screen-slide.exit {
    transform: translateY(-100%);
    opacity: 0;
}

.screen-header {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
}

.screen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.screen-item {
    background: white;
    padding: 16px;
    border-radius: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 1.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chat-bubble {
    display: flex;
    margin-bottom: 12px;
    gap: 8px;
    align-items: flex-end;
}

.chat-bubble.right {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    background: #007AFF;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chat-text {
    background: #E5E5EA;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 1.3rem;
    max-width: 80%;
    color: #000;
}

.chat-bubble.right .chat-text {
    background: #007AFF;
    color: white;
}

.chat-input-mock {
    margin-top: auto;
    background: #E5E5EA;
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #8E8E93;
    font-size: 1.4rem;
}

.listing-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px;
    border-radius: 16px;
    margin-bottom: 12px;
    gap: 12px;
}

.listing-icon {
    width: 40px;
    height: 40px;
    background: #FFF3E0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.listing-info {
    flex: 1;
}

.listing-title {
    font-weight: 600;
    font-size: 1.5rem;
    color: #000;
}

.listing-sub {
    font-size: 1.2rem;
    color: #8E8E93;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .hero-text-container {
        height: 180px;
        width: 100%;
    }

    .hero-text-item {
        width: 100%;
        left: 0;
    }

    .hero-text-item p {
        margin: 0 auto;
    }

    .hero-showcase {
        padding: 40px 20px;
    }
}

/* DEBUG / FALLBACK: Ensure first item is visible if JS fails */
.hero-text-item.active {
    display: block !important;
    opacity: 1 !important;
}

/* Fallback: If no JS adds 'active', force the first one to show (but weak selector so JS overrides if needed?) 
   Actually, better to hardcode the 'active' class in HTML which I did.
   But if JS fails, it stays static.
   
   Potential issue: The CSS I added earlier includes:
   .hero-text-item { display: none; opacity: 0; }
   .hero-text-item.active { display: block; opacity: 1; }
   
   If the HTML has class="hero-text-item active" (which it does), it should be visible.
   
   Wait, let's re-read the HTML I inserted.
   <div class="hero-text-item active"> ... </div>
   
   So if CSS is loaded, it should be visible.
   
   Is it possible the CSS file acts weirdly?
   
   Let's check the media query closing brace in index.css.
*/