/* ========================================
   perledo.rentals — Global Stylesheet
   Modern Minimalist Design System
   ======================================== */

/* --- CSS Variables --- */
:root {
  --color-white: #ffffff;
  --color-soft-grey: #f7f7f7;
  --color-charcoal: #1a1a1a;
  --color-teal: #2a9d8f;
  --color-teal-dark: #238b7e;
  --color-teal-light: #3dbdb0;
  --color-grey-light: #e5e5e5;
  --color-grey-medium: #999999;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--color-charcoal);
  background-color: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-teal-dark);
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-charcoal);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p {
  margin-bottom: 1rem;
  color: #4a4a4a;
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--grey {
  background-color: var(--color-soft-grey);
}

.text-center {
  text-align: center;
}

.section-title {
  margin-bottom: 3rem;
}

.section-title p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-grey-medium);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-weight: 500;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  text-align: center;
}

.btn--primary {
  background-color: var(--color-teal);
  color: var(--color-white);
  border-color: var(--color-teal);
}

.btn--primary:hover {
  background-color: var(--color-teal-dark);
  border-color: var(--color-teal-dark);
  color: var(--color-white);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-teal);
  border-color: var(--color-teal);
}

.btn--outline:hover {
  background-color: var(--color-teal);
  color: var(--color-white);
}

.btn--white {
  background-color: var(--color-white);
  color: var(--color-teal);
  border-color: var(--color-white);
}

.btn--white:hover {
  background-color: var(--color-soft-grey);
  color: var(--color-teal-dark);
}

.btn--lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  padding: 1rem 0;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-charcoal);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.navbar__logo span {
  color: var(--color-teal);
}

.navbar__links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.navbar__link {
  color: var(--color-charcoal);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-teal);
  transition: var(--transition);
}

.navbar__link:hover::after,
.navbar__link--active::after {
  width: 100%;
}

.navbar__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}

.navbar__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-charcoal);
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #2a9d8f 0%, #264653 50%, #1a1a2e 100%);
  z-index: 0;
}

.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(42, 157, 143, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(38, 70, 83, 0.5) 0%, transparent 50%),
    linear-gradient(180deg, rgba(26, 26, 46, 0) 0%, rgba(26, 26, 46, 0.3) 100%);
  z-index: 1;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.1) 100%);
  z-index: 2;
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 0 1.5rem;
}

.hero__title {
  color: var(--color-white);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.hero__subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  font-weight: 300;
}

/* --- Page Hero (Inner Pages) --- */
.page-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
}

