/* =========================================================
   Homepage-specific styles

   Desktop presentation remains unchanged.

   The separate mobile hero is displayed on:
   - phones in portrait orientation;
   - phones in landscape orientation;
   - touch devices up to 1024px wide.
   ========================================================= */


/* =========================================================
   BASE RULES MOVED FROM THE ORIGINAL INLINE CSS
   ========================================================= */

body {
  margin: 0;
}

header,
nav {
  display: block;
}

h1 {
  font-size: 2.2rem;
  line-height: 1.1;
  margin: 0.5rem 0;
}


/* =========================================================
   MOBILE-HIDE UTILITY

   Keeps elements with .mobile-hide hidden on phones in both
   portrait and landscape orientation.
   ========================================================= */

@media screen and (max-width: 1024px) and (pointer: coarse) {
  .mobile-hide {
    display: none;
  }
}


/* =========================================================
   IRS ENROLLED AGENT EXPLANATION SECTION
   DESKTOP VERSION
   ========================================================= */

.ea-explain-section {
  padding: 10px 0 45px;
}

.ea-explain-card {
  background: #ffffff;
  border: 1px solid rgba(15, 34, 64, 0.10);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  padding: 34px 38px;
}

.ea-explain-card h2 {
  color: #0b2545;
  margin: 0 0 14px;
  font-size: 1.75rem;
  line-height: 1.25;
}

.ea-explain-card p {
  color: #344054;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 14px;
}

.ea-explain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.ea-explain-item {
  background: #fbfcfe;
  border: 1px solid rgba(15, 34, 64, 0.10);
  border-radius: 16px;
  padding: 18px;
}

.ea-explain-item strong {
  display: block;
  color: #0b2545;
  font-size: 1.02rem;
  margin-bottom: 7px;
}

.ea-explain-item span {
  color: #667085;
  line-height: 1.55;
  font-size: 0.95rem;
}


/* =========================================================
   IRS ENROLLED AGENT EXPLANATION SECTION
   MOBILE VERSION
   ========================================================= */

@media screen and (max-width: 1024px) and (pointer: coarse) {
  .ea-explain-card {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .ea-explain-card h2 {
    font-size: 1.45rem;
  }

  .ea-explain-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   DESKTOP AND MOBILE HERO VISIBILITY
   ========================================================= */

/* Desktop hero is visible by default. */
.desktop-home-hero {
  display: block;
}

/* Mobile hero is hidden by default. */
.mobile-home-hero {
  display: none;
}


/* =========================================================
   MOBILE HERO

   The pointer: coarse condition targets touchscreen devices.
   The 1024px width keeps the mobile hero active when a phone
   is turned sideways.
   ========================================================= */

@media screen and (max-width: 1024px) and (pointer: coarse) {

  /* Hide the original desktop hero on phones. */
  .desktop-home-hero {
    display: none;
  }

  /* Display the separate mobile hero. */
  .mobile-home-hero {
    display: block;
    width: 100%;
    background: #ffffff;
    overflow: hidden;
  }


  /* =======================================================
     MOBILE HERO IMAGE
     ======================================================= */

  .mobile-home-hero__image {
    position: relative;
    width: 100%;
    height: clamp(205px, 56vw, 285px);
    overflow: hidden;
    background: #d9dde2;
  }

  .mobile-home-hero__image::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 38%;
    background:
      linear-gradient(
        to bottom,
        rgba(8, 22, 39, 0),
        rgba(8, 22, 39, 0.20)
      );
    pointer-events: none;
  }

  .mobile-home-hero__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    /*
     Adjust this second value to move the photograph vertically.

     Smaller percentage: image moves downward and shows more
     of the upper part of the original photograph.

     Larger percentage: image moves upward and shows more of
     the lower part of the original photograph.
    */
    object-position: center 30%;
  }


  /* =======================================================
     MOBILE HERO CONTENT PANEL
     ======================================================= */

  .mobile-home-hero__panel {
    position: relative;
    background: #0b2545;
    color: #ffffff;
  }

  .mobile-home-hero__panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 56px;
    height: 3px;
    transform: translate(-50%, -50%);
    background: #d4af61;
  }

  .mobile-home-hero__content {
    width: min(100%, 430px);
    margin: 0 auto;
    padding: 31px 22px 30px;
    text-align: center;
    box-sizing: border-box;
  }


  /* =======================================================
     MOBILE HERO EYEBROW
     ======================================================= */

  .mobile-home-hero__eyebrow {
    margin: 0 0 13px;
    color: #e3c779;
    font-size: 0.76rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }


  /* =======================================================
     MOBILE HERO H1

     The wording of the H1 remains unchanged.
     ======================================================= */

  .mobile-home-hero__title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 8.7vw, 2.65rem);
    line-height: 1.03;
    font-weight: 700;
    letter-spacing: -0.025em;
  }

  .mobile-home-hero__title span {
    display: block;
  }

  .mobile-home-hero__title span + span {
    margin-top: 7px;
  }


  /* =======================================================
     GOLD DIVIDER
     ======================================================= */

  .mobile-home-hero__line {
    width: 44px;
    height: 2px;
    margin: 21px auto 19px;
    background: #d4af61;
  }


  /* =======================================================
     MOBILE HERO SERVICES
     ======================================================= */

  .mobile-home-hero__services {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: rgba(255, 255, 255, 0.96);
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 600;
  }


  /* =======================================================
     MOBILE HERO SERVICE AREA
     ======================================================= */

  .mobile-home-hero__area {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    line-height: 1.45;
  }


  /* =======================================================
     MOBILE HERO BUTTON
     ======================================================= */

  .mobile-home-hero__button {
    display: flex;
    width: 100%;
    min-height: 52px;
    margin: 23px auto 0;
    padding: 13px 20px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid #d4af61;
    border-radius: 8px;
    background: #d4af61;
    color: #15110a;
    font-size: 0.98rem;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.20);
    transition:
      background-color 0.2s ease,
      border-color 0.2s ease,
      color 0.2s ease,
      transform 0.2s ease;
  }

  .mobile-home-hero__button:hover,
  .mobile-home-hero__button:focus-visible {
    background: #ffffff;
    border-color: #ffffff;
    color: #0b2545;
    text-decoration: none;
    transform: translateY(-1px);
  }
}


