/*
Theme Name: Custom Classifieds Theme
Theme URI: http://example.com/
Author: Developer
Description: A custom, lightweight classifieds theme with user front-end submission, dual admin/user verification workflow, and location/category filtering.
Version: 1.0.0
*/

/* ==========================================================================
   1. BASE & TYPOGRAPHY
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');

body {
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    font-family: "Google Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400; /* Fixed invalid <weight> value */
    font-style: normal;
    font-variation-settings: "GRAD" 0;
}

h2 {
    font-size: 35px;
}

a {
    color: #005177;
}

.texter {
    text-align: center;
}

/* ==========================================================================
   2. HEADER & HERO SECTION
   ========================================================================== */
.head {
    background-color: rgb(253, 250, 238);
}

.head h1 a {
    color: #005177;
}

.hero {
    background-color: rgb(254, 248, 236);
    width: 100%;
    min-height: 210px; /* Switched to min-height for responsiveness */
    padding-top: 70px;
    padding-bottom: 120px;
    position: relative;
}

.illustration {
    float: right;
    display: flex; /* Fixed invalid 'position: flex' */
}

.illustration img {
    max-width: 100%; /* Better responsiveness */
    width: 600px;
    height: auto;
    margin-top: -44px;
    margin-right: -45px;
}

/* Position the container relative so the tooltip can align to it */
.tooltip-container {
  position: relative;
  text-decoration: none; /* Optional: removes underline */
}

/* Base styles for both the tooltip box and the arrow */
.tooltip-container::before,
.tooltip-container::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 100;
  pointer-events: none; /* Prevents flickering when hovering near edges */
}

