/* ==========================================
   PORTFOLIO PAGE - COMPLETE REDESIGN
   Professional Agency Portfolio System
   January 2025 - Aixel Web Development
   ========================================== */

/* ==========================================
   PORTFOLIO HERO SECTION
   ========================================== */

.portfolio-hero {
  padding: 100px 0 80px;
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.portfolio-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30z' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E");
  opacity: 0.3;
  animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(-60px) translateY(-60px); }
}

.portfolio-hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.portfolio-hero-subtitle {
  font-size: 20px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

/* ==========================================
   PORTFOLIO SECTION
   ========================================== */

.portfolio-section {
  padding: 80px 0 120px;
  background: #ffffff;
}

/* Filter Navigation */
.portfolio-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
  animation: fadeInDown 0.6s ease-out;
}

.filter-btn {
  padding: 12px 24px;
  border: 2px solid #e5e7eb;
  background: white;
  color: #6c757d;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover {
  border-color: #000000;
  color: #000000;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #000000 0%, #333333 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.filter-count {
  font-size: 13px;
  opacity: 0.8;
}

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

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  position: relative;
  min-height: 400px;
}

/* Portfolio Card */
.portfolio-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: scale(1);
  will-change: opacity, transform;
}

/* Filter Animation States */
.portfolio-card.filter-hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

.portfolio-card.filter-visible {
  opacity: 1;
  transform: scale(1);
  position: relative;
  visibility: visible;
}

.portfolio-card:hover {
  transform: translateY(-8px) scale(1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Image Wrapper */
.portfolio-card-image-wrapper {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.portfolio-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 800ms cubic-bezier(0.4, 0, 0.2, 1), transform 400ms ease;
  will-change: opacity, transform;
}

.portfolio-card-image.loaded {
  opacity: 1;
}

.portfolio-card-image.error {
  opacity: 1;
  object-fit: contain;
  padding: 40px;
  background: linear-gradient(135deg, #000000 0%, #333333 100%);
}

.portfolio-card:hover .portfolio-card-image.loaded {
  transform: scale(1.08);
}

/* Fallback for when image fails to load */
.portfolio-card-image[src=""], 
.portfolio-card-image:not([src]) {
  background: linear-gradient(135deg, #000000 0%, #333333 100%);
  opacity: 1;
}

/* Skeleton Loader */
.portfolio-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    110deg,
    #f1f3f4 8%,
    rgba(255, 255, 255, 0.8) 18%,
    #f1f3f4 33%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s infinite linear;
  z-index: 2;
  border-radius: 16px 16px 0 0;
  transition: opacity 0.3s ease;
}

.portfolio-card-image.loaded ~ .portfolio-skeleton,
.portfolio-card-image.error ~ .portfolio-skeleton {
  opacity: 0;
  pointer-events: none;
}

@keyframes skeleton-shimmer {
  0% { 
    background-position: -200% 0; 
  }
  100% { 
    background-position: 200% 0; 
  }
}

/* Loading indicator for slow connections */
.portfolio-skeleton::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.2);
  border-top: 3px solid #000000;
  border-radius: 50%;
  animation: skeleton-spin 1s linear infinite;
}

@keyframes skeleton-spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Category Badge */
.portfolio-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #000000;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 12px;
  border-radius: 20px;
  z-index: 2;
}

/* Card Content */
.portfolio-card-content {
  padding: 24px;
}

.portfolio-card-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
  line-height: 1.3;
}

.portfolio-card-description {
  font-size: 15px;
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 16px;
}

.portfolio-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.portfolio-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #6c757d;
}

.portfolio-meta-item i {
  color: #000000;
}

/* Card CTA */
.portfolio-card-cta {
  width: 100%;
  padding: 12px 24px;
  background: transparent;
  border: 2px solid #000000;
  color: #000000;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 300ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.portfolio-card-cta:hover {
  background: #000000;
  color: white;
  gap: 12px;
}

