/*



Theme Name: CopyrightFreePic



Theme URI: https://copyrightfreepic.com



Author: CopyrightFreePic



Description: Download free high-quality images, stock photos, backgrounds, icons, and AI-generated images for personal and commercial use.



Version: 1.6 (Collage-Optimized, Core-Web-Vitals & SEO-Ready)



*/







/* =========================================



RESET & GLOBAL STYLES (SEO & UX Optimized)



========================================= */







*,



*::before,



*::after {



  margin: 0;



  padding: 0;



  box-sizing: border-box;



}







html {



  scroll-behavior: smooth;



  -webkit-font-smoothing: antialiased;



  -moz-osx-font-smoothing: grayscale;



  -webkit-text-size-adjust: 100%;



}







body {



  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;



  background: #f8fafc;



  color: #0f172a;



  line-height: 1.6;



  text-rendering: optimizeLegibility;



  overflow-x: hidden;



}







a {



  text-decoration: none;



  color: inherit;



}







img {



  max-width: 100%;



  height: auto;



  display: block;



  font-style: italic; /* Style for missing alt text during render */



}







.container {



  width: 92%;



  max-width: 1400px;



  margin: 0 auto;



}







/* Screen Reader Accessibility Class (WCAG 2.1 Compliant) */



.screen-reader-text {



  border: 0;



  clip: rect(1px, 1px, 1px, 1px);



  clip-path: inset(50%);



  height: 1px;



  margin: -1px;



  overflow: hidden;



  padding: 0;



  position: absolute;



  width: 1px;



  word-wrap: normal !important;



}







.screen-reader-text:focus {



  background-color: #ffffff;



  clip: auto !important;



  clip-path: none !important;



  color: #2563eb;



  display: block;



  font-size: 14px;



  font-weight: bold;



  height: auto;



  left: 5px;



  line-height: normal;



  padding: 15px 23px 14px;



  text-decoration: none;



  top: 5px;



  width: auto;



  z-index: 100000;



  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);



}







/* =========================================



HEADER (Sticky & Glassmorphism)



========================================= */







.site-header {



  position: sticky;



  top: 0;



  z-index: 1000;



  padding: 16px 0;



  background: rgba(255, 255, 255, 0.95);



  backdrop-filter: blur(10px);



  -webkit-backdrop-filter: blur(10px);



  border-bottom: 1px solid #e2e8f0;



  will-change: transform;



}







.header-inner {



  display: flex;



  justify-content: space-between;



  align-items: center;



}







.logo {



  font-size: 22px;



  font-weight: 800;



  letter-spacing: -0.5px;



}







.logo span {



  color: #2563eb;



}







nav.main-navigation {



  display: flex;



  align-items: center;



  gap: 24px;



}







nav.main-navigation a {



  font-size: 15px;



  font-weight: 500;



  color: #475569;



  transition: color 0.2s ease;



}







nav.main-navigation a:hover,



nav.main-navigation a:focus-visible {



  color: #2563eb;



  outline: none;



}







/* Upload Action Button */



.btn-upload {



  background: #2563eb;



  color: #ffffff !important;



  padding: 8px 18px;



  border-radius: 6px;



  font-weight: 600;



  transition: background 0.2s ease, transform 0.1s ease;



}







.btn-upload:hover {



  background: #1d4ed8;



  transform: translateY(-1px);



}







/* =========================================



HERO SECTION



========================================= */







.hero {



  padding: 80px 20px;



  text-align: center;



  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);



  border-bottom: 1px solid #e2e8f0;



}







.hero h1 {



  font-size: 44px;



  font-weight: 800;



  letter-spacing: -1px;



  margin-bottom: 12px;



  color: #0f172a;



  line-height: 1.25;



}







.hero p {



  font-size: 18px;



  color: #64748b;



  margin-bottom: 32px;



}







/* =========================================



SEARCH BOX & TRENDING TAGS



========================================= */







.cpf-search {



  max-width: 680px;



  margin: 0 auto;



  display: flex;



  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);



  border-radius: 12px;



  overflow: hidden;



  border: 1px solid #cbd5e1;



  background: #ffffff;



  transition: border-color 0.2s ease, box-shadow 0.2s ease;



}







.cpf-search:focus-within {



  border-color: #2563eb;



  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);



}







.cpf-search input {



  flex: 1;



  padding: 16px 20px;



  border: none;



  font-size: 16px;



  outline: none;



  background: transparent;



}







.cpf-search button {



  padding: 16px 28px;



  border: none;



  background: #2563eb;



  color: #ffffff;



  cursor: pointer;



  font-size: 15px;



  font-weight: 600;



  transition: background 0.2s ease;



}







.cpf-search button:hover {



  background: #1d4ed8;



}







/* Popular Tag Pills */



.trending-tags {



  margin-top: 18px;



  display: flex;



  align-items: center;



  justify-content: center;



  gap: 8px;



  flex-wrap: wrap;



  font-size: 13px;



  color: #64748b;



}







.tag-pill {



  background: #ffffff;



  padding: 4px 12px;



  border-radius: 20px;



  border: 1px solid #e2e8f0;



  color: #334155;



  transition: all 0.2s ease;



}







