/* Gallery Page Performance Optimizations */

/* Disable all animations and transitions on gallery page */
.gallery-item *,
.gallery-categories *,
.hero-section *,
.featured-project * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Optimize images */
.gallery-image img,
.featured-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    display: block !important;
    contain: strict !important;
    will-change: auto !important;
    backface-visibility: hidden !important;
    transform: translateZ(0) !important;
    image-rendering: optimizeSpeed !important;
    image-rendering: -webkit-optimize-contrast !important;
}

/* Disable hover effects */
.gallery-item:hover,
.category-filter:hover,
.featured-project:hover {
    transform: none !important;
    box-shadow: none !important;
}

.gallery-item:hover .gallery-image img,
.featured-project:hover .featured-image img {
    transform: none !important;
}

/* Optimize layout */
.gallery-grid,
.gallery-categories,
.featured-project {
    contain: layout style paint !important;
    will-change: auto !important;
}

/* Disable blob animations completely */
.blob {
    display: none !important;
}

/* Optimize category filters */
.gallery-categories {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    justify-content: flex-start !important;
    margin-bottom: 2rem !important;
    position: relative !important;
    z-index: 9999 !important;
    background: #fff !important;
    padding: 1.5rem 0.5rem !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    min-height: 60px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.category-filter {
    margin: 0 !important;
    min-width: 150px !important;
    text-align: center !important;
    white-space: nowrap !important;
    flex: 0 1 auto !important;
    position: relative;
    z-index: 9999 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.category-filter:hover,
.category-filter.active {
    transform: none !important;
    box-shadow: var(--shadow-md) !important;
}

/* Optimize gallery overlay */
.gallery-overlay {
    transition: none !important;
    will-change: auto !important;
    contain: layout style paint !important;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1 !important;
}

/* Optimize overlay content */
.overlay-content h4,
.overlay-content p {
    transition: none !important;
    animation: none !important;
}

/* Optimize view project buttons */
.view-project-btn {
    transition: none !important;
    transform: none !important;
}

.view-project-btn:hover {
    transform: none !important;
}

/* Optimize gallery info */
.gallery-info h4,
.gallery-info p {
    transition: none !important;
    animation: none !important;
}

/* Optimize category badges */
.category-badge {
    transition: none !important;
    transform: none !important;
}

/* Optimize featured content */
.featured-content h3,
.featured-content p {
    transition: none !important;
    animation: none !important;
}

/* Optimize project meta */
.project-meta,
.project-date,
.project-client {
    transition: none !important;
    animation: none !important;
}

/* Optimize project details */
.project-details {
    transition: none !important;
}

.detail-item {
    transition: none !important;
}

/* Optimize tech tags */
.tech-tag {
    transition: none !important;
    transform: none !important;
}

/* Optimize load more button */
.load-more-btn {
    transition: none !important;
    transform: none !important;
}

.load-more-btn:hover {
    transform: none !important;
}

/* Optimize stats grid */
.stats-grid {
    contain: layout style paint !important;
}

.stat-card {
    transition: none !important;
    transform: none !important;
    contain: layout style paint !important;
}

.stat-card:hover {
    transform: none !important;
}

.stat-card .stat-icon {
    transition: none !important;
    transform: none !important;
}

.stat-card .stat-number {
    transition: none !important;
    animation: none !important;
}

.stat-card .stat-label {
    transition: none !important;
}

/* Optimize hero stats */
.hero-stat {
    transition: none !important;
    transform: none !important;
}

.hero-stat .stat-number {
    transition: none !important;
    animation: none !important;
}

/* Optimize section headers */
.section-header h2,
.section-header .section-subtitle {
    transition: none !important;
    animation: none !important;
}

/* Optimize gradient text */
.gradient-text {
    animation: none !important;
    transition: none !important;
}

/* Optimize hero content */
.hero-content h1,
.hero-content p,
.hero-content .hero-subtitle {
    transition: none !important;
    animation: none !important;
}

/* Optimize container */
.container {
    contain: layout style paint !important;
}

/* Optimize sections */
.section {
    contain: layout style paint !important;
    transition: none !important;
}

/* Optimize main element */
main {
    contain: layout style paint !important;
}

/* Optimize body */
body {
    contain: layout style paint !important;
    overflow-x: hidden !important;
}

/* Optimize header */
header {
    contain: layout style paint !important;
    transition: none !important;
}

/* Optimize navigation */
.nav-links {
    transition: none !important;
}

.nav-links a {
    transition: none !important;
}

/* Optimize hamburger */
.hamburger span {
    transition: none !important;
}

/* Optimize dropdown */
.dropdown-menu {
    transition: none !important;
    animation: none !important;
}

/* Optimize logo */
.logo img {
    transition: none !important;
}

/* Optimize footer */
.site-footer {
    contain: layout style paint !important;
}

/* Optimize all interactive elements */
a, button, input, textarea, select {
    transition: none !important;
}

/* Optimize scroll behavior */
html {
    scroll-behavior: auto !important;
}

/* Optimize font loading */
* {
    font-display: swap !important;
}

/* Optimize image loading */
img {
    loading: lazy !important;
    decoding: async !important;
}

/* Optimize CSS containment */
* {
    contain: layout style paint !important;
}

/* Disable all transforms and animations globally for gallery page */
* {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Re-enable only essential transforms */
.gallery-item,
.gallery-image,
.featured-project,
.featured-image,
.category-filter {
    transform: translateZ(0) !important;
}

/* Optimize for reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* --- Detailed Gallery Item Layout --- */
.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.gallery-item {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 800px;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 2px 16px rgba(30,40,90,0.07);
  overflow: hidden;
  align-items: stretch;
  min-height: 260px;
  margin: 0;
}

.gallery-image {
  flex: 0 0 260px;
  max-width: 320px;
  min-width: 180px;
  background: #f6f8fa;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #f0f0f0;
}

.featured-content {
  flex: 1 1 0%;
  padding: 2rem 2.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 1rem;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.98rem;
}

.category-tag {
  background: #f6f8fa;
  color: #e74c3c;
  font-weight: 600;
  border-radius: 2rem;
  padding: 0.35em 1.2em;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-right: 0.5em;
  display: inline-block;
}
.category-tag.security-services { color: #e74c3c; }
.category-tag.digital-branding { color: #8e44ad; }
.category-tag.system { color: #2980b9; }
.category-tag.training { color: #16a085; }
.category-tag.network { color: #f39c12; }

.project-date, .project-client {
  color: #6c7a89;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.gallery-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #1a2236;
}

.gallery-desc {
  color: #4a5568;
  font-size: 1.08rem;
  margin-bottom: 1.2rem;
}

.gallery-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.1rem;
}
.detail-item {
  color: #16a085;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 500;
}

.gallery-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em;
}
.tech-tag {
  background: #f6f8fa;
  color: #1a2236;
  border-radius: 1.5em;
  padding: 0.25em 0.9em;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.2em;
}

@media (max-width: 900px) {
  .gallery-item {
    flex-direction: column;
  }
  .gallery-image {
    max-width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
  }
  .featured-content {
    padding: 1.2rem 1rem;
  }
  .project-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
} 