/*
Theme Name: Ashley Kehoe Eventing
Theme URI: https://ashleykehoeeventing.com
Author: Custom
Description: Custom theme for an equestrian eventing site — dark green & cream palette, serif display type.
Version: 1.0
Text Domain: ake-theme
*/

/* -----------------------------------------
   0. Tokens
----------------------------------------- */
:root{
  --cream:        #F1F1EF;
  --cream-dark:   #E4E4E2;
  --green-dark:      #044B39;  /* your logo color — header/footer bg */
  --green-mid:       #0F6650;  /* text links, icons, "About" eyebrow on dark bg */
  --green-btn:       #0C7A5C;  /* CTA button background */
  --green-btn-hover: #085C46;  /* button hover — a shade darker than green-btn */
  --text-dark:    #2B2B26;
  --text-muted:   #6B6B60;
  --white:        #FFFFFF;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Jost', 'Helvetica Neue', Arial, sans-serif;
  --max-width:    1180px;
  --radius:       2px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin:0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.6;
}

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
ul{ list-style: none; margin: 0; padding: 0; }
.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

a:focus-visible, button:focus-visible{
  outline: 2px solid var(--green-btn);
  outline-offset: 2px;
}

.btn{
  display: inline-block;
  background: var(--green-btn);
  color: var(--white);
  padding: 14px 28px;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s ease;
}
.btn:hover{ background: var(--green-btn-hover); color: var(--white); }
.btn.btn-outline{
  background: transparent;
  border: 1px solid var(--white);
}
.link-arrow{
  color: var(--green-mid);
  font-weight: 500;
  font-size: .9rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.link-arrow::after{ content: "\2192"; margin-left: 6px; display:inline-block; transition: transform .15s ease; }
.link-arrow:hover::after{ transform: translateX(3px); }

/* -----------------------------------------
   1. Top utility bar
----------------------------------------- */
.top-bar{
  background: var(--cream-dark);
  font-size: .82rem;
}
.top-bar .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
}
.top-bar a{ color: var(--text-dark); }
.top-bar .socials{ display:flex; gap: 14px; }
.top-bar .socials a{
  width: 26px; height: 26px;
  display:flex; align-items:center; justify-content:center;
  background: var(--green-dark);
  color: var(--white);
  border-radius: 3px;
}
.top-bar .socials svg{ width: 13px; height:13px; fill: currentColor; }

