/* Mobile-only styles for professionals pages */
@media only screen and (max-width: 767px) {
  /* Hero container height */
  #hero-container {
    height: 90vh !important;
    min-height: 90vh !important;
    max-height: 90vh !important;
    overflow: hidden !important;
  }
  
  /* Hero content flex positioning */
  #hero-content {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
  
  /* Layout container */
  .max-w-7xl, .mobile-flex-col {
    flex-direction: column !important;
    align-items: center !important;
    padding-top: 0rem !important; /* Reduced from 6rem */
  }
  
  /* Left side: profile information */
  .max-w-7xl > div:first-child, .mobile-full-width {
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0.75rem !important; /* Reduced from 1.5rem */
  }
  
  /* Main profile card styling */
  .max-w-7xl > div:first-child > div, .mobile-full-width > div {
    padding: 1rem !important; /* Reduced padding */
    margin-top: 0rem !important;
  }
  
  /* Name in title */
  .max-w-7xl > div:first-child h1, .mobile-full-width h1 {
    font-size: 2.5rem !important;
    margin-bottom: 0.25rem !important;
  }
  
  /* Job title */
  .max-w-7xl > div:first-child h2, .mobile-full-width h2 {
    font-size: 0.85rem !important;
    margin-bottom: 1rem !important;
  }
  
  /* Award card spacing */
  .max-w-7xl > div:first-child .mt-6, .mobile-full-width .mt-6 {
    margin-top: 1rem !important;
  }
  
  /* Right side: portrait */
  .max-w-7xl > div:last-child, .mobile-portrait {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: center !important;
    margin-top: 0rem !important; /* Reduced from 1.5rem */
    margin-bottom: -8rem !important;
    margin-right: 1.5rem !important;
  }
  
  /* Professional portrait */
  .max-w-7xl > div:last-child img, .mobile-portrait img {
    max-height: 44vh !important; /* Reduced from 40vh */
    margin-left: 0 !important;
    margin-bottom: 0 !important;
    width: auto !important;
  }
  
  /* Adjust contact icons position */
  .flex-col.space-y-2.absolute, .mobile-contact-row {
    position: static !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0.75rem auto !important; /* Reduced from 1.2rem */
    width: 100% !important;
    gap: 1rem !important; /* Reduced from 1.2rem */
    margin-bottom: -2rem !important;
  }
  
  /* Fix mobile contact icon hover */
  .group.relative.w-9.h-9 {
    position: relative !important;
    width: 2.75rem !important; /* Reduced from 3rem */
    height: 2.75rem !important; /* Reduced from 3rem */
    overflow: hidden !important;
  }
  
  /* Fix hover text issue on mobile */
  .group.relative.w-9.h-9:hover {
    width: 2.75rem !important; /* Match width */
  }
  
  /* Hide hover text on mobile */
  .group.relative.w-9.h-9 span, .hover-text {
    display: none !important;
  }
  
  /* Prevent icon from disappearing on hover */
  .group.relative.w-9.h-9 i, .mobile-contact-row i {
    opacity: 1 !important;
    transition: none !important;
  }
  
  /* Reduce bottom scroll arrow size */
  #scroll-arrow {
    transform: scale(0.85) translateX(-50%);
    bottom: 0.5rem !important;
  }
  
  /* Description */
  .mobile-full-width p {
    font-size: 0.95rem !important;
  }
  
  /* CFA card title */
  .mt-6 .mobile-bottom-wrapper h3 {
    font-size: 0.9rem !important;
  }
  
  /* CFA card description */
  .mt-6 .mobile-bottom-wrapper p,
  .mt-6 .mobile-bottom-wrapper em {
    font-size: 0.8rem !important;
  }
  
  .mobile-contact-row a {
    width: 2.75rem !important;
    height: 2.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    background: rgba(255,255,255,0.2);
    border-radius: 0.25rem;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    margin: 0 !important;
  }
  
  .fa-linkedin-in {
    font-size: 1.2rem !important;
  }
  
  .mobile-contact-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
  }

  /* Professional Overview section mobile styles */
  #second-section {
    padding: 1.5rem 0.5rem !important;
    background-color: #EFEFE5 !important;
    background-image: none !important;
    min-height: auto !important;
    height: auto !important;
    box-sizing: border-box;
  }

  #second-section .grid,
  #second-section .md\:grid-cols-2 {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.2rem !important;
  }
  
  /* Education card specific spacing to match Macromap spacing */
  #second-section .flex-col.space-y-6 > div:first-child {
    margin-bottom: 2.2rem !important;
  }
  
  #second-section .overview-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 1.2rem auto !important;
    box-sizing: border-box;
    padding: 1rem !important;
  }
  #second-section .section-title {
    font-size: 1.6rem !important;
    margin-bottom: 1.5rem !important;
  }
  #second-section .bio-text,
  #second-section .overview-card p,
  #second-section .overview-card li,
  #second-section .overview-card span {
    font-size: 0.98rem !important;
    line-height: 1.6 !important;
  }
  #second-section .overview-card ul {
    padding-left: 1.1rem !important;
  }
  #second-section .overview-card h3 {
    font-size: 1.02rem !important;
    margin-bottom: 0.6rem !important;
  }
  #second-section .fade-in-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  /* Add specific margin only below the MacroMap card */
  #second-section .expert-publications {
    margin-bottom: 7rem !important; /* Adjust this value as needed */
  }

  /* Target the disclaimer text more specifically on mobile */
  .mt-12 .disclaimer-text,
  .bio-text + div .disclaimer-text,
  #second-section .disclaimer-text {
    font-size: 10px !important;
    line-height: 1.2 !important;
    opacity: 0.7 !important;
  }
}