/* =========================================================
   PHONE LANDSCAPE ADJUSTMENTS

   Keeps the mobile design active but prevents the hero image
   and panel from becoming unnecessarily tall.
   ========================================================= */

@media screen
  and (max-width: 1024px)
  and (max-height: 600px)
  and (orientation: landscape)
  and (pointer: coarse) {

  .mobile-home-hero__image {
    height: 220px;
  }

  .mobile-home-hero__image img {
    object-position: center 20%;
  }

  .mobile-home-hero__content {
    width: min(100%, 560px);
    padding: 25px 24px 25px;
  }

  .mobile-home-hero__eyebrow {
    margin-bottom: 10px;
  }

  .mobile-home-hero__title {
    font-size: 2.15rem;
  }

  .mobile-home-hero__title span + span {
    margin-top: 5px;
  }

  .mobile-home-hero__line {
    margin-top: 17px;
    margin-bottom: 15px;
  }

  .mobile-home-hero__services {
    gap: 5px;
    font-size: 0.95rem;
  }

  .mobile-home-hero__area {
    margin-top: 14px;
  }

  .mobile-home-hero__button {
    margin-top: 18px;
  }
}


/* =========================================================
   VERY NARROW PHONE ADJUSTMENTS
   ========================================================= */

@media screen and (max-width: 390px) and (pointer: coarse) {
  .mobile-home-hero__image {
    height: 210px;
  }

  .mobile-home-hero__content {
    padding: 28px 17px 25px;
  }

  .mobile-home-hero__title {
    font-size: 2rem;
  }

  .mobile-home-hero__services {
    font-size: 0.95rem;
  }
}


/* =========================================================
   REDUCED MOTION ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .mobile-home-hero__button {
    transition: none;
  }
}


/* UNIVERSAL INNER-PAGE HERO SUPPORT */
.desktop-hero-heading { display: block; }

@media screen and (max-width: 1024px) and (pointer: coarse) {
  .desktop-hero-heading { display: none !important; }
  .mobile-home-hero__image picture { display: block; width: 100%; height: 100%; }
}