/* -----------------------------------------
   2. Main header / nav
----------------------------------------- */
.site-header{
  /*background: var(--cream);*/
	background: #FFFFFF;
  border-bottom: 1px solid rgba(0,0,0,.06);
  position: relative;
  z-index: 30; /* NEW — keeps the entire header above page content sections */
}
.site-header .container{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.site-branding{ display:flex; align-items:center; gap:14px; }
.site-branding img{ height: 46px; width:auto; }
.site-branding .name{
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: .06em;
  line-height:1.25;
}
.site-branding .name small{
  display:block;
  font-family: var(--font-body);
  font-size: .6rem;
  letter-spacing: .3em;
  color: var(--text-muted);
}
/* Restrict the SVG logo width and height in the header */
.custom-logo-link img,
.custom-logo,
.site-logo img {
    /*max-width: 320px !important;  /* Hard ceiling for width */
    max-height: 160px !important;  /* Hard ceiling for height */
    width: auto !important;
    height: auto !important;
    display: block;
}
.main-nav ul{ display:flex; align-items:center; gap: 30px; }
.main-nav a{
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 500;
}
.main-nav li.menu-item-has-children{ position: relative; }
.main-nav li.menu-item-has-children > a::after{ content:" \25BE"; font-size:.7em; }
.main-nav .sub-menu{
  position:absolute; top: 100%; left:0;
  background: var(--white);
  min-width: 200px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  padding: 8px 0;
  display:none;
  z-index: 50;
}
.main-nav li.menu-item-has-children:hover .sub-menu{ display:block; }
.main-nav .sub-menu a{ display:block; padding: 8px 18px; text-transform:none; letter-spacing:0; }
.main-nav .sub-menu a:hover{ background: var(--cream); }

.header-right{ display:flex; align-items:center; gap: 34px; }
.nav-toggle{ display:none; background:none; border:none; cursor:pointer; }

/* -----------------------------------------
   3. Hero
----------------------------------------- */
.hero{
  position: relative;
  min-height: 620px;
  display:flex;
  align-items:center;
  background-size: cover;
  background-position: center;
  overflow:hidden;
}
.hero::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(90deg, rgba(16,42,32,.82) 0%, rgba(16,42,32,.45) 45%, rgba(16,42,32,.05) 75%);
	z-index: 1;
}
.hero .container{ position:relative; z-index:2; }
.hero-content{ max-width: 620px; color: var(--white); } 
.hero-eyebrow{
  text-transform: uppercase;
  letter-spacing: .25em;
  font-size: 1.5em;
  font-family: var(--font-display);
  color: #BFD6C8;
  margin-bottom: 14px;
}
.hero h1{
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--white);
  margin-bottom: 20px;
}
.hero p{ font-size: 1.05rem; margin-bottom: 30px; max-width: 480px; color: #EFEFE8; }

.hero-dots{
  position:absolute; right: 32px; bottom: 26px; z-index:2;
  display:flex; gap: 8px;
}
.hero-dots button{
  width:9px; height:9px; border-radius:50%;
  background: rgba(255,255,255,.45);
  border: none; padding:0; cursor:pointer;
}
.hero-dots button.active{ background: var(--green-btn); width:11px; height:11px; }
.hero-slides{
  position:absolute; inset:0; z-index:0;
}
.hero-slide{
  position:absolute; inset:0;
  background-size:cover; background-position:center;
  opacity:0;
  transition: opacity 1.2s ease-in-out;
}
.hero-slide.active{ opacity:1; }

/* -----------------------------------------
   4. Icon feature row
----------------------------------------- */
.feature-row{
  background: var(--white);
  padding: 70px 0;
}
.feature-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
}
.feature-item{
  text-align:center;
  padding: 0 28px;
  border-right: 1px solid rgba(0,0,0,.08);
}
.feature-item:last-child{ border-right:none; }
.feature-item .icon{
  width: 56px; height:56px;
  margin: 0 auto 20px;
  color: var(--green-mid);
}
.feature-item .icon svg{ width:100%; height:100%; }
.feature-item h3{
  font-size: 1.2rem;
  letter-spacing:.08em;
  text-transform: uppercase;
}
.feature-item p{ color: var(--text-muted); font-size: .92rem; margin-bottom: 16px; }

