/* === CSS VARIABLES === */
:root {
  --bg-color: #F7F7F8;
  --text-color: #444444;
  --header-bg: #3a1078;
  --link-color: #3795BD;
  --link-hover-color: #08C076;
  --btn-bg: #08C076;
  --btn-hover-bg: #3795BD;
  --btn-secondary-bg: #1D366F;
  --btn-secondary-hover-bg: #144560;
  --card-bg: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.08);
}

body.dark {
  --bg-color: #121212;
  --text-color: #ddd;
  --header-bg: #1a1a1a;
  --link-color: #4ea8ff;
  --link-hover-color: #76d6a0;
  --btn-bg: #339966;
  --btn-hover-bg: #4ea8ff;
  --btn-secondary-bg: #223344;
  --btn-secondary-hover-bg: #335577;
  --card-bg: #222222;
  --card-shadow: rgba(0, 0, 0, 0.5);
}
#darkModeToggle {
  position: fixed;
  top: 50%;
  right: 10px;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: right center;
  z-index: 1000;

  padding: 10px 15px;
  background-color: #222;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s;
}

#darkModeToggle:hover {
  background-color: #444;
}

body.dark #darkModeToggle {
  background-color: #ddd;
  color: #000;
}

body.dark #darkModeToggle:hover {
  background-color: #bbb;
}

body.dark .main-header,
body.dark .main-header a {
  color: white;
}

body.dark .town,
body.dark .town ul {
  color: white;
}

/* === GLOBAL STYLES === */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  background-color: var(--bg-color);
  color: var(--text-color);
}

ul {
  padding-left: 20px;
  color: #333;
}

/* === HEADER & NAVIGATION === */
.main-header {
  background: var(--header-bg);
  padding: 0.8rem 1.5rem;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

.logo {
  color: var(--bg-color);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
}

.hamburger {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: var(--bg-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: var(--link-hover-color);
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #4f31aa;
    position: absolute;
    top: 60px;
    left: 0;
    padding: 1rem;
    z-index: 1000;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 0.5rem 0;
  }
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--btn-bg);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-align: center;
  border: none;
}

.btn:hover {
  background-color: var(--btn-hover-bg);
}

.btn-secondary {
  background-color: var(--btn-secondary-bg);
}

.btn-secondary:hover {
  background-color: var(--btn-secondary-hover-bg);
}

/* Smaller button variant */
.btn-contact {
  display: inline-block;
  margin-top: 12px;
  background-color: var(--link-color);
  color: white;
  padding: 8px 15px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease;
}

.btn-contact:hover {
  background-color: var(--btn-hover-bg);
}

/* === HERO SECTION === */
.hero {
  background: url('images/schull.jpg') no-repeat center center fixed;
  background-size: cover;
  color: white;
  padding: 120px 20px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

.hero h1,
.hero p,
.hero .hero-buttons {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  color: #1D366F;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #08C076;
}

.hero-buttons .btn {
  margin: 10px;
}

/* === SECTIONS === */
.about,
.how-it-works,
.testimonials {
  background: var(--bg-color);
  margin: 30px 0;
  padding: 40px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(224, 224, 224, 0.8);
  color: var(--text-color);
}

.how-it-works {
  text-align: center;
}

.how-it-works h2,
.testimonials h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #1D366F;
}

.how-it-works ol {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 600px;
  text-align: left;
}

.how-it-works ol li {
  background: var(--bg-color);
  margin: 10px 0;
  padding: 15px 20px;
  border-left: 6px solid #08C076;
  border-radius: 6px;
  font-weight: 500;
  color: var(--text-color);
}

.testimonials p {
  font-size: 1.1rem;
  color: var(--text-color);
  max-width: 700px;
  margin: auto;
}

/* === LISTINGS GRID === */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

/* Individual Listing Card */
.listing-card {
  background-color: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--card-shadow);
  border: 1px solid #eee;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.listing-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}

.listing-card h3 {
  color: #1D366F;
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.listing-card p {
  font-size: 0.95rem;
  margin: 4px 0;
  color: var(--text-color);
}

.listing-card strong {
  color: #1D366F;
}

/* Links in listing details */
.listing-details a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.listing-details a:hover {
  color: var(--link-hover-color);
  font-weight: 500;
}

/* === LIGHTBOX === */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

/* === FILTER FORM === */
.filter-form {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  max-width: 400px;
  margin: 40px auto;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  font-size: 1rem;
}

.filter-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #1D366F;
}

.filter-form select,
.filter-form input[type="text"],
.filter-form button {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1.5px solid #ccc;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.filter-form select:focus,
.filter-form input[type="text"]:focus {
  border-color: #08C076;
  outline: none;
}

.filter-form button {
  background-color: var(--btn-bg);
  color: white;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.filter-form button:hover {
  background-color: var(--btn-hover-bg);
}

/* === FOOTER === */
.footer {
  text-align: center;
  color: var(--text-color);
}

.footer a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--link-hover-color);
  font-weight: 500;
}

/* === RESPONSIVE LISTING CARD === */
@media (max-width: 600px) {
  .listing-card {
    max-width: 100%;
  }
}