.portfolio-card-cta i {
  transition: transform 300ms ease;
}

.portfolio-card-cta:hover i {
  transform: translateX(4px);
}

/* ==========================================
   EMPTY & LOADING STATES
   ========================================== */

.portfolio-empty {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1 / -1;
}

.empty-icon {
  font-size: 64px;
  color: #e5e7eb;
  margin-bottom: 24px;
}

.portfolio-empty h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.portfolio-empty p {
  font-size: 16px;
  color: #6c757d;
}

.portfolio-loading {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1 / -1;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #000000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.portfolio-loading p {
  font-size: 16px;
  color: #6c757d;
}

/* ==========================================
   PROJECT MODAL
   ========================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  cursor: pointer;
  animation: fadeIn 300ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  position: relative;
  background: white;
  border-radius: 20px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 2;
  transform: scale(0.9) translateY(20px);
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 25px 100px rgba(0, 0, 0, 0.5);
}

.modal.active .modal-container {
  transform: scale(1) translateY(0);
}

/* Custom Scrollbar */
.modal-container::-webkit-scrollbar {
  width: 8px;
}

.modal-container::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 0 20px 20px 0;
}

.modal-container::-webkit-scrollbar-thumb {
  background: #000000;
  border-radius: 4px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
  background: #333333;
}

.modal-close {
  position: sticky;
  top: 20px;
  right: 20px;
  float: right;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  margin-bottom: -48px;
}

/* Modal Content */
.modal-content {
  padding: 48px;
  clear: both;
}

.modal-header {
  margin-bottom: 32px;
}

.modal-category {
  display: inline-block;
  background: linear-gradient(135deg, #000000 0%, #333333 100%);
  color: white;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 8px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.modal-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 12px;
  line-height: 1.2;
}

.modal-subtitle {
  font-size: 18px;
  color: #6c757d;
  line-height: 1.6;
}

/* Modal Hero Image */
.modal-hero-image {
  width: 100%;
  height: 400px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Project Details Grid */
.project-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
  padding: 32px;
  background: #f8f9fa;
  border-radius: 12px;
}

.project-detail {
  text-align: center;
}

.project-detail-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #000000;
  margin-bottom: 8px;
}

.project-detail-value {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
}

/* Modal Sections */
.modal-section {
  margin-bottom: 40px;
}

.modal-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-section-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.modal-section-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
}

.modal-section-content {
  font-size: 16px;
  color: #495057;
  line-height: 1.8;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  transition: all 300ms ease;
}

.feature-item:hover {
  border-color: #667eea;
  transform: translateX(4px);
}

.feature-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
}

.feature-text {
  font-size: 15px;
  color: #495057;
  line-height: 1.5;
}

/* Technologies */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.tech-badge {
  padding: 10px 20px;
  background: #f8f9fa;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  transition: all 300ms ease;
}

.tech-badge:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
  transform: translateY(-2px);
}

/* Testimonial */
.testimonial-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px;
  border-radius: 16px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.testimonial-section::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 200px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.1);
  line-height: 1;
}

.testimonial-content {
  position: relative;
  z-index: 2;
}

.testimonial-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  justify-content: center;
}

.testimonial-stars i {
  color: #FFD700;
  font-size: 18px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.testimonial-quote {
  font-size: 20px;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 24px;
}

.testimonial-author {
  font-size: 16px;
  font-weight: 700;
  opacity: 0.9;
}

.testimonial-role {
  font-size: 14px;
  opacity: 0.8;
  margin-top: 4px;
}

/* Website Link Section */
.website-link-section {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: white;
  padding: 40px;
  border-radius: 16px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
}

.website-link-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='2' fill='rgba(255,255,255,0.1)'/%3E%3C/svg%3E");
  animation: patternFloat 20s linear infinite;
}

@keyframes patternFloat {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-40px, -40px) rotate(360deg); }
}