.page-hero--detail {
  background: linear-gradient(135deg, #264653 0%, #2a9d8f 100%);
}

.page-hero--area {
  background: linear-gradient(135deg, #1a1a2e 0%, #2a9d8f 50%, #e9c46a 100%);
}

.page-hero--contact {
  background: linear-gradient(135deg, #2a9d8f 0%, #264653 100%);
}

.page-hero--privacy {
  background: linear-gradient(135deg, #1a1a2e 0%, #264653 100%);
}

.page-hero__content h1 {
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.page-hero__content p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* --- Apartment Grid --- */
.apartments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.apartment-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.apartment-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.apartment-card__image {
  height: 220px;
  position: relative;
}

.apartment-card__image--1 {
  background: linear-gradient(135deg, #2a9d8f 0%, #264653 60%, #e9c46a 100%);
}

.apartment-card__image--2 {
  background: linear-gradient(135deg, #2a9d8f 0%, #1a8a7d 50%, #a8d5ba 100%);
}

.apartment-card__image--3 {
  background: linear-gradient(135deg, #264653 0%, #2a9d8f 40%, #e9c46a 100%);
}

.apartment-card__image--4 {
  background: linear-gradient(135deg, #2a9d8f 0%, #6bb7a8 50%, #f0ead2 100%);
}

.apartment-card__image--5 {
  background: linear-gradient(135deg, #1a8a7d 0%, #2a9d8f 50%, #e9c46a 100%);
}

.apartment-card__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--color-teal);
  color: var(--color-white);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.apartment-card__body {
  padding: 1.5rem;
}

.apartment-card__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.apartment-card__type {
  color: var(--color-grey-medium);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.apartment-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.apartment-card__price {
  font-weight: 600;
  color: var(--color-teal);
  font-size: 1.1rem;
}

.apartment-card__price span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-grey-medium);
}

.apartment-card__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-teal);
}

.apartment-card__link:hover {
  text-decoration: underline;
}

/* --- Detail Page --- */
.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.gallery {
  display: grid;
  gap: 1rem;
}

.gallery__main {
  height: 400px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2a9d8f 0%, #264653 60%, #e9c46a 100%);
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.gallery__thumb {
  height: 100px;
  border-radius: var(--radius-sm);
}

.gallery__thumb--1 { background: linear-gradient(135deg, #2a9d8f, #264653); }
.gallery__thumb--2 { background: linear-gradient(135deg, #264653, #e9c46a); }
.gallery__thumb--3 { background: linear-gradient(135deg, #1a8a7d, #6bb7a8); }

.detail-info h2 {
  margin-bottom: 0.5rem;
}

.detail-info__type {
  color: var(--color-grey-medium);
  margin-bottom: 1.5rem;
}

.detail-info__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-teal);
  margin-bottom: 1.5rem;
}

.detail-info__price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-grey-medium);
}

.amenities {
  margin: 2rem 0;
}

.amenities h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: #4a4a4a;
}

.amenity-item::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--color-teal);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* --- Area Page --- */
.area-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.area-feature--reverse {
  direction: rtl;
}

.area-feature--reverse > * {
  direction: ltr;
}

.area-feature__image {
  height: 350px;
  border-radius: var(--radius-md);
}

.area-feature__image--lake {
  background: linear-gradient(135deg, #2a9d8f 0%, #264653 50%, #e9c46a 100%);
}

.area-feature__image--mountain {
  background: linear-gradient(135deg, #1a1a2e 0%, #264653 40%, #2a9d8f 100%);
}

.area-feature__image--varenna {
  background: linear-gradient(135deg, #e9c46a 0%, #2a9d8f 50%, #264653 100%);
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-charcoal);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-grey-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--color-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-info__icon {
  width: 48px;
  height: 48px;
  background: var(--color-soft-grey);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-info__text h4 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.contact-info__text p {
  margin: 0;
  color: var(--color-grey-medium);
  font-size: 0.95rem;
}

.map-placeholder {
  height: 250px;
  background: linear-gradient(135deg, var(--color-soft-grey) 0%, var(--color-grey-light) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-grey-medium);
  font-size: 0.95rem;
  border: 2px dashed var(--color-grey-light);
}

/* --- Privacy Page --- */
.privacy-content {
  max-width: 800px;
  margin: 0 auto;
}

.privacy-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.privacy-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.privacy-content p {
  margin-bottom: 1rem;
}

.privacy-content ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.privacy-content ul li {
  margin-bottom: 0.5rem;
  color: #4a4a4a;
  line-height: 1.7;
}

.privacy-content .last-updated {
  color: var(--color-grey-medium);
  font-style: italic;
  margin-bottom: 2rem;
}

/* --- Footer --- */
.footer {
  background-color: var(--color-charcoal);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer__brand p {
  color: rgba(255, 255, 255, 0.6);
  max-width: 300px;
}

.footer__brand-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 1rem;
}

.footer__brand-title span {
  color: var(--color-teal);
}

.footer__col h4 {
  color: var(--color-white);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer__col a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer__col a:hover {
  color: var(--color-teal);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer__bottom a {
  color: rgba(255, 255, 255, 0.6);
}

.footer__bottom a:hover {
  color: var(--color-teal);
}

/* --- Mobile Menu --- */
@media (max-width: 768px) {
  .navbar__toggle {
    display: flex;
  }

  .navbar__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-md);
  }

  .navbar__links--open {
    display: flex;
  }

  .apartments-grid {
    grid-template-columns: 1fr;
  }

  .detail {
    grid-template-columns: 1fr;
  }

  .gallery__main {
    height: 250px;
  }

  .area-feature {
    grid-template-columns: 1fr;
  }

  .area-feature--reverse {
    direction: ltr;
  }

  .area-feature__image {
    height: 250px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .amenities-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 70vh;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  
  .hero__title {
    font-size: 2.2rem;
  }

  .btn--lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
  }
}
