/* =============================================
   CAMPUSCONNECT — Main Stylesheet
   Color Scheme: White / Purple / Black / Beige
   ============================================= */

:root {
  --purple: #6B21A8;
  --purple-light: #9333EA;
  --purple-soft: #EDE9FE;
  --purple-mid: #7C3AED;
  --black: #0F0F0F;
  --white: #FFFFFF;
  --beige: #F5F0E8;
  --beige-dark: #E8DFD0;
  --beige-mid: #FAF6F0;
  --gray: #6B7280;
  --gray-light: #F3F4F6;
  --shadow: 0 4px 20px rgba(107, 33, 168, 0.12);
  --shadow-deep: 0 12px 40px rgba(107, 33, 168, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
}

/* ---- UTILITIES ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--black);
  text-align: center;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--gray);
  font-size: 1.05rem;
  margin-bottom: 52px;
}

/* ---- NAVBAR ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  padding: 18px 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--beige-dark);
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 12px 0;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--black);
  text-decoration: none;
}

.logo span { color: var(--purple); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--black);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--purple);
  transition: var(--transition);
}

.nav-links a:hover { color: var(--purple); }
.nav-links a:hover::after { width: 100%; }

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

.hamburger span {
  width: 25px; height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15,15,15,0.6), rgba(107,33,168,0.6)),
    url("https://images.unsplash.com/photo-1741528804373-2bedeb308ce1?auto=format&fit=crop&w=2000&q=70")
      center center / cover no-repeat;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
}

.s1 {
  width: 600px; height: 600px;
  top: -200px; right: -150px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.15), transparent 70%);
}

.s2 {
  width: 400px; height: 400px;
  bottom: -100px; left: -100px;
  background: radial-gradient(circle, rgba(107, 33, 168, 0.1), transparent 70%);
}

.s3 {
  width: 300px; height: 300px;
  top: 40%; left: 40%;
  background: radial-gradient(circle, rgba(237, 233, 254, 0.5), transparent 70%);
}

.hero-content {
  text-align: center;
  max-width: 760px;
  padding: 40px 24px;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-block;
  background: var(--purple-soft);
  color: var(--purple);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 24px;
}

.hero-title em {
  font-style: normal;
  color: var(--purple);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--gray);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-search {
  display: flex;
  max-width: 540px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 50px;
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  border: 2px solid transparent;
  transition: var(--transition);
}

.hero-search:focus-within {
  border-color: var(--purple-light);
}

.hero-search input {
  flex: 1;
  padding: 16px 24px;
  border: none;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--black);
  background: transparent;
}

.hero-search button {
  padding: 14px 28px;
  background: var(--purple);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  border-radius: 50px;
  margin: 4px;
  transition: var(--transition);
}

.hero-search button:hover { background: var(--purple-mid); }

.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  color: var(--purple);
  animation: bounce 2s infinite;
}

/* ---- CATEGORIES ---- */
.categories {
  padding: 100px 0;
  background: var(--white);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.cat-card {
  border-radius: var(--radius);
  padding: 36px 28px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: var(--transition);
}

.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-deep); }
.cat-card:hover::before { opacity: 1; }

