/**
* Promotion Modal Styles
* PCCoE R&D Outreach Website
*/

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

/* Modal Container */
.modal-container {
  background: #ffffff;
  border-radius: 20px;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

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

.modal-container.maximized {
  max-width: 95vw;
  max-height: 95vh;
}

/* Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #06b6d4 100%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 20px 20px 0 0;
  color: white;
  flex-shrink: 0;
  z-index: 10;
}

.modal-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  background: transparent;
  border-radius: 50%;
  padding: 5px;
}

.modal-title h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
  font-family: var(--heading-font, 'Raleway', sans-serif);
  letter-spacing: 0.5px;
}

.modal-title h3 strong {
  font-weight: 700;
  font-size: 1.35rem;
}

.modal-title p {
  margin: 0;
  margin-top: 3px;
  font-size: 0.9rem;
  opacity: 0.95;
  color: white;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.action-btn.close-btn:hover {
  background: #ef4444;
}

/* Modal Content */
.modal-content {
  padding: 2rem;
  background: #ffffff;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  display: block;
}

.content-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

.content-title h3 {
  color: var(--heading-color, #011e2c);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  font-family: var(--heading-font, 'Raleway', sans-serif);
}

.content-title p {
  color: var(--default-color, #010608);
  opacity: 0.7;
  margin: 0;
}

/* Event Image */
.event-image {
  border-radius: 15px;
  overflow: hidden !important;
  margin-bottom: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  max-width: 45%;
  width: 45%;
  flex-shrink: 0;
  max-height: min(60vh, 650px);
  display: block !important;
  visibility: visible !important;
  min-height: 0;
  background: #f0f0f0;
}

.event-image img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  transition: transform 0.3s ease;
  max-width: 100%;
  max-height: min(60vh, 650px);
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.event-image:hover img {
  transform: scale(1.02);
}

/* Event Details */
.event-details {
  text-align: left;
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  max-height: min(60vh, 650px);
  padding-right: 0.5rem;
}

.event-details h4 {
  color: var(--accent-color, #04415f);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  margin-top: 0;
  font-family: var(--heading-font, 'Raleway', sans-serif);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.3;
}

.achievement-link-icon {
  color: var(--accent-color, #04415f);
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  opacity: 0.7;
}

.achievement-link-icon:hover {
  opacity: 1;
  color: #3b82f6;
  transform: translateY(-2px);
}

.event-details > p {
  color: var(--default-color, #010608);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.additional-content {
  background: var(--background-color, #f1f5f7);
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.additional-content p {
  color: var(--heading-color, #011e2c);
  font-weight: 500;
  margin-bottom: 1rem;
}

.additional-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.additional-content li {
  color: var(--default-color, #010608);
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
}

.additional-content li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-color, #04415f);
  font-weight: bold;
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary {
  flex: 1;
  min-width: 140px;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 0.95rem;
  font-family: var(--nav-font, 'Poppins', sans-serif);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color, #04415f) 0%, #2086b8 100%);
  color: white;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(4, 65, 95, 0.3);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--accent-color, #04415f);
  border: 2px solid var(--accent-color, #04415f);
}

.btn-secondary:hover {
  background: var(--accent-color, #04415f);
  color: white;
  transform: translateY(-2px);
}

/* Achievements Carousel */
.achievements-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-bottom: 1rem;
}

.achievements-carousel .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.achievements-carousel .swiper-slide {
  height: auto;
  display: flex;
}

.achievement-item {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
}

.achievements-carousel .swiper-button-next,
.achievements-carousel .swiper-button-prev {
  color: var(--accent-color, #04415f);
  background: rgba(255, 255, 255, 0.9);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.achievements-carousel .swiper-button-next:hover,
.achievements-carousel .swiper-button-prev:hover {
  background: var(--accent-color, #04415f);
  color: white;
  transform: scale(1.1);
}

.achievements-carousel .swiper-button-next::after,
.achievements-carousel .swiper-button-prev::after {
  font-size: 18px;
  font-weight: bold;
}

.achievements-carousel .swiper-pagination {
  position: relative;
  margin-top: 1.5rem;
  bottom: auto;
}

.achievements-carousel .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: var(--accent-color, #04415f);
  opacity: 0.3;
  transition: all 0.3s ease;
}

.achievements-carousel .swiper-pagination-bullet-active {
  opacity: 1;
  transform: scale(1.2);
  background: var(--accent-color, #04415f);
}

/* Animations */
@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Scrollbar Styling for Modal */
.modal-container::-webkit-scrollbar,
.event-details::-webkit-scrollbar {
  width: 6px;
}

.modal-container::-webkit-scrollbar-track,
.event-details::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb,
.event-details::-webkit-scrollbar-thumb {
  background: var(--accent-color, #04415f);
  border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb:hover,
.event-details::-webkit-scrollbar-thumb:hover {
  background: #2086b8;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .achievement-item {
    flex-direction: column;
  }

  .event-image {
    max-width: 100%;
    width: 100%;
    margin-bottom: 1.5rem;
    max-height: min(50vh, 500px);
  }

  .event-image img {
    max-height: min(50vh, 500px);
    object-fit: contain;
  }

  .event-details {
    max-height: none;
    overflow-y: visible;
  }
}

@media (max-width: 768px) {
  .modal-overlay {
    padding: 10px;
  }

  .modal-container {
    border-radius: 15px;
    max-height: 95vh;
  }

  .modal-header {
    padding: 1rem 1.5rem;
    border-radius: 15px 15px 0 0;
  }

  .modal-logo {
    gap: 0.75rem;
  }

  .logo-img {
    width: 40px;
    height: 40px;
  }

  .modal-title h3 {
    font-size: 1rem;
  }

  .modal-title p {
    font-size: 0.75rem;
  }

  .action-btn {
    width: 32px;
    height: 32px;
  }

  .action-btn svg {
    width: 16px;
    height: 16px;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .content-title h3 {
    font-size: 1.5rem;
  }

  .event-details h4 {
    font-size: 1.25rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .modal-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .modal-actions {
    align-self: flex-end;
  }

  .modal-title h3 {
    font-size: 0.9rem;
  }

  .content-title h3 {
    font-size: 1.25rem;
  }

  .event-details h4 {
    font-size: 1.1rem;
  }
}

/* Copy Notification */
.copy-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #10b981;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  font-weight: 500;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}