.tag-pill:hover,



.tag-pill:focus-visible {



  border-color: #2563eb;



  color: #2563eb;



  background: #eff6ff;



  outline: none;



}







/* =========================================



CATEGORY GRID STYLES



========================================= */







.categories-section {



  padding: 40px 0 20px;



}







.categories-section h2 {



  font-size: 22px;



  font-weight: 700;



  margin-bottom: 20px;



  letter-spacing: -0.5px;



}







.category-grid {



  display: flex;



  gap: 12px;



  flex-wrap: wrap;



}







.category-card {



  background: #ffffff;



  border: 1px solid #e2e8f0;



  padding: 12px 20px;



  border-radius: 8px;



  font-size: 14px;



  font-weight: 600;



  color: #334155;



  transition: all 0.2s ease;



  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);



}







.category-card p {



  font-size: 12px;



  font-weight: 400;



  color: #64748b;



  margin-top: 2px;



}







.category-card:hover,



.category-card:focus-visible {



  background: #2563eb;



  color: #ffffff;



  border-color: #2563eb;



  transform: translateY(-2px);



  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);



  outline: none;



}







.category-card:hover p,



.category-card:focus-visible p {



  color: rgba(255, 255, 255, 0.85);



}







/* =========================================



IMAGE SECTION & MASONRY COLLAGE GRID (LCP & CLS Optimized)



========================================= */







.image-section {



  padding: 48px 0 80px;



}







.image-section-header {



  display: flex;



  justify-content: space-between;



  align-items: center;



  margin-bottom: 24px;



}







.image-section h2 {



  font-size: 24px;



  font-weight: 700;



  letter-spacing: -0.5px;



}







/* Masonry Columns Layout with Paint Performance Enhancements */



.image-grid {



  column-count: 4;



  column-gap: 16px;



  width: 100%;



}







.image-card {



  break-inside: avoid;



  page-break-inside: avoid;



  margin-bottom: 16px;



  border-radius: 12px;



  overflow: hidden;



  background: #0f172a;



  position: relative;



  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);



  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;



  content-visibility: auto; /* Optimizes off-screen render performance */



  contain-intrinsic-size: 300px;



}







.image-card:hover {



  transform: translateY(-4px);



  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);



}







.image-thumb-wrapper {



  position: relative;



  width: 100%;



  display: block;



  overflow: hidden;



}







.image-thumb-wrapper img {



  width: 100%;



  height: auto;



  display: block;



  object-fit: cover;



  transition: transform 0.5s ease;



  will-change: transform;



}







.image-card:hover .image-thumb-wrapper img {



  transform: scale(1.04);



}







/* Dynamic Gradient Overlay on Hover */



.image-thumb-wrapper::after {



  content: "";



  position: absolute;



  inset: 0;



  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.85) 100%);



  opacity: 0;



  pointer-events: none;



  transition: opacity 0.3s ease;



}







.image-thumb-wrapper:hover::after {



  opacity: 1;



}







/* Overlay Content (Title, Author, Download Button) - Strictly Hidden Until Hover */



.card-overlay-content {



  position: absolute;



  bottom: 0;



  left: 0;



  right: 0;



  padding: 16px;



  z-index: 3;



  display: flex;



  justify-content: space-between;



  align-items: flex-end;



  opacity: 0;



  transform: translateY(8px);



  transition: opacity 0.3s ease, transform 0.3s ease;



}







.image-thumb-wrapper:hover .card-overlay-content,



.image-thumb-wrapper:focus-within .card-overlay-content {



  opacity: 1;



  transform: translateY(0);



}







.card-info {



  color: #ffffff;



}







.card-title {



  color: #ffffff;



  font-size: 14px;



  font-weight: 600;



  line-height: 1.3;



  margin: 0;



  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);



}







.card-author {



  color: rgba(255, 255, 255, 0.85);



  font-size: 12px;



  display: block;



  margin-top: 2px;



}







.card-download-btn {



  background: #ffffff;



  color: #0f172a;



  padding: 8px 14px;



  border-radius: 6px;



  font-size: 12px;



  font-weight: 700;



  text-decoration: none;



  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);



  transition: background 0.2s ease, transform 0.1s ease;



}







.card-download-btn:hover {



  background: #f1f5f9;



  transform: scale(1.03);



}







/* Infinite Scroll Loader */



.cpf-loader {



  text-align: center;



  padding: 30px;



  font-weight: 600;



  color: #64748b;



}







/* =========================================



AI IMAGE GENERATOR MODAL (Locked & Hidden by Default)



========================================= */







.cpf-modal {



  display: none !important;



  position: fixed;



  top: 0;



  left: 0;



  width: 100%;



  height: 100%;



  background: rgba(15, 23, 42, 0.6);



  backdrop-filter: blur(4px);



  -webkit-backdrop-filter: blur(4px);



  justify-content: center;



  align-items: center;



  z-index: 9999;



}







.cpf-modal.is-active,



.cpf-modal.show {



  display: flex !important;



}







