/* ViralBrand Agency - Custom Styles */

:root {
    --vb-primary: #E91E63;
    --vb-secondary: #FF6B6B;
    --vb-dark: #121212;
    --vb-light: #F8F9FA;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--vb-light);
    padding-bottom: 70px;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.5px; /* Adjust value as needed */
}

/* Default mobile header (light mode) */
.mobile-header {
    background-color: #ffffff !important; /* White background */
    color: #121212 !important; /* Black text/icons */
    height: 50px !important;
    padding-top: 2px;
    padding-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 999;
}


/* Mobile header in dark mode */
.dark-mode .mobile-header {
    background-color: #121212 !important; /* Black background */
    color: #ffffff !important;
    height: 50px !important;
    padding-top: 2px !important;
    padding-bottom: 0 !important;
}

/* Ensuring icons/buttons in header adapt accordingly */
.dark-mode .mobile-header .btn,
.dark-mode .mobile-header a {
    color: #ffffff !important;
}

.mobile-header .btn,
.mobile-header a {
    color: #121212 !important;
}

/* Default (light mode) */
.desktop-sidebar .nav-item {
  color: #121212; /* dark text */
}

/* Dark mode override */
.dark-mode .desktop-sidebar .nav-item {
  color: #ffffff; /* light text */
}

/* Active link styling */
.desktop-sidebar .nav-item.active {
  color: var(--vb-primary);
}

.dark-mode .desktop-sidebar .nav-item.active {
  color: var(--vb-primary);
}

/* Hover states */
.desktop-sidebar .nav-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .desktop-sidebar .nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}


/* Bottom Navigation Styles */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #ddd;
    z-index: 1050; /* Raise above most content */
    height: 50px;
    display: flex;
    justify-content: space-around;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #262626;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: var(--vb-primary);
}

.nav-item:hover {
    color: var(--vb-primary);
    transform: translateY(-2px);
}

/* Content Area */
.content-area {
    margin-top: 20px;
    min-height: calc(100vh - 130px);
}

