/* ============================================
   FloridaBeachSunset.com — Modern Stylesheet
   Replaces skel.js-based responsive system
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #1a6b8a;
  --color-primary-dark: #145a74;
  --color-secondary: #e8a545;
  --color-secondary-dark: #d4912e;
  --color-accent: #c4573a;
  --color-accent-light: #e07a5f;
  --color-bg: #faf8f5;
  --color-bg-alt: #f0ece6;
  --color-text: #2c3e50;
  --color-text-light: #5a6d7e;
  --color-text-on-dark: #f5f0eb;
  --color-nav-bg: #1a3a4a;
  --color-nav-hover: #e8a545;
  --color-border: #ddd5c9;
  --color-white: #ffffff;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Annie Use Your Telescope', Georgia, serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.18);
  --radius: 6px;
  --radius-lg: 12px;
  --nav-height: 60px;
  --max-width: 1100px;
  --transition: 0.25s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p {
  margin: 0 0 1.25rem;
}

/* --- Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-nav-bg);
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  min-height: var(--nav-height);
  position: relative;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-secondary) !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo:hover {
  color: var(--color-white) !important;
}

/* Hamburger Toggle */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: var(--color-text-on-dark);
  width: 26px;
  height: 3px;
  border-radius: 3px;
  position: relative;
  transition: all 0.3s ease;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: '';
  position: absolute;
}

.nav-toggle-label span::before { top: -8px; }
.nav-toggle-label span::after { top: 8px; }

/* Nav hamburger animated X */
.nav-toggle:checked + .nav-toggle-label span {
  background: transparent;
}
.nav-toggle:checked + .nav-toggle-label span::before {
  transform: rotate(45deg);
  top: 0;
}
.nav-toggle:checked + .nav-toggle-label span::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Nav list */
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.site-nav li {
  position: relative;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.65rem;
  color: var(--color-text-on-dark);
  font-size: 0.85rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-nav-hover);
  border-bottom-color: var(--color-nav-hover);
}

.site-nav a.active {
  color: var(--color-secondary);
  border-bottom-color: var(--color-secondary);
}

/* --- Main Content --- */
#content, main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 60vh;
}

/* Legacy styles from old inc/style.css — override for new layout */
ul.menu {
  display: none;
}

#page-background {
  display: none;
}

#footer {
  display: none;
}

/* --- Image Float Classes (legacy compat) --- */
.imageright, div.imageright {
  float: right;
  max-width: 45%;
  margin: 0 0 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-light);
  padding: 0;
}

.imageright img, div.imageright img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.imageleft, div.imageleft {
  float: left;
  max-width: 45%;
  margin: 0 1.5rem 1.25rem 0;
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-light);
  padding: 0;
}

.imageleft img, div.imageleft img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Clearfix for floated images */
#content::after,
main::after {
  content: '';
  display: table;
  clear: both;
}

/* --- Review sidebar --- */
div.review {
  float: right;
  max-width: 320px;
  padding: 1rem;
  margin: 0 0 1rem 1.5rem;
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.9rem;
}

tr:nth-child(even) {
  background: var(--color-bg-alt);
}

tr:hover {
  background: #e8f0f5;
}

/* Responsive table wrapper */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- Forms --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  font-family: var(--font-body);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 107, 138, 0.15);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c3e50' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

form {
  margin: 1.5rem 0;
}

/* --- Buttons --- */
.button,
input[type="submit"],
button[type="submit"] {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--color-white);
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  background: var(--color-accent-light);
  color: var(--color-white) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.button:active,
input[type="submit"]:active,
button[type="submit"]:active {
  transform: translateY(0);
}

/* Special/CTA button */
.button.special,
.btn-cta {
  background: var(--color-secondary);
  color: var(--color-text) !important;
  font-size: 1.1rem;
  padding: 0.85rem 2.5rem;
}

.button.special:hover,
.btn-cta:hover {
  background: var(--color-secondary-dark);
  color: var(--color-text) !important;
}

/* --- Responsive YouTube / Video Embeds --- */
.video-wrapper,
iframe[src*="youtube"] {
  max-width: 100%;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Photo Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.gallery-grid a,
.gallery-grid > div {
  text-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition);
}

.gallery-grid a:hover {
  transform: scale(1.02);
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* --- Feature Lists --- */
ul.features,
.features {
  list-style: none;
  padding: 0;
}

.features-row-header {
  margin: 1.5rem 0 0.5rem;
}

.features-row-header > em {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  font-style: normal;
  display: block;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--color-border);
}

ul.features-row-data {
  list-style: none;
  padding: 0 0 0 1rem;
}

ul.features-row-data li {
  padding: 0.3rem 0;
  position: relative;
  padding-left: 1.2rem;
}

