@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700,800,900&display=swap');

:root {
  --card-bg: #12122b;
  --border: rgba(192, 132, 252, 0.3);
  --text-primary: #e5e7eb;
  --text-secondary: #d1c4e9;
  --accent-purple: #c084fc;
  --accent-cyan: #a78bfa;
  --accent-glow: rgba(168, 85, 247, 0.6);
  --text-white: #ffffff
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0f1a, #1a1a2e);
  color: #e5e7eb;
  font-family: 'Poppins', sans-serif;
}

.section-title {
  font-size: 2.5rem;
  margin: 40px 0;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #c084fc;
  text-shadow: 0 0 12px rgba(192, 132, 252, 0.6);
}
.project-filters {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: white;
  cursor: pointer;
  transition: 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: #c084fc;
  color: #000;
}
/* Hide mobile filter button on desktop */
.mobile-filter-toggle {
  display: none;
}


@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
}

/* Card */
.card {
  position: relative;
  width: 300px;
  height: 480px;
  background: #12122b;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.45);
  border-radius: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

/* ✨ Glowing hover */
.card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 0 15px rgba(168, 85, 247, 0.7),
    0 0 30px rgba(192, 132, 252, 0.6),
    0 10px 35px rgba(0, 0, 0, 0.6);
}

/* Image section */
.imgBx {
  position: relative;
  width: 100%;
  height: 220px;
  background: var(--img);
  background-size: cover;
  background-position: center;
}

/* curved transition effect */
.imgBx::before {
  content: '';
  position: absolute;
  bottom: -40px;
  width: 100%;
  height: 80px;
  border-radius: 40px;
  background: #12122b;
}
.imgBx::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 40px;
  width: 80px;
  height: 80px;
  background: transparent;
  border-radius: 50%;
  box-shadow: 75px 70px 0 40px #12122b;
}

/* Content */
.content {
  position: relative;
  top: -20px;
  z-index: 10;
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.content h3 {
  font-size: 1.2em;
  color: #c084fc;
  margin-bottom: 8px;
}
.content h3 span {
  font-size: 0.75em;
  font-weight: 400;
  color: #a78bfa;
}

.content p {
  font-size: 0.9rem;
  color: #d1c4e9;
  margin-bottom: 15px;
  flex-grow: 1;
}

/* Buttons */
.buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}
.buttons a {
  flex: 1;
  padding: 10px;
  border-radius: 30px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  color: #fff;
  transition: 0.3s;
}
.buttons a:first-child {
  background: linear-gradient(135deg, #a855f7, #9333ea);
  color: #fff;
}
.buttons a:last-child {
  background: transparent;
  border: 1px solid #a78bfa;
  color: #a78bfa;

}
.buttons a:last-child:hover {
  background: #a78bfa;
  color: #0f0f1a;
}

.buttons a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* ================= MOBILE ================= */
@media (max-width: 600px) {

  .section-title {
    font-size: 2rem;
    margin: 24px 0;
    text-align: center;
  }

  .container {
    flex-direction: column;
    gap: 24px;
    padding: 0 14px;
  }

  .card {
    width: 100%;
    max-width: 360px;
    height: auto;
    border-radius: 28px;
  }

  .imgBx {
    height: 200px;
  }

  .content {
    top: -10px;
    padding: 0 16px 18px;
  }

  .content h3 {
    font-size: 1.05rem;
  }

  .content p {
    font-size: 0.85rem;
  }

  .buttons {
    flex-direction: column;
    gap: 10px;
  }

  .buttons a {
    padding: 12px;
    font-size: 0.9rem;
  }.mobile-filter-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
    padding: 12px 22px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.5);
  }

  /* Filters hidden by default */
  .project-filters {
    display: none;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }

  /* Show when active */
  .project-filters.show {
    display: flex;
    animation: slideDown 0.3s ease;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
  }
}

/* Animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ================= TABLET ================= */
@media (min-width: 601px) and (max-width: 900px) {

  .section-title {
    font-size: 2.2rem;
    margin: 32px 0;
  }

  .container {
    gap: 26px;
    padding: 0 24px;
  }

  .card {
    width: 260px;
    height: 440px;
  }

  .imgBx {
    height: 200px;
  }

  .content h3 {
    font-size: 1.1rem;
  }

  .content p {
    font-size: 0.85rem;
  }

  .buttons a {
    font-size: 0.85rem;
    padding: 10px;
  }
}


/* ================= LIGHT MODE ================= */