/* The Tooltip Bubble */
.tooltip-container::before {
  content: attr(data-tooltip); /* Pulls text from the HTML attribute */
  bottom: 130%; /* Positions it above the link */
  background-color: #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap; /* Keeps text on one line */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* The Little Triangle/Arrow */
.tooltip-container::after {
  content: "";
  bottom: 110%; /* Positions right below the bubble */
  border-width: 6px;
  border-style: solid;
  border-color: #333 transparent transparent transparent; /* Creates downward arrow */
}

/* Reveal on Hover */
.tooltip-container:hover::before,
.tooltip-container:hover::after {
  opacity: 1;
  visibility: visible;
}



/* Global Layout Variables scoped to the component */
  .fp-banner-container {
    --fp-bg-gradient: linear-gradient(135deg, #070202 0%, #1c0505 50%, #4a0707 100%);
    --fp-primary-color: #feed5a;
    --fp-accent-badge: #feed5a;
    --fp-text-main: #ffffff;
    --fp-text-muted: #cccccc;
    /* Structural Setup */
    width: 100%;
    margin: auto;
    max-width: 1150px;
    height: auto; 
    background: var(--fp-bg-gradient);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: clamp(1.5rem, 5vw, 3.5rem);
     color: var(--fp-text-main);
      
    /* Flex Engine for Adaptive Layout without Media Queries */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 5vw, 4rem); 
    box-sizing: border-box;
  }

  /* Force box-sizing safely inside the component wrapper */
  .fp-banner-container *, 
  .fp-banner-container *::before, 
  .fp-banner-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  /* LEFT CONTENT SECTOR */
  .fp-banner-content {
    flex: 1 1 300px;
    max-width: 620px;
    display: flex;
    flex-direction: column;
  }

  .fp-badge {
    background-color: var(--fp-accent-badge);
    color: #000000;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(255, 183, 3, 0.2);
  }

  .fp-main-title {
    font-size: clamp(1.8rem, 4vw, 3.2rem); 
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.2rem;
  }

  .fp-main-title span {
    color: var(--fp-primary-color);
  }

  .fp-description {
    color: var(--fp-text-muted);
    font-size: clamp(0.95rem, 1vw + 0.5rem, 1.1rem);
    line-height: 1.6;
    margin-bottom: 2.2rem;
  }

  /* Interactive Elements Layout Group */
  .fp-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
  }

  .fp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    flex: 1 1 160px; 
    max-width: 240px;
    transition: transform 0.2s ease, background-color 0.2s ease;
  }

  .fp-btn:active {
    transform: scale(0.97);
  }

  .fp-btn-primary {
    background-color: var(--fp-primary-color);
     color: #000000;
  }

  .fp-btn-primary:hover {
    background-color: #feed5a;
  }

  .fp-btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    gap: 0.5rem;
  }

  .fp-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
  }

  .fp-play-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
  }

  /* RIGHT VISUAL SECTOR */
  .fp-banner-visual {
    flex: 1 1 260px;
    max-width: 220px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Modern Placeholder Layout Mockup */
  .fp-ui-mockup-frame {
    width: 100%;
    aspect-ratio: 9 / 18.5; 
    background: #141414;
    border: 10px solid #2d2d2d;
    border-radius: 38px;
    padding: 14px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  }

  .fp-ui-screen {
    background: #f8f9fa;
    height: 100%;
    border-radius: 22px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .fp-ui-navbar {
    height: 20px;
    background: #e2e8f0;
    border-radius: 6px;
    width: 50%;
  }

  .fp-ui-hero-panel {
    height: 35%;
    background: #cbd5e1;
    border-radius: 12px;
  }

  .fp-ui-content-blocks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    flex-grow: 1;
  }

  .fp-ui-block {
    background: #e2e8f0;
    border-radius: 10px;
  }









/* ==========================================================================
   3. FILTER BAR COMPONENT
   ========================================================================== */
.boxy {
    background-color: white;
    padding: 15px;
    width: 60%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 8px; /* Added for smoother edges */
    
    /* Center Positioning */
    position: absolute;
    top: 65%; /* Adjusted for better centering */
    left: 50%;
    transform: translate(-50%, -50%);
}

.filter-bar {
    margin: auto;
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 6px;    
    overflow: hidden;
    width: 100%;
    /* Removed 'height: 70px' so it can expand on mobile */
}

.input-group {
    font-size: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    padding: 10px 20px;
    position: relative;
}

.input-group.gray-bg {
    background-color: #f7f7f7;
}

.input-group label {
    font-size: 14px; /* Adjusted down slightly for visual hierarchy */
    color: #6b7280;
    padding: 5px 10px;
    border: 0;
    margin-bottom: 2px;
}

.input-group select,
.filter-bar select {
    border: none;
    background: transparent;
    font-size: 16px;
    color: #374151;
    width: 100%;
    outline: none;
    cursor: pointer;
    padding: 10px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23374151%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 10px auto;
}

.filter-bar
select option:checked, 
select option:hover,
select option:focus {
    background-color: rgb(254, 237, 90);
    padding: 20px;
    color: #374151;
}

.divider {
    width: 1px;
    background-color: #e5e7eb;
    margin: 15px 0;
}

.submit-btn {
    background-color: #fde047;
    color: #111827;
    border: none;
    padding: 0 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.submit-btn:hover {
    background-color: #facc15;
}

.submit-btn svg {
    width: 18px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* Container holding both lists side-by-side */
.taxonomies-wrapper {
    display: flex;
    justify-content: flex-start;
    gap: 60px; /* Space between the left and right columns */
    margin: 20px 0;
    font-family: 'Google Sans', sans-serif;
}

/* Individual column sizing */
.classified-taxonomies-list,
.classified-taxonomies-list2 {
    flex: 0 1 auto; 
    min-width: 200px;
}

/* Headings */
.classified-taxonomies-list h3,
.classified-taxonomies-list2 h3 {
    color: #3b2f2f;
    font-size: 18px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
}

/* WordPress List container */
.classified-taxonomies-list ul,
.classified-taxonomies-list2 ul {
    list-style-type: disc;
    margin: 0;
    padding-left: 20px; /* Indent for the bullets */
}

/* List items & WordPress post count text */
.classified-taxonomies-list li,
.classified-taxonomies-list2 li {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

/* Links inside the list */
.classified-taxonomies-list a,
.classified-taxonomies-list2 a {
    color: #005f9e;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.classified-taxonomies-list a:hover,
.classified-taxonomies-list2 a:hover {
    color: #003d66; /* Darker blue on hover */
}



.classified-taxonomies-list li, .classified-taxonomies-list2 li {
    font-size: 22px !important;
    color: #2b3e51 !important;
    font-weight: 600 !important;
    list-style: none !important; /* Removes bullet points */
    margin-bottom: 15px !important;
}




.precise-grid-container {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 30px auto !important;
    padding: 10px !important;
    display: block !important;
    clear: both !important;
    background: transparent !important;
}

.precise-grid-section {
    margin-bottom: 45px !important;
    display: block !important;
    width: 100% !important;
    clear: both !important;
}

.precise-grid-main-heading {
    font-size: 24px !important;
    color: #1e293b !important;
    margin: 0 0 24px 0 !important;
    font-weight: 700 !important;
    display: block !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Perfect 3-Column Display Engine */
.precise-grid-layout {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    list-style-type: none !important;
}

/* Card Container Overrides styled exactly like image_4dce3a.png */
a.precise-card {
    all: unset !important; /* Strips theme link behavior entirely */
    display: grid !important;
    grid-template-columns: 54px 1fr 20px !important; /* Allocates exact layout zones */
    align-items: center !important;
    gap: 16px !important;
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important; /* Very soft light gray border */
    border-radius: 18px !important; /* Smooth rounded corner radius matching image */
    padding: 24px !important; /* Generous inside padding space */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.015) !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    float: none !important;
}

a.precise-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04) !important;
    background: #ffffff !important;
}

/* Grey Square Letter Avatar Box */
.precise-card-avatar {
    width: 54px !important;
    background-color: #feed5a !important;
    color: #000000 !important;
    height: 54px !important;
    background-color: #f1f3f5 !important; /* Distinct light grey box background */
    color: #d1001c !important; /* High contrast red letter */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    border-radius: 10px !important; /* Subtly rounded inner box corners */
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

/* Text layout alignment matching image */
.precise-card-text-zone {
    display: block !important;
    min-width: 0 !important;
    text-align: left !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Truncates text cleanly if it spans past 2 full layout lines */
.precise-card-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important; /* Allows text to break onto line 2 */
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 19px !important; /* Matches the text size scale in image */
    color: #1e293b !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Muted Subtitle "Explore" Link */
.precise-card-subtitle {
    display: block !important;
    font-size: 15px !important;
    color: #64748b !important;
    margin-top: 6px !important;
    padding: 0 !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Red Trailing Arrow Indicator */
.precise-card-caret {
    color: #d1001c !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    user-select: none !important;
}






/* ==========================================================================
   4. AD GRID SYSTEM
   ========================================================================== */
.ad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.ad-card {
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ad-card h3 {
    margin-top: 0;
}

.ad-card img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px;
    border-radius: 4px;
}
/* ==========================================================================
   Category Navigation Styles
   ========================================================================== */

.category-nav {
  width: 100%;
  padding: 10px 20px;

  
}

.category-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #1a2b4c; /* Dark blue color from your image */
  transition: transform 0.2s ease, opacity 0.2s ease;
  min-width: 90px; /* Ensures items don't shrink too much */
}

.category-item:hover {
  transform: translateY(-5px); /* Slight lift effect on hover */
  opacity: 0.8;
}

.icon-wrapper {
  width: 150px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.icon-wrapper img, 
.icon-wrapper svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.category-title {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}



/* =========================================
   Modern Network Badge Styling
   ========================================= */
.network-badge {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #ffffff;
  padding: 24px 32px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.08); /* Soft teal shadow */
  border: 1px solid #f1f5f9;
  max-width: 500px;
  margin: 40px auto;
  font-family: 'Google Sans', 'Segoe UI', sans-serif;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.network-badge:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(13, 148, 136, 0.12);
}

/* Icon Container */
.badge-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-icon svg {
  width: 28px;
  height: 28px;
}

/* Typography */
.badge-title {
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px 0;
}

.badge-subtitle {
  color: #64748b;
  font-size: 15px;
  margin: 0;
  line-height: 1.5;
}

/* The Number Highlight */
.badge-subtitle .highlight {
  color: #0d9488; /* Medical Teal */
  font-weight: 700;
  font-size: 18px;
  background-color: #f0fdfa;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  margin: 0 2px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .network-badge {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
}



/* ==========================================================================
   5. FORMS & TABLES
   ========================================================================== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    background: #fff;
    padding: 30px;

    
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #444;
}

.form-group input[type="text"], 
.form-group textarea, 
.form-group select, 
.form-group input[type="file"] {
    width: 100%;
    font-size: 16px; /* Adjusted to prevent iOS zooming on focus */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.btn {
    background-color: rgb(254, 237, 90);
    color: #005177;
    padding: 12px 20px;
    min-width: 200px;
    height: 60px;
    font-size: 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: inline-block;
}
/* Apply to the whole document */
::selection {
    background-color: rgb(254, 237, 90);
    color: #005177; /* Or #000 for standard black */
}

/* For older versions of Firefox */
::-moz-selection {
    background-color: rgb(254, 237, 90);
    color: #005177;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    padding: 12px;
    border: 1px solid #eee;
    text-align: left;
}

table th {
    background: #f7f7f7;
}

/* ==========================================================================
   6. ANIMATIONS
   ========================================================================== */
.headline {
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    font-weight: 300;
    text-align: center;
    display: flex; 
    flex-direction: column; /* Forces the dynamic text onto a new line */
    align-items: center;    /* Keeps everything perfectly centered */
    justify-content: center;
    gap: 4px;               /* Small gap so it sits *just* below */
}

/* The window that hides the words outside of view */
.dynamic-wrapper {
    font-size: 1.3em; /* Makes the blue text 30% larger than the base headline */
    overflow: hidden;
    height: 1.5em; /* Match this to your word height + padding to prevent clipping */
    display: block;          
    width: 100%;
}

.dynamic-text {
    display: flex;
    font-size: inherit; /* This forces the text to scale perfectly with your responsive headline */
    flex-direction: column;
    text-align: center;
    /* Increased to 35s so 20 words have time to cycle naturally (approx 1.7s per word) */
    animation: slide-up 35s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.word {
    height: 1.5em;      /* Explicitly defined height for calculation */
    line-height: 1.5em; /* Perfectly centers text inside the element box */
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

@keyframes slide-up {
    /* Each step moves exactly -1.5em (the precise height of 1 word) */
    0%, 4%     { transform: translateY(0); }
    5%, 9%     { transform: translateY(-1.5em); }
    10%, 14%   { transform: translateY(-3.0em); }
    15%, 19%   { transform: translateY(-4.5em); }
    20%, 24%   { transform: translateY(-6.0em); }
    25%, 29%   { transform: translateY(-7.5em); }
    30%, 34%   { transform: translateY(-9.0em); }
    35%, 39%   { transform: translateY(-10.5em); }
    40%, 44%   { transform: translateY(-12.0em); }
    45%, 49%   { transform: translateY(-13.5em); }
    50%, 54%   { transform: translateY(-15.0em); }
    55%, 59%   { transform: translateY(-16.5em); }
    60%, 64%   { transform: translateY(-18.0em); }
    65%, 69%   { transform: translateY(-19.5em); }
    70%, 74%   { transform: translateY(-21.0em); }
    75%, 79%   { transform: translateY(-22.5em); }
    80%, 84%   { transform: translateY(-24.0em); }
    85%, 89%   { transform: translateY(-25.5em); }
    90%, 94%   { transform: translateY(-27.0em); }
    95%, 99%   { transform: translateY(-28.5em); }
    100%       { transform: translateY(-30.0em); } /* Perfect loop reset */
}

/* ==========================================================================
   7. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Tablets (Screens smaller than 900px) */
@media (max-width: 900px) {


    .precise-grid-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; /* 2 Columns on Tablets */
    }


    .ad-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .boxy {
        width: 85%;
    }

    .illustration {
        display: none; /* Often best to hide large decorative images on smaller devices to prevent overflow */
    }

    .category-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px 20px; /* Adds vertical spacing when they wrap */
  }

}

/* Mobile Phones (Screens smaller than 600px) */
@media (max-width: 600px) {


.fp-ui-mockup-frame { display: none;}
    .precise-grid-layout {
        grid-template-columns: 1fr !important; /* Full row cards on Mobile screens */
        gap: 15px !important;
    }
    a.precise-card {
        padding: 16px !important;
    }
    .ad-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding-top: 40px;
        padding-bottom: 60px;
        display: flex;
        flex-direction: column;
    }

    /* Un-center the filter box on mobile so it flows naturally */
    .boxy {
        position: relative;
        width: 90%;
        top: auto;
        left: auto;
        transform: none;
        margin: 20px auto;
    }
    .taxonomies-wrapper {
        flex-direction: column;
        gap: 30px; /* Reduce gap when they stack vertically */
    }
    .filter-bar {
        flex-direction: column;
        border-radius: 8px;
    }
    
    .input-group {
        padding: 15px;
    }

    /* Hide the vertical divider on mobile since columns are stacked */
    .divider {
        display: none; 
    }
    
    .submit-btn {
        width: 100%;
        padding: 15px;
    }
    
    .container {
        width: 95%;
        padding: 15px;
    }
    .category-nav {
    padding: 30px 10px;
  }
  
  .category-container {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto; /* Allows scrolling left/right */
    scroll-snap-type: x mandatory; /* Makes scrolling smooth */
    padding-bottom: 15px; /* Room for scrollbar */
    
    /* Hide scrollbar for a cleaner look but keep functionality */
    scrollbar-width: none; /* Firefox */
  }

  .category-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
  }

  .category-item {
    scroll-snap-align: start;
    flex: 0 0 auto; /* Prevents items from shrinking */
    width: 100px; 
  }
  
  .icon-wrapper {
    width: 60px;
    height: 60px;
  }
}

/* --- Global Dashboard Variables & Container --- */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    font-family: inherit;
}

/* --- Alerts --- */
.dashboard-alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
}
.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}
.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}
.alert-action-required {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
    border-left: 5px solid #ffc107;
}

