/*
Theme Name: My Landlady
Theme URI: https://mylandlady.com
Author: Galaxy Properties, LLC
Author URI: https://mylandlady.com
Description: Custom theme for the My Landlady rental portfolio. Designed to display available and coming soon rentals with accessible, responsive templates and easy‑to‑edit phone number settings.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mylandlady
*/

/* Base styling */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Global link styling: dark purple from the logo */
a {
  color: #633164;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

header {
  /* Keep the header visually distinct and on top of the page content. */
  background: #ffffff;
  border-bottom: 1px solid #ddd;
  position: relative;
  z-index: 1000;
}

/* A flex container for logo and navigation. Reduced padding for a more compact header. */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Limit logo size so the header height stays reasonable on all screen sizes. */
/* Constrain both our own logo image and the WordPress custom logo to avoid blowing out the layout. */
.logo img,
.custom-logo {
  max-height: 48px;
  height: auto;
  width: auto;
  max-width: 250px;
}

/* If WordPress outputs the logo as an inline SVG (common with custom logo SVGs), constrain its size */
.custom-logo-link svg,
.logo svg {
  height: 48px;
  max-height: 48px;
  width: auto;
  max-width: 250px;
}

/* Primary menu styling */
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
  /* Use the dark purple as the base text color for navigation links */
  color: #633164;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

nav a:hover,
nav a:focus {
  background-color: #f8f5fa;
  text-decoration: none;
  outline: none;
}

nav a:hover {
  background-color: #f2ecf7;
  text-decoration: none;
}

nav a:focus {
  outline: 2px dashed #790f8b;
  outline-offset: 2px;
}

/* Styling for call and text buttons used on rental pages */
.call-button,
.text-button {
  display: inline-block;
  padding: 0.75rem 1rem;
  background: #633164;
  color: #ffffff;
  margin-right: 0.5rem;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.call-button:hover,
.text-button:hover,
.call-button:focus,
.text-button:focus {
  background: #876886;
  outline: none;
}

footer {
  background: #f5f5f5;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #555;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* Rental card styles */
.rental-card {
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.rental-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.rental-card-content {
  padding: 1rem;
}

.rental-card h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.rental-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.rental-meta span {
  display: inline-block;
  margin-right: 0.5rem;
}

.cta-buttons {
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .rental-card {
    flex-direction: row;
  }
  .rental-card img {
    width: 40%;
  }
  .rental-card-content {
    width: 60%;
  }
}

/* Front page hero section */
.hero {
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1494526585095-c41746248156?auto=format&fit=crop&w=1500&q=80');
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: 4rem 1rem;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

/* Call‑to‑action button styling using the dark purple from the logo */
.cta-button {
  display: inline-block;
  background-color: #633164;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.cta-button:hover,
.cta-button:focus {
  background-color: #876886;
  text-decoration: none;
}

/* Front page content area to add spacing below hero */
.front-page-content {
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Carousel styles for the rental gallery on single rental pages */
.rental-gallery.carousel {
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.rental-gallery.carousel .slide {
  display: none;
}

/* Show the first slide by default for accessibility and when JavaScript is disabled */
.rental-gallery.carousel .slide:first-child {
  display: block;
}

.rental-gallery.carousel .slide img {
  width: 100%;
  height: auto;
  display: block;
}

.rental-gallery.carousel .prev,
.rental-gallery.carousel .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  z-index: 1;
}

.rental-gallery.carousel .prev {
  left: 0.5rem;
}

.rental-gallery.carousel .next {
  right: 0.5rem;
}

.rental-gallery.carousel .prev:hover,
.rental-gallery.carousel .next:hover,
.rental-gallery.carousel .prev:focus,
.rental-gallery.carousel .next:focus {
  background: rgba(0, 0, 0, 0.7);
  outline: none;
}

/* Responsive adjustments for mobile devices */
@media (max-width: 600px) {
  /* Stack header contents vertically on small screens */
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  /* Full width navigation on small screens */
  nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
    margin-top: 0.5rem;
  }
  nav a {
    padding: 0.75rem 0;
    width: 100%;
    border-radius: 0;
  }
  /* Reduce hero padding and font sizes for better mobile fit */
  .hero {
    padding: 3rem 1rem;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .cta-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}