/* Golf Advisor V13.1.3 – Visual Consistency Pass
   Loaded last to stabilise shared frontend presentation without changing templates. */

:root{
  --ga-ui-radius-sm:14px;
  --ga-ui-radius-md:20px;
  --ga-ui-radius-lg:28px;
  --ga-ui-border:rgba(18,63,44,.13);
  --ga-ui-shadow:0 18px 52px rgba(16,37,27,.09);
  --ga-ui-shadow-hover:0 24px 68px rgba(16,37,27,.13);
  --ga-ui-focus:0 0 0 4px rgba(200,162,74,.28);
  --ga-ui-control-height:46px;
}

html{overflow-x:hidden;scroll-behavior:smooth}
body{overflow-x:clip}
main{min-width:0}
img,video,svg,canvas,iframe{max-width:100%}

/* Shared layout rhythm */
main > :where(.container,.ga-section,.ga-page-hero,.ga-course-hero,.ga-trip-experience,.detail-hero){min-width:0}
:where(.container,.ga-section){width:min(calc(100% - 32px),1180px)}
:where(.ga-section,.page-section){scroll-margin-top:104px}
:where(.grid,.form-grid,.stats,.filters,.detail-content,.trip-layout,.ga-course-story-layout)>*{min-width:0}

/* Stable, accessible hero contrast across all public hero variants. */
main :where(
  .hero,
  .page-hero,
  .ga-page-hero,
  .ga-home-hero,
  .ga-course-hero,
  .ga-trip-experience-hero,
  .ga-scorecards-hero,
  .ga-travel-hero,
  .ga-personal-journal-hero,
  .ga-ai-caddie-hero,
  .ga-journal-story-hero,
  .contact-hero
) :where(h1,.ga-hero__title){
  color:#fffdf7!important;
  text-shadow:0 3px 24px rgba(0,0,0,.38);
}
main :where(
  .hero,
  .page-hero,
  .ga-page-hero,
  .ga-home-hero,
  .ga-course-hero,
  .ga-trip-experience-hero,
  .ga-scorecards-hero,
  .ga-travel-hero,
  .ga-personal-journal-hero,
  .ga-ai-caddie-hero,
  .ga-journal-story-hero,
  .contact-hero
) :where(.lead,.ga-hero__lead,.ga-page-hero__lead,p:not(.eyebrow):not(.ga-kicker)){
  color:rgba(255,255,255,.9);
}
main :where(.ga-page-hero,.ga-course-hero,.ga-trip-experience-hero,.hero,.page-hero) .breadcrumbs,
main :where(.ga-page-hero,.ga-course-hero,.ga-trip-experience-hero,.hero,.page-hero) .breadcrumbs a{
  color:rgba(255,255,255,.9)!important;
}
main :where(.ga-page-hero,.ga-course-hero,.ga-trip-experience-hero,.hero,.page-hero) :where(.eyebrow,.ga-kicker,.ga-hero__eyebrow){
  color:#f0d67c!important;
}

/* Component consistency */
main :where(.card,.ga-content-card,.ga-story-panel,.ga-course-story-card,.ga-side-card,.ga-ranking-card,.ga-filter-panel){
  border-color:var(--ga-ui-border);
  border-radius:var(--ga-ui-radius-md);
  box-shadow:var(--ga-ui-shadow);
}
@media (hover:hover){
  main :where(a.card,a.ga-content-card,a.ga-course-card,a.ga-card-system):hover{
    transform:translateY(-2px);
    box-shadow:var(--ga-ui-shadow-hover);
  }
}

/* Buttons and action links */
main :where(.btn,button:not(.nav-toggle):not(.submenu-toggle),[class*="-action"]){
  min-height:var(--ga-ui-control-height);
}
main .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:11px 19px;
  border-radius:999px;
  line-height:1.1;
  text-decoration:none;
}
main :where(.btn,button,a):focus-visible{
  outline:0;
  box-shadow:var(--ga-ui-focus)!important;
}
main :where(button,.btn)[disabled],main :where(button,.btn)[aria-disabled="true"]{
  opacity:.5;
  cursor:not-allowed;
  transform:none!important;
}

/* Course story expand/collapse control */
main :where([data-ga-story-toggle],.ga-story-toggle,.ga-overview-toggle,.ga-course-overview-toggle,.course-text-toggle){
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:42px;
  margin-top:14px;
  padding:9px 15px;
  border:1px solid rgba(18,63,44,.2);
  border-radius:999px;
  background:#fff;
  color:#123f2c;
  font:inherit;
  font-size:.9rem;
  font-weight:850;
  line-height:1;
  box-shadow:0 8px 24px rgba(18,63,44,.08);
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease;
}
main :where([data-ga-story-toggle],.ga-story-toggle,.ga-overview-toggle,.ga-course-overview-toggle,.course-text-toggle)::after{
  content:"→";
  font-size:1.05em;
  transition:transform .18s ease;
}
main :where([data-ga-story-toggle],.ga-story-toggle,.ga-overview-toggle,.ga-course-overview-toggle,.course-text-toggle)[aria-expanded="true"]::after{
  transform:rotate(-90deg);
}
@media (hover:hover){
  main :where([data-ga-story-toggle],.ga-story-toggle,.ga-overview-toggle,.ga-course-overview-toggle,.course-text-toggle):hover{
    transform:translateY(-1px);
    border-color:rgba(18,63,44,.36);
    background:#f7faf7;
    box-shadow:0 12px 30px rgba(18,63,44,.12);
  }
}

/* Forms */
main :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.input){
  min-height:var(--ga-ui-control-height);
  border-radius:var(--ga-ui-radius-sm);
  border-color:rgba(18,63,44,.18);
}
main :where(input,select,textarea):focus{
  outline:0;
  border-color:#c8a24a;
  box-shadow:var(--ga-ui-focus);
}

/* Tables and horizontal content remain contained. */
main :where(.table-wrap,.admin-table-wrap,.ga-table-wrap,.comparison-table-wrap){max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
main table{max-width:100%}

@media(max-width:900px){
  :where(.container,.ga-section){width:min(calc(100% - 28px),1180px);padding-left:0;padding-right:0}
  main :where(.ga-page-hero,.ga-course-hero,.ga-trip-experience-hero,.detail-hero){margin-left:14px;margin-right:14px;width:auto}
  main :where(.ga-page-hero__actions,.ga-hero__actions,.ga-action-row,.quick-actions){gap:10px}
}

@media(max-width:640px){
  :root{--ga-ui-control-height:48px}
  :where(.container,.ga-section){width:min(calc(100% - 24px),1180px)}
  main :where(.card,.ga-content-card,.ga-story-panel,.ga-course-story-card,.ga-side-card){border-radius:18px}
  main :where(.ga-page-hero,.ga-course-hero,.ga-trip-experience-hero,.detail-hero){margin-left:12px;margin-right:12px}
  main :where(.ga-page-hero__actions,.ga-hero__actions,.ga-action-row) .btn{width:100%}
  main :where(.filters,.form-grid.two,.stats){grid-template-columns:minmax(0,1fr)}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}
