/*
  Modern CSS Additions
  Portfolio - João Marcos Ramos
  Updated: 2025
*/

/* ========================== Hero Animated Roles ========================== */
.d2c_hero_roles {
  position: relative;
  height: 34px;
  overflow: hidden;
  margin-bottom: 20px;
}

.d2c_hero_role {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  color: var(--default_color_one);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  animation: roleSlide 15s infinite both;
  animation-fill-mode: both;  /* stay at opacity:0 during delay */
  white-space: nowrap;
}

.d2c_hero_role:nth-child(1) { animation-delay: 0s; }
.d2c_hero_role:nth-child(2) { animation-delay: 5s; }
.d2c_hero_role:nth-child(3) { animation-delay: 10s; }

@keyframes roleSlide {
  0%, 100% { opacity: 0; transform: translateY(18px); }
  8%, 28%  { opacity: 1; transform: translateY(0);    }
  36%      { opacity: 0; transform: translateY(-18px); }
}

/* Hero CTA button group */
.d2c_hero_cta_group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
  align-items: center;
}

.d2c_btn_outline_white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--default_color_one);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--border_radius);
  padding: 8px 15px;
  font-family: var(--primary_font);
  font-weight: 600;
  font-size: 14px;
  text-transform: capitalize;
  transition: 0.4s all ease;
  text-decoration: none;
}

.d2c_btn_outline_white:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--default_color_one);
  color: var(--default_color_one);
  text-decoration: none;
}

.d2c_btn_outline_white i {
  color: #FF0000;
  font-size: 16px;
}

/* ========================== Tech Stack Section ========================== */
.d2c_tech_stack {
  background: linear-gradient(160deg, #0d1b3e 0%, #1a3a6e 50%, #0d1b3e 100%);
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}

.d2c_tech_stack::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url(../images/circuit.png) center/cover no-repeat;
  opacity: 0.04;
}

.d2c_tech_stack .d2c_title {
  color: #fff;
  font-size: 28px;
  text-align: center;
  margin-bottom: 8px;
}

.d2c_tech_stack_subtitle {
  color: rgba(255,255,255,0.55);
  text-align: center;
  font-size: 15px;
  margin-bottom: 40px;
}

.d2c_tech_categories {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.d2c_tech_category_label {
  display: block;
  color: var(--primary_color);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 12px;
  opacity: 0.9;
}

.d2c_tech_grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.d2c_tech_badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 30px;
  padding: 7px 18px;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: 0.3s all ease;
  text-decoration: none;
  cursor: default;
}

.d2c_tech_badge:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,0.2);
}

.d2c_tech_badge i {
  font-size: 15px;
  color: var(--primary_color);
}

/* ========================== Portfolio Filter Tabs ========================== */
.d2c_filter_tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 35px;
}

.d2c_filter_btn {
  padding: 8px 26px;
  border: 2px solid var(--secondary_color);
  background: transparent;
  color: var(--secondary_color);
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: 0.3s all ease;
  font-family: var(--primary_font);
}

.d2c_filter_btn.active,
.d2c_filter_btn:hover {
  background: var(--secondary_color);
  color: #fff;
  box-shadow: 0 4px 18px rgba(90,118,210,0.3);
}

/* ========================== Project Placeholders ========================== */
.d2c_project_placeholder {
  width: 100%;
  min-height: 260px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--border_radius);
}

.d2c_placeholder_api {
  background: linear-gradient(135deg, #0b1d34 0%, #0f3d2e 40%, #1a5c42 100%);
}

.d2c_placeholder_accounting {
  background: linear-gradient(135deg, #0a0e1e 0%, #141852 45%, #1e2880 100%);
}

.d2c_placeholder_trucks {
  background: linear-gradient(135deg, #1a0b00 0%, #3a1500 45%, #5c2500 100%);
}

.d2c_placeholder_icon {
  font-size: 60px;
  color: rgba(255,255,255,0.18);
  margin-bottom: 14px;
  line-height: 1;
}

.d2c_placeholder_label {
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-family: var(--primary_font);
  font-weight: 600;
}

/* Project GitHub button inside overlay */
.d2c_gallery_content .d2c_github_link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s all ease;
  font-family: var(--primary_font);
}

.d2c_gallery_content .d2c_github_link:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
  text-decoration: none;
}

/* ========================== Interest Icons (FA-based) ========================== */
.d2c_logo_wrapper .d2c_interest_icon {
  font-size: 44px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 10px;
  display: block;
  text-align: center;
}

.d2c_logo_wrapper .d2c_interest_label {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-align: center;
  font-family: var(--primary_font);
  font-weight: 600;
  line-height: 1.3;
}

.d2c_logo_wrapper {
  flex-direction: column;
  gap: 0;
}

/* ========================== Certificate Status Badges ========================== */
.cert_status {
  display: inline-block;
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
  font-family: var(--primary_font);
}

.cert_completed {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.cert_in_progress {
  background: rgba(234, 179, 8, 0.12);
  color: #a16207;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

/* ========================== Preloader Update ========================== */
#preloader > p {
  position: absolute;
  bottom: 30%;
  width: 100%;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-family: var(--primary_font);
}

/* ========================== Section Transition Improvements ========================== */
.d2c_gallery_column {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.d2c_gallery_column.hidden {
  display: none !important;
}

/* ========================== Experience Cards 5-column fix ========================== */
.d2c_services .row.d2c_exp_row {
  justify-content: center;
}

/* ========================== Responsive for new sections ========================== */
@media (max-width: 767px) {
  .d2c_hero_roles { height: 28px; }
  .d2c_hero_role { font-size: 14px; letter-spacing: 0.12em; }
  .d2c_hero_cta_group { flex-direction: column; align-items: flex-start; }
  .d2c_tech_stack { padding: 50px 0; }
  .d2c_filter_btn { padding: 7px 18px; font-size: 13px; }
  .d2c_project_placeholder { min-height: 200px; }
  .d2c_placeholder_icon { font-size: 44px; }
}

@media (max-width: 991px) {
  .d2c_tech_badge { font-size: 12px; padding: 6px 14px; }
}
