/*
Theme Name: Gallery Theme
Theme URI: 
Author: 
Author URI: 
Description: Custom WordPress theme with media library gallery - 5-column grid layout
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gallery-theme
*/

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background: #fff;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-branding {
  flex-shrink: 0;
}

.site-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.site-title a {
  color: #333;
  text-decoration: none;
}

.main-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.main-navigation a {
  color: #333;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.main-navigation a:hover {
  color: #666;
}

/* Main content */
.site-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: start;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* Logos - contain instead of cover for better display */
.gallery-item.gallery-item--logo img {
  object-fit: contain;
  padding: 12px;
}

.gallery-link {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.3;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

.gallery-empty {
  text-align: center;
  padding: 3rem 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  color: #666;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Responsive - Mobile */
@media (max-width: 640px) {
  .site-header {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .main-navigation ul {
    gap: 1rem;
  }

  .site-main {
    padding: 1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

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

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2rem;
  border-top: 1px solid #eee;
  text-align: center;
  font-size: 0.875rem;
  color: #666;
}