.website-link-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.website-link-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.website-link-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.website-link-icon i {
  font-size: 20px;
  color: white;
}

.website-link-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: white;
}

.website-link-description {
  font-size: 16px;
  opacity: 0.9;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.website-link-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.website-link-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 600ms;
}

.website-link-button:hover::before {
  left: 100%;
}

.website-link-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.website-link-text {
  position: relative;
  z-index: 2;
}

.website-link-arrow {
  position: relative;
  z-index: 2;
  transition: transform 300ms ease;
}

.website-link-button:hover .website-link-arrow {
  transform: translateX(4px);
}

/* Modal CTA */
.modal-cta {
  text-align: center;
  padding: 40px;
  background: #f8f9fa;
  border-radius: 16px;
  margin-top: 40px;
}

.modal-cta-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 12px;
}

.modal-cta-text {
  font-size: 16px;
  color: #6c757d;
  margin-bottom: 24px;
}

.modal-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 300ms ease;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.modal-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
  gap: 12px;
}

.modal-cta-button i {
  transition: transform 300ms ease;
}

.modal-cta-button:hover i {
  transform: translateX(4px);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
  }
  
  .project-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .portfolio-hero {
    padding: 120px 0 60px;
  }
  
  .portfolio-hero-title {
    font-size: 36px;
  }
  
  .portfolio-hero-subtitle {
    font-size: 18px;
  }
  
  .portfolio-section {
    padding: 60px 0 80px;
  }
  
  .portfolio-filter {
    gap: 8px;
  }
  
  .filter-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .modal-content {
    padding: 32px 24px;
  }
  
  .modal-hero-image {
    height: auto;
    max-height: 50vh;
    object-fit: contain;
  }
  
  .project-details-grid {
    grid-template-columns: 1fr 1fr;
    padding: 24px;
    gap: 16px;
  }
  
  .project-detail-value {
    font-size: 20px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .testimonial-section {
    padding: 32px 24px;
  }
  
  .testimonial-quote {
    font-size: 18px;
  }
  
  .modal-cta {
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: 10px;
  }
  
  .modal-container {
    border-radius: 16px;
    max-height: 95vh;
  }
  
  .modal-close {
    width: 40px;
    height: 40px;
    top: 10px;
    right: 10px;
    font-size: 20px;
  }
  
  .modal-content {
    padding: 24px 16px;
  }
  
  .modal-hero-image {
    height: auto !important;
    max-height: 45vh;
    width: 100%;
    object-fit: contain;
    border-radius: 12px;
  }
  
  .modal-title {
    font-size: 24px;
  }
  
  .modal-subtitle {
    font-size: 16px;
  }
  
  .project-details-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-section-title {
    font-size: 20px;
  }
  
  .modal-section-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .testimonial-section::before {
    font-size: 120px;
    top: -10px;
    left: 10px;
  }
  
  .modal-cta {
    padding: 24px 16px;
  }
  
  .modal-cta-button {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.modal:focus {
  outline: none;
}

.filter-btn:focus-visible,
.portfolio-card-cta:focus-visible,
.modal-close:focus-visible,
.modal-cta-button:focus-visible {
  outline: 3px solid #000000;
  outline-offset: 2px;
}

.portfolio-card:focus-within {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.3);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
  .portfolio-filter,
  .modal,
  .portfolio-card-cta {
    display: none;
  }
  
  .portfolio-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
  
  .portfolio-grid {
    gap: 20px;
  }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .portfolio-skeleton {
    animation: none;
    background: #e5e7eb;
  }
  
  .spinner {
    animation: none;
    border-top-color: #667eea;
  }
}

/* ==========================================
   MOBILE PORTFOLIO ENHANCEMENTS
   Professional Mobile Design System
   ========================================== */

@media (max-width: 767px) {
  .portfolio-hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
  }
  
  .portfolio-hero-title {
    font-size: 40px;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
  }
  
  .portfolio-hero-subtitle {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.9;
    padding: 0 20px;
  }
  
  /* Portfolio Filter Mobile Enhancement */
  .portfolio-filter {
    padding: 0 20px 32px;
    margin-bottom: 40px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  
  .portfolio-filter::-webkit-scrollbar {
    display: none;
  }
  
  .filter-btn {
    white-space: nowrap;
    padding: 12px 20px;
    margin-right: 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 24px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--color-gray-dark);
    transition: all 0.3s ease;
    min-width: auto;
  }
  
  .filter-btn.active {
    background: var(--color-black);
    color: white;
    border-color: var(--color-black);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  .filter-count {
    font-size: 12px;
    opacity: 0.7;
  }
  
  /* Portfolio Grid Mobile Enhancement */
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 20px;
  }
  
  .portfolio-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  }
  
  .portfolio-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 0;
    transition: all 0.4s ease;
  }
  
  .portfolio-card:hover .portfolio-image {
    transform: scale(1.02);
  }
  
  .portfolio-content {
    padding: 24px;
  }
  
  .portfolio-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 8px;
    line-height: 1.3;
  }
  
  .portfolio-category {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
  }
  
  .portfolio-description {
    font-size: 15px;
    color: var(--color-gray);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .portfolio-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
  }
  
  .portfolio-view-btn:hover {
    color: var(--color-black);
    transform: translateX(4px);
  }
  
  /* Portfolio Empty State Mobile */
  .portfolio-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-gray);
  }
  
  .empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
  }
  
  .portfolio-empty h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--color-gray-dark);
  }
  
  .portfolio-empty p {
    font-size: 15px;
    opacity: 0.8;
  }
  
  /* Modal Mobile Enhancement */
  .modal-container {
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    margin: 20px;
  }
  
  .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    z-index: 1001;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }
  
  .modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
  }
  
  .modal-content {
    padding: 24px;
    overflow-y: auto;
    max-height: 85vh;
  }
  
  .modal-hero-image {
    width: 100%;
    height: auto;
    max-height: 50vh;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 24px;
    background: #f8f9fa;
  }
  
  .modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.3;
  }
  
  .modal-category {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 20px;
  }
  
  .modal-description {
    font-size: 15px;
    color: var(--color-gray);
    line-height: 1.6;
    text-align: center;
    margin-bottom: 24px;
  }
}

