/* Entrepreneurship Page Design Overhaul */

/* Entrepreneurship page navbar height - match home page */
.entrepreneurship-page .navbar {
  padding: 22px 0 !important;
  min-height: 85px !important;
}

.entrepreneurship-page body {
  padding-top: 95px !important;
}

.entrepreneurship-header {
  height: 450px;
  background-size: cover;
  background-position: center;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  box-shadow: var(--soft-shadow);
}

.entrepreneurship-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 100%);
  z-index: 1;
}

.entrepreneurship-header .lower-header {
  position: relative;
  z-index: 2;
}

/* Branding Icon Wrapper (for logos) */
.profile-icon-wrapper.branding-wrapper {
  background: #ffffff;
  padding: 10px;
  border: 1px solid var(--glass-border);
}

.profile-icon-wrapper.branding-wrapper img {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

/* Subtitles for roles */
.post-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.9;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Ensure headings match the design system */
.post-title a {
  color: var(--primary) !important;
  text-decoration: none !important;
  transition: color 0.3s ease;
}

.post-title a:hover {
  color: var(--accent) !important;
}

/* Overriding global tag commas if any remain */
.tags-container span::before {
  content: none !important;
}

/* Specific button styles if used later */
.btn-entrepreneur {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-entrepreneur:hover {
  transform: translateY(-2px);
  box-shadow: var(--soft-shadow);
}

/* Fix Gallery items if not already perfect */
.main-article .gallery .image-item {
  border: 1px solid var(--glass-border);
  background-color: rgba(255, 255, 255, 0.2);
}

/* Modern Gallery Layout (Fixed Overlapping & Gaps) */
.modern-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto;
  gap: 15px;
  margin: 30px 0;
  width: 100%;
}

/* 5 Image Layout: 1 Large on top, 4 balanced below */
.modern-gallery .image-item:nth-child(1) {
  grid-column: span 2;
  height: 400px;
}

.modern-gallery .image-item:not(:first-child) {
  height: 250px;
}

/* Modern Masonry (2 images) */
.modern-masonry-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 30px 0;
}

.modern-masonry-gallery .image-item {
  height: 350px;
}

/* Base Image Item Styles */
.image-item {
  width: 100%;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--glass-border);
}

.image-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

/* Branding vs Photo Logic */
.branding-item {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: #ffffff;
  /* Contrast for logos */
  padding: 40px;
  /* Internal spacing for logos */
}

