@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600&family=Open+Sans&display=swap');

html { height: 100%; }
body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background: #f3f8f4;
  color: #333;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
h1,h2,h3 { font-family: 'Poppins', sans-serif; color: #004b23; }

nav {
  background: #4a9a5e;
  padding: 0.6rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border-bottom: 1px solid #e9ecef;
}
nav a {
  color: #004b23;
  margin: 0 12px;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
}
nav a::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(74,154,94,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
nav a:hover::after { opacity: 1; }
nav a:hover {
  background: #fff;
  color: #004b23;
  box-shadow: 0 2px 8px rgba(74,154,94,0.2);
}
nav .active {
  background: #fff;
  color: #004b23;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(74,154,94,0.2);
}

.hero { position:relative; height:50vh; color:#fff; text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center; background-size:cover; background-position:center 30%; }
.hero .overlay { position:absolute; inset:0; background:rgba(0,0,0,0.5); }
.hero-content { position:relative; z-index:2; width:100%; text-align:center; }
.hero-content h1, .hero-content p, .logo { text-shadow: 1px 1px 1px rgba(0,0,0,1); }
.hero h1 { color: #9be09b; }
.logo { position: absolute; top: 1rem; left: 1rem; width:200px; z-index: 3; }

.btn {
  background:#f6be00;
  color:#004b23;
  border:none;
  padding:1.2rem 2.5rem;
  border-radius:25px;
  font-weight:600;
  cursor:pointer;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}
.btn:hover { background:#ffd64c; box-shadow: 0 6px 20px rgba(46,139,87,0.3); }
.btn.small { padding: 0.5rem 1rem; font-size: 0.9rem; border-radius: 20px; }

.content { max-width:900px; margin:auto; padding:2rem; flex:1; }
.card-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:1rem; }

.role-card, .recommend-card, .resource-card {
  background:#fff;
  border-radius:12px;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
  padding:1rem;
  transition:transform 0.2s,box-shadow 0.2s;
  cursor:pointer;
}
.role-card:hover, .recommend-card:hover, .resource-card:hover {
  transform:translateY(-4px);
  box-shadow:0 4px 10px rgba(0,0,0,0.15);
}
.role-card img { width:100%; border-radius:10px; height:160px; object-fit:cover; filter:brightness(1.1); }

footer {
  background: #4a9a5e;
  color:#fff;
  text-align:center;
  padding:0.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.eu-logo {
  background: rgba(255,255,255,1);
  padding: 0.2rem;
  border-radius: 4px;
  width:180px;
  margin-left: 0.5rem;
}
.content p:last-child { margin-bottom: 0.5rem; }
.back { margin-top:1rem; }

/* Resource Section Styling */
.resource-section {
  margin: 2rem 0;
  padding: 1rem;
  border-left: 4px solid #2e8b57;
  background: #f9f9f9;
}
.section-title {
  font-family: 'Poppins', sans-serif;
  color: #004b23;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #f6be00;
  padding-bottom: 0.5rem;
}
#resTitle { font-size: 1.8rem; margin-bottom: 0.5rem; color: #004b23; }

/* =================================================================== */
/* ONLY FOR roles.html – DOES NOT AFFECT ANY OTHER PAGE                */
/* =================================================================== */

.container {
  flex: 1;
  position: relative;
  padding: 2rem 1rem 6rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Three animated steps */
.step {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.25,1,0.3,1);
  overflow-y: auto;
  padding-bottom: 120px;
}
.step.active {
  opacity: 1;
  pointer-events: all;
  position: relative;
}

/* Step 1 – Role Selection (centered, full visibility) */
#step-roles {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 160px);
}
#step-roles .content-center {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin: 3rem auto;
  max-width: 1200px;
}
.role-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: all 0.4s ease;
}
.role-card:hover { transform: translateY(-18px); box-shadow: 0 30px 60px rgba(0,0,0,0.22); }
.role-card img { width: 100%; height: 260px; object-fit: cover; }
.role-card h3 { padding: 1.8rem 1rem 0.8rem; font-size: 1.5rem; color: #004b23; }
.role-card .role-blurb { padding: 0 2rem 2rem; color: #555; line-height: 1.7; }

/* Step 2 – Recommendations */
#step-recommendations h2 {
  text-align: center;
  margin: 2rem 0 3rem;
  font-size: 2.2rem;
  color: #004b23;
}
.rec-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}
.rec-card {
  background: #fff;
  padding: 1.8rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  cursor: pointer;
  border-left: 6px solid #f6be00;
  transition: all 0.4s;
}
.rec-card:hover { transform: translateY(-10px); box-shadow: 0 20px 50px rgba(0,0,0,0.18); }
.rec-card h3 { color: #004b23; margin-bottom: 1rem; font-size: 1.3rem; }

/* Step 3 – Resources */
.resource-wrapper {
  display: flex;
  gap: 3rem;
  max-width: 1500px;
  margin: 0 auto;
  padding: 2rem 2rem 6rem;
}
.resource-sidebar {
  width: 300px;
  background: #fff;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.resource-sidebar h3 {
  color: #004b23;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 4px solid #f6be00;
  padding-bottom: 0.8rem;
}
.resource-sidebar a {
  display: block;
  padding: 1rem 0;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  transition: all 0.3s;
}
.resource-sidebar a:hover, .resource-sidebar a.active {
  color: #f6be00;
  font-weight: 700;
  padding-left: 1rem;
}
.resource-main { flex: 1; }
#res-title { font-size: 1.5rem; color: #004b23; margin: 1rem 0 2rem; }
#res-detail {
  background: #fff;
  padding: 2rem;
  border-radius: 14px;
  border-left: 8px solid #f6be00;
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 3rem;
  box-shadow: 0 6px 25px rgba(0,0,0,0.1);
}
.resource-section h3 {
  color: #004b23;
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f6be00;
}
.card-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

/* Fixed Back Button – Always visible & beautiful */
.back-btn {
  position: fixed !important;
  top: 80px;
  left: 20px;
  z-index: 9999;
  background: #ffffff !important;
  border: 3px solid #f6be00 !important;
  color: #004b23 !important;
  padding: 0.65rem 1.4rem !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25) !important;
  transition: all 0.3s ease !important;
}
.back-btn:hover {
  background: #f6be00 !important;
  color: white !important;
  transform: translateY(-3px) scale(1.05);
}

/* Mobile adjustments */
@media (max-width: 992px) {
  .resource-wrapper { flex-direction: column; padding: 1rem; }
  .resource-sidebar { width: 100%; position: static; max-height: none; margin: 2rem 0; }
  .role-grid, .rec-grid { grid-template-columns: 1fr; }
}



/* SECONDARY ROLE NAV – clean, fixed, beautiful */
.role-nav-secondary {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  padding: 0.8rem 2rem;
  text-align: center;
  position: sticky;
  top: 68px;                    /* just below your main sticky nav */
  z-index: 998;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border-bottom: 1px solid #eee;
  display: none;                /* shown only when a role is selected */
}
.role-nav-secondary.active {
  display: block;
}
.role-nav-btn {
  background: none;
  border: 2px solid #4a9a5e;
  color: #004b23;
  padding: 0.6rem 1.4rem;
  margin: 0 0.5rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.role-nav-btn:hover {
  background: #4a9a5e;
  color: white;
  transform: translateY(-2px);
}
.role-nav-btn.active {
  background: #004b23;
  color: white;
  border-color: #004b23;
}
@media (max-width: 768px) {
  .role-nav-secondary { padding: 0.6rem 1rem; }
  .role-nav-btn { 
    padding: 0.5rem 1rem; 
    margin: 0.3rem;
    font-size: 0.9rem;
  }
}
