/*
Theme Name:  TEM Weddings
Theme URI:   https://fogmediapro.com
Description: Lightweight child theme of Hello Elementor for the TEM Weddings & Events landing page. Holds the design tokens, locally hosted fonts, and the small amount of CSS that Elementor Free cannot produce on its own.
Author:      Fog Media
Template:    hello-elementor
Version:     1.0.0
Text Domain: tem-weddings
*/

/* ==========================================================================
   1. Design tokens
   Elementor's Site Settings (Global Colors / Fonts) hold the same values so
   editors can change them without touching this file. These variables are
   only used by the custom CSS below.
   ========================================================================== */
:root {
  --tem-brand: #723520;
  --tem-brand-dark: #5A2918;
  --tem-cream: #F5F1EE;
  --tem-white: #FFFFFF;
  --tem-text: #723520;
  --tem-heading: #723520;
  --tem-bg: #FFFFFF;
  --tem-rule: rgba(114, 53, 32, 0.16);
  --tem-rule-strong: rgba(114, 53, 32, 0.32);
  --tem-rule-card: rgba(114, 53, 32, 0.22);
  --tem-serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --tem-sans: 'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --tem-container: 1248px;
  --tem-gutter: 40px;
  --tem-radius: 0px;
  --tem-ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --tem-focus: 2px solid #723520;
}
@media (max-width: 767px) {
  :root { --tem-gutter: 24px; }
}

/* ==========================================================================
   2. Fonts (self-hosted, subset, only the weights the design uses)
   ========================================================================== */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/cormorant-garamond-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/cormorant-garamond-400italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/jost-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/jost-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/jost-500.woff2') format('woff2');
}

/* ==========================================================================
   3. Page basics (scoped to the landing page body class)
   ========================================================================== */
.tem-landing {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--tem-bg);
  overflow-x: hidden;
}
.tem-landing .elementor-heading-title em,
.tem-landing .elementor-widget-text-editor em {
  font-style: italic;
  font-weight: 400;
}
/* Serif italic headings render a touch heavy at 500; the design uses 400 */
.tem-landing .elementor-heading-title em { font-weight: 400; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Visible focus for keyboard users */
.tem-landing a:focus-visible,
.tem-landing button:focus-visible,
.tem-landing input:focus-visible,
.tem-landing select:focus-visible,
.tem-landing textarea:focus-visible {
  outline: var(--tem-focus);
  outline-offset: 3px;
}

/* Skip link (printed by functions.php) */
.tem-skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--tem-brand);
  color: var(--tem-white);
  font: 400 12px/1 var(--tem-sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}
.tem-skip:focus { top: 16px; }

/* ==========================================================================
   4. Header + navigation (Elementor Free has no menu widget)
   ========================================================================== */
.tem-header { position: relative; }

/* Desktop: underline that grows from the left on hover */
.tem-nav-list .elementor-icon-list-item > a {
  position: relative;
  transition: opacity 0.3s;
}
.tem-nav-list .elementor-icon-list-item > a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--tem-ease);
}
.tem-nav-list .elementor-icon-list-item > a:hover::after,
.tem-nav-list .elementor-icon-list-item > a:focus-visible::after {
  transform: scaleX(1);
}

/* Hamburger button: an Elementor Button with the text visually hidden */
.tem-burger .elementor-button {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.tem-burger .elementor-button-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.tem-burger .elementor-button::before,
.tem-burger .elementor-button::after {
  content: '';
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: var(--tem-brand);
  transition: transform 0.3s var(--tem-ease), top 0.3s var(--tem-ease), box-shadow 0.2s, left 0.3s;
}
.tem-burger .elementor-button::before {
  top: 16px;
  box-shadow: 0 7px 0 var(--tem-brand);
}
.tem-burger .elementor-button::after {
  top: 30px;
  left: 19px;
}
.tem-burger.is-open .elementor-button::before {
  top: 23px;
  box-shadow: none;
  transform: rotate(45deg);
}
.tem-burger.is-open .elementor-button::after {
  top: 23px;
  left: 11px;
  transform: rotate(-45deg);
}

/* Tablet + mobile: the nav container becomes a drop-down panel */
@media (max-width: 1024px) {
  .tem-header .tem-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    width: 100%;
    padding: 24px var(--tem-gutter) 32px;
    background: var(--tem-white);
    border-bottom: 1px solid var(--tem-rule);
    box-shadow: 0 24px 40px -24px rgba(114, 53, 32, 0.25);
  }
  .tem-header .tem-nav.is-open { display: flex; }
  .tem-nav .elementor-icon-list-items.elementor-inline-items {
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    gap: 18px;
  }
  .tem-nav .elementor-icon-list-items.elementor-inline-items .elementor-inline-item {
    margin: 0;
  }
  .tem-nav .elementor-icon-list-item > a { font-size: 14px; }
  .tem-nav .elementor-icon-list-item > a::after { display: none; }
}

