
/* ==========================
   PROJECTS SECTION
========================== */
.projects-section {
  padding: 80px 20px;
}

.projects-section .container {
  max-width: 1200px;
  margin: 0 auto;
}

.projects-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--color-primary);
  text-align: center;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  gap: 2rem;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ==========================
   MAIN PROJECT CARDS
========================== */
.project-card {
  border: 2px solid #ddd;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.project-card img {
  width: 100%;
  height: 220px;         
  object-fit: cover;     
  border-radius: 12px;
  margin-bottom: 1rem;
}

/* ==========================
   MAIN PROJECT BUTTON
========================== */
.main-btn {
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  width: 180px;
  padding: 12px 20px;
  border-radius: 100px;
  background: var(--color-primary);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  margin: 1rem auto 0; 
  text-decoration: none;
}

.main-btn:hover {
 
  background: var(--color-primary);
}

.main-btn svg {
  width: 34px;
  height: 34px;
  margin-left: 10px;
  transition: transform 0.3s ease-in-out;
}

.main-btn:hover svg {
  transform: translateX(5px);
}

.main-btn:active {
  transform: scale(0.95);
}



.project-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  width: 100%;
}

.project-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.project-card p {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.project-card .btn.primary {
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  align-self: center;
}

/* ==========================
   FUN PROJECTS SECTION
========================== */
.fun-projects-section {
  background-color: #fffefaff;
  padding: 2rem 1rem;
  text-align: center;
}

.fun-projects-section .projects-title {
  color: var(--color-primary-light);
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.fun-projects-section .btn.secondary {
  background-color: var(--color-primary-light);
  color: var(--color-text);
}

/* Fun Projects Grid */
.fun-projects .projects-grid {
  display: grid;
  gap: 2rem;
  justify-content: center;
  margin: 0 auto;
  max-width: 1600px;
  grid-template-columns: 1fr;
}

/* ==========================
   IFRAME STYLING
========================== */
.fun-projects .iframe-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0 auto;
  height: auto;
  min-height: 500px;
}

.fun-projects .project-iframe {
  width: 100%;
  height: 100%;
  min-height: 500px;
  border: none;
  border-radius: 16px;
  display: block;
  z-index: 1;
}

.iframe-wrapper {
  position: relative;
}

.iframe-wrapper .view-live-btn {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5; 
}

/* Fallback for iframe */
.iframe-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #f8f8f8;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  color: #444;
  padding: 1rem;
  border-radius: 16px;
  z-index: 2;
}

.iframe-fallback img {
  width: 120px; 
  height: auto;
  margin-bottom: 0.8rem;
}

.iframe-wrapper iframe:empty + .iframe-fallback {
  display: flex;
}

/* ==========================
   BUTTONS
========================== */
.view-live-btn {
  position: relative; 
  overflow: hidden;   
  margin-top: 1rem;
  padding: 12px 18px;
  border: none;
  background: #fff9eeff;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Quicksand', sans-serif;
  font-weight: bold;
  font-size: 18px;
  color: #444;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.view-live-btn.cta:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50px;
  background: #c3e1ebff;
  width: 45px;
  height: 45px;
  transition: all 0.3s ease;
  z-index: -1;
}

.view-live-btn.cta span {
  position: relative;
  z-index: 1;
}

.view-live-btn.cta svg {
  position: relative;
  top: 0;
  margin-left: 10px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: #444;
  stroke-width: 2;
  transform: translateX(-5px);
  transition: all 0.3s ease;
  z-index: 1;
}

.view-live-btn.cta:hover:before {
  width: 100%;
  background: #aac7d1ff;
}

.view-live-btn.cta:hover svg {
  transform: translateX(0);
}

.view-live-btn.cta:active {
  transform: scale(0.95);
}

/* ==========================
   RESPONSIVE
========================== */
@media (max-width: 767px) {
  .projects-section {
    padding: 80px 15px;
  }

  .projects-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .project-card {
    max-width: 100%;
    padding: 1rem;
  }

  .project-card img,
  .project-card iframe {
    height: 150px;
  }

  .fun-projects .iframe-wrapper {
    min-height: 700px;
  }
}

@media (max-width: 480px) {
  .fun-projects .iframe-wrapper {
    min-height: 400px;
  }
}

/* Medium screens */
@media (min-width: 768px) {
  .projects-grid,
  .fun-projects .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Wide screens */
@media (min-width: 1200px) {
  .projects-grid,
  .fun-projects .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
