/* =========================================================
   YES I CAN ROOFING & EXTERIORS
   V28 — MOBILE EXPERIENCE
   Loaded last: mobile-only polish without changing desktop.
   ========================================================= */

@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }

  body {
    overflow-x: hidden;
  }

  #services,
  #gallery,
  #estimate,
  #about,
  #contact {
    scroll-margin-top: 72px;
  }

  /* ---------- HEADER ---------- */
  :root {
    --header-height: 66px;
  }

  .site-header__inner {
    width: calc(100% - 24px);
    min-height: 66px;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .site-header__brand {
    width: min(252px, 73vw);
    height: 58px;
    overflow: hidden;
  }

  .site-header__logo {
    content: url("../../imagenes/yes-i-can-roofing-logo-footer-tight.webp");
    width: min(245px, 72vw);
    max-height: 48px;
    object-fit: contain;
    object-position: left center;
  }

  .site-header__menu-button {
    display: block;
    width: 42px;
    height: 42px;
    padding: 9px;
  }

  .site-header__mobile-menu {
    box-shadow: 0 16px 28px rgba(0, 11, 23, .25);
  }

  .site-header__mobile-nav {
    width: calc(100% - 32px);
    padding: 8px 0 18px;
  }

  .site-header__mobile-link {
    padding: 13px 2px;
    font-size: 13px;
  }

  .site-header__mobile-whatsapp {
    margin-top: 14px;
    min-height: 48px;
  }

  /* ---------- HERO ---------- */
  .hero,
  .hero__inner {
    min-height: 560px;
  }

  .hero__inner {
    width: calc(100% - 28px);
  }

  .hero__visual {
    background-position: 67% bottom;
  }

  .hero__visual::before {
    background:
      linear-gradient(
        180deg,
        rgba(255,255,255,.98) 0%,
        rgba(255,255,255,.96) 27%,
        rgba(255,255,255,.82) 42%,
        rgba(255,255,255,.34) 58%,
        rgba(255,255,255,.03) 75%,
        rgba(255,255,255,0) 100%
      );
  }

  .hero__content {
    width: 100%;
    max-width: none;
    padding: 18px 0 168px;
  }

  .hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    margin-bottom: 13px;
  }

  .hero__trust-item {
    gap: 5px;
    font-size: 8.5px;
    letter-spacing: .025em;
  }

  .hero__trust-item svg {
    width: 15px;
    height: 15px;
  }

  .hero__trust-divider {
    display: none;
  }

  .hero__title {
    font-size: clamp(38px, 11.2vw, 50px);
    line-height: .94;
    letter-spacing: -.04em;
  }

  .hero__title span,
  .hero__title strong {
    white-space: normal;
  }

  .hero__title strong {
    margin-top: 5px;
  }

  .hero__services {
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.55;
  }

  .hero__services span:not(:last-child)::after {
    margin: 0 5px;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 16px;
  }

  .hero__button {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 11px;
  }

  /* ---------- SERVICES ---------- */
  .services-strip {
    margin-top: -126px;
    padding: 0 0 14px;
  }

  .services-strip__inner {
    width: 100%;
    padding: 0 14px 4px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .services-strip__inner::-webkit-scrollbar {
    display: none;
  }

  .service-card {
    flex: 0 0 min(72vw, 270px);
    scroll-snap-align: start;
    border-radius: 12px;
  }

  .service-card__media {
    height: 132px;
  }

  .service-card__body {
    min-height: 50px;
    padding: 12px 10px 11px;
  }

  .service-card__title {
    font-size: 12px;
  }


@media (max-width: 430px) {
  .hero,
  .hero__inner {
    min-height: 540px;
  }

  .hero__content {
    padding-bottom: 156px;
  }

  .hero__services {
    margin-top: 12px;
  }

  .services-strip {
    margin-top: -134px;
  }
}

  /* ---------- BEFORE / AFTER + ESTIMATE ---------- */
  .transformation {
    padding: 8px 0 24px;
  }

  .transformation__inner {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .transformation-card,
  .estimate-shell__card.estimate-calculator {
    border-radius: 12px;
  }

  .transformation-card__media {
    height: 240px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .transformation-card__panel {
    min-height: 240px;
  }

  .transformation-card__panel--after {
    border-top: 0;
    border-left: 1px solid rgba(255,255,255,.8);
  }

  .transformation-card__image {
    background-position: center;
  }

  .transformation-card__badge {
    top: 10px;
    font-size: 9px;
    padding: 7px 9px;
  }

  .transformation-card__badge--before {
    left: 10px;
  }

  .transformation-card__badge--after {
    right: 10px;
  }

  .transformation-card__benefits {
    grid-template-columns: 1fr;
  }

  .transformation-card__benefit {
    min-height: 0;
    padding: 13px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }

  .transformation-card__benefit:last-child {
    border-bottom: 0;
  }

  .transformation-card__benefit strong {
    font-size: 12px;
  }

  .transformation-card__benefit span {
    font-size: 10px;
  }

  .estimate-shell__card.estimate-calculator {
    padding: 18px 15px 15px;
  }

  .estimate-calculator__header {
    text-align: left;
  }

  .estimate-calculator__eyebrow {
    font-size: 9px;
  }

  .estimate-shell__title {
    font-size: 26px;
    line-height: 1;
  }

  .estimate-calculator__intro {
    font-size: 11px;
    line-height: 1.45;
  }

  .estimate-calculator__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .estimate-field__control {
    min-height: 49px;
  }

  .estimate-field select {
    font-size: 13px;
  }

  .estimate-result {
    grid-template-columns: 44px 1fr;
    gap: 10px;
    padding: 13px;
  }

  .estimate-result__icon {
    width: 40px;
    height: 40px;
  }

  .estimate-result__amount {
    font-size: 21px;
  }

  .estimate-result__note {
    font-size: 9px;
    line-height: 1.35;
  }

  .estimate-calculator__whatsapp {
    min-height: 49px;
    font-size: 11px;
  }

  /* ---------- GALLERY ---------- */
  .project-gallery {
    padding: 30px 0 34px;
  }

  .project-gallery__inner {
    width: calc(100% - 24px);
  }

  .project-gallery__header {
    margin-bottom: 14px;
  }

  .project-gallery__eyebrow {
    font-size: 9px;
  }

  .project-gallery__title {
    font-size: 36px;
  }

  .project-gallery__filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 7px;
    margin-bottom: 15px;
    padding: 0 0 5px;
    scrollbar-width: none;
  }

  .project-gallery__filters::-webkit-scrollbar {
    display: none;
  }

  .project-gallery__filter {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 15px;
    border-radius: 999px;
    font-size: 10px;
  }

  .project-gallery__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project-gallery__item {
    border-radius: 12px;
  }

  .project-gallery__photo {
    aspect-ratio: 16 / 9;
  }

  .project-gallery__meta {
    min-height: 72px;
    padding: 12px 14px 12px 54px;
  }

  .project-gallery__meta strong {
    font-size: 13px;
  }

  .project-gallery__meta > span:last-child {
    font-size: 10px;
  }

  .project-gallery__icon {
    left: 12px;
    width: 34px;
    height: 34px;
  }

  .project-gallery__view-all {
    margin-top: 18px;
    min-height: 44px;
  }

  /* ---------- WHY CHOOSE ---------- */
  .why-choose {
    padding: 30px 0 32px;
  }

  .why-choose__inner {
    width: calc(100% - 24px);
  }

  .why-choose__header {
    margin-bottom: 18px;
  }

  .why-choose__eyebrow {
    font-size: 9px;
  }

  .why-choose__title {
    font-size: 29px;
  }

  .why-choose__intro {
    margin-top: 8px;
    font-size: 11px;
  }

  .why-choose__panel {
    grid-template-columns: 1fr;
    border-radius: 12px;
  }

  .why-choose__item {
    min-height: 0;
    padding: 17px 16px;
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-areas:
      "icon title"
      "icon text";
    column-gap: 13px;
    row-gap: 4px;
    align-items: center;
    text-align: left;
    border-bottom: 1px solid #e1e7ec;
  }

  .why-choose__item:last-child {
    border-bottom: 0;
  }

  .why-choose__item::after {
    display: none !important;
  }

  .why-choose__icon {
    grid-area: icon;
    width: 34px;
    height: 34px;
    margin: 0;
  }

  .why-choose__item h3 {
    grid-area: title;
    min-height: 0;
    margin: 0;
    font-size: 12px;
    line-height: 1.2;
  }

  .why-choose__rule {
    display: none;
  }

  .why-choose__item p {
    grid-area: text;
    max-width: none;
    margin: 0;
    font-size: 10px;
    line-height: 1.45;
  }

  .why-choose__footer {
    display: none;
  }

  /* ---------- REVIEWS ---------- */
  .reviews {
    padding: 32px 0 34px;
  }

  .reviews__inner {
    width: calc(100% - 24px);
  }

  .reviews__header {
    margin-bottom: 17px;
  }

  .reviews__eyebrow {
    font-size: 9px;
  }

  .reviews__title {
    font-size: 28px;
    line-height: 1.08;
  }

  .reviews__intro {
    font-size: 10px;
  }

  .reviews__grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .reviews__score-card,
  .reviews__card {
    min-height: 0;
    border-radius: 12px;
  }

  .reviews__score-card {
    padding: 20px 18px;
  }

  .reviews__score-row strong {
    font-size: 52px;
  }

  .reviews__big-star {
    font-size: 36px;
  }

  .reviews__card {
    padding: 17px 16px;
  }

  .reviews__quote {
    margin: 12px 0 15px;
    font-size: 13px;
    line-height: 1.55;
  }

  /* ---------- HOW IT WORKS ---------- */
  .how-it-works {
    padding: 30px 0 32px;
  }

  .how-it-works__inner {
    width: calc(100% - 24px);
  }

  .how-it-works__header {
    margin-bottom: 16px;
  }

  .how-it-works__eyebrow {
    font-size: 9px;
  }

  .how-it-works__title {
    font-size: 29px;
  }

  .how-it-works__steps {
    grid-template-columns: 1fr;
    border: 1px solid #e3e8ed;
    border-radius: 12px;
    overflow: hidden;
  }

  .how-it-works__step {
    grid-template-columns: 58px 1fr;
    gap: 11px;
    min-height: 100px;
    padding: 14px 12px 14px 18px;
    border-bottom: 1px solid #e4e9ee;
  }

  .how-it-works__step:last-child {
    border-bottom: 0;
  }

  .how-it-works__step::after {
    display: none !important;
  }

  .how-it-works__number {
    top: 10px;
    left: 6px;
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .how-it-works__icon {
    width: 54px;
    height: 54px;
  }

  .how-it-works__icon svg {
    width: 28px;
    height: 28px;
  }

  .how-it-works__content h3 {
    font-size: 13px;
  }

  .how-it-works__content p {
    font-size: 10.5px;
  }

  /* ---------- FINAL CTA ---------- */
  .final-cta__inner {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .final-cta__visual {
    order: -1;
    min-height: 225px;
    background:
      linear-gradient(0deg, rgba(3,23,42,.12), rgba(3,23,42,.12)),
      url("../../imagenes/footer-cta-house.webp") center 54% / cover no-repeat;
  }

  .final-cta__copy {
    padding: 30px 20px 32px;
    background: #03172a;
  }

  .final-cta__copy::after {
    display: none;
  }

  .final-cta__eyebrow {
    margin-bottom: 8px;
    font-size: 9px;
  }

  .final-cta__title {
    font-size: clamp(37px, 10.5vw, 50px);
    line-height: .95;
  }

  .final-cta__text {
    margin: 14px 0 20px;
    font-size: 13px;
    line-height: 1.5;
  }

  .final-cta__button {
    width: 100%;
    min-height: 50px;
    font-size: 11px;
  }

  /* ---------- FOOTER ---------- */
  .site-footer__inner {
    width: calc(100% - 28px);
  }

  .site-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    padding: 24px 0 14px;
  }

  .site-footer__brand,
  .site-footer__column {
    margin: 0;
    padding: 0 0 20px;
    border-left: 0;
    border-bottom: 1px solid var(--footer-line);
  }

  .site-footer__column {
    padding-top: 20px;
  }

  .site-footer__brand {
    align-items: flex-start;
  }

  .site-footer__logo {
    width: min(100%, 260px);
    margin: 0 0 8px !important;
    transform: none !important;
  }

  .site-footer__brand p {
    max-width: 350px;
    font-size: 12px;
    line-height: 1.5;
  }

  .site-footer__socials {
    margin-top: 13px !important;
  }

  .site-footer__column h3 {
    font-size: 14px;
  }

  .site-footer__contact li {
    font-size: 11px;
  }

  .site-footer__links a {
    min-height: 38px;
    font-size: 11px;
  }

  .site-footer__area-intro {
    font-size: 11px;
  }

  .site-footer__area-layout--cities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
  }

  .site-footer__area-list li {
    font-size: 10.5px;
  }

  .site-footer__bottom {
    min-height: 0;
    padding: 16px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 10px;
  }

  .site-footer__canadian {
    font-size: 11px;
  }

  .site-footer__legal {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 420px) {
  .hero,
  .hero__inner {
    min-height: 610px;
  }

  .hero__content {
    padding-bottom: 232px;
  }

  .hero__title {
    font-size: 38px;
  }

  .service-card {
    flex-basis: 78vw;
  }

  .transformation-card__media,
  .transformation-card__panel {
    min-height: 210px;
    height: 210px;
  }

  .project-gallery__title {
    font-size: 33px;
  }

  .reviews__title,
  .why-choose__title,
  .how-it-works__title {
    font-size: 26px;
  }

  .site-footer__area-layout--cities {
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
  }
}

/* =========================================================
   V29 — MOBILE PREMIUM PASS
   Tested target: 360–430 px
   ========================================================= */
@media (max-width: 768px) {
  /* HERO: less dead height, preserve house presence */
  .hero,
  .hero__inner {
    min-height: 590px;
  }

  .hero__content {
    padding: 16px 0 215px;
  }

  .hero__visual {
    background-position: 66% bottom;
  }

  /* SERVICES: cleaner swipe cards */
  .services-strip {
    margin-top: -28px;
    padding-bottom: 18px;
  }

  .services-strip__inner {
    padding-left: 14px;
    padding-right: 14px;
    scroll-padding-left: 14px;
  }

  .service-card {
    flex-basis: min(78vw, 286px);
  }

  /* BEFORE / AFTER: remove the white void caused by desktop grid rows */
  .transformation-card {
    height: auto !important;
    display: block !important;
    grid-template-rows: none !important;
    background: #ffffff !important;
  }

  .transformation-card__media {
    height: 226px !important;
    min-height: 226px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    overflow: hidden;
    background: #dfe5eb;
  }

  .transformation-card__panel {
    min-height: 226px !important;
    height: 226px !important;
  }

  .transformation-card__image {
    inset: -2px;
    transform: scale(1.015);
  }

  .transformation-card__benefits {
    margin-top: 0 !important;
  }

  .transformation-card__benefit {
    padding: 12px 14px;
  }

  /* GALLERY: 2-column visual grid instead of six giant stacked cards */
  .project-gallery {
    padding: 26px 0 30px;
  }

  .project-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .project-gallery__item {
    min-width: 0;
    border-radius: 10px;
  }

  .project-gallery__photo {
    aspect-ratio: 4 / 3 !important;
  }

  .project-gallery__meta {
    min-height: 76px;
    padding: 10px 8px 9px 10px !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
  }

  .project-gallery__icon {
    position: static !important;
    width: 28px !important;
    height: 28px !important;
    margin-top: -25px;
    margin-bottom: 2px;
    border-width: 2px;
  }

  .project-gallery__icon svg {
    width: 15px;
    height: 15px;
  }

  .project-gallery__meta strong {
    font-size: 11px !important;
    line-height: 1.18;
  }

  .project-gallery__meta > span:last-child {
    font-size: 8.5px !important;
    line-height: 1.2;
  }

  .project-gallery__view-all {
    width: 100%;
    margin-top: 15px;
  }

  /* WHY CHOOSE: slightly denser */
  .why-choose__item {
    padding: 14px 14px;
    grid-template-columns: 38px 1fr;
    column-gap: 11px;
  }

  .why-choose__icon {
    width: 30px;
    height: 30px;
  }

  .why-choose__item h3 {
    font-size: 11.5px;
  }

  .why-choose__item p {
    font-size: 9.5px;
  }

  /* REVIEWS: horizontal swipe instead of ~4 giant vertical cards */
  .reviews__grid {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 11px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 1px;
    overscroll-behavior-inline: contain;
    padding: 1px 1px 7px;
    scrollbar-width: none;
  }

  .reviews__grid::-webkit-scrollbar {
    display: none;
  }

  .reviews__score-card,
  .reviews__card {
    flex: 0 0 calc(100% - 24px);
    min-height: 235px !important;
    scroll-snap-align: start;
  }

  .reviews__score-card {
    justify-content: center;
  }

  /* HOW IT WORKS: remove excess card height */
  .how-it-works__step {
    min-height: 88px;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  /* FINAL CTA: keep image, make closing block more compact */
  .final-cta__visual {
    min-height: 205px;
  }

  .final-cta__copy {
    padding: 26px 18px 28px;
  }

  .final-cta__title {
    font-size: clamp(35px, 10vw, 46px);
  }

  /* FOOTER: reduce tall stacked feeling */
  .site-footer__grid {
    padding-top: 20px;
  }

  .site-footer__brand,
  .site-footer__column {
    padding-bottom: 17px;
    margin-bottom: 0;
  }

  .site-footer__column {
    padding-top: 17px;
  }

  .site-footer__logo {
    width: min(100%, 248px);
  }

  .site-footer__brand p {
    font-size: 11px;
  }

  .site-footer__area-layout--cities {
    gap: 5px 14px;
  }
}

@media (max-width: 390px) {
  .hero__title {
    font-size: 36px;
  }

  .hero,
  .hero__inner {
    min-height: 575px;
  }

  .hero__content {
    padding-bottom: 205px;
  }

  .project-gallery__meta strong {
    font-size: 10.5px !important;
  }

  .project-gallery__meta > span:last-child {
    font-size: 8px !important;
  }
}
