@import url('https://fonts.googleapis.com/css2?family=Irish+Grover&family=Istok+Web:wght@400;500;700&display=swap');

/* CSS Custom Properties (Variables) for consistent theming */
html {
  scroll-behavior: smooth; /* for smooth scroll-spy */
}

html, body {
  height: 100%;
}

:root {
  --color-bg-dark: #1A1512;        /* Darkest brown for header/footer */
  --color-bg: #2D2420;              /* Main background brown */
  --color-bg-card: #3D322C;         /* Card backgrounds */
  --color-accent: #D4A053;          /* Golden accent color */
  --color-accent-glow: #E8B86D;     /* Lighter golden for hover effects */
  --color-secondary: #2D4A3E;       /* Dark green secondary color */
  --color-text: #F5EDE4;            /* Light cream text */
  --color-text-muted: #B8A99A;      /* Muted text for less emphasis */
  --color-text-danger: #E74C36;      /* Muted text for less emphasis */
}

/* Universal box-sizing for consistent layout calculations */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base body styling */
body {
  overflow-x: hidden;           /* Prevent horizontal scrolling */
  width: 100%;
  font-family: "Istok Web", sans-serif;  /* Google Font for body text */
  line-height: 1.3;
  color: var(--color-text);
  background-color: var(--color-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: stretch;
  justify-content: stretch;
}

main {
  flex: 1;
}

/* Heading styles using decorative font */
h1, h2, h3, h4, h5, h6 {
  font-family: "Irish Grover", system-ui;  /* Google Font for headings */
  color: var(--color-accent);
  text-transform: capitalize;
  text-wrap: balance;            /* Balanced text wrapping for better readability */
}

h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* ============================================
   HEADER AND NAVIGATION
   ============================================ */

/* Fixed header that stays at top of viewport */
header {
  background-color: var(--color-bg-dark);
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.08);
  padding: 1rem 2rem;
  position: fixed;           /* Keeps header visible while scrolling */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;              /* Ensures header stays above other content */
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

nav > div:last-child {
  display: flex;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.logo {
  font-family: "Irish Grover", system-ui;
  font-size: 2rem;
  color: var(--color-accent);
}

/* Hamburger menu button - hidden on desktop, shown on mobile */
.hamburger {
  display: none;                  /* Hidden by default, shown in media queries */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101 !important;        /* Above nav menu overlay */
  transition: transform 0.3s ease;
}

/* Individual hamburger lines */
.ham-line {
  width: 100%;
  height: 3px;
  background-color: var(--color-text);
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger animation when active - transforms into X */
.hamburger.active .ham-line:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);  /* Top line rotates down */
}

.hamburger.active .ham-line:nth-child(2) {
  opacity: 0;                                      /* Middle line fades out */
}

.hamburger.active .ham-line:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);  /* Bottom line rotates up */
}

.nav-menu {
  display: flex;
  gap: 2rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hero section with AI-generated background image */
/* Background image generated by Microsoft Copilot (2026) */
.hero {
  background-image: url('/images/Cozy-Cottage-House.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 80vh;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.hero h1, .hero p {
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  max-width: 650px;
}

/* ============================================
   BUTTONS AND INTERACTIVE ELEMENTS
   ============================================ */

/* Call-to-action button styling */
.button {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--color-bg-dark);
  color: var(--color-accent);
  text-decoration: none;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Button hover effect with color inversion and lift */
.button:hover {
  background-color: var(--color-accent);
  color: var(--color-bg-dark);
  transform: translateY(-2px);     /* Lifts button slightly on hover */
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}

/* ============================================
   IMAGE GALLERY AND LAYOUT
   ============================================ */

/* Responsive image grid layout */
.image-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;           /* Allows images to wrap on smaller screens */
  gap: 1rem;
  width: 100%;
  /*max-width: 1200px;*/
  margin: 0 auto;
}

/* Image wrapper containers */
.image-wrapper {
  overflow: hidden;
  position: relative;
  flex: 1 1 calc(25% - 1rem);
  min-width: 150px;
  height: 300px;
  border-radius: 0.5rem;
  transition: box-shadow 0.3s ease, width 0.3s ease, transform 0.2s ease;
}

.image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: 0 0 50px 0 rgba(0, 0, 0, 0.5);
  pointer-events: none;
  border-radius: 0.5rem;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}

.image-wrapper img:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

