/*
# Project:     lovemallacoota.com.au
# Author:      Colin Dixon BSc, DipEd, Cert IV TAE
# Contact:     crdixon@gmail.com
# Assistant:    ChatGPT-5
# Timestamp:   23/10/2025 08:12 AM AEDT (Mallacoota)
# Version:     [25.10.007]
# File Name:   style.css
# Description: Main stylesheet for the lovemallacoota.com.au portal.
*/

:root {
  --font-family-sans: system-ui, -apple-system, "Segoe UI", "Roboto",
    "Helvetica Neue", "Arial", sans-serif;
  --border-radius: 12px;
  --spacing-unit: 1rem;
  --transition-speed: 0.3s;
  --max-width: 1400px; /* Increased max-width for wider layout */

  --bg-color-light: #f0f2f5;
  --text-color-light: #1c1e21;
  --link-color-light: #0056b3;
  --glass-fill-light: rgba(255, 255, 255, 0.6);
  --glass-border-light: rgba(255, 255, 255, 0.5);
  --shadow-light: 0 8px 32px 0 rgba(31, 38, 135, 0.2);

  --bg-color-dark: #121212;
  --text-color-dark: #e4e6eb;
  --link-color-dark: #66b0ff;
  --glass-fill-dark: rgba(40, 40, 40, 0.55);
  --glass-border-dark: rgba(255, 255, 255, 0.1);
  --shadow-dark: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

[data-theme="light"] {
  --bg-color: var(--bg-color-light);
  --text-color: var(--text-color-light);
  --link-color: var(--link-color-light);
  --glass-fill: var(--glass-fill-light);
  --glass-border: var(--glass-border-light);
  --shadow: var(--shadow-light);
}
[data-theme="dark"] {
  --bg-color: var(--bg-color-dark);
  --text-color: var(--text-color-dark);
  --link-color: var(--link-color-dark);
  --glass-fill: var(--glass-fill-dark);
  --glass-border: var(--glass-border-dark);
  --shadow: var(--shadow-dark);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* --- General Layout --- */
body {
  font-family: var(--font-family-sans);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  transition: background-color var(--transition-speed),
    color var(--transition-speed);
  display: flex;
  flex-direction: column;
}
main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: calc(var(--spacing-unit) * 1.5);
  padding: var(--spacing-unit);
  width: 100%;
  padding-top: 6rem;
  padding-bottom: 2rem;
}
a {
  color: var(--link-color);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* --- Glass Cards --- */
.glass-card {
  background: var(--glass-fill);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  padding: calc(var(--spacing-unit) * 2);
  transition: background var(--transition-speed), border var(--transition-speed);
  width: 100%;
  max-width: var(--max-width);
}
.hero-card {
  text-align: center;
}
h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
p {
  margin-bottom: 1rem;
}
.glass-card > p:last-child {
  margin-bottom: 0;
}

/* --- Video Card --- */
.video-card {
  padding: var(--spacing-unit);
}
.video-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-top: 56.25%;
  border-radius: calc(var(--border-radius) - 6px);
}
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Portal Navigation Grid --- */
.portal-nav-grid {
  display: grid;
  grid-template-columns: 1fr; /* Mobile first */
  gap: var(--spacing-unit);
}
@media (min-width: 769px) {
  .portal-nav-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.nav-card {
  display: block;
  padding: 1.5rem;
  border-radius: calc(var(--border-radius) - 4px);
  background: rgba(0, 0, 0, 0.05);
  transition: transform var(--transition-speed),
    box-shadow var(--transition-speed);
  text-align: center;
}
.nav-card:hover {
  text-decoration: none;
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.nav-card h3 {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}
.nav-card p {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 0;
}

/* --- Directory Listings Grid (Desktop First) --- */
.listings-grid {
  display: grid;
  gap: var(--spacing-unit);
  grid-template-columns: repeat(4, 1fr); /* Widescreen */
}
@media (max-width: 1919px) {
  .listings-grid {
    grid-template-columns: repeat(3, 1fr); /* Desktop */
  }
}
@media (max-width: 1199px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr); /* Tablet */
  }
}
@media (max-width: 768px) {
  .listings-grid {
    grid-template-columns: 1fr; /* Mobile */
  }
}

.listing-card {
  background: rgba(0, 0, 0, 0.05);
  border-radius: calc(var(--border-radius) - 4px);
  padding: 1.5rem;
  transition: transform var(--transition-speed),
    box-shadow var(--transition-speed);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.listing-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.listing-card h3 {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}
.listing-card p {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.9;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* NEW: card chips (category tags) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin-bottom: 0.5rem;
}
.chip {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-color);
  opacity: 0.85;
}

/* Links/buttons row on cards */
.listing-card .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}
.listing-card .links a,
button.suggest-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-color);
  cursor: pointer;
  transition: background-color var(--transition-speed),
    color var(--transition-speed), transform 0.06s ease-in-out;
}
.listing-card .links a:hover,
button.suggest-link:hover {
  background: var(--link-color);
  color: var(--bg-color);
  text-decoration: none;
}
button.suggest-link {
  border: 1px dashed var(--glass-border);
}

/* --- Theme Toggle --- */
.theme-toggle {
  position: absolute;
  top: var(--spacing-unit);
  right: var(--spacing-unit);
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-color);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10;
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* --- Footer --- */
footer {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 0;
  margin-top: auto;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  background: var(--glass-fill);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-section {
  text-align: center;
  width: 100%;
}
.footer-links-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1rem;
}
.footer-links-container .separator {
  display: none;
}
@media (min-width: 768px) {
  .footer-links-container .separator {
    display: inline;
  }
}
.social-links a {
  display: inline-block;
  margin: 0 0.75rem;
  color: var(--text-color);
  transition: color var(--transition-speed), transform 0.2s;
}
.social-links svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.social-links a:hover {
  transform: scale(1.1);
  color: var(--link-color);
}
.copyright-section {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* --- Map Embed (moved from inline to CSS) --- */
.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: calc(var(--border-radius) - 6px);
  overflow: hidden;
}
.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Accessibility niceties --- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
  border-radius: 6px;
}