.food {
  background: linear-gradient(135deg, #FFF7ED, #FED7AA);
}
.food:hover { background: linear-gradient(135deg, #FED7AA, #FDBA74); }

.study {
  background: linear-gradient(135deg, var(--purple-soft), #DDD6FE);
}
.study:hover { background: linear-gradient(135deg, #DDD6FE, #C4B5FD); }

.parking {
  background: linear-gradient(135deg, #F0FDF4, #BBF7D0);
}
.parking:hover { background: linear-gradient(135deg, #BBF7D0, #86EFAC); }

.resources {
  background: linear-gradient(135deg, var(--beige), var(--beige-dark));
}
.resources:hover { background: linear-gradient(135deg, var(--beige-dark), #D6C9B6); }

.cat-icon { font-size: 2.5rem; margin-bottom: 16px; }

.cat-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--black);
}

.cat-card p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.5;
}

.cat-arrow {
  position: absolute;
  bottom: 20px; right: 20px;
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: var(--transition);
  color: var(--purple);
}

.cat-card:hover .cat-arrow { opacity: 1; transform: translateX(0); }

/* ---- FEATURED ---- */
.featured {
  padding: 100px 0;
  background: var(--beige-mid);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feat-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-deep); }

.feat-img {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.feat-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.food-img { background: linear-gradient(135deg, #92400E, #D97706); }
.study-img { background: linear-gradient(135deg, var(--purple), #9333EA); }
.park-img { background: linear-gradient(135deg, #065F46, #059669); }

.feat-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(255,255,255,0.95);
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 50px;
}

.feat-overlay {
  position: absolute;
  bottom: 14px; right: 14px;
  background: rgba(0,0,0,0.4);
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 50px;
  backdrop-filter: blur(4px);
}

.feat-body { padding: 24px; }
.feat-body h3 { font-size: 1.2rem; margin-bottom: 10px; }
.feat-body p { color: var(--gray); font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }

.feat-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.feat-meta span { font-size: 0.82rem; color: var(--gray); }

.feat-btn {
  display: inline-block;
  background: var(--purple-soft);
  color: var(--purple);
  padding: 9px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition);
}

.feat-btn:hover { background: var(--purple); color: white; }

/* ---- STATS BANNER ---- */
.stats-banner {
  padding: 80px 0;
  background: var(--purple);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat { color: white; }

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 900;
  display: inline-block;
}

.stat > span:last-of-type {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255,255,255,0.7);
}

.stat p {
  margin-top: 8px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}

/* ---- MAP SECTION ---- */
.map-section {
  padding: 100px 0;
  background: var(--white);
}

.map-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.map-text h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin-bottom: 20px;
}

.map-text p {
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 28px;
}

.map-features {
  list-style: none;
  margin-bottom: 36px;
}

.map-features li {
  padding: 8px 0;
  color: var(--black);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--beige-dark);
}

.btn-primary {
  display: inline-block;
  background: var(--purple);
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
}

.btn-primary:hover {
  background: var(--purple-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.map-visual { position: relative; }

.map-mock {
  width: 100%;
  aspect-ratio: 1;
  background: var(--beige);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
}

.map-mock::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(107,33,168,0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(rgba(107,33,168,0.05) 1px, transparent 1px) 0 0 / 40px 40px;
}

.map-roads {
  position: absolute;
  inset: 30%;
  border: 3px solid rgba(107,33,168,0.2);
  border-radius: 8px;
}

.map-pin {
  position: absolute;
  background: var(--white);
  border-radius: 50px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  animation: pinFloat 3s ease-in-out infinite;
}

.map-pin:hover { transform: scale(1.05); box-shadow: var(--shadow); }
.p1 { top: 20%; left: 15%; animation-delay: 0s; }
.p2 { top: 50%; right: 12%; animation-delay: 0.8s; }
.p3 { bottom: 22%; left: 30%; animation-delay: 1.6s; }
.p4 { top: 30%; left: 45%; animation-delay: 2.4s; }

/* ---- PAGE HERO (for inner pages) ---- */
.page-hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, var(--beige-mid) 0%, var(--purple-soft) 100%);
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 16px;
}

.page-hero h1 span { color: var(--purple); }

.page-hero p {
  color: var(--gray);
  font-size: 1.1rem;
  max-width: 540px;
  margin: 0 auto;
}

/* ---- FILTER BAR ---- */
.filter-bar {
  padding: 32px 0;
  background: var(--white);
  border-bottom: 1px solid var(--beige-dark);
}

.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 9px 22px;
  border-radius: 50px;
  border: 2px solid var(--beige-dark);
  background: var(--white);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  color: var(--black);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--purple);
  border-color: var(--purple);
  color: white;
}

/* ---- LISTING CARDS ---- */
.listings {
  padding: 80px 0;
  background: var(--beige-mid);
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.listing-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.listing-img {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.listing-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-food-1 { background: linear-gradient(135deg, #7C2D12, #C2410C); }
.img-food-2 { background: linear-gradient(135deg, #14532D, #15803D); }
.img-food-3 { background: linear-gradient(135deg, #1E3A5F, #2563EB); }
.img-food-4 { background: linear-gradient(135deg, #4A1D96, #7C3AED); }
.img-food-5 { background: linear-gradient(135deg, #7F1D1D, #DC2626); }
.img-food-6 { background: linear-gradient(135deg, #422006, #92400E); }

.img-study-1 { background: linear-gradient(135deg, var(--purple), #9333EA); }
.img-study-2 { background: linear-gradient(135deg, #1E3A5F, #1D4ED8); }
.img-study-3 { background: linear-gradient(135deg, #14532D, #16A34A); }
.img-study-4 { background: linear-gradient(135deg, #1C1917, #44403C); }
.img-study-5 { background: linear-gradient(135deg, #4A1D96, #6D28D9); }
.img-study-6 { background: linear-gradient(135deg, #7F1D1D, #B91C1C); }

.img-park-1 { background: linear-gradient(135deg, #064E3B, #065F46); }
.img-park-2 { background: linear-gradient(135deg, #1E3A5F, #1E40AF); }
.img-park-3 { background: linear-gradient(135deg, #292524, #44403C); }
.img-park-4 { background: linear-gradient(135deg, #4A1D96, #7C3AED); }

.listing-img-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  opacity: 0.6;
}

.listing-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255,255,255,0.95);
  color: var(--black);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
}

.listing-body { padding: 22px; }
.listing-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.listing-body p { color: var(--gray); font-size: 0.88rem; line-height: 1.6; margin-bottom: 14px; }

.listing-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.listing-tag {
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
}

.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--beige-dark);
}

.listing-hours { font-size: 0.82rem; color: var(--gray); }

.listing-btn {
  background: var(--purple);
  color: white;
  border: none;
  padding: 7px 16px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.listing-btn:hover { background: var(--purple-mid); }

/* ---- ABOUT PAGE ---- */
.about-section {
  padding: 100px 0;
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-bottom: 80px;
}

.about-visual {
  background: linear-gradient(135deg, var(--purple-soft), var(--beige));
  border-radius: var(--radius);
  padding: 60px;
  text-align: center;
  font-size: 5rem;
}

.about-text h2 { font-size: 2.2rem; margin-bottom: 20px; }
.about-text p { color: var(--gray); line-height: 1.8; margin-bottom: 16px; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 60px;
}

.team-card {
  background: var(--beige-mid);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  transition: var(--transition);
}

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

.team-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.team-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.team-card p { color: var(--gray); font-size: 0.9rem; }

/* ---- RESOURCES PAGE ---- */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.resource-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

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

.resource-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.resource-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.resource-card p { color: var(--gray); font-size: 0.9rem; line-height: 1.6; margin-bottom: 20px; }

.resource-link {
  color: var(--purple);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 2px solid var(--purple-soft);
  transition: var(--transition);
}

.resource-link:hover { border-color: var(--purple); }

/* ---- FOOTER ---- */
.footer {
  background: var(--black);
  color: white;
  padding: 70px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo { color: white; font-size: 1.6rem; }
.footer-brand .logo span { color: var(--purple-light); }
.footer-brand p { color: rgba(255,255,255,0.5); margin-top: 16px; line-height: 1.7; font-size: 0.9rem; }

.footer-links h4,
.footer-info h4 {
  font-size: 1rem;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.9);
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--purple-light); }

.footer-info p { color: rgba(255,255,255,0.5); font-size: 0.9rem; margin-bottom: 10px; }

.footer-bottom {
  padding: 24px 0;
}

.footer-bottom p {
  text-align: center;
  color: rgba(255,255,255,0.3);
  font-size: 0.85rem;
}

/* ---- ANIMATIONS ---- */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.7s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes pinFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .map-content { grid-template-columns: 1fr; gap: 40px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .resources-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: white;
    padding: 20px;
    box-shadow: var(--shadow);
    gap: 16px;
  }
  .hamburger { display: flex; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: 1fr; }
  .resources-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; border-radius: var(--radius); }
  .hero-search button { border-radius: var(--radius-sm); margin: 0 4px 4px; }
}
