/* ===== OTTER LODGE SKYE — Global Stylesheet ===== */

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

:root {
  --primary: #2C5F7C;
  --primary-dark: #1E4258;
  --secondary: #D4A857;
  --accent: #5B8A72;
  --bg: #F8F7F4;
  --bg-alt: #FFFFFF;
  --text: #2D3436;
  --text-light: #636E72;
  --border: #E0DDD8;
  --radius: 8px;
  --shadow: 0 2px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --max-width: 1200px;
  --transition: 0.3s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
* { -webkit-overflow-scrolling: touch; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--secondary); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* --- Typography --- */
h1, h2, h3, h4 { line-height: 1.3; color: var(--primary-dark); }
h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
h2 { font-size: 2rem; font-weight: 600; margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

/* --- Header / Navigation --- */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--secondary); }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  padding: 6px 0;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--secondary);
  transition: width var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover { color: var(--primary); }

.nav-cta {
  background: var(--secondary) !important;
  color: #fff !important;
  padding: 10px 22px !important;
  border-radius: var(--radius);
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  transition: background var(--transition) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: #c49a4a !important; color: #fff !important; }

/* Mobile menu */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text); margin: 5px 0;
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 70vh;
  min-height: 450px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.6);
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 700px;
  padding: 0 24px;
}
.hero-content h1 { color: #fff; font-size: 3rem; margin-bottom: 0.5rem; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.hero-content p { font-size: 1.2rem; opacity: 0.95; margin-bottom: 1.5rem; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-align: center;
}
.btn-primary { background: var(--secondary); color: #fff; }
.btn-primary:hover { background: #c49a4a; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-outline:hover { background: #fff; color: var(--primary-dark); }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }

/* --- Section Spacing --- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header p { color: var(--text-light); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.card-body { padding: 24px; }
.card-body h3 { margin-bottom: 8px; }
.card-body p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 16px; }

/* --- Features / Info Boxes --- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
}
.feature {
  text-align: center;
  padding: 32px 20px;
}
.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--text-light); font-size: 0.95rem; }

/* --- Content Page Layout --- */
.page-hero {
  background: var(--primary-dark);
  padding: 48px 0;
  text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: 8px; }
.page-hero p { color: rgba(255,255,255,0.8); font-size: 1.1rem; }
.page-content { padding: 60px 0; }
.page-content p, .page-content ul, .page-content ol { max-width: 750px; }

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.two-col img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* --- Contact Info --- */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin: 32px 0;
}
.contact-item {
  background: var(--bg-alt);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.contact-item h3 { margin-bottom: 8px; }
.contact-item a { font-size: 1.1rem; font-weight: 600; }

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.gallery-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--transition);
}
.gallery-grid img:hover { transform: scale(1.02); }

/* --- Pricing / Tariff --- */
.tariff-cta {
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --- Map --- */
.map-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 32px 0;
}
.map-wrapper iframe {
  width: 100%;
  height: 400px;
  border: 0;
}

/* --- Footer --- */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1rem;
}
.footer-grid a {
  color: rgba(255,255,255,0.7);
  display: block;
  padding: 4px 0;
  font-size: 0.9rem;
}
.footer-grid a:hover { color: var(--secondary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-light);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* --- Blog placeholder --- */
.blog-notice {
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --- Responsive --- */

/* Tablet (iPad portrait, small laptops) */
@media (max-width: 1024px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.85rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Mobile & small tablets */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .hero { height: 55vh; min-height: 380px; }
  .hero-content h1 { font-size: 2.2rem; }
  .hero-content p { font-size: 1.05rem; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 50px 0; }
  .page-hero { padding: 36px 0; }
  .page-content { padding: 40px 0; }

  /* Mobile navigation */
  .nav-links {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--bg-alt);
    flex-direction: column;
    padding: 20px 24px;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  .nav-links a::after { display: none; }
  .nav-toggle { display: block; }
  .nav-cta {
    margin-top: 8px;
    text-align: center;
    justify-content: center;
    border-radius: var(--radius) !important;
    min-height: 48px !important;
  }

  /* Grids — single column on mobile */
  .card-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .gallery-grid img { height: 180px; }
  .features { grid-template-columns: 1fr 1fr; gap: 20px; }
  .feature { padding: 20px 12px; }
  .contact-info { grid-template-columns: 1fr; }

  /* CTAs & special blocks */
  .tariff-cta { padding: 40px 20px; }
  .blog-notice { padding: 40px 20px; }
  .map-wrapper iframe { height: 300px; }

  /* Buttons — full width on mobile for easy tapping */
  .hero-content .btn { display: block; width: 100%; max-width: 300px; margin: 8px auto; }
}

/* Small phones (iPhone SE, older devices) */
@media (max-width: 480px) {
  html { font-size: 15px; }
  .hero { height: 50vh; min-height: 340px; }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-content p { font-size: 1rem; }
  .container { padding: 0 16px; }
  .nav-inner { padding: 0 16px; }
  .btn { padding: 14px 24px; font-size: 0.95rem; width: 100%; text-align: center; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid img { height: 220px; }
  .features { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .card-img { height: 200px; }
  .two-col img { border-radius: var(--radius); }
  .section-header { margin-bottom: 32px; }
  .map-wrapper iframe { height: 250px; }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  /* Larger tap targets */
  .nav-links a { min-height: 48px; }
  .btn { min-height: 48px; }
  .footer-grid a { padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
  /* Remove hover effects that don't work on touch */
  .card:hover { transform: none; }
  .gallery-grid img:hover { transform: none; }
  /* iOS tap highlight */
  a, button { -webkit-tap-highlight-color: rgba(44, 95, 124, 0.1); }
}

/* Safe area insets for notched phones (iPhone X+) */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-footer { padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
  .nav-inner { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
}

/* Landscape orientation on phones */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { height: auto; min-height: 280px; padding: 40px 0; }
  .page-hero { padding: 24px 0; }
}
