/* ========================================
   ROLE-BASED PERSONALIZATION STYLES
   Modern Horizontal Layout Design
   Foresta Wood Industries
   ======================================== */

/* ===== ROLE SELECTION SECTION ===== */
.role-selection-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #0c4326 0%, #1a5f3a 50%, #0c4326 100%);
  position: relative;
  overflow: hidden;
}

.role-selection-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("assets/forestaBg (1).webp") center/cover no-repeat;
  opacity: 0.1;
  pointer-events: none;
}

.role-section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  position: relative;
  z-index: 1;
}

.role-section-header {
  text-align: center;
  margin-bottom: 60px;
}

.role-section-header .section-label {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
  font-weight: 500;
}

.role-section-header .section-heading {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.role-section-header .section-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 300;
}

/* ===== ROLE CARDS GRID - Stacked List ===== */
.role-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ===== INDIVIDUAL ROLE CARD ===== */
.role-card {
  background: #fff;
  border-radius: 16px;
  padding: 0;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
}

.role-card:hover {
  transform: translateX(8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.role-card.selected {
  background: linear-gradient(90deg, #f0f7f2 0%, #fff 100%);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.15);
}

/* Card Image Section */
.role-card-image {
  position: relative;
  height: 140px;
  overflow: hidden;
  border-radius: 16px 0 0 16px;
}

.role-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.role-card:hover .role-card-image img {
  transform: scale(1.1);
}

.role-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    rgba(12, 67, 38, 0.6) 0%, 
    rgba(12, 67, 38, 0.2) 100%);
}

/* Icon Badge - Centered on image */
.role-card-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.role-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  color: #0c4326;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: all 0.4s ease;
}

.role-icon svg {
  width: 24px;
  height: 24px;
}

.role-card:hover .role-icon {
  transform: scale(1.1);
  background: #0c4326;
  color: #fff;
}

/* Card Body - Middle Content */
.role-card-body {
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-card-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.role-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: #0c4326;
  line-height: 1.2;
}

.role-subtitle {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
}

/* Role Description */
.role-desc {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  max-width: 500px;
}

/* Role Features - Inline */
.role-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-feature {
  padding: 6px 14px;
  background: #f5f7f5;
  border: 1px solid #e8ebe8;
  border-radius: 25px;
  font-size: 0.8rem;
  color: #0c4326;
  font-weight: 500;
  transition: all 0.3s ease;
}

.role-card:hover .role-feature {
  background: #e8f5e9;
  border-color: #c8e6c9;
}

/* Learn More - Right Side */
.role-learn-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 40px;
  background: linear-gradient(135deg, #f8faf8 0%, #f0f2f0 100%);
  color: #0c4326;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.4s ease;
  border-left: 1px solid #e8ebe8;
  height: 100%;
  min-width: 180px;
  text-align: center;
}

.role-learn-more svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.role-learn-more:hover {
  background: #0c4326;
  color: #fff;
}

.role-learn-more:hover svg {
  transform: translateX(6px);
}

/* Selected State */
.role-card.selected::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #2d8f5f, #0c4326);
  z-index: 3;
}

.role-card.selected .role-icon {
  background: #0c4326;
  color: #fff;
}

/* ===== WELCOME NOTIFICATION ===== */
.role-welcome-notification {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem 1.75rem;
  box-shadow: 0 16px 50px rgba(12, 67, 38, 0.2);
  z-index: 9998;
  transform: translateX(140%);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  border-left: 4px solid #0c4326;
}

.role-welcome-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.notification-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f5e9 0%, #f0f7f2 100%);
  border-radius: 12px;
  color: #0c4326;
}

.notification-icon svg {
  width: 24px;
  height: 24px;
}

.notification-text strong {
  display: block;
  color: #0c4326;
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.notification-text p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

/* ===== TABLET LAYOUT ===== */
@media (max-width: 1024px) {
  .role-card {
    grid-template-columns: 160px 1fr auto;
  }
  
  .role-card-image {
    height: 120px;
  }
  
  .role-card-body {
    padding: 20px 24px;
  }
  
  .role-title {
    font-size: 1.4rem;
  }
  
  .role-learn-more {
    padding: 24px 28px;
    min-width: 140px;
  }
}

/* ===== MOBILE LAYOUT - Stack Vertically ===== */
@media (max-width: 768px) {
  .role-selection-section {
    padding: 70px 0;
  }
  
  .role-section-header {
    margin-bottom: 40px;
    padding: 0 5%;
  }
  
  .role-section-header .section-heading {
    font-size: 2.25rem;
  }
  
  .role-cards-grid {
    gap: 1rem;
    padding: 0 4%;
  }
  
  .role-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  
  .role-card-image {
    height: 160px;
    border-radius: 16px 16px 0 0;
  }
  
  .role-card-body {
    padding: 28px 24px 20px;
    text-align: center;
  }
  
  .role-card-header {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  
  .role-desc {
    text-align: center;
  }
  
  .role-features {
    justify-content: center;
  }
  
  .role-learn-more {
    border-left: none;
    border-top: 1px solid #e8ebe8;
    padding: 18px 24px;
    border-radius: 0 0 16px 16px;
    min-width: auto;
  }
  
  .role-card.selected::before {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 4px;
  }
  
  .role-welcome-notification {
    right: 15px;
    left: 15px;
    bottom: 80px;
  }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {
  .role-section-header .section-heading {
    font-size: 1.9rem;
  }
  
  .role-section-header .section-description {
    font-size: 1rem;
  }
  
  .role-card-image {
    height: 140px;
  }
  
  .role-title {
    font-size: 1.35rem;
  }
  
  .role-desc {
    font-size: 0.9rem;
  }
  
  .role-feature {
    font-size: 0.75rem;
    padding: 5px 12px;
  }
}

/* ===== SCROLL ANIMATIONS ===== */
.role-card {
  opacity: 0;
  transform: translateX(-30px);
}

.role-card.animate-in {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.role-card:nth-child(1) { transition-delay: 0s; }
.role-card:nth-child(2) { transition-delay: 0.08s; }
.role-card:nth-child(3) { transition-delay: 0.16s; }
.role-card:nth-child(4) { transition-delay: 0.24s; }
.role-card:nth-child(5) { transition-delay: 0.32s; }

/* ===== ROLE-SPECIFIC CONTENT VISIBILITY ===== */
[data-user-role="developers"] .for-homeowners,
[data-user-role="developers"] .diy-section,
[data-user-role="homeowners"] .technical-specs,
[data-user-role="homeowners"] .bulk-pricing,
[data-user-role="joineries"] .inspiration-gallery,
[data-user-role="architects"] .wholesale-terms,
[data-user-role="showrooms"] .diy-guides {
  display: none !important;
}