.photo-item {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Redesigned Gallery Lightbox (Global Mask) */
.gallery-mask {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 9999 !important;
  /* Ensure it's on top of everything */
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 5vh 5vw;
}

.gallery-mask img {
  max-width: 90% !important;
  max-height: 85vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-mask:not(.mask-off) img {
  transform: scale(1);
}

.mask-close {
  position: absolute;
  top: 30px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 24px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mask-close:hover {
  background: var(--accent);
  transform: rotate(90deg);
}

.mask-off {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Main Article Enhancements */
.main-article {
  margin-top: 2rem;
  line-height: 1.8;
  color: var(--text-main);
}

.intro-section {
  margin-bottom: 2rem;
}

.lead-text {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--primary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Venture Section Container */
.venture-section {
  margin-bottom: 2.5rem;
  position: relative;
}

.venture-tagline {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  /* Consistent with other headings */
  margin: 1rem 0 0 0 !important;
  padding-bottom: 0 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em;
}

.venture-content {
  margin-top: 1.5rem;
}

.venture-content p {
  margin-bottom: 1.5rem;
}

/* Venture Separator */
.venture-separator {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--glass-border), transparent);
  margin: 2rem 0;
  opacity: 0.5;
}

/* Premium Quote Styling */
.premium-quote {
  position: relative;
  margin: 2rem 0;
  padding: 3rem;
  background: rgba(var(--primary-rgb), 0.03);
  border-radius: 32px;
  border: 1px solid var(--glass-border);
  text-align: center;
}


/* Reverting: default blockquote quotes are kept now */

.quote-icon {
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.2;
  position: absolute;
  top: 1.5rem;
  left: 2rem;
}

.premium-quote p {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.5;
  margin-bottom: 1.5rem !important;
  position: relative;
  z-index: 1;
}

.premium-quote cite {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Link Hover Effect */
.main-article a:not(.post-title a):not(.profile-card) {
  color: var(--accent);
  text-decoration: none;
  position: relative;
  font-weight: 600;
  transition: all 0.3s ease;
}

.main-article a:not(.post-title a):not(.profile-card)::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.main-article a:not(.post-title a):not(.profile-card):hover {
  color: var(--primary);
}

.main-article a:not(.post-title a):not(.profile-card):hover::after {
  width: 100%;
}

/* Reveal Animation Overrides - Optimized for mobile */
.main-article .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.main-article .reveal.active {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .main-article .reveal {
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  }
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablet and below (768px and below) */
@media (max-width: 768px) {
  /* Container adjustments */
  .container.glass.premium-card {
    padding: 1.5rem !important;
  }

  /* Header section */
  .entrepreneurship-header {
    height: 320px !important;
    padding: 20px !important;
    border-radius: 16px;
    margin-bottom: 1.5rem;
  }

  .entrepreneurship-header .title {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.5rem !important;
  }

  .entrepreneurship-header .subtitle {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
  }

  .tags-container {
    margin-bottom: 1rem !important;
    flex-wrap: wrap;
  }

  .tags-container span {
    font-size: 0.75rem !important;
    padding: 4px 12px !important;
    margin-right: 8px !important;
    margin-bottom: 8px !important;
  }

  /* Profile links container */
  .profile-links-container {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin: 20px 0 !important;
  }

  .profile-card {
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .profile-icon-wrapper {
    width: 50px !important;
    height: 50px !important;
    margin-right: 15px !important;
  }

  .profile-icon-wrapper i {
    font-size: 24px !important;
  }

  .profile-label {
    font-size: 1rem !important;
  }

  .profile-action {
    font-size: 0.8rem !important;
  }

  /* Main article */
  .main-article {
    margin-top: 1.5rem !important;
  }

  .post-title {
    font-size: 1.75rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.3 !important;
  }

  .post-subtitle {
    font-size: 1rem !important;
  }

  .main-article p {
    font-size: 1rem !important;
    line-height: 1.7 !important;
    margin-bottom: 1.25rem !important;
  }

  .lead-text {
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem !important;
  }

  /* Venture sections */
  .venture-section {
    margin-bottom: 2rem !important;
  }

  .venture-tagline {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
    margin: 0.75rem 0 !important;
  }

  .venture-content p {
    font-size: 1rem !important;
    margin-bottom: 1.25rem !important;
  }

  .venture-separator {
    margin: 2rem 0 !important;
  }

  /* Premium quote */
  .premium-quote {
    padding: 1.75rem 1.25rem !important;
    margin: 1.5rem 0 !important;
    border-radius: 20px !important;
  }

  .premium-quote p {
    font-size: 1.15rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1rem !important;
  }

  .premium-quote cite {
    font-size: 0.95rem !important;
  }

  .quote-icon {
    font-size: 2rem !important;
    top: 1rem !important;
    left: 1.25rem !important;
  }

  /* Gallery layouts */
  .modern-gallery {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin: 20px 0 !important;
  }

  .modern-gallery .image-item:first-child {
    grid-column: span 1 !important;
    height: 250px !important;
  }

  .modern-gallery .image-item:not(:first-child) {
    height: 200px !important;
  }

  .modern-masonry-gallery {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .modern-masonry-gallery .image-item {
    height: 250px !important;
  }

  .image-item {
    border-radius: 16px !important;
  }

  /* Gallery lightbox */
  .gallery-mask {
    padding: 2vh 2vw !important;
  }

  .gallery-mask img {
    max-width: 95% !important;
    max-height: 90vh !important;
    border-radius: 16px !important;
  }

  .mask-close {
    top: 15px !important;
    right: 15px !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
  }

  /* Links */
  .main-article a:not(.post-title a):not(.profile-card) {
    word-break: break-word;
  }
}

/* Small mobile devices (480px and below) */
@media (max-width: 480px) {
  /* Container */
  .container.glass.premium-card {
    padding: 1rem !important;
  }

  /* Header */
  .entrepreneurship-header {
    height: 280px !important;
    padding: 16px !important;
    border-radius: 12px;
  }

  .entrepreneurship-header .title {
    font-size: 1.5rem !important;
  }

  .entrepreneurship-header .subtitle {
    font-size: 0.9rem !important;
  }

  .tags-container span {
    font-size: 0.7rem !important;
    padding: 3px 10px !important;
  }

  /* Profile cards */
  .profile-card {
    padding: 14px !important;
    flex-direction: row;
    align-items: center;
  }

  .profile-icon-wrapper {
    width: 45px !important;
    height: 45px !important;
    margin-right: 12px !important;
  }

  .profile-icon-wrapper i {
    font-size: 22px !important;
  }

  .profile-label {
    font-size: 0.95rem !important;
  }

  .profile-action {
    font-size: 0.75rem !important;
  }

  /* Typography */
  .post-title {
    font-size: 1.5rem !important;
  }

  .main-article p {
    font-size: 0.95rem !important;
  }

  .lead-text {
    font-size: 1.05rem !important;
  }

  .venture-tagline {
    font-size: 1.15rem !important;
  }

  /* Premium quote */
  .premium-quote {
    padding: 1.5rem 1rem !important;
    border-radius: 16px !important;
  }

  .premium-quote p {
    font-size: 1.05rem !important;
  }

  .premium-quote cite {
    font-size: 0.85rem !important;
  }

  /* Gallery */
  .modern-gallery .image-item:first-child {
    height: 220px !important;
  }

  .modern-gallery .image-item:not(:first-child) {
    height: 180px !important;
  }

  .modern-masonry-gallery .image-item {
    height: 220px !important;
  }
}

/* Extra small devices (360px and below) */
@media (max-width: 360px) {
  .entrepreneurship-header {
    height: 250px !important;
    padding: 12px !important;
  }

  .entrepreneurship-header .title {
    font-size: 1.35rem !important;
  }

  .entrepreneurship-header .subtitle {
    font-size: 0.85rem !important;
  }

  .post-title {
    font-size: 1.35rem !important;
  }

  .premium-quote {
    padding: 1.25rem 0.875rem !important;
  }

  .premium-quote p {
    font-size: 1rem !important;
  }
}

/* Dark Mode Overrides */
.dark-mode .venture-tagline {
  color: #ffffff !important;
}

.dark-mode .premium-quote {
  background: rgba(255, 255, 255, 0.05);
}

.dark-mode .premium-quote p {
  color: #ffffff;
}

.dark-mode .premium-quote cite {
  color: #000000;
}

.dark-mode .venture-separator {
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.dark-mode .lead-text {
  color: #ffffff;
}

/* Additional dark mode text improvements */
.dark-mode .main-article p,
.dark-mode .post-subtitle,
.dark-mode .venture-section p {
  color: #ffffff;
}

.dark-mode .post-title {
  color: #000000;
}

.dark-mode .post-title a {
  color: var(--accent);
}

/* Dark mode link styling for main content */
.dark-mode .main-article a:not(.post-title a):not(.profile-card) {
  color: #000000;
}

.dark-mode .main-article a:not(.post-title a):not(.profile-card):hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 480px) {
  .entrepreneurship-header {
    height: 300px;
    padding: 20px;
  }

  .entrepreneurship-header .title {
    font-size: 1.6rem;
  }
}