/* ==========================================================================
   CILENTO REAL ESTATE - LAYOUT COMPONENTS
   Components used across ALL pages: navbar, footer, hamburger menu
   ========================================================================== */

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(72,71,71,0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 3px solid var(--accent-gold);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 15px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5rem; /* Changed to fixed height */
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}


.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  display: block;
  height: 70px;
  width: auto;
  max-width: 350px;
  object-fit: contain;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.navbar-scrolled .nav-logo img {
  height: 42px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-gold);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all 0.3s ease;
}

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

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: all 0.3s ease;
}

/* Styles for scrolled navbar */
.navbar.navbar-scrolled {
  padding: 5px 0;
  border-bottom-width: 2px;
}

.navbar.navbar-scrolled .nav-container {
  height: 50px; /* Changed to fixed height */
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  background: var(--primary-dark);
  border-top: 1px solid var(--accent-gold);
  padding: 40px 0 15px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}

.footer-section h3,
.footer-section h4 {
  color: var(--accent-gold);
  margin-bottom: 1rem;
  text-align: left;
}

.footer-section p,
.footer-section li {
  color: var(--text-gray);
  line-height: 1.6;
  text-align: center;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--text-gray);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent-gold);
}

.footer-section li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.footer-section svg {
  flex-shrink: 0;
}

.footer-logo {
  max-width: 180px;
  height: auto;
  display: block;
  object-fit: contain;
  margin-top: 55px;
}

.social-links {
  display: flex;
  justify-content: left;
  gap: 1rem;
}

.social-links a {
  padding: 8px 16px;
  background: var(--secondary-dark);
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-links a:hover {
  background: var(--accent-gold);
  color: var(--primary-dark);
}

.social-links img {
  height: 20px;
  width: auto;
}

li img {
  height: 20px;
  width: auto;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--accent-dark);
}

.footer-bottom p {
  color: var(--text-gray);
  font-size: 0.9rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
  /* Navigation */
  .nav-container {
    position: relative;
    justify-content: flex-end; /* Push remaining items (hamburger) to the right */
  }

  .nav-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 90%; /* Slightly adjust logo height for mobile */
  }

  .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(72, 71, 71, 0.98);
    backdrop-filter: blur(10px);
    width: 100%;
    height: 100vh;
    flex-direction: column;
    padding-top: 120px;
    text-align: center;
    z-index: 999;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
  }

  .nav-menu.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu li {
    padding: 1rem 0;
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInMenu 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  }

  .nav-menu.active li:nth-child(1) { animation-delay: 0.1s; }
  .nav-menu.active li:nth-child(2) { animation-delay: 0.15s; }
  .nav-menu.active li:nth-child(3) { animation-delay: 0.2s; }
  .nav-menu.active li:nth-child(4) { animation-delay: 0.25s; }
  .nav-menu.active li:nth-child(5) { animation-delay: 0.3s; }

  @keyframes slideInMenu {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  .nav-logo img {
    height: 65px;
    max-width: 250px;
  }

  /* Footer */
  .footer-content {
    margin-top: 0;
    grid-template-columns: 1fr;
    text-align: center;
    align-items: center;
    justify-content: center;
  }

  .footer-logo {
    margin: 0 0.5rem auto;
    margin-left: 8%;
    width: 100%;
    height: auto;
    
  }
}