/* --- Header Bar --- */
.dashboard-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.dashboard-header-bar h3 {
    text-transform: capitalize;
    margin: 0;
}
.btn-premium {
    color: #005177;
    font-weight: bold;
    text-decoration: none;
    padding: 8px 16px;
    background-color: rgb(254, 237, 90);
    border-radius: 4px;
    transition: background 0.2s;
}
.btn-premium:hover {
    background-color: rgb(240, 222, 60);
}

/* --- Bulk Action Bar --- */
.bulk-action-bar {
    background: #f9f9f9;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-delete-selected {
    background: #ba2121;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.5;
    transition: opacity 0.3s;
}
.btn-delete-selected.active {
    opacity: 1;
}
#selected-count {
    font-size: 13px;
    color: #666;
}

/* --- Table Styling --- */
.table-responsive-wrapper {
    width: 100%;
}
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e5e5e5;
}
.dashboard-table thead tr {
    background: #f4f4f4;
    text-align: left;
}
.dashboard-table th,
.dashboard-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
}
.col-checkbox {
    width: 40px;
    text-align: center;
}
.col-management {
    text-align: center;
    width: 120px;
}
.text-center {
    text-align: center;
}
.scale-checkbox {
    transform: scale(1.2);
    cursor: pointer;
}
.row-needs-action {
    background: #fffdf5;
}
.empty-table-msg {
    text-align: center;
    color: #666;
    padding: 30px 10px;
}