ul.features-row-data li::before {
  content: '✓';
  color: var(--color-primary);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* --- Cards / Info Boxes --- */
.info-box {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin: 1.5rem 0;
}

/* --- Horizontal Rule --- */
hr {
  border: none;
  border-top: 2px solid var(--color-border);
  margin: 2rem 0;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.clearfix::after { content: ''; display: table; clear: both; }

/* --- Banner Image Header --- */
.banner-image {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

/* --- Availability Color Legend --- */
span[style*="background-color:#64ff64"],
span[style*="background-color: #64ff64"] {
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 600;
}

span[style*="background-color:#ff6464"],
span[style*="background-color: #ff6464"] {
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 600;
}

/* --- FAQ Styling --- */
h3 + p,
h3 + .imageright + p,
h3 + .imageleft + p {
  margin-top: 0.5rem;
}

/* --- reCAPTCHA button override --- */
.g-recaptcha {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.g-recaptcha:hover {
  background: var(--color-accent-light);
}

/* --- Map page --- */
#map_canvas {
  width: 100% !important;
  max-width: 700px;
  height: 400px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 1rem auto;
}

/* --- CrossSlide / Panorama Container --- */
#scroll {
  max-width: 100%;
  width: 100% !important;
  height: auto !important;
  min-height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1rem auto;
}

div.caption {
  text-align: center;
  font-style: italic;
  color: var(--color-text-light);
  margin: 0.5rem 0;
}

/* --- Pannellum / Panorama iFrame --- */
#panoframe {
  width: 100% !important;
  max-width: 100%;
  height: 450px;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* --- Old msg.jpg banner --- */
img[src="/pics/msg.jpg"],
img[src="pics/msg.jpg"] {
  width: 100%;
  max-width: var(--max-width);
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 0 auto 1.5rem;
}

/* --- CENTER tag override (legacy HTML) --- */
center, CENTER {
  text-align: center;
}

/* ==========================
   RESPONSIVE BREAKPOINTS
   ========================== */

/* --- Tablet & below (< 1024px) --- */
@media (max-width: 1024px) {
  .site-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-nav a {
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
  }

  .imageright, div.imageright,
  .imageleft, div.imageleft {
    max-width: 50%;
  }
}

/* --- Mobile Nav Breakpoint (< 768px) --- */
@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  .nav-toggle-label {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-nav-bg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    box-shadow: var(--shadow-lg);
  }

  .nav-toggle:checked ~ .site-nav {
    max-height: 100vh;
    overflow-y: auto;
  }

  .site-nav ul {
    flex-direction: column;
    padding: 0.5rem 0;
  }

  .site-nav li {
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .site-nav a {
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    border-bottom: none;
  }

  .site-nav a:hover,
  .site-nav a.active {
    background: rgba(255,255,255,0.08);
    border-bottom: none;
  }

  /* Float images stack on mobile */
  .imageright, div.imageright,
  .imageleft, div.imageleft {
    float: none;
    max-width: 100%;
    margin: 1rem auto;
    display: block;
  }

  /* Review boxes stack on mobile */
  div.review {
    float: none;
    max-width: 100%;
    margin: 1rem 0;
  }

  #content, main {
    padding: 1.25rem 1rem;
  }

  table {
    font-size: 0.85rem;
  }

  th, td {
    padding: 0.5rem 0.65rem;
  }

  /* Stack two-column float layouts */
  div[style*="float:left; width:50%"],
  div[style*="float:right; width:50%"],
  div[style*="float:left;width:50%"],
  div[style*="float:right;width:50%"] {
    float: none !important;
    width: 100% !important;
    margin-bottom: 1rem;
  }

  /* Responsive YouTube iframes */
  iframe[src*="youtube"] {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }

  /* Map canvas */
  #map_canvas {
    height: 300px;
  }

  #panoframe {
    height: 350px;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.2rem; }
}

/* --- Small phone (< 480px) --- */
@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  #content, main {
    padding: 1rem 0.75rem;
  }

  .site-logo {
    font-size: 1.15rem;
  }

  table {
    font-size: 0.8rem;
  }

  th, td {
    padding: 0.4rem 0.5rem;
  }

  #map_canvas {
    height: 250px;
  }

  #panoframe {
    height: 280px;
  }
}

/* --- Large Desktop (> 1200px) --- */
@media (min-width: 1200px) {
  body {
    font-size: 17px;
  }

  .header-inner {
    padding: 0 2rem;
  }
}

/* --- Focus States (Accessibility) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.site-nav a:focus-visible {
  outline-color: var(--color-secondary);
}

/* --- Print Styles --- */
@media print {
  .site-header,
  .site-footer,
  .nav-toggle-label,
  .btn-quote,
  .g-recaptcha,
  iframe,
  #map_canvas {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  #content, main {
    max-width: 100%;
    padding: 0;
  }

  img {
    max-width: 4in;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }

  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: '';
  }
}

/* --- Smooth loading transition --- */
body {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0.85; }
  to { opacity: 1; }
}