/* ==========================================================================
   5. Hero
   ========================================================================== */
.tem-hero { position: relative; }
.tem-hero > .elementor-element {
  position: relative;
  z-index: 1;
}
@keyframes tem-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.tem-hero > .elementor-element { animation: tem-rise 1.6s var(--tem-ease) both; }

/* ==========================================================================
   6. Cards, images and hover states
   ========================================================================== */
/* Slow zoom on hover (containers or image widgets carrying .tem-zoom) */
.tem-zoom { overflow: hidden; }
.tem-zoom img {
  display: block;
  transition: transform 1.4s var(--tem-ease);
}
.tem-zoom:hover img,
a.e-con:hover .tem-zoom img,
.e-con:focus-within .tem-zoom img {
  transform: scale(1.05);
}

/* Live Instagram feed (Smash Balloon Instagram Feed, free) */
.tem-igfeed #sb_instagram { padding-bottom: 0 !important; }
.tem-igfeed #sb_instagram #sbi_images { margin: -8px; width: auto; }
.tem-igfeed #sb_instagram .sbi_item { overflow: hidden; }
.tem-igfeed #sb_instagram .sbi_photo_wrap { overflow: hidden; }
.tem-igfeed #sb_instagram .sbi_photo {
  transition: transform 1.4s var(--tem-ease);
  opacity: 1 !important;
}
.tem-igfeed #sb_instagram .sbi_item:hover .sbi_photo { transform: scale(1.05); }
.tem-igfeed #sb_instagram .sbi_photo:hover { opacity: 1 !important; }
.tem-igfeed #sb_instagram .sb_instagram_header,
.tem-igfeed #sb_instagram .sbi_follow_btn,
.tem-igfeed #sb_instagram .sbi_load { display: none !important; }
.tem-igfeed .sbi_no_js { display: none; }

/* Square Instagram tiles (static fallback) */
.tem-square img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Destination veil: brand overlay with the italic name, shown on hover */
.tem-dest-media { position: relative; }
.tem-dest-media .tem-veil {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(114, 53, 32, 0.8);
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.tem-dest:hover .tem-veil,
.tem-dest:focus-visible .tem-veil { opacity: 1; }

/* Thin line-arrow after button / link text (no icon font needed) */
.tem-arrow .elementor-button-content-wrapper,
.tem-link-arrow a {
  display: inline-flex;
  align-items: center;
}
.tem-arrow .elementor-button-content-wrapper::after,
.tem-link-arrow a::after {
  content: '';
  flex: 0 0 auto;
  width: 18px;
  height: 10px;
  margin-left: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='10' viewBox='0 0 18 10' fill='none' stroke='%23000' stroke-width='1'%3E%3Cpath d='M0 5h17M13 1l4 4-4 4'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='10' viewBox='0 0 18 10' fill='none' stroke='%23000' stroke-width='1'%3E%3Cpath d='M0 5h17M13 1l4 4-4 4'/%3E%3C/svg%3E") no-repeat center / contain;
}
.tem-link-arrow a {
  padding-bottom: 6px;
  border-bottom: 1px solid currentColor;
  gap: 0;
  margin-left: 12px;
}
.tem-link-arrow a::after { margin-left: 12px; }

/* Quiet links: fade on hover */
.tem-lnk a,
.tem-foot-list .elementor-icon-list-item > a,
.tem-link-arrow a {
  transition: opacity 0.3s;
}
.tem-lnk a:hover,
.tem-foot-list .elementor-icon-list-item > a:hover,
.tem-link-arrow a:hover { opacity: 0.6; }

/* Buttons: colour transitions (colours themselves come from Elementor) */
.tem-btn .elementor-button {
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease;
  border-radius: var(--tem-radius);
}

/* ==========================================================================
   7. Horizontal scroll rows on small screens (services, weddings,
      destinations, testimonials). Grid on desktop, snap-scroll row below.
   ========================================================================== */
@media (max-width: 767px) {
  .e-con.e-grid.e-con-full.tem-hscroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: calc(100% + 2 * var(--tem-gutter));
    max-width: none;
    margin-left: calc(-1 * var(--tem-gutter));
    margin-right: calc(-1 * var(--tem-gutter));
    padding-left: var(--tem-gutter);
    padding-right: var(--tem-gutter);
    scroll-padding: 0 var(--tem-gutter);
  }
  .tem-hscroll::-webkit-scrollbar { display: none; }
  .tem-hscroll > .e-con,
  .tem-hscroll > .elementor-widget {
    flex: 0 0 270px;
    width: 270px;
    scroll-snap-align: start;
  }
  #weddings .tem-hscroll > .e-con { flex-basis: 280px; width: 280px; }
  #destinations .tem-hscroll > .e-con { flex-basis: 190px; width: 190px; }
  #testimonials .tem-hscroll > .e-con { flex-basis: 300px; width: 300px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .e-con.e-grid.e-con-full.tem-hscroll-tablet {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: calc(100% + 2 * var(--tem-gutter));
    max-width: none;
    margin-left: calc(-1 * var(--tem-gutter));
    margin-right: calc(-1 * var(--tem-gutter));
    padding-left: var(--tem-gutter);
    padding-right: var(--tem-gutter);
    scroll-padding: 0 var(--tem-gutter);
  }
  .tem-hscroll-tablet::-webkit-scrollbar { display: none; }
  .tem-hscroll-tablet > .e-con {
    flex: 0 0 230px;
    width: 230px;
    scroll-snap-align: start;
  }
  #testimonials .tem-hscroll-tablet > .e-con { flex-basis: 340px; width: 340px; }
}