/* Thumbnail */
.ad-thumbnail-wrapper {
    margin-top: 8px;
}
.ad-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

/* Status Texts & Badges */
.status-badge { font-weight: 500; }
.status-approved, .status-live { color: green; }
.status-pending { color: orange; }
.status-hidden { color: red; }
.status-text-published { color: green; font-weight: bold; font-size: 13px; }
.status-text-awaiting { color: #777; font-style: italic; font-size: 12px; }

/* Buttons in Table */
.btn-activate-ad {
    text-decoration: none;
    font-size: 12px;
    display: inline-block;
    padding: 6px 11px;
    background: #28a745;
    color: #fff;
    border-radius: 4px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: pulse 2s infinite;
}
.management-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    white-space: nowrap;
}
.btn-edit-ad {
    color: #0073aa;
    font-weight: bold;
    font-size: 13px;
    text-underline-offset: 3px;
}
.single-delete-btn {
    background: none;
    border: none;
    color: #ba2121;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
}

/* JS Animations */
.fade-out {
    background: #f8d7da !important;
    opacity: 0;
    transition: all 0.4s ease;
}
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 2px 4px rgba(40,167,69,0.2); }
    50% { transform: scale(1.03); box-shadow: 0 4px 10px rgba(40,167,69,0.4); }
    100% { transform: scale(1); box-shadow: 0 2px 4px rgba(40,167,69,0.2); }
}

