/* ==========================================================================
   PROPTUBE (FD VIDEOS) - ACCORDING TO INDEX.PHP LAYOUT ARCHITECTURE
   ========================================================================== */

:root {
    --primary-color: #0d2b5e;
    --secondary-color: #1e293b;
    --accent-color: #3b82f6;
    --99-teal: #0078db;
    --bg-light: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --font-main: 'Inter', sans-serif;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page & Body Layout (Exact match with index.php) */
html,
body {
    font-family: 'Inter', sans-serif;
    background-color: #0a1520 !important;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    height: 100% !important;
    overflow: hidden !important;
}

/* Header Navigation (Exact match with index.php) */
header.re-99-header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18) !important;
    background: #0a1520 !important;
    z-index: 10000 !important;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    border-bottom: none !important;
}

.header-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo-row img {
    height: 48px;
    width: auto;
    display: block;
}

.header-location-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.header-location-selector:hover {
    background: rgba(255, 255, 255, 0.25);
}

.header-location-selector i.fa-map-marker-alt {
    color: #3b82f6;
}

.header-links-center {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-links-center a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.header-links-center a:hover {
    color: #ffffff;
}

.header-actions-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-post-property {
    background: #22c55e;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
    transition: background 0.2s ease;
}

.btn-post-property:hover {
    background: #16a34a;
}

/* Floating Main Container (Matching index.php) */
.desktop-main-container {
    background: #ffffff !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    position: fixed !important;
    box-sizing: border-box !important;
}

@media (min-width: 769px) {
    .desktop-main-container {
        top: 78px !important;
        bottom: 16px !important;
        left: 16px !important;
        right: 16px !important;
        width: calc(100% - 32px) !important;
        max-width: 100% !important;
        height: calc(100vh - 94px) !important;
        margin: 0 auto !important;
        padding: 30px 40px !important;
        border-radius: 20px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
        z-index: 100 !important;
    }
}

@media (max-width: 768px) {
    header.re-99-header {
        padding: 6px 12px;
        height: 56px !important;
    }

    .header-logo-row {
        gap: 4px !important;
    }

    .header-logo-row img {
        height: 38px !important;
    }

    .header-links-center,
    .btn-post-property {
        display: none !important;
    }

    .loc-desktop {
        display: none !important;
    }

    .loc-mobile {
        display: flex !important;
        padding: 4px 8px !important;
        font-size: 0.74rem !important;
        margin-right: 6px;
    }

    .desktop-main-container {
        top: 64px !important;
        bottom: 68px !important;
        left: 8px !important;
        right: 8px !important;
        width: calc(100% - 16px) !important;
        height: calc(100vh - 132px) !important;
        margin: 0 auto !important;
        padding: 16px 12px !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
        z-index: 100 !important;
    }
}

/* Portal Layout structure */
.proptube-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 992px) {
    .proptube-layout {
        grid-template-columns: 1fr;
    }

    aside.pt-sidebar {
        display: none !important;
    }
}

/* Sidebar styling inside white main container */
aside.pt-sidebar {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
}

.sidebar-menu-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.sidebar-menu-list:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-muted);
    padding: 0 8px 8px 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.sidebar-item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.25s;
}

.sidebar-item-link:hover {
    background-color: rgba(0, 102, 204, 0.05);
    color: #0066cc;
    transform: translateX(2px);
}

.sidebar-item-link.active {
    background-color: rgba(0, 102, 204, 0.1);
    color: #0066cc;
    font-weight: 700;
}

.sidebar-item-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Inline horizontal scrollable categories for mobile */
.category-scroll-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 4px 0 10px 0;
    margin-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-scroll-row::-webkit-scrollbar {
    display: none;
}

.category-pill-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f1f5f9;
    color: #1e293b;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.category-pill-chip:hover {
    background-color: #e2e8f0;
    color: #0078db;
    border-color: #cbd5e1;
}

.category-pill-chip.active {
    background-color: #0078db;
    color: #ffffff;
    border-color: #0078db;
    box-shadow: 0 3px 10px rgba(0, 120, 219, 0.25);
}

.mobile-only-flex {
    display: none;
}

@media (max-width: 992px) {
    .mobile-only-flex {
        display: flex !important;
    }
}

/* Main feed area */
.pt-main-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feed-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.search-form-feed {
    display: flex;
    flex: 1;
    max-width: 600px;
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid var(--border-color);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.search-input-feed {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    color: var(--text-main);
    min-width: 0;
}

.search-btn-feed {
    background: #0078db;
    border: none;
    color: white;
    padding: 10px 22px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-btn-feed:hover {
    background: #0052a3;
}

/* Listing Grid (Desktop & Mobile 16:9 Widescreen Rectangle YouTube style) */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.video-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-main);
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease-in-out;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 102, 204, 0.2);
}

.video-thumbnail-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Perfect 16:9 widescreen rectangle like YouTube */
    position: relative;
    background-color: #0f172a;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
}

.video-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Clips image cleanly without vertical stretching */
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail-img {
    transform: scale(1.05);
}

.play-overlay-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-card:hover .play-overlay-icon {
    background-color: #ef4444;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-category-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.video-info-container {
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    flex: 1;
    position: relative;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #1e293b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.video-details-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    flex: 1;
}

.video-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-author {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.video-meta {
    margin: 0;
    font-size: 0.76rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-more-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1rem;
    padding: 4px;
    cursor: pointer;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    border-radius: 16px;
    background-color: #f8fafc;
    border: 1.5px dashed var(--border-color);
    max-width: 480px;
    margin: 40px auto;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 1.15rem;
    color: var(--text-main);
}

.empty-state p {
    margin: 0 0 20px 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Footer styling resets */
footer {
    background-color: #ffffff;
    color: #475569;
    text-align: center;
    padding: 60px 24px;
    font-size: 0.85rem;
    border-top: 1px solid #e2e8f0;
    margin: 60px -40px -40px;
}

@media (max-width: 768px) {
    footer {
        margin: 40px -12px -12px;
        padding: 40px 16px;
    }

    .video-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .video-card {
        border-radius: 14px !important;
    }

    .video-thumbnail-container {
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
        height: auto !important;
        border-radius: 14px 14px 0 0 !important;
    }

    .video-thumbnail-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}

/* Mobile bottom nav bar */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: rgba(10, 21, 32, 0.96) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: none !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
        z-index: 11900;
        justify-content: space-around;
        align-items: center;
        box-sizing: border-box;
        padding: 4px 0;
    }

    .mobile-bottom-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: rgba(255, 255, 255, 0.65) !important;
        font-size: 0.72rem;
        font-weight: 600;
        flex: 1;
        gap: 3px;
        height: 100%;
        box-sizing: border-box;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-bottom-item.active {
        color: #3b82f6 !important;
        font-weight: 700;
    }

    .mobile-bottom-item i {
        font-size: 1.2rem;
    }
}