/* ==========================================================================
   8. Enquiry form (Contact Form 7, underlined fields as in the design)
   ========================================================================== */
.tem-form .wpcf7 { width: 100%; }
.tem-form .wpcf7-form,
.tem-form .tem-fields {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
/* CF7's own stylesheet is not loaded; reproduce the bits that matter */
.tem-form .screen-reader-response {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.tem-form .hidden-fields-container,
.tem-form .wpcf7-response-output,
.tem-form .wpcf7-spinner { display: none; }
.tem-form .wpcf7-form.sent .wpcf7-response-output,
.tem-form .wpcf7-form.failed .wpcf7-response-output,
.tem-form .wpcf7-form.invalid .wpcf7-response-output,
.tem-form .wpcf7-form.spam .wpcf7-response-output,
.tem-form .wpcf7-form.aborted .wpcf7-response-output,
.tem-form .wpcf7-form.unaccepted .wpcf7-response-output { display: block; }
.tem-form .wpcf7-form.submitting .wpcf7-spinner { display: block; }
.tem-form .tem-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}
.tem-form .tem-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.tem-form label {
  font: 400 11px/1.5 var(--tem-sans);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--tem-brand);
}
.tem-form .wpcf7-form-control-wrap { display: block; }
.tem-form input:not([type='submit']),
.tem-form select,
.tem-form textarea {
  font: 400 16px/1.5 var(--tem-sans);
  color: var(--tem-brand);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(114, 53, 32, 0.28);
  border-radius: 0;
  padding: 10px 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.4s;
  appearance: none;
  -webkit-appearance: none;
}
.tem-form input::placeholder,
.tem-form textarea::placeholder { color: rgba(114, 53, 32, 0.5); }
.tem-form input:focus,
.tem-form select:focus,
.tem-form textarea:focus {
  outline: none;
  border-bottom-color: var(--tem-brand);
}
.tem-form select {
  padding-right: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23723520' stroke-width='1'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 2px center;
}
.tem-form select option { color: var(--tem-brand); background: var(--tem-white); }
.tem-form textarea { resize: none; min-height: 96px; }
.tem-form .wpcf7-submit {
  width: 100%;
  min-height: 60px;
  margin-top: 8px;
  border: 0;
  border-radius: var(--tem-radius);
  background: var(--tem-brand);
  color: var(--tem-white);
  font: 400 12px/1 var(--tem-sans);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.45s ease;
}
.tem-form .wpcf7-submit:hover { background: var(--tem-brand-dark); }
.tem-form .wpcf7-submit:disabled { opacity: 0.6; cursor: wait; }
.tem-form .wpcf7-spinner {
  margin: 8px auto 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--tem-rule-strong);
  border-top-color: var(--tem-brand);
  border-radius: 50%;
  animation: tem-spin 0.8s linear infinite;
}
@keyframes tem-spin { to { transform: rotate(360deg); } }
.tem-form .wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  font: 400 12px/1.4 var(--tem-sans);
  letter-spacing: 0.04em;
  color: #A12F1F;
}
.tem-form .wpcf7-response-output {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--tem-brand);
  font: 300 14px/1.6 var(--tem-sans);
  color: var(--tem-brand);
}
@media (max-width: 767px) {
  .tem-form .wpcf7-form,
  .tem-form .tem-fields { gap: 28px; }
  .tem-form .tem-row { gap: 18px; }
  .tem-form label { font-size: 10px; letter-spacing: 0.24em; }
  .tem-form .wpcf7-submit { min-height: 56px; letter-spacing: 0.28em; }
}

/* ==========================================================================
   9. Footer + mobile sticky bar
   ========================================================================== */
@media (max-width: 767px) {
  .tem-footer .tem-span2 { grid-column: 1 / -1; }
}
.tem-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
}

/* ==========================================================================
   10. Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .tem-landing *,
  .tem-landing *::before,
  .tem-landing *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