body.light {
  background: linear-gradient(135deg, #f7f5ff, #ece9ff);
  color: #1f2933;
}

/* Section title */
body.light .section-title {
  color: #7c3aed;
  text-shadow: 0 0 10px rgba(124, 58, 237, 0.25);
}

/* Filters */
body.light .filter-btn {
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: #6d28d9;
}

body.light .filter-btn.active,
body.light .filter-btn:hover {
  background: #7c3aed;
  color: #fff;
}

/* Card */
body.light .card {
  background: #fdfbff;
  box-shadow: 0 18px 35px rgba(124, 58, 237, 0.18);
}

/* Hover stays premium */
body.light .card:hover {
  box-shadow:
    0 0 12px rgba(124, 58, 237, 0.35),
    0 12px 30px rgba(124, 58, 237, 0.25);
}

/* Image curve background fix */


/* curved transition effect */
body.light .imgBx::before {
  content: '';
  position: absolute;
  bottom: -40px;
  width: 100%;
  height: 80px;
  border-radius: 40px;
  background: #fdfbff;
}
body.light .imgBx::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 40px;
  width: 80px;
  height: 80px;
  background: transparent;
  border-radius: 50%;
  box-shadow: 75px 70px 0 40px #fdfbff;
}

/* Content */
body.light .content h3 {
  color: #7c3aed;
}

body.light .content h3 span {
  color: #8b5cf6;
}

body.light .content p {
  color: #4b5563;
}

/* Buttons */
body.light .buttons a:first-child {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
}

body.light .buttons a:last-child {
  border: 1px solid #8b5cf6;
  color: #7c3aed;
}

body.light .buttons a:last-child:hover {
  background: #7c3aed;
  color: #fff;
}

/* Mobile filter button */
body.light .mobile-filter-toggle {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.35);
}












/* ---------------------- */
/* CAROUSEL (Desktop/Tablet) */
/* ---------------------- *//* --- Certificate Section Variables --- */
/* Unique Styles for Certificates to prevent conflict *//* --- Certificate Section Variables --- */
:root {
  --cert-bg: #12122b;
  --cert-accent: #c084fc;
  --cert-text: #e5e7eb;
  --text-white: #ffffff;
  --cert-border: rgba(192, 132, 252, 0.3);
}
/* Ensure the 3D space is preserved */
/* --- 3D STAGE SETUP --- */
.carousel-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 600px; /* Essential: Gives the carousel breathing room */
  width: 100%;
  perspective: 2000px; /* Higher value = more subtle 3D */
  overflow: visible !important;
}

#certificates-box {
  position: relative;
  width: 280px;
  height: 380px;
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
  display: block !important; /* Prevents flex from flattening the 3D */
}

/* --- THE CARDS --- *//* ---------------------- */
/* THEME VARIABLES */
/* ---------------------- */

/* Light Mode (default) */
/* ---------------------- */
/* THEME VARIABLES – HERO MATCH */
/* ---------------------- */

.section-title-certificate {
  text-align: center;
  font-size: 2.5em;
  margin: 90px 0 20px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-family: 'Cinzel Decorative', serif;
   color: #c084fc;
  text-shadow:
    0 0 12px rgba(168, 85, 247, 0.6),
    0 0 24px rgba(192, 132, 252, 0.4);
  margin-bottom: 0 !important;
  padding-bottom: 40px; /* controlled spacing */
}

/* ---------------------- */
/* CAROUSEL (Desktop/Tablet) */
/* ---------------------- */
.carousel-container {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1500px;
  height: 80vh;
  position: 40px 0 60px;
}

.carousel {
  position: relative;
  width: 300px;
  height: 420px;
  transform-style: preserve-3d;
  transition: transform 1s;
}

/* Certificate Card (shared) */
.cert-card {
  background: var(--cert-bg);
  opacity: 1;
  color: var(--text-white);
  border: 1px solid var(--border);
  border-radius: 15px;
  backdrop-filter: blur(8px);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(160, 100, 255, 0.15);
  display: flex;
  flex-direction: column;
  padding: 12px;
  text-align: center;
  user-select: none;
  transition: all 0.4s ease-in-out, background 0.4s ease;
}


.carousel .cert-card {
  position: absolute;
  top: calc(50% - 170px);
  left: calc(50% - 110px);
  width: 180px;
  height: 220px;
  transform-style: preserve-3d;
}

.cert-card:hover {
  transform: scale(1.05) translateY(-5px);
   box-shadow:
    0 0 35px rgba(168, 85, 247, 0.6),
    0 0 60px rgba(192, 132, 252, 0.35);
}

