/* =============================================
   Illabunda / PKSC — Main Stylesheet
   Mobile-first, custom CSS, no dependencies
   ============================================= */

/* --- Variables --- */
:root {
  /* Navy + red — matches the logo and classic alpine ski club aesthetic */
  --navy:       #1e3a5f;
  --navy-dark:  #132540;
  --blue:       #2a5c8a;
  --blue-light: #3d7db5;
  --sky:        #e8f0f8;
  --white:      #ffffff;
  --off-white:  #f7f8fa;
  --text:       #1e1e1e;
  --text-muted: #5a5a5a;
  --border:     #d0d8e2;
  --red:        #c0392b;
  --red-dark:   #a93226;
  --accent:     #c0392b;   /* alpine red — matches logo */

  --nav-height: 64px;
  --radius:     4px;
  --shadow:     0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg:  0 4px 20px rgba(0,0,0,0.15);

  --font-sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-size-base: 16px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--font-size-base); scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--off-white);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-light); text-decoration: underline; }
ul { list-style: none; }

/* --- Skip link (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--navy);
  color: var(--white);
  padding: 8px 16px;
  z-index: 9999;
}
.skip-link:focus { top: 0; }

/* =============================================
   HEADER & NAV
   ============================================= */

.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  border-bottom: 3px solid var(--red);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.primary-nav { margin-left: auto; }

/* Logo / site name */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.site-logo img {
  height: 40px;
  width: auto;
}
.site-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.site-logo-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.site-logo-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Primary nav */
.primary-nav {
  display: none;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--navy-dark);
  padding: 12px 0 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.primary-nav.open { display: block; }

.primary-nav > ul > li {
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.primary-nav > ul > li > a,
.primary-nav > ul > li > button,
.primary-nav > ul > li > form > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 20px;
  color: rgba(255,255,255,0.88);
  font-size: 0.95rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  font-family: inherit;
}
.primary-nav > ul > li > a:hover,
.primary-nav > ul > li > button:hover,
.primary-nav > ul > li > form > button:hover {
  color: var(--white);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

/* Dropdown arrow */
.nav-arrow {
  display: none;
}

/* Dropdown menus */
.nav-dropdown {
  display: none;
  background: rgba(0,0,0,0.2);
  padding: 4px 0;
}
.nav-item.open .nav-dropdown { display: block; }

.nav-dropdown a {
  display: block;
  padding: 9px 20px 9px 36px;
  color: rgba(255,255,255,0.72);
  font-size: 0.88rem;
  text-decoration: none;
}
.nav-dropdown a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.05);
  text-decoration: none;
}

/* Dropdown section labels — non-interactive headings inside a dropdown */
.nav-dropdown-label {
  padding: 8px 20px 2px 36px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  cursor: default;
  user-select: none;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 4px;
}
@media (min-width: 900px) {
  .nav-dropdown-label { padding: 8px 18px 2px; }
}

/* Login / auth nav item */
.nav-login a {
  color: var(--accent) !important;
  font-weight: 600;
}

/* --- Desktop nav (≥ 900px) --- */
@media (min-width: 900px) {
  .nav-toggle { display: none; }

  .primary-nav {
    display: flex !important;
    position: static;
    background: none;
    padding: 0;
    border: none;
    margin-left: auto;
  }
  .primary-nav > ul {
    display: flex;
    gap: 2px;
    align-items: center;
    justify-content: flex-end;
  }
  .primary-nav > ul > li {
    position: relative;
    border: none;
  }
  .primary-nav > ul > li > a,
  .primary-nav > ul > li > button,
  .primary-nav > ul > li > form > button {
    padding: 0 14px;
    height: var(--nav-height);
    font-size: 0.88rem;
    border-radius: 0;
    white-space: nowrap;
    color: var(--navy);
  }
  .primary-nav > ul > li > a:hover,
  .primary-nav > ul > li > button:hover,
  .primary-nav > ul > li > form > button:hover,
  .nav-item.open > a,
  .nav-item.open > button {
    background: var(--sky);
    color: var(--navy);
  }

  /* Desktop dropdown */
  .nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--navy-dark);
    box-shadow: var(--shadow-lg);
    border-top: 2px solid var(--blue-light);
    padding: 6px 0;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .nav-dropdown a {
    padding: 9px 18px;
    font-size: 0.85rem;
    white-space: nowrap;
  }
}

/* =============================================
   HERO / PAGE HEADER
   ============================================= */

.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 48px 20px 40px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.page-hero p {
  font-size: 1.05rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
}