@media (max-width: 479px) {
  .portfolio-hero-title {
    font-size: 36px;
  }
  
  .portfolio-hero-subtitle {
    font-size: 16px;
    padding: 0 16px;
  }
  
  .portfolio-filter {
    padding: 0 16px 24px;
  }
  
  .portfolio-grid {
    padding: 0 16px;
    gap: 24px;
  }
  
  .portfolio-content {
    padding: 20px;
  }
  
  .portfolio-title {
    font-size: 18px;
  }
  
  .portfolio-description {
    font-size: 14px;
  }
  
  .modal-content {
    padding: 20px;
  }
  
  .modal-title {
    font-size: 20px;
  }
  
  .modal-description {
    font-size: 14px;
  }
}

/* ============================================
   FLOATING WHATSAPP BUTTON
   ============================================ */
.floating-whatsapp {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    text-decoration: none;
    transition: all 0.3s ease;
}

.floating-whatsapp i {
    font-size: 2rem;
    color: #fff;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.4);
    animation: whatsappPulse 2s ease-out infinite;
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: #ffffff;
    color: #128C7E;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

.floating-whatsapp:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    right: 75px;
}

@media (max-width: 767px) {
    .floating-whatsapp {
        bottom: 16px;
        right: 16px;
        width: 54px;
        height: 54px;
    }
    
    .floating-whatsapp i {
        font-size: 1.75rem;
    }
    
    .whatsapp-tooltip {
        display: none;
    }
}