/* Portfolio Styles */

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #8fbc8f 0%, #556b2f 100%);
  padding: 0px 0 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 70px;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>')
    repeat;
  opacity: 0.3;
}

.page-header h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  animation: slideInDown 1s ease-out;
}

.page-header p {
  font-size: 1.3rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
  animation: slideInUp 1s ease-out 0.3s both;
}

/* Portfolio Filter */
.portfolio-filter {
  padding: 60px 0 40px;
  background: #f8f9fa;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.filter-btn {
  background: white;
  border: 2px solid #8fbc8f;
  color: #8fbc8f;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s;
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn:hover,
.filter-btn.active {
  background: #8fbc8f;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(143, 188, 143, 0.3);
}

/* Portfolio Gallery */
.portfolio-gallery {
  padding: 40px 0 80px;
  background: white;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.portfolio-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  background: white;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  cursor: pointer;
  opacity: 1;
  transform: scale(1);
}

.portfolio-item.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.portfolio-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.portfolio-image svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-image svg {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 30px 20px 20px;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

.portfolio-info h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.portfolio-info p {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 10px;
}

.portfolio-category {
  display: inline-block;
  background: #8fbc8f;
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Success Stories */
.success-stories {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.success-stories h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 60px;
  position: relative;
}

.success-stories h2::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #8fbc8f, #556b2f);
  border-radius: 2px;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.story-item {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.story-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #8fbc8f, #556b2f);
}

.story-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.story-image {
  text-align: center;
  margin-bottom: 20px;
}

.story-image svg {
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(143, 188, 143, 0.3);
}

.story-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  text-align: center;
}

.story-course {
  color: #8fbc8f;
  font-weight: 500;
  text-align: center;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.story-text {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
  font-style: italic;
  position: relative;
  padding-left: 20px;
}

.story-text::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -5px;
  font-size: 2rem;
  color: #8fbc8f;
  font-family: serif;
}

.story-achievement {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.story-achievement span {
  background: #f8f9fa;
  color: #333;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid #e9ecef;
}

/* Portfolio Statistics */
.portfolio-stats {
  padding: 80px 0;
  background: linear-gradient(135deg, #8fbc8f 0%, #556b2f 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.portfolio-stats::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>')
    repeat;
}

.portfolio-stats h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 60px;
  position: relative;
  z-index: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
  padding: 30px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.stat-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  display: block;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
  color: white;
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 500;
}

/* CTA Section */
.cta-section {
  padding: 80px 0;
  background: white;
  text-align: center;
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
}

.cta-section p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  padding: 15px 30px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #8fbc8f, #556b2f);
  color: white;
  border: none;
}

.btn-secondary {
  background: transparent;
  color: #8fbc8f;
  border: 2px solid #8fbc8f;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(143, 188, 143, 0.4);
}

.btn-secondary:hover {
  background: #8fbc8f;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(143, 188, 143, 0.4);
}

/* Portfolio Modal */
.portfolio-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background-color: white;
  margin: 5% auto;
  padding: 0;
  width: 90%;
  max-width: 800px;
  border-radius: 20px;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.modal-image {
  height: 300px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
}

.modal-image svg,
.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-info {
  padding: 30px;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.modal-description {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
}

.modal-category {
  display: inline-block;
  background: #8fbc8f;
  color: white;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.modal-details {
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.modal-details p {
  margin-bottom: 8px;
  color: #666;
}

.modal-details strong {
  color: #333;
  font-weight: 600;
}

/* Animations */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-header {
    padding: 100px 0 60px;
  }

  .page-header h1 {
    font-size: 2.5rem;
  }

  .page-header p {
    font-size: 1.1rem;
  }

  .portfolio-filter {
    padding: 40px 0 30px;
  }

  .filter-buttons {
    gap: 10px;
  }

  .filter-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .portfolio-item {
    margin: 0 10px;
  }

  .success-stories {
    padding: 60px 0;
  }

  .success-stories h2 {
    font-size: 2rem;
    margin-bottom: 40px;
  }

  .stories-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .story-item {
    padding: 25px;
  }

  .portfolio-stats {
    padding: 60px 0;
  }

  .portfolio-stats h2 {
    font-size: 2rem;
    margin-bottom: 40px;
  }

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

  .stat-item {
    padding: 20px 15px;
  }

  .stat-icon {
    font-size: 2.5rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .cta-section {
    padding: 60px 0;
  }

  .cta-section h2 {
    font-size: 2rem;
  }

  .cta-section p {
    font-size: 1.1rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .modal-info {
    padding: 20px;
  }

  .modal-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 2rem;
  }

  .filter-buttons {
    flex-direction: column;
    align-items: center;
  }

  .filter-btn {
    width: 100%;
    max-width: 200px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .story-achievement {
    flex-direction: column;
    gap: 10px;
  }

  .story-achievement span {
    text-align: center;
  }
}

/* Print Styles */
@media print {
  .portfolio-modal,
  .cookie-banner,
  .mobile-menu-toggle,
  .cta-section {
    display: none !important;
  }

  .portfolio-item {
    break-inside: avoid;
    margin-bottom: 20px;
  }

  .page-header {
    background: #8fbc8f !important;
    -webkit-print-color-adjust: exact;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .portfolio-overlay {
    background: rgba(0, 0, 0, 0.9);
  }

  .filter-btn {
    border-width: 3px;
  }

  .story-item {
    border: 2px solid #333;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .portfolio-item,
  .story-item,
  .stat-item,
  .btn-primary,
  .btn-secondary,
  .filter-btn {
    transition: none;
  }

  .portfolio-image svg {
    transition: none;
  }

  .animate-on-scroll {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