.cpf-modal-content {



  background: #ffffff;



  padding: 32px;



  border-radius: 16px;



  width: 90%;



  max-width: 500px;



  position: relative;



  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);



}







.cpf-close-modal {



  position: absolute;



  right: 20px;



  top: 15px;



  font-size: 24px;



  color: #64748b;



  cursor: pointer;



}







.cpf-modal-content input {



  width: 100%;



  padding: 12px;



  border: 1px solid #cbd5e1;



  border-radius: 8px;



  margin: 16px 0;



  box-sizing: border-box;



}







.cpf-ai-submit-btn {



  width: 100%;



  background: #8b5cf6;



  color: #ffffff;



  border: none;



  padding: 12px;



  border-radius: 8px;



  font-weight: 600;



  cursor: pointer;



  transition: background 0.2s ease;



}







.cpf-ai-submit-btn:hover {



  background: #7c3aed;



}







/* =========================================



ADMIN GALLERY PREVIEW (WordPress Backend)



========================================= */







#cpf-gallery-preview {



  display: flex;



  flex-wrap: wrap;



  gap: 16px;



  margin: 20px 0;



}







.cpf-gallery-item {



  width: 150px;



  padding: 8px;



  border: 1px solid #e2e8f0;



  border-radius: 10px;



  background: #ffffff;



  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);



  transition: transform 0.2s ease, box-shadow 0.2s ease;



  overflow: hidden;



}







.cpf-gallery-item:hover {



  transform: translateY(-2px);



  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);



}







.cpf-gallery-item img {



  display: block;



  width: 100%;



  height: 120px;



  object-fit: cover;



  border-radius: 6px;



  margin-bottom: 8px;



}







.cpf-remove-image {



  width: 100%;



  padding: 7px 10px;



  border: none;



  border-radius: 6px;



  background: #ef4444;



  color: #ffffff;



  font-size: 13px;



  font-weight: 600;



  cursor: pointer;



  transition: background-color 0.2s ease;



}







.cpf-remove-image:hover {



  background: #dc2626;



}







/* =========================================



FOOTER



========================================= */







.site-footer {



  padding: 48px 0;



  background: #0f172a;



  color: #94a3b8;



  text-align: center;



  border-top: 1px solid #1e293b;



}







.footer-nav {



  display: flex;



  justify-content: center;



  gap: 20px;



  flex-wrap: wrap;



  margin-bottom: 20px;



}







.footer-nav a {



  color: #cbd5e1;



  font-size: 14px;



  font-weight: 500;



  transition: color 0.2s ease;



}







.footer-nav a:hover,



.footer-nav a:focus-visible {



  color: #2563eb;



  outline: none;



}







.copyright-text {



  font-size: 13px;



  color: #64748b;



}







/* =========================================



RESPONSIVE DESIGN FOR COLLAGE



========================================= */







@media (max-width: 1200px) {



  .image-grid {



    column-count: 3;



  }



}







@media (max-width: 992px) {



  .hero h1 {



    font-size: 36px;



  }



}







@media (max-width: 768px) {



  .header-inner {



    flex-direction: column;



    gap: 16px;



  }







  nav.main-navigation {



    gap: 16px;



    flex-wrap: wrap;



    justify-content: center;



  }







  .hero {



    padding: 50px 16px;



  }







  .hero h1 {



    font-size: 30px;



  }







  .hero p {



    font-size: 15px;



  }







  .cpf-search {



    flex-direction: column;



    box-shadow: none;



    border: none;



    background: transparent;



  }







  .cpf-search input {



    border-radius: 8px;



    background: #ffffff;



    border: 1px solid #cbd5e1;



    margin-bottom: 8px;



  }







  .cpf-search button {



    border-radius: 8px;



    width: 100%;



  }







  .image-grid {



    column-count: 2;



    column-gap: 12px;



  }







  .image-card {



    margin-bottom: 12px;



  }







  .category-grid {



    justify-content: center;



  }



}







@media (max-width: 480px) {



  .logo {



    font-size: 20px;



  }







  .hero h1 {



    font-size: 26px;



  }







  .image-grid {



    column-count: 1;



  }



}







/* =========================================



ARTICLE SLIDER NAVIGATION & SCROLLBAR STYLES



========================================= */







/* Hide native browser scrollbars for clean UI while keeping native touch/swipe */



.article-track-wrapper::-webkit-scrollbar {



  display: none;



}







.article-card:hover {



  transform: translateY(-3px);



  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);



}







.slider-btn {



  position: absolute;



  top: 50%;



  transform: translateY(-50%);



  background: #ffffff;



  border: 1px solid #cbd5e1;



  border-radius: 50%;



  width: 42px;



  height: 42px;



  cursor: pointer;



  z-index: 10;



  font-size: 18px;



  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);



  transition: all 0.2s ease;



  display: flex;



  align-items: center;



  justify-content: center;



}







.slider-btn:hover {



  background: #2563eb;



  color: #ffffff;



  border-color: #2563eb;



}







.prev-btn {



  left: -20px;



}







.next-btn {



  right: -20px;



}







@media (max-width: 768px) {



  .prev-btn {



    left: -5px;



  }



  .next-btn {



    right: -5px;



  }



}