/* --- Mobile Responsiveness (The Magic) --- */
@media screen and (max-width: 768px) {


    /* Stack header */
    .dashboard-header-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 15px;
    }
    
    /* Convert Table into Cards */
    .dashboard-table, 
    .dashboard-table tbody, 
    .dashboard-table tr, 
    .dashboard-table td {
        display: block;
        width: 100%;
    }
    
    /* Hide standard headers */
    .dashboard-table thead {
        display: none;
    }
    
    /* Style the row as a card */
    .dashboard-table tr {
        margin-bottom: 15px;
        border: 1px solid #e5e5e5;
        border-radius: 6px;
        background: #fff;
        padding: 10px;
    }
    
    /* Style cells to sit on one line with their generated label */
    .dashboard-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        border-bottom: 1px solid #f0f0f0;
        padding: 10px 5px;
    }
    .dashboard-table td:last-child {
        border-bottom: none;
    }
    
    /* Use the HTML data-label to insert mobile headers */
    .dashboard-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #555;
        text-align: left;
        margin-right: 15px;
    }
    
    /* Formatting overrides for specific cells inside the card */
    .text-center, .col-management {
        text-align: right;
    }
    .management-actions {
        justify-content: flex-end;
    }
    
    /* Ad Title needs to wrap nicely if long */
    .dashboard-table td[data-label="Ad Title"] {
        flex-direction: column;
        align-items: flex-end;
    }
    .dashboard-table td[data-label="Ad Title"]::before {
        align-self: flex-start;
        margin-bottom: 5px;
    }
}