.home-hero {
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 50%, var(--blue) 100%);
  padding: 135px 20px 108px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero.jpg') center 40%/cover no-repeat;
  opacity: 0.45;
}
.home-hero-content {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}
.home-hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.home-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 28px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  line-height: 1.4;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
  text-decoration: none;
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  color: var(--white);
  text-decoration: none;
}
.btn-blue {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-blue:hover {
  background: var(--blue-light);
  border-color: var(--blue-light);
  color: var(--white);
  text-decoration: none;
}
.btn-sm {
  padding: 7px 16px;
  font-size: 0.85rem;
}

/* =============================================
   LAYOUT
   ============================================= */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-body {
  padding: 40px 0 60px;
}

/* Section headings */
.section-heading {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.section-heading-sm {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* =============================================
   CARDS
   ============================================= */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 20px; }
.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
.card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* Photo placeholder — used where real images haven't been added yet */
.photo-placeholder {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.photo-placeholder svg {
  opacity: 0.35;
}

/* =============================================
   INFO STRIPS / ALERTS
   ============================================= */

.info-strip {
  background: var(--sky);
  border-left: 4px solid var(--blue);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 20px;
  font-size: 0.92rem;
}
.info-strip p { margin: 0; }
.info-strip p + p { margin-top: 6px; }

.notice-strip {
  background: #fff8ec;
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 20px;
  font-size: 0.92rem;
}

/* =============================================
   TABLES
   ============================================= */

.table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--white);
}
thead tr {
  background: var(--navy);
  color: var(--white);
}
th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--off-white); }
tbody tr:hover { background: var(--sky); }

/* =============================================
   FORMS
   ============================================= */

.form-group {
  margin-bottom: 18px;
}
label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(42,100,150,0.15);
}
textarea { min-height: 100px; resize: vertical; }

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* =============================================
   FOOTER
   ============================================= */

.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
  padding: 40px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-col h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 12px;
}
.footer-col p, .footer-col a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
}
.footer-col a:hover {
  color: var(--white);
  text-decoration: none;
}
.footer-col ul li { margin-bottom: 4px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--white); }

/* =============================================
   HOME PAGE SPECIFIC
   ============================================= */

.home-highlights {
  padding: 48px 0;
}
.highlight-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.highlight-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  filter: grayscale(1);
}
.highlight-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.highlight-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.home-subscribe {
  background: var(--navy);
  color: var(--white);
  padding: 48px 20px;
  text-align: center;
}
.home-subscribe h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.home-subscribe p {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 24px;
}
.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 540px;
  margin: 0 auto;
}
.subscribe-form input {
  flex: 1;
  min-width: 180px;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  color: var(--white);
}
.subscribe-form input::placeholder { color: rgba(255,255,255,0.5); }
.subscribe-form input:focus {
  background: rgba(255,255,255,0.18);
  border-color: var(--white);
  box-shadow: none;
}

/* =============================================
   WEATHER WIDGET
   ============================================= */

.weather-bar {
  background: var(--sky);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 0.85rem;
}
.weather-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.weather-bar a {
  color: var(--navy);
  font-weight: 500;
}
.weather-bar a:hover { color: var(--blue); }

/* =============================================
   RATES TABLE (seasonal)
   ============================================= */

.rates-table th:first-child { min-width: 140px; }
.rate-highlight { color: var(--text); }

/* Admin booking tables — shrink the Ref column and tighten cell padding */
.booking-table th:first-child { min-width: 0; width: 1%; }
.booking-table th,
.booking-table td { padding: 7px 10px; }

/* =============================================
   CONTACTS PAGE
   ============================================= */

.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.contact-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.contact-card .role {
  font-size: 0.82rem;
  color: var(--blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.contact-card p { font-size: 0.9rem; color: var(--text-muted); }
.contact-detail {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--text);
}
.contact-detail-label {
  font-weight: 600;
  min-width: 50px;
  color: var(--text-muted);
}

/* =============================================
   LOGIN PAGE
   ============================================= */

.login-wrap {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--blue) 100%);
}
.login-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
}
.login-box h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.login-box .subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* =============================================
   UTILITIES
   ============================================= */

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.text-muted { color: var(--text-muted); font-size: 0.9rem; }
.text-center { text-align: center; }
.text-navy { color: var(--navy); }
.font-bold { font-weight: 700; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =============================================
   STAT TILES
   ============================================= */

.stat-tile {
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 100px;
  flex-shrink: 0;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-tile-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-tile-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* =============================================
   DASHBOARD TILES
   ============================================= */

.dashboard-tile {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.dashboard-tile:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 16px rgba(0,74,153,0.12);
  transform: translateY(-2px);
  color: var(--text);
}
.dashboard-tile-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
  line-height: 1;
  filter: grayscale(100%);
}
.dashboard-tile-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 4px;
}
.dashboard-tile-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* =============================================
   ACCORDION
   ============================================= */

.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.accordion-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  cursor: pointer;
  user-select: none;
}
.accordion-summary::-webkit-details-marker { display: none; }
.accordion-summary::after {
  content: '\25BE';
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.accordion[open] .accordion-summary::after {
  transform: rotate(-180deg);
}
.accordion-summary:hover { background: var(--off-white); }
.accordion-body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
}
