/*
 Theme Name:   EP Flooring Services - Kadence Child
 Theme URI:    https://epflooringservicesllc.com
 Description:  Custom child theme for EP Flooring Services LLC built on Kadence
 Author:       EP Flooring Services LLC
 Author URI:   https://epflooringservicesllc.com
 Template:     kadence
 Version:      1.0.3
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  epflooring-child
*/

/* ==========================================
   EP Flooring Services LLC - Custom Styles
   ========================================== */

/* -- Global Typography -- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: #3d3835;
}

a {
  color: #d4922e;
  transition: color 0.2s ease;
}

a:hover {
  color: #b87a1e;
}

/* -- Header -- */
.site-header {
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

/* -- Buttons -- */
.wp-block-button__link {
  transition: all 0.3s ease;
}

.wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* -- Service Cards (Home page) — equal height + clickable -- */

/* Columns: stretch children to equal height */
.wp-block-column {
  display: flex;
  flex-direction: column;
}

/* Card outer: fill column height */
.wp-block-column > .wp-block-group.has-background {
  flex: 1 1 auto;
  display: flex !important;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
  cursor: pointer;
}

.wp-block-column > .wp-block-group.has-background:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Card inner container: flex column to stack content and push CTA down */
.wp-block-column > .wp-block-group.has-background > .wp-block-group__inner-container {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
}

/* Image area: fixed height, crop to fit regardless of source dimensions */
.wp-block-column > .wp-block-group.has-background > .wp-block-group__inner-container > figure.wp-block-image {
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
  margin-bottom: 0;
}

.wp-block-column > .wp-block-group.has-background > .wp-block-group__inner-container > figure.wp-block-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

/* Push CTA link to bottom of card */
.wp-block-column > .wp-block-group.has-background > .wp-block-group__inner-container > p:last-child {
  margin-top: auto;
}

/* Make entire service card clickable via the CTA link */
.wp-block-column > .wp-block-group.has-background a[href="/contact"]::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 8px;
}

/* -- Services Page — consistent image sizing -- */
.wp-block-columns.are-vertically-aligned-center .wp-block-image img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

/* -- Gallery -- */
.wp-block-gallery .wp-block-image img {
  border-radius: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-gallery .wp-block-image:hover img {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* -- Formidable Forms -- */
.frm_forms .frm_form_field input[type="text"],
.frm_forms .frm_form_field input[type="email"],
.frm_forms .frm_form_field input[type="tel"],
.frm_forms .frm_form_field textarea,
.frm_forms .frm_form_field select {
  border: 1px solid #d4cfc8;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.frm_forms .frm_form_field input:focus,
.frm_forms .frm_form_field textarea:focus,
.frm_forms .frm_form_field select:focus {
  border-color: #d4922e;
  box-shadow: 0 0 0 3px rgba(212, 146, 46, 0.15);
  outline: none;
}

.frm_forms .frm_form_field label {
  font-weight: 600;
  color: #2c2825;
  font-size: 15px;
}

.frm_forms .frm_submit button,
.frm_forms .frm_submit input[type="submit"] {
  background-color: #d4922e !important;
  color: #ffffff !important;
  border: none;
  border-radius: 6px;
  padding: 14px 36px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.frm_forms .frm_submit button:hover,
.frm_forms .frm_submit input[type="submit"]:hover {
  background-color: #b87a1e !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 146, 46, 0.3);
}

.frm_forms .frm_message {
  background-color: #e8f5e9;
  border-left: 4px solid #4caf50;
  padding: 16px 20px;
  border-radius: 6px;
}

/* -- Footer -- */
.site-footer {
  background-color: #2c2825;
  color: #d4cfc8;
}

.site-footer a {
  color: #d4922e;
  text-decoration: none;
}

.site-footer a:hover {
  color: #f0b04e;
}

/* -- Footer Trust Bar -- */
.epf-trust-bar {
  background-color: #2c2825;
  text-align: center;
  padding: 18px 20px 0;
}

.epf-trust-bar p {
  color: #7a7570;
  font-size: 13px;
  margin: 0;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #3d3835;
  padding-bottom: 18px;
}

/* -- Phone Links -- */
a[href^="tel:"] {
  color: #d4922e;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(212, 146, 46, 0.2);
}

/* -- Mobile -- */
@media (max-width: 768px) {
  .wp-block-cover { min-height: 400px !important; }
  .wp-block-column { flex-basis: 100% !important; }

  /* Hero CTAs stack cleanly */
  .wp-block-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .wp-block-button { width: 100%; }
  .wp-block-button__link {
    width: 100%;
    text-align: center;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Gallery: 2 columns on tablet/mobile */
  .wp-block-gallery.columns-3 {
    columns: 2 !important;
  }
  .wp-block-gallery.has-nested-images.columns-3 .wp-block-image {
    width: calc(50% - 6px) !important;
  }

  /* Ensure tap targets meet 48px minimum */
  .wp-block-button__link,
  a[href^="tel:"] {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
  }

  /* Section spacing for readability */
  .wp-block-group.alignfull {
    padding-top: 50px !important;
    padding-bottom: 50px !important;
  }
  .wp-block-cover.alignfull {
    padding-top: 50px !important;
    padding-bottom: 50px !important;
  }
}

@media (max-width: 480px) {
  /* Keep 2 columns even on small screens for gallery */
  .wp-block-gallery.columns-3 {
    columns: 2 !important;
  }
  .wp-block-gallery.has-nested-images.columns-3 .wp-block-image {
    width: calc(50% - 6px) !important;
  }

  /* Tighter heading sizes on small screens */
  .wp-block-cover h1 {
    font-size: 36px !important;
  }
}

/* -- Misc -- */
html { scroll-behavior: smooth; }
::selection { background-color: #d4922e; color: #ffffff; }
