/* =========================================================
   TIMG — styles.css
   Font: 'Logo' (GoogleSans variable) on .logo, inputs, select,
   .card-info, .provider-badge — nowhere else.
   All color via CSS variables. No hardcoded hex outside :root.
   ========================================================= */

@font-face {
  font-family: 'Logo';
  src: url('/assets/GoogleSans-VariableFont_GRAD,opsz,wght.ttf') format('truetype-variations'),
       url('/assets/GoogleSans-VariableFont_GRAD,opsz,wght.ttf') format('truetype');
  font-weight: 300 800;
  font-display: swap;
}

:root {
  /* Brand */
  --primary: #1480FF;
  --primary-dim: rgba(20, 128, 255, 0.12);
  --primary-glow: rgba(20, 128, 255, 0.35);

  /* Light theme */
  --bg: #F5F8FC;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --text: #12161F;
  --text-muted: #667085;
  --skeleton-base: #E9EEF5;
  --skeleton-shine: #F7FAFF;

  --font-logo: 'Logo', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px -12px rgba(16, 24, 40, 0.10);
}

[data-theme="dark"] {
  --bg: #0A0E15;
  --card: #131A25;
  --border: #232C3A;
  --text: #EAF0F8;
  --text-muted: #8B96A8;
  --skeleton-base: #182130;
  --skeleton-shine: #22304500;
  --primary-dim: rgba(20, 128, 255, 0.18);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -14px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  min-height: 100vh;
}

button, input, select {
  font-family: inherit;
  color: inherit;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.first {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.theme-toggle:active { transform: scale(0.94); }

.theme-toggle svg { width: 19px; height: 19px; }

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Search */

.search {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 6px 6px 16px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-dim);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar input {
  font-family: var(--font-logo);
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  padding: 10px 4px;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar select {
  font-family: var(--font-logo);
  border: none;
  border-left: 1px solid var(--border);
  background: transparent;
  outline: none;
  font-size: 14px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text-muted);
}

#searchBtn {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: calc(var(--radius) - 6px);
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

#searchBtn:hover { filter: brightness(1.08); }
#searchBtn:active { transform: scale(0.97); }

/* Filters bar */

.filters-bar {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filters-bar select {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.filters-bar select:hover,
.filters-bar select:focus {
  border-color: var(--primary);
  outline: none;
}

#clearFiltersBtn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
}

#clearFiltersBtn:hover { text-decoration: underline; }

/* =========================================================
   GRID
   ========================================================= */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

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

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

/* =========================================================
   CARDS
   ========================================================= */

.image-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.image-card:not(.skeleton):hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

/* =========================================================
   DOWNLOAD BUTTON
   ========================================================= */

.download-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
  z-index: 2;
}

.image-card:hover .download-btn {
  opacity: 1;
  transform: translateY(0);
}

.download-btn:hover { background: var(--primary); color: #fff; }
.download-btn svg { width: 16px; height: 16px; }

.card-img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--skeleton-base);
}

@media (max-width: 600px) {
  .card-img { height: 200px; }
}

.card-info {
  font-family: var(--font-logo);
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-desc {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-author {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.provider-badge {
  font-family: var(--font-logo);
  align-self: flex-start;
  margin-top: 4px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
}

/* =========================================================
   SKELETON LOADING CARD
   ========================================================= */

.skeleton-img {
  width: 100%;
  height: 220px;
  background: var(--skeleton-base);
  position: relative;
  overflow: hidden;
}

@media (max-width: 600px) {
  .skeleton-img { height: 200px; }
}

.skeleton-img::after,
.skeleton-text::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    100deg,
    transparent 20%,
    var(--primary-dim) 42%,
    rgba(255, 255, 255, 0.55) 50%,
    var(--primary-dim) 58%,
    transparent 80%
  );
  animation: shimmer 1.6s ease-in-out infinite;
}

[data-theme="dark"] .skeleton-img::after,
[data-theme="dark"] .skeleton-text::after {
  background: linear-gradient(
    100deg,
    transparent 20%,
    var(--primary-dim) 42%,
    rgba(20, 128, 255, 0.28) 50%,
    var(--primary-dim) 58%,
    transparent 80%
  );
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.skeleton-text {
  position: relative;
  overflow: hidden;
  height: 12px;
  border-radius: 6px;
  background: var(--skeleton-base);
  margin: 14px 14px 0;
}

.skeleton-text.short {
  width: 55%;
  margin-top: 8px;
  margin-bottom: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-img::after,
  .skeleton-text::after {
    animation: none;
  }
}

/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

/* Same fix as .modal-overlay — [hidden] must beat display:flex */
.empty-state[hidden] {
  display: none;
}

.empty-state svg {
  width: 42px;
  height: 42px;
  color: var(--border);
  margin-bottom: 16px;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.empty-sub {
  font-size: 13.5px;
  margin: 0;
}

/* =========================================================
   PAGINATION FOOTER — page-level, below the whole grid
   ========================================================= */

.pagination-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Same [hidden] fix — display:flex above would otherwise win */
.pagination-footer[hidden] {
  display: none;
}

.page-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-btn:disabled:hover {
  border-color: var(--border);
  color: var(--text);
}

.page-indicator {
  font-family: var(--font-logo);
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* =========================================================
   DETAILS MODAL
   ========================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 21, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

/* The [hidden] attribute must win over the display:flex above —
   without this rule, the browser's default [hidden]{display:none}
   loses to the class rule and the modal never actually hides. */
.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  background: var(--card);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow);
}

.modal-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-info { padding: 18px 20px 20px; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.modal-download-btn {
  margin-top: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modal-download-btn:hover { filter: brightness(1.08); }

/* =========================================================
   EMBED / "GET CODE" BOX
   ========================================================= */

.embed-btn {
  margin-top: 12px;
  margin-left: 8px;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.embed-box {
  margin-top: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.embed-code {
  flex: 1;
  margin: 0;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 11.5px;
  color: var(--text);
  overflow-x: auto;
  white-space: nowrap;
}

.copy-btn {
  flex-shrink: 0;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Same [hidden] fix as everywhere else in this file */
.embed-box[hidden] {
  display: none;
}

/* =========================================================
   FOCUS STATES (accessibility)
   ========================================================= */

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
footer{
  border-top: 1px solid blue;
  font-family: 'Logo';

}

.footer-legal p{
  text-align: center;
  color: #3F414E;
  
}
.footer-men a{
  color: blue;
  text-decoration: none;
  
}
.logo-m{
  padding-top: 0;
}
.exp{
  padding-left: 51px;
}
.contact-btn{
  background: dodgerblue;
  color: white;
  padding: 0.6em;
  border: none;
}
.ad-slot {
  max-width: 728px;
  margin: 32px auto 0;
  display: flex;
  justify-content: center;
}
.ad{
  font-size: 18px;
  font-weight: 300;
  font-family: 'Logo';
}