section {
  width: 100%;
  max-width: 100%;
  padding: 4rem 2rem;
  margin: 0;
}

.intro-div {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  text-align: left;
}

.intro-right {
  display: flex;
  flex-direction: column;
  justify-content: left;
}

.section-history, .section-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  /*max-width: 1200px;*/
  margin: 0 auto;
}
.section-intro {
  display: flex;
  flex-direction: column;
}

main {
  width: 100%;
  background-color: var(--color-bg);
}


.container {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.gallery {
  background-color: var(--color-bg-dark);
  padding: 4rem 2rem;
}

.gallery h2 {
  max-width: 1200px;
}

footer {
  background-color: var(--color-bg-dark);
  color: var(--color-text);
  text-align: center;
  padding: 1rem 2rem;
  margin-top: 4rem;
}

footer a {
  color: var(--color-accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* About page -  history*/
.img-history {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.img-history img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 0.5rem;
  filter: brightness(80%);
  transition: filter 0.3s ease;
}

.img-history img:hover {
  filter: brightness(100%);
}
/* About page amenities */
.amenities-grid {
  max-width: 1200px;
}
.amenities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.amenities img {
  width: 100%;
  max-width: 200px;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
  filter: brightness(80%);
  transition: filter 0.3s ease, transform 0.2s ease;
}

.amenities img:hover {
  filter: brightness(100%);
  transform: scale(1.02);
}

/* About - testimonials */
.testimonials {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.testimonial-card {
  background: var(--color-bg-card);
  padding: 2rem;
  border-radius: 0.5rem;
  max-width: 400px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--color-accent);
}

.testimonial-card p {
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial-name {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-text-muted);
}


/* ============================================
   CONTACT PAGE STYLES
   ============================================ */

/* Two-column layout for contact form and map */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* Equal width columns */
  gap: 3rem;
  padding: 4rem 2rem;
  max-width: 1200px;
  scroll-margin-top: 5rem;           /* Clears the fixed header on #form anchor scroll */
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-card);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

.contact-form h2 {
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.contact-form label {
  color: var(--color-text);
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  font-weight: bold;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-text-muted);
  border-radius: 0.25rem;
  color: var(--color-text);
  font-size: 1rem;
  font-family: inherit;
}

.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 10px rgba(212, 160, 83, 0.3);
}

.contact-form input[type="submit"] {
  background: var(--color-accent);
  color: var(--color-bg-dark);
  border: none;
  cursor: pointer;
  font-weight: bold;
  margin-top: 1.5rem;
  transition: all 0.3s ease;
}

.contact-form input[type="submit"]:hover {
  background: var(--color-accent-glow);
  box-shadow: 0 0 20px rgba(212, 160, 83, 0.4);
}

/* Contact page - Map */
.contact-map {
  background: var(--color-bg-card);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.4);
}


.contact-map h2 {
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.contact-map iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 0.25rem;
}



/* ============================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ============================================ */

