/* Reset */

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

body {
font-family: 'PT Sans', sans-serif;
background-color: #f9f9f9;
color: #222;
}

/* ---------------- HEADER ---------------- */
.top-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 1000;
}

.top-nav-container {
    max-width: 90%;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO */
.logo {
    font-family: 'Marck Script', cursive;
    font-size: 45px;
    color: #ffffff; /* FIX: white on banner */
    letter-spacing: -0.08em;
    text-decoration: none !important;
  }

/* LEGAL LINK */
.legal-link-header {
    font-size: 16px;
    color: #ffffff; /* FIX: white on banner */
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.3s;
}

/* NAV LINKS */
.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-menu,
.nav-menu li,
.dropdown-content {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.dropdown {
    position: relative;
}
/* AI Tools Button Style (Black Box Button) */
.dropdown-btn {
  background: #000;
  color: #fff;
  padding: 10px 18px;
  border-radius: 16px;
  border: none;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: 0.2s ease;
  display: inline-block;
}

/* Hover effect */
.dropdown-btn:hover {
  background: #333;
}

  
/* NAV LINKS - default */
.nav-links a {
    text-decoration: none;
    color: #ffffff; /* FIX: white on banner */
    font-weight: 400;
    padding: 10px 25px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

/* AI Tools Button */
.nav-links .dropdown > a {
    background: #1f1e1e;
    color: white !important;
    font-size: 20px;
    border-radius: 18px;
}

/* DROPDOWN MENU */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 2px;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 20;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 10px 20px;
    color: #333 !important;
    font-size: 17px;
    border-radius: 0;
    transition: all 0.3s;
}

.dropdown-content a:hover {
    background: linear-gradient(270deg, #08ff9c, #025aff, #08ff9c);
    background-size: 300% 300%;
    color: #fff !important;
}

/* ---------------- BANNER ---------------- */
.banner {
background-image: url("../images/banner.jpg");
background-size: cover;
background-position: center;
height: 500px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
position: relative;
overflow: hidden;
padding-top: 100px;
}

.banner-content {
width: 100%;
max-width: 900px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.banner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.banner-lcp {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Search Bar */
.search-bar-wrapper {
display: flex;
justify-content: center;
width: 100%;
margin-bottom: 40px;
}

.search-bar-border {
padding: 2px;
border-radius: 22px;
background: linear-gradient(270deg, #08ff9c, #025aff, #08ff9c);
background-size: 300% 300%;
animation: gradientGlow 5s linear infinite;
}

@keyframes gradientGlow {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}

.search-bar {
width: 800px;
height: 55px;
max-width: 100%;
display: flex;
align-items: center;
background-color: white;
border-radius: 20px;
overflow: hidden;
box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.search-bar input {
flex: 1;
padding: 20px 20px;
border: none;
font-size: 18px;
outline: none;
}

.search-bar .search-icon {
  padding: 0 20px;       /* keep horizontal spacing */
  background: none;
  border: none;
  font-size: 32px;       /* bigger size */
  line-height: 1;        /* ensures vertical center */
  display: flex;          /* flex to center vertically */
  align-items: center;    /* center icon inside button */
  justify-content: center; 
  cursor: pointer;
}

.banner-text {
  font-family: 'Onest', sans-serif;
  font-weight: 900;
  letter-spacing: -0.05em;
  font-size: clamp(28px, 8vw, 90px);
  background: linear-gradient(90deg, #15ffad, #deff07, #15ffad);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientMove 3s ease-in-out infinite;

  margin-top: -40px;
  text-align: center;
  line-height: 0.8;
  white-space: normal;

  display: inline-block;    /* 💚 Fix clipping */
  padding: 25px 0;          /* adds breathing room */
}

/* Gradient Animation */
@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}


/* ---------------- CATEGORY ---------------- */
.category-grid {
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: center;
margin: 30px 0 20px;
}

.category {
text-decoration: none;
font-weight: 400;
font-size: 20px;
color: #222;
padding: 10px 20px;
border-radius: 30px;
background: transparent;
transition: all 0.3s ease;
}

.category.selected {
background: linear-gradient(270deg, #08ff9c, #025aff, #08ff9c);
background-size: 400% 400%;
animation: gradientGlow 10s linear infinite;
color: #fff;
}

.category:hover {
background-image: linear-gradient(135deg, #08ff9c, #025aff);
color: white;
}


/* ---------------- MASONRY GRID ---------------- */

.image-item .image-wrapper .download-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 120px;
  height: 40px;
  background: url('../images/download-icon.png') no-repeat center center;
  background-size: cover;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  cursor: pointer;
  z-index: 5; /* stays above image */
}

.image-item .image-wrapper:hover .download-overlay {
  opacity: 1;
  transform: scale(1.1);
}


/* FIX: Header overlay blocking typing */
.header-overlay {
    pointer-events: none !important;
}

/* Allow clicks on search bar */
.search-bar-wrapper,
.search-bar-border,
.search-bar,
#searchInput,
.search-icon {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 9999 !important;
}


/* Responsive columns */
@media (max-width: 1400px) { .masonry-grid { column-count: 4; } }
@media (max-width: 1100px) { .masonry-grid { column-count: 3; } }
@media (max-width: 700px)  { .masonry-grid { column-count: 2; } }
@media (max-width: 420px)  { .masonry-grid { column-count: 1; } }

/* ===========================================
   ✅ MOBILE & TABLET HEADER FIX (Option B)
   =========================================== */

@media (max-width: 1024px) {

  /* Header container adjusts */
  .top-nav-container {
      max-width: 100%;
      padding: 15px 18px;
  }

  /* Logo left */
  .logo {
      font-size: 34px;
      color: #ffffff !important;
      position: relative;
      z-index: 10;
  }

  /* Hide "Legal & Policies" from header on mobile */
  .legal-link-header {
      display: none !important;
  }

  /* AI Tools becomes a small button on right */
  .nav-links .dropdown > a {
      background: #000;
      color: #fff;
      padding: 6px 14px;
      font-size: 16px;
      border-radius: 14px;
  }

  /* AI Tools dropdown styling */
  .dropdown-content {
      right: 0;
      min-width: 160px;
      border-radius: 10px;
  }

  /* Mobile header layout: Logo left, AI Tools right */
  .nav-menu {
      gap: 10px;
      align-items: center;
  }

  /* Banner height for mobile */
  .banner {
      height: 450px;
      padding-top: 80px;
  }

  /* Search bar width */
  .search-bar {
      width: 100%;
      max-width: 450px;
  }

  /* Search input */
  .search-bar input {
      font-size: 16px;
      padding: 0 16px;
  }

  .search-bar .search-icon img {
      width: 20px;
      height: 20px;
  }

  /* Banner text mobile size */
  .banner-text {
      font-size: clamp(26px, 8vw, 52px);
      margin-top: 10px;
      line-height: 1.1;
  }

  /* Categories grid */
  .category-grid {
      gap: 8px;
      padding: 0 10px;
  }

  .category {
      padding: 8px 14px;
      font-size: 17px;
  }
}

/* ===========================================
   ✅ SMALL MOBILE (≤ 600px)
   =========================================== */

@media (max-width: 600px) {

  /* Header spacing */
  .top-nav-container {
      padding: 12px 15px;
  }

  /* Smaller logo for small screens */
  .logo {
      font-size: 30px;
  }

  /* AI Tools button */
  .nav-links .dropdown > a {
      font-size: 14px;
      padding: 5px 10px;
  }

  /* Banner height */
  .banner {
      height: 420px;
      padding-top: 90px;
  }

  .search-bar-border {
    border-radius: 17px !important;   /* match search bar */
    padding: 2px !important;          /* keep gradient thickness */
  }

  /* Search bar centered */
  .search-bar {
      height: 52px;
      width: 100%;
      border-radius: 16px;
  }

  .search-bar input { 
      font-size: 15px;
  }

  /* Categories */
  .category {
      padding: 8px 12px;
      font-size: 16px;
  }
}
/* --- Smooth Fade + Blur --- */
.image-load {
  opacity: 0;
  transform: scale(0.97);
  filter: blur(10px);
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}

.image-loaded {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* --- SOFT GREY SKELETON --- */
.skeleton {
  width: 100%;
  min-height: 220px;   /* ← FIX */
  border-radius: 12px;
  background: linear-gradient(90deg,
    rgba(220, 220, 220, 0.21),
    rgba(240, 240, 240, 0.663),
    rgba(189, 189, 189, 0.15)
  );
  background-size: 400% 100%;
  animation: shimmer 1.5s ease infinite;
}
@keyframes shimmer {
  0% { background-position: -100% 0; }
  100% { background-position: 100% 0; }
}

/* --- PEXELS STYLE MASONRY FLEX GRID --- */
.masonry-grid {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

.masonry-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px; /* equal vertical spacing */
}

.image-wrapper {
  position: relative;   /* ✔ FIX: allows absolute button positioning */
  overflow: hidden;
  min-height: 220px;
  border-radius: 12px;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
      

/* 4 columns desktop */
@media (max-width: 1400px) { .masonry-grid { gap: 14px; } }

/* 3 columns */
@media (max-width: 1100px) {
  .masonry-col:nth-child(4) { display: none; }
}

/* 2 columns */
@media (max-width: 800px) {
  .masonry-col:nth-child(3) { display: none; }
}

/* 1 column */
@media (max-width: 500px) {
  .masonry-col:nth-child(2) { display: none; }
}
/* Make dropdown always appear above search bar */
.nav-menu,
.dropdown,
.dropdown-content {
    position: relative;
    z-index: 9999 !important;
}

/* Dropdown itself highest layer */
.dropdown-content {
    position: absolute;
    background: white;
    z-index: 10000 !important;
}

/* Fix search bar stacking so it stays behind when dropdown opens */
.search-bar-wrapper,
.search-bar {
    position: relative;
    z-index: 10 !important;
}