/* -----------------------------------------
   5. About / split section
----------------------------------------- */
.about-split{
  background: var(--green-dark);
  color: var(--white);
  padding: 90px 0;
}
.about-split .container{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items:center;
}
.about-split .eyebrow{
  text-transform:uppercase; letter-spacing:.25em; font-size:.78rem;
  color:#8FB39F; margin-bottom: 14px;
}
.about-split h2{ color: var(--white); font-size: 2.2rem; margin-bottom: 18px; }
.about-split p{ color:#D8E2DA; margin-bottom: 28px; max-width: 460px; }
.about-split .about-media img{ border-radius: var(--radius); }

/* -----------------------------------------
   6. Recent Highlights
----------------------------------------- */
.highlights{ padding: 80px 0; }
.highlights h2{
  text-align:center;
  text-transform: uppercase;
  letter-spacing:.15em;
  font-size: 1.5rem;
  margin-bottom: 44px;
}
.highlights-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.highlight-card .thumb{
  aspect-ratio: 4/3;
  overflow:hidden;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.highlight-card .thumb img{ width:100%; height:100%; object-fit:cover; transition: transform .35s ease; }
.highlight-card:hover .thumb img{ transform: scale(1.05); }
.highlight-card .date{
  font-size: .75rem;
  letter-spacing:.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.highlight-card h3{ font-size: 1.1rem; margin-bottom: 12px; }

/* -----------------------------------------
   7. Newsletter band
----------------------------------------- */
.newsletter{
  background: var(--green-dark);
  color: var(--white);
  padding: 50px 0;
}
.newsletter .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.newsletter h2{
  text-transform:uppercase; letter-spacing:.15em; font-size:1.3rem; margin-bottom:6px; color:var(--white);
}
.newsletter p{ color:#CFDCD4; margin:0; }
.newsletter form{ display:flex; gap: 10px; flex: 1 1 420px; max-width: 520px; }
.newsletter input[type=email]{
  flex:1;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
}
.newsletter .btn{ flex-shrink:0; }
@media (max-width: 720px){
  ...
  .newsletter .container{ flex-direction:column; align-items:stretch; } /* changed flex-start → stretch */

  .newsletter form{
    flex: 1 1 auto;   /* stop inheriting the 420px basis on the new axis */
    max-width: 100%;
    width: 100%;
    flex-direction: column; /* stack input above button */
  }
  .newsletter input[type=email]{
    width: 100%;
  }
  .newsletter .btn{
    width: 100%;
    text-align: center;
  }
}

/* -----------------------------------------
   8. Footer
----------------------------------------- */
.site-footer{
  background: var(--green-dark);
  color: #C9D6CD;
  padding: 60px 0 24px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand{ display:flex; align-items:center; gap:12px; }
.footer-brand img{ height:120px; width:auto; }
.footer-brand .name{ font-family: var(--font-display); color: var(--white); font-size:1.1rem; }
.footer-brand .name small{ display:block; font-size:.55rem; letter-spacing:.3em; color:#8FB39F; }
.site-footer h4{
  color: var(--white);
  text-transform: uppercase;
  letter-spacing:.1em;
  font-size: .85rem;
  margin-bottom: 16px;
}
.site-footer ul li{ margin-bottom: 8px; }
.site-footer a:hover{ color: var(--white); }
.footer-socials{ display:flex; gap: 10px; }
.footer-socials a{
  width:34px; height:34px; border-radius:3px;
  background: rgba(255,255,255,.08);
  display:flex; align-items:center; justify-content:center;
}
.footer-socials svg{ width:15px; height:15px; fill: currentColor; }
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 22px;
  display:flex;
  justify-content:space-between;
  font-size: .8rem;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a{ margin-left: 18px; }

/* -----------------------------------------
   9. Generic page/single content
----------------------------------------- */
.page-content{ padding: 70px 0; }
.page-content .container{ max-width: 820px; }
.page-content h1{ margin-bottom: 24px; }
.page-content img{ border-radius: var(--radius); margin: 20px 0; }

/* -----------------------------------------
   10. Responsive
----------------------------------------- */
@media (max-width: 960px){
  .feature-grid, .highlights-grid{ grid-template-columns: repeat(2,1fr); row-gap: 40px; }
  .feature-item{ border-right:none; border-bottom:1px solid rgba(0,0,0,.08); padding-bottom: 30px; }
  .about-split .container{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; row-gap: 30px; }
}

@media (max-width: 720px){
  .main-nav{ position:absolute; top:100%; left:0; right:0; background: var(--cream); box-shadow:0 12px 20px rgba(0,0,0,.1); display:none; z-index: 20; /* NEW — sits above .hero's z-index:0/1/2 layers */}
  .main-nav.open{ display:block; }
  .main-nav ul{ flex-direction:column; align-items:flex-start; padding: 16px 24px; gap: 14px; }
  .main-nav .sub-menu{ position:static; box-shadow:none; padding-left: 12px; display:block; }
  .nav-toggle{ display:block; }
  .header-right .btn{ display:none; }
  .site-header .container{ position: relative; flex-wrap: wrap; }
  .feature-grid, .highlights-grid, .footer-grid{ grid-template-columns: 1fr; }
  .newsletter .container{ flex-direction:column; align-items:flex-start; }
  .hero{ min-height: 520px; text-align:left; }
}
/* -----------------------------------------
 *      11. Sponsors
 * ----------------------------------------*/
 .sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 30px; /* Space between cards */
    padding: 20px;
  }
  .sponsor-card {
    background: #fff; /* White card background */
 border: 1px solid #e0e0e0;
    border-top: 4px solid var(--green-dark); /* Dark Green top accent line */
    border-radius: 8px;
    overflow: hidden; /* Contains the image corners */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column; /* Stacks elements vertically */
    padding: 20px;
	  text-align:center;
  }
  .sponsor-card-photo {
    width: 100%;
    height: 200px; /* Uniform height */
    object-fit: cover; /* Keeps aspect ratio without stretching */
    border-radius: 6px;
    margin-bottom: 15px;
  }
  .sponsor-card-logo-container {
    text-align: center;
    margin-bottom: 15px;
	display: flex;
    justify-content: center;
    align-items: center;
  }
  .sponsor-card-logo {
    max-height: 120px; /* Standards logo size */
    width: auto;
	  display: block;
  margin: 0 auto; /* Center image within its parent */
  }
  .sponsor-card-blurb {
    font-size: 1rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
  }
  .sponsor-card-url-link {
    font-weight: bold;
    color: var(--green-dark); /* Your Dark Green color */
    text-decoration: underline;
    text-align: center;
    margin-top: auto; /* Pushes the link to the bottom of the card */
  }
/* -----------------------------------------
 *      12. Services Page
 * --------------------------------------- */
.services-section {
    width: 100% !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    box-sizing: border-box;
  }
.services-grid {
    display: grid;
   grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
  }
/* Desktop Grid (Forces 2 Columns on Screens Wider Than 768px) */
  @media screen and (min-width: 768px) {
    .services-grid {
      grid-template-columns: repeat(2, 1fr); /* Displays 2 cards side-by-side (2x2 layout) */
    }
  }
  .service-card {
    background: #ffffff; /* White card against light grey site background */
    border: 1px solid #e0e0e0;
    border-top: 4px solid var(--green-dark); /* Dark Green top accent line */
    border-radius: 8px;
    padding: 30px 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
	  box-sizing: border-box;
  }

  .service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.08);
  }

  .service-title {
    color: var(--green-dark); /* Dark Green */
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .service-description {
    color: #444;
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 20px;
  }

  .service-list {
    margin: 0 0 25px 0;
    padding-left: 20px;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .service-list li {
    margin-bottom: 8px;
  }

  .service-btn {
    display: block;
    text-align: center;
    background-color: var(--green-btn); /* Dark Green */
    color: #ffffff !important;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
    margin-top: auto; /* Pushes button to bottom of card */
  }

  .service-btn:hover {
    background-color: var(--green-btn-hover); /* Darker green on hover */
  }
/* -----------------------------------------
 *      13. lightbox
 * --------------------------------------- */
/* Thumbnail strip (3-4 small photos under each horse) */
.horse-gallery{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0 36px;
}
.horse-gallery a{
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cream-dark);
  cursor: zoom-in;
}
/* Extra specificity so .page-content img (margin/radius) doesn't leak in */
.horse-gallery a img{
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  transition: transform .3s ease;
}
.horse-gallery a:hover img,
.horse-gallery a:focus-visible img{ transform: scale(1.06); }

@media (max-width: 720px){
  .horse-gallery{ grid-template-columns: repeat(2, 1fr); }
}

/* Lightbox overlay */
.ake-lb{
  position: fixed;
  inset: 0;
  z-index: 100000;              /* above the header and the WP admin bar */
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 24, 18, .94);
}
.ake-lb.is-open{ display: flex; }
html.ake-lb-lock{ overflow: hidden; }

.ake-lb-stage{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 64px 72px 72px;
}
.ake-lb-img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity .2s ease;
}
.ake-lb-img.is-ready{ opacity: 1; }

.ake-lb-btn{
  position: absolute;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: var(--white);
  cursor: pointer;
  transition: background .2s ease;
}
.ake-lb-btn:hover{ background: rgba(255, 255, 255, .26); }
.ake-lb-btn:focus-visible{ outline: 2px solid var(--white); outline-offset: 2px; }
.ake-lb-close{ top: 16px; right: 16px; }
.ake-lb-prev{ left: 16px; top: 50%; transform: translateY(-50%); }
.ake-lb-next{ right: 16px; top: 50%; transform: translateY(-50%); }

.ake-lb-meta{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  color: #D8E2DA;
  font-size: .9rem;
}

@media (max-width: 720px){
  .ake-lb-stage{ padding: 64px 12px 72px; }
  .ake-lb-prev{ left: 8px; }
  .ake-lb-next{ right: 8px; }
}

@media (prefers-reduced-motion: reduce){
  .horse-gallery a img,
  .ake-lb-img,
  .ake-lb-btn{ transition: none; }
}

/* -----------------------------------------
 *      14. Brett changes
 * --------------------------------------- */
.post-thumbnail img, 
.featured-media img, 
.wp-post-image {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
}
