/* FlyingForFun v3 - standalone compatibility layer.
   Replaces the generic Weebly/EditMySite sites.css rules used by the exported markup.
   No remote Weebly/EditMySite resources are required. */

html, body { min-height: 100%; }
body { margin: 0; }
*, *::before, *::after { box-sizing: border-box; }
img { border: 0; }

/* Exported content primitives */
.wsite-elements { width: 100%; }
.wsite-content-title { word-wrap: break-word; }
.wsite-spacer { display: block; width: 100%; clear: both; }
.wcustomhtml { max-width: 100%; }
hr.styled-hr { border: 0; height: 1px; margin: 0; background: #e1ddd7; }

/* Images */
.wsite-image { max-width: 100%; }
.wsite-image img { height: auto; max-width: 100%; vertical-align: middle; }
.wsite-image a { display: inline-block; max-width: 100%; }
.wsite-image-border-none img { border: 0 !important; }
.wsite-caption { line-height: 1.4; }

/* Weebly exported multi-column tables */
.wsite-multicol, .wsite-multicol-table-wrap { width: 100%; }
.wsite-multicol-table { width: 100%; border: 0; border-collapse: collapse; border-spacing: 0; table-layout: fixed; }
.wsite-multicol-tbody, .wsite-multicol-tr { width: 100%; }
.wsite-multicol-col { vertical-align: top; box-sizing: border-box; }

/* Responsive YouTube embeds */
.wsite-youtube { width: 100%; }
.wsite-youtube-wrapper { width: 100%; }
.wsite-youtube-container { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; overflow: hidden; }
.wsite-youtube-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Exported galleries. Most dimensions are already inline; these rules provide containment. */
.imageGallery { width: 100%; max-width: 100%; overflow: hidden; }
.imageGallery::after { content: ''; display: table; clear: both; }
.galleryImageHolder, .galleryInnerImageHolder { max-width: 100%; }
.galleryImage { max-width: 100%; height: auto; }

/* Forms / external payment buttons */
form { margin: 0; }
input[type="image"] { max-width: 100%; height: auto; }

/* Keep old HTML font tags predictable without remote font downloads. */
body, .paragraph, p, .wsite-menu-default a, .wsite-menu a,
.wsite-form-input, .wsite-input, .wsite-form-field select {
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
h1, h2, h3, h4, h5, h6, .wsite-content-title {
  font-family: Georgia, "Times New Roman", serif;
}

/* The old Weebly base stylesheet supplied these useful clearing defaults. */
.clearfix::before, .clearfix::after { content: ' '; display: table; }
.clearfix::after { clear: both; }

@media (max-width: 767px) {
  .wsite-multicol-table, .wsite-multicol-tbody, .wsite-multicol-tr, .wsite-multicol-col {
    display: block; width: 100% !important;
  }
  .wsite-multicol-col { padding-left: 0 !important; padding-right: 0 !important; }
  /* Gallery items use inline percentage widths from Weebly. Keep a usable 2-column mobile grid. */
  .imageGallery > div { width: 50% !important; }
}

@media (max-width: 430px) {
  .imageGallery > div { width: 100% !important; }
}

/* v3.3 - page-specific image sizing restored to the visual scale of the Weebly site */

/* Downloads: product images in each multi-column row should occupy a consistent visual frame.
   This also prevents _orig source files from expanding to their full natural size. */
body.wsite-page-downloads #wsite-content .wsite-multicol-col .wsite-image {
  height: 280px;
  text-align: center !important;
}
body.wsite-page-downloads #wsite-content .wsite-multicol-col .wsite-image a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 260px;
}
body.wsite-page-downloads #wsite-content .wsite-multicol-col .wsite-image img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 260px !important;
  object-fit: contain;
}

/* Airbus A320 overview: the Weebly 'published' image variants were pre-scaled.
   The standalone export uses _orig files, so restore a comparable display width explicitly. */
body.wsite-page-airbus-a320 #wsite-content .wsite-image {
  text-align: center !important;
}
body.wsite-page-airbus-a320 #wsite-content img[src*="fcu-v1-7-right-side"] {
  width: 338px !important;
  max-width: 100% !important;
}
body.wsite-page-airbus-a320 #wsite-content img[src*="left-right-efis"] {
  width: 550px !important;
  max-width: 100% !important;
}
body.wsite-page-airbus-a320 #wsite-content img[src*="fcu-2-0-front"] {
  width: 420px !important;
  max-width: 100% !important;
}
body.wsite-page-airbus-a320 #wsite-content img[src*="fcu-with-kav-display1"] {
  width: 380px !important;
  max-width: 100% !important;
}
body.wsite-page-airbus-a320 #wsite-content img[src*="fcu-with-kav-display-and-efis1"] {
  width: 430px !important;
  max-width: 100% !important;
}

@media (max-width: 767px) {
  body.wsite-page-downloads #wsite-content .wsite-multicol-col .wsite-image {
    height: auto;
    min-height: 0;
  }
  body.wsite-page-downloads #wsite-content .wsite-multicol-col .wsite-image a {
    height: auto;
  }
  body.wsite-page-downloads #wsite-content .wsite-multicol-col .wsite-image img {
    max-height: 320px !important;
  }
}

/* v3.4 — page-specific image sizing refinements */
/* Cessna 172 overview: normalize thumbnail presentation while preserving aspect ratio. */
body.wsite-page-cessna-172-cockpit #wsite-content .wsite-multicol-col .wsite-image {
  min-height: 155px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.wsite-page-cessna-172-cockpit #wsite-content .wsite-multicol-col .wsite-image > a {
  width: 100%;
  height: 135px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.wsite-page-cessna-172-cockpit #wsite-content .wsite-multicol-col .wsite-image img {
  width: 100% !important;
  height: 135px !important;
  max-width: 240px !important;
  object-fit: contain;
  display: block;
}

/* Boeing 737: Weebly rendered full-size/auto images slightly smaller than raw _orig assets. */
body.wsite-page-boeing-737-cockpit #wsite-content .wsite-image img[style*="width:auto"] {
  max-width: 88% !important;
  height: auto !important;
}

/* Baron 58: same treatment, but a little less reduction than Boeing. */
body.wsite-page-baron-58 #wsite-content .wsite-image img[style*="width:auto"] {
  max-width: 90% !important;
  height: auto !important;
}

@media screen and (max-width: 767px) {
  body.wsite-page-cessna-172-cockpit #wsite-content .wsite-multicol-col .wsite-image {
    min-height: 185px;
  }
  body.wsite-page-cessna-172-cockpit #wsite-content .wsite-multicol-col .wsite-image > a {
    height: 165px;
  }
  body.wsite-page-cessna-172-cockpit #wsite-content .wsite-multicol-col .wsite-image img {
    height: 165px !important;
    max-width: 320px !important;
  }
  body.wsite-page-boeing-737-cockpit #wsite-content .wsite-image img[style*="width:auto"],
  body.wsite-page-baron-58 #wsite-content .wsite-image img[style*="width:auto"] {
    max-width: 100% !important;
  }
}