/* Certificate Icon */
.cert-icon {
  font-size: 1.4em;
  color: var(--accent-cyan);
  margin-bottom: 5px;
  align-self: flex-start;
  filter: brightness(0) invert(1);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* Titles & Text */
.cert-title {
  font-size: 0.95em;
  margin: 6px 0 2px;
  font-weight: bold;
  color: var(--text-white);
}
.cert-issuer {
  font-size: 0.75em;
  font-weight: bold;
  color: var(--accent-purple);
}
.cert-desc {
  font-size: 0.7em;
  line-height: 1.1em;
  margin: 6px 0;
  color: var(--text-white);
}

/* Date */
.cert-date {
  font-size: 0.75em;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  top: 15px;
  right: 12px;
}
.cert-date i {
  font-size: 0.8em;
  color: var(--accent-cyan);
}

/* Button */
.cert-btn {
  margin-top: auto;
  text-decoration: none;
  background: linear-gradient(135deg, #a855f7, #c084fc);

  padding: 6px 8px;
  text-align: center;
  border-radius: 6px;
  font-size: 0.75em;
  color: #fff;
  font-weight: bold;
  transition: background 0.3s, transform 0.2s;
}
.cert-btn:hover {
  background: linear-gradient(45deg, var(--accent-purple), var(--accent-cyan));
  transform: translateY(-2px);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Styling for the Navigation Arrows */
.cert-nav-buttons {
  display: flex;
  gap: 40px;
  position: absolute;
  bottom: 30px;
  z-index: 100;
}

.cert-nav-buttons span {
  width: 50px;
  height: 50px;
  border: 2px solid #a78bfa; /* Your accent color */
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.3s;
  position: relative;
}

.cert-nav-buttons span:hover {
  background: rgba(167, 139, 250, 0.2);
  box-shadow: 0 0 15px #c084fc;
}

/* Custom Arrow Icons using CSS */
.cert-nav-buttons span::before {
  content: '';
  width: 10px;
  height: 10px;
  border-top: 2px solid #a78bfa;
  border-left: 2px solid #a78bfa;
  transform: rotate(-45deg); /* Left Arrow */
  margin-left: 4px;
}

.cert-nav-buttons span.next::before {
  transform: rotate(135deg); /* Right Arrow */
  margin-left: -4px;
}

/* ---------------------- */
/* RESPONSIVE BREAKPOINTS */
/* ---------------------- */

/* Tablet View */
@media (max-width: 1100px) {
  .section-title-certificate{
    margin-bottom: 1px;
    margin-top: 60px;
  }
  .carousel-container {
    height: auto;
    padding-top: 40px;
    padding-bottom: 90px; /* space for arrows */
    align-items: flex-start;
  }
   .cert-nav-buttons {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 22px;
    z-index: 50;
  }

  .cert-nav-buttons button {
    width: 46px;
    height: 46px;
    font-size: 1.3rem;
  }
}

@media (max-width: 900px) {
  .carousel-container {
    height: auto;
    padding-bottom: 70px; /* space for arrows */
  }

  .carousel .cert-card {
    width: 160px;
    height: 200px;
    padding: 10px;
  }

  .cert-title { font-size: 0.85em; }
  .cert-issuer { font-size: 0.7em; }
  .cert-desc { font-size: 0.65em; }

  /* 🔥 FIX ARROWS */
  .cert-nav-buttons {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 20;
  }

  .cert-nav-buttons button {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }
}


/* Mobile View (switch to grid) */
/* Mobile fallback layout (stacked grid) */
/* === MOBILE STACKED FALLBACK (≤600px) === */
/* === FINAL MOBILE FIX (≤600px) === */
@media (max-width: 600px) {
  .carousel-container {
    height: auto !important;
    padding: 40px 0 !important; /* Space above and below the whole section */
    display: flex !important;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow-x: hidden; /* Prevents horizontal scroll */
  }

  .carousel {
    display: flex !important;
    flex-direction: column !important;
    gap: 25px !important; /* This creates the GAP between your cards */
    width: 100% !important;
    transform: none !important;
    align-items: center;
  }

  .cert-card {
    position: relative !important;
    /* This makes the card fit the screen with a small margin */
    width: 88vw !important; 
    max-width: 350px;
    height: auto !important;
    min-height: 200px;
    
    /* Centering fix */
    margin: 0 auto !important; 
    left: 0 !important;
    
    /* Internal Spacing Fix */
    padding: 20px !important; 
    box-sizing: border-box !important; /* CRUCIAL: Keeps button inside borders */
    
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Fix the "View Certificate" button fitting */
  .cert-btn {
    width: 100%; /* Makes it span the full inside width of the card */
    margin-top: 15px;
    padding: 10px 0 !important; /* Comfortable height for tapping */
    box-sizing: border-box;
    font-size: 0.85rem;
  }

  /* Description Spacing */
  .cert-desc {
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.9rem;
  }


  /* Hide navigation arrows as they don't work in stack mode */
  .cert-nav-buttons {
    display: none !important;
  }
}