/* Post Grid Styles */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.post-item {
    aspect-ratio: 1;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

/* Reel Container Styles */
.reel-container {
    height: calc(100vh - 130px);
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

.reel-item {
    height: calc(100vh - 130px);
    scroll-snap-align: start;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Desktop Sidebar Styles */
.desktop-sidebar {
    width: 207px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    background: white;
    border-right: 1px solid #dbdbdb;
    z-index: 1000;
    padding: 10px 0;
}

.desktop-content {
    margin-left: 250px;
    padding: 20px;
}



@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Brand Card Styles */
.brand-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.brand-card:hover {
    transform: translateY(-5px);
}

/* Search Container */
.search-container {
    background: white;
    border-radius: 20px;
    padding: 10px 15px;
    margin: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Landing Page Hero */
.landing-hero {
    background: linear-gradient(135deg, var(--vb-primary), var(--vb-secondary));
    color: white;
    padding: 60px 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 767px) {
    .desktop-sidebar { 
        display: none; 
    }
    .desktop-content { 
        margin-left: 0; 
    }
    .bottom-nav { 
        display: flex; 
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .desktop-sidebar { 
        display: none; 
    }
    .desktop-content { 
        margin-left: 0; 
    }
    .bottom-nav { 
        display: flex; 
    }
}

@media (min-width: 992px) {
    .mobile-header { 
        display: none !important;
    }
    .bottom-nav { 
        display: none; 
    }
    .content-area { 
        margin-top: 0; 
    }
    body { 
        padding-bottom: 0; 
    }
}



/* Add this at the bottom of your existing media queries */
@media (max-width: 767px) {
    .desktop-sidebar { 
        display: none; 
    }
    .desktop-content { 
        margin-left: 0; 
    }
    .bottom-nav { 
        display: flex; 
    }

 @media (max-width: 767px) {
    .mobile-header img {
        max-width: 200px; /* Adjust if still too large */
        max-height: 60px; /* Header height */
        height: auto;
        width: auto;
        object-fit: contain;
    }
}



@media (max-width: 767px) {
    .post-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on small screens */
    }
}





/* Additional Custom Styles */
.logo-gradient {
    background: linear-gradient(135deg, var(--vb-primary), var(--vb-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary {
    background: linear-gradient(135deg, var(--vb-primary), var(--vb-secondary));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--vb-secondary), var(--vb-primary));
    transform: translateY(-2px);
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--vb-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}




@media (max-width: 991px) {
    #search-section .search-container {
        margin-top: 80px; /* Adjust this value as needed */
    }
}

/* Tablet and up: restore logo size */
@media (min-width: 768px) and (max-width: 991px) {
  .mobile-header img {
    max-height: 48px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

/* Mobile Header Logo Styling */
.mobile-header img {
  max-height: 75px;   /* slightly smaller */
  padding-top: 20px;
  padding-bottom: 8px;
}


.desktop-sidebar .nav-item {
    display: flex !important;
    flex-direction: row !important; 
    align-items: center !important;
}

.desktop-sidebar .nav-item i {
    margin-right: 12px !important; /* Adjust spacing as needed */
}

/* Toggle Switch Styling */
/* Toggle Switch Styling */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background-color: white;
    bottom: 3px;
    left: 3px;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: #4b5563; /* dark theme color */
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

.dark-mode .brand-card,
.dark-mode .search-container,
.dark-mode .desktop-sidebar,
.dark-mode .bottom-nav,
.dark-mode .mobile-header,
.dark-mode .landing-hero {
    background-color: #1e1e1e;
    color: #ffffff;
}

.dark-mode .nav-item {
    color: #ddd;
}

.dark-mode .nav-item.active {
    color: #e91e63;
}


/* Offcanvas default styling (light mode) */
.offcanvas {
    background-color: #ffffff;
    color: #121212;
}

/* Offcanvas in dark mode */
.dark-mode .offcanvas {
    background-color: #121212;
    color: #ffffff;
}

.dark-mode .offcanvas .nav-link {
    color: #ffffff;
}

.offcanvas .nav-link {
    color: #121212;
}

/* Offcanvas header colors */
.dark-mode .offcanvas-header {
    border-bottom: 1px solid #2e2e2e;
}

.offcanvas-header {
    border-bottom: 1px solid #e5e5e5;
}



.bottom-nav {
    justify-content: space-around;
}

.bottom-nav .nav-item {
    color: #121212; /* Black for light mode */
    text-decoration: none;
}

.dark-mode .bottom-nav .nav-item {
    color: #ffffff; /* White for dark mode */
}

/* Remove any residual spacing for text */
.bottom-nav small {
    display: none;
}

/* Ensure icons are properly sized and aligned */
.bottom-nav i {
    font-size: 18px;
    padding: 5px 0;
}

/* Highlight active nav item clearly */
.bottom-nav .nav-item.active i {
    color: #E91E63; /* Your primary color to highlight active icon */
}

/* Default close button (light mode) */
.offcanvas .btn-close {
    filter: invert(0%); /* Black close icon */
}

/* Dark mode: make it white */
.dark-mode .offcanvas .btn-close {
    filter: invert(100%);
}

/* Base styling for the search input container */
.search-container {
    background: white;
    border: 1px solid #ccc; /* Light grey border */
    border-radius: 10px;
    padding: 8px 12px;
    margin: 12px 16px 0 16px; /* Top margin reduced for mobile view */
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

/* Search input field default */
.search-container input {
    background-color: #ffffff;
    color: #121212;
    border: none;
    outline: none;
}

/* Search icon color (light mode) */
.search-container .input-group-text i {
    color: #666;
}

/* Dark mode overrides */
.dark-mode .search-container {
    background: #1e1e1e;
    border: 1px solid #444;
}

.dark-mode .search-container input {
    background-color: #121212;
    color: #ffffff;
}

.dark-mode .search-container .input-group-text i {
    color: #bbb;
}

/* Optional: smooth transition between modes */
.search-container,
.search-container input {
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

@media (max-width: 767px) {
    #search-section .search-container {
        margin-top: 10px; /* Just below the fixed header */
         margin-bottom: 30px;
    }
}
}

@media (max-width: 767px) {
  .reel-item {
    overflow: hidden;
  }
}
@media (min-width: 768px) {
  .reel-item {
    overflow: visible;
  }
}

body.dark-mode {
  background: #121212;
  color: #fff;
}
  
.dark-mode .content-area,
.dark-mode .desktop-content,
.dark-mode .post-grid,
.dark-mode .post-item,
.dark-mode .brand-card {
  background: #1b1b1b;
  color: #fff;
}

/* re-apply header/sidebar/footer in dark */
.dark-mode .desktop-sidebar,
.dark-mode .bottom-nav {
  background: #1b1b1b !important;
}

/* Sidebar: icons to the left of the text */
.desktop-sidebar .nav-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
}

.desktop-sidebar .nav-item i {
  margin-right: 8px !important;
}

.desktop-sidebar .nav-item span {
  white-space: nowrap;
}

/* Toggle Switch Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 20px; width: 20px;
  border-radius: 50%;
  background-color: white;
  bottom: 3px; left: 3px;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #4b5563;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* Mobile & Tablet Header Height + Logo Size */
@media (max-width: 991px) {
  .mobile-header {
    height: 70px !important;      /* smaller header */
    padding-top: 2px;                /* remove extra vertical padding */
    padding-bottom: 10px;
  }

  .mobile-header img {
    max-height: 70px !important;   /* consistent logo size */
    height: 150px;
    width: auto;
  }
}

/* Force identical header height & padding in dark mode */
.dark-mode .mobile-header {
  height: 50px !important;       /* same as light mode */
  padding-top: 2px !important;      /* remove extra space */
  padding-bottom: 0px !important;
 
}

/* And logo sizing still applies equally */
.dark-mode .mobile-header img {
  max-height: 70px !important;
  height: auto;
  width: auto;
}




#reelContainer {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    gap: 50px; /* Adds spacing between videos */
  padding-bottom: 120px; /* Adds bottom padding */
  
}



.reel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    scroll-snap-align: start;
    z-index: 1;
    overflow: hidden;
  background-color: transparent !important; /* Removes black background */
  border: none; /* Ensure no border is shown */
}


.reel-item video {
    height: auto;
    max-height: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    object-fit: cover;
    position: relative;
    z-index: 1;
    scroll-snap-align: start;
    background-color: transparent !important; /* Removes black bars on videos */
}

.reel-item {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background-color: transparent !important; /* Removes black background */
  border: none; /* Ensure no border is shown */
}



.video-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
    padding: 0 45px; /* optional: keeps scrubber inside padding space */
    box-sizing: border-box;
}

.video-scrubber {
    width: 100%;
    appearance: none;
    height: 4px;
    background: rgba(175, 175, 175, 0.6);
    border-radius: 2px;
    outline: none;
    margin-bottom: 4px;
}

.video-scrubber::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: rgb(176, 176, 176);
    border-radius: 50%;
    cursor: pointer;
}

.video-timer {
    font-size: 12px;
    color: white;
    opacity: 0.9;
}

.play-pause-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
    color: white;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.play-pause-icon.show {
    opacity: 1;
}

.video-wrapper {
    position: relative;
    height: auto;
    max-height: 100vh;
    aspect-ratio: 9 / 16;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important; /* Removes background behind the video */
    
}

.video-spinner {
    position: absolute;
    width: 48px;
    height: 48px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* Additional reel-item spacing for mobile */
@media (max-width: 767px) {
    .reel-item {
        margin-bottom: 40px;
    }
}

/* Fix bottom nav icons color in dark mode tablet view */
@media (max-width: 991px) {
    .dark-mode .bottom-nav .nav-item i {
        color: #ffffff !important;
    }
}

.volume-toggle {
    display: none !important;
}

@media (min-width: 992px) {
  .reel-item {
    margin-bottom: 60px; /* adjust as needed */
  }
}

.carousel-indicators [data-bs-target] {
  background-color: #888;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 4px;
}

.carousel-indicators .active {
  background-color: var(--vb-primary);
}

@media (max-width: 767px) {
  .carousel-control-prev,
  .carousel-control-next {
    display: none !important;
  }
}
.caption-body span.more {
  color: grey !important;
  cursor: pointer;
}

/* Light border for brand-card in dark mode */
body.dark-mode .brand-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: #1e1e1e;
}

/* Optional: subtle border for light mode too */
body:not(.dark-mode) .brand-card {
  border: 1px solid rgba(0, 0, 0, 0.05);
}

    .icon-bar i {
      font-size: 24px;
      margin-right: 15px;
      cursor: pointer;
      transition: color 0.3s;
    }
    body.dark-mode .icon-bar i {
      color: #fff;
    }
    body:not(.dark-mode) .icon-bar i {
      color: #000;
    }
    .caption-body span.more {
      color: var(--vb-primary);
      cursor: pointer;
    }

/* White background in dark mode on all devices */
body.dark-mode input[type="search"],
body.dark-mode input#searchInput {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #ccc !important;
}

/* Ensure consistent styling in all modes */
input#searchInput {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  outline: none;
  width: 100%;
  transition: background-color 0.3s, color 0.3s;
}

.caption-body span.more { color: var(--vb-primary); cursor: pointer; }

.post-item {
  @apply relative overflow-hidden rounded-lg shadow-md cursor-pointer transition-transform duration-300 hover:scale-105;
}
.post-item img {
  @apply w-full h-48 object-cover rounded-t-lg;
}