/* Tablet breakpoint - screens 768px and below */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background-color: var(--color-bg-dark);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 3rem;
    gap: 2rem;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
    z-index: 100;
  }

  .nav-menu.active {
    transform: translateX(0);
    opacity: 1;
  }

  .nav-menu a {
    font-size: 1.5rem;
    padding: 1rem 0;
    width: 100%;
    text-align: center;
    text-decoration: none;
    border-bottom: 1px solid var(--color-bg-card);
  }

  body.menu-open {
    overflow: hidden;
  }

  .image-wrapper {
    flex: 1 1 calc(50% - 0.5rem);
  }

  .image-row img {
    flex: 1 1 calc(50% - 0.5rem);
  }

  .hero {
    min-height: 100vh;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 1.2rem;
  }

  .section-intro, .section-history {
    grid-template-columns: 1fr 1fr;
  }

  /* contact page */
  .contact-section {
    display: grid;
    grid-template-columns: 1fr;
  }

  .img-history {
    grid-template-columns: 1fr;
  }

  /* amenities */
  .amenities {
    grid-template-columns: repeat(2, 1fr);
  }

  /* section intro */
  .intro-div {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
    gap: 1rem;
  }

  .intro-right {
    gap: 2rem;
  }

  /* Section history */
  .section-history {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Mobile breakpoint - screens 480px and below */
@media (max-width: 480px) {
  nav {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 1rem;
  }

  .nav-menu {
    top: 60px;
    height: calc(100vh - 60px);
  }

  .image-wrapper {
    flex: 1 1 100%;
  }

  .testimonials {
    flex-direction: column;
    align-items: center;
  }
  .testimonial-card {
    max-width: 100%;
  }

  /* amenties */


  .amenities img {
    width: 100%;
    max-width: 120px;
    height: 100%;
    object-fit: cover;
  }
}



/* login page */
.login-section {
  padding: 6rem 2rem 2rem 2rem;
  min-height: 80vh;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form {
  width: 100%;
  max-width: 450px;
}

.error-message {
  color: #e74c3c; 
  margin-bottom: 1rem;
}

.validation-error {
  color: #e74c3c;
}

.btn-full {
  width:100%;
  margin-top: 1rem;
}

/* Admin */

.admin-section {
  padding: 6rem 2rem 2rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

/* Public content pages (PropertyDetails, Privacy, Error) */
.page-section {
  padding: 6rem 2rem 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  width: 100%;
  margin: 0;
}

.logout-form {
  margin-bottom: 2rem;
}

.admin-form {
  margin-bottom: 3rem;
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
  background-color: var(--color-bg-card);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

.admin-form input, .admin-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-text-muted);
  border-radius: 0.25rem;
  color: var(--color-text);
  font-size: 1rem;
  font-family: inherit;
}

.admin-form input:focus, .admin-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 10px rgba(212, 160, 83, 0.3);
}

.admin-form input[type="submit"] {
  background: var(--color-accent);
  color: var(--color-bg-dark);
  border: none;
  cursor: pointer;
  font-weight: bold;
  margin-top: 1.5rem;
  transition: all 0.3s ease;
}

.admin-form input[type="submit"]:hover {
  background: var(--color-accent-glow);
  box-shadow: 0 0 20px rgba(212, 160, 83, 0.4);
}
.property-title {
  color: var(--color-accent);
}

.property-actions {
  display: flex;
  gap: 1rem;
}

.btn-top {
  margin-top: 1rem;
}

.btn-danger{
  background-color: var(--color-text-muted);
  color: var(--color-bg-dark);
}

.btn-danger:hover {
  background-color: var(--color-text-danger);
  color: var(--color-text);
}

.file-input {
  margin: 1rem 0;
  color: var(--color-text);
}

.image-row-admin {
  margin-bottom: 3rem;
}

.image-delete-form {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
}

/*Edit Image preview*/
.edit-image-preview {
  width: 100%;
  max-width: 400px;
  height: 250px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.property-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.btn-inline {
  display: inline-block;
}

/* Gallery */
.gallery-section {
  padding: 4rem 2rem;
  margin: 0 auto;
  max-width: 1200px;
}

.swiper {
  padding-bottom: 2rem !important;
}


.swiper-wrapper-top {
  margin-top: 2rem;
}

.swiper-image-wrapper {
  height: 500px;
  border-radius: 0.5rem;
  overflow: hidden;
}

.swiper-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swiper-caption {
  text-align: center;
  margin-top: 1rem;
  color: var(--color-text-muted);
}

/* Contact */
.success-message {
  color: var(--color-accent);
  font-size: 1.2rem;
}

.submit-btn {
  width: 100%;
  margin-top: 1rem;
}

/* Missing classes */
.property-card {
  max-width: 900px;
  margin-bottom: 2rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.admin-divider {
  border: none;
  border-top: 1px solid var(--color-bg-card);
  margin: 2rem 0;
}

/* iOS hero fix */
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
  }
  .swiper-image-wrapper {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .swiper-image-wrapper {
    height: 250px;
  }
  .property-actions {
    flex-direction: column;
  }
}

/* Swiper arrow colour - override default blue */
.swiper-button-next,
.swiper-button-prev {
  color: var(--color-accent) !important;
}

.swiper-pagination {
  position: relative !important;
  bottom: auto !important;
  margin-top: 0.5rem;
}

/* Swiper pagination dots */
.swiper-pagination-bullet {
  background: var(--color-accent) !important;
  opacity: 0.6;
}

.swiper-pagination-bullet-active {
  background: var(--color-accent) !important;
  opacity: 1;
}

/* Push caption down so dots appear between image and caption */
.swiper-caption {
  margin-top: 0.5rem;
  text-align: center;
  color: var(--color-text-muted);
}