:root {
    --ph-primary: #0a5c46;
    --ph-primary-dark: #063d2f;
    --ph-accent: #ff7a00;
    --ph-light: #f5f7f6;
    --ph-gray: #6c757d;
}

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: #fafbfa;
    color: #222;
}

a { text-decoration: none; }

/* Navbar */
.navbar-ph {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.navbar-ph .navbar-brand {
    font-weight: 700;
    color: var(--ph-primary) !important;
    font-size: 1.5rem;
}
.navbar-ph .navbar-brand span { color: var(--ph-accent); }
.navbar-ph .nav-link {
    color: #333 !important;
    font-weight: 500;
    padding: .5rem 1rem !important;
}
.navbar-ph .nav-link.active,
.navbar-ph .nav-link:hover { color: var(--ph-primary) !important; }

/* Category mega-menu on the "Properties" nav item: opens on hover on desktop,
   falls back to Bootstrap's normal click-toggle on touch devices */
.category-dropdown-menu {
    min-width: 220px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    border-radius: 10px;
    padding: .5rem 0;
}
.category-dropdown-menu .dropdown-item { padding: .5rem 1.25rem; font-weight: 500; }
.category-dropdown-menu .dropdown-item:hover,
.category-dropdown-menu .dropdown-item:focus { background: #eef7f3; color: var(--ph-primary); }
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-item.dropdown-toggle::after {
    float: right; margin-top: 7px; transform: rotate(-90deg);
}
.dropdown-submenu > .dropdown-menu {
    top: -.5rem;
    left: 100%;
    margin-left: 2px;
}
@media (hover: hover) and (pointer: fine) {
    .category-mega:hover > .category-dropdown-menu,
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
        animation: none;
    }
}
@media (max-width: 991.98px) {
    .dropdown-submenu > .dropdown-menu { position: static; margin-left: 1rem; box-shadow: none; }
}
.btn-ph-primary {
    background: var(--ph-primary);
    border-color: var(--ph-primary);
    color: #fff;
    font-weight: 600;
}
.btn-ph-primary:hover { background: var(--ph-primary-dark); color: #fff; }
.btn-ph-accent {
    background: var(--ph-accent);
    border-color: var(--ph-accent);
    color: #fff;
    font-weight: 600;
}
.btn-ph-accent:hover { background: #e06d00; color: #fff; }

/* Hero */
.hero-section {
    background: linear-gradient(135deg, var(--ph-primary) 0%, var(--ph-primary-dark) 100%);
    color: #fff;
    padding: 70px 0 140px;
}
.hero-section h1 { font-weight: 700; font-size: 2.6rem; }
.hero-section p { font-size: 1.1rem; opacity: .9; }

/* Hero banner carousel */
.hero-carousel { position: relative; }
.hero-slide {
    position: relative;
    overflow: hidden;
    /* Flex-centers the caption/illustration row within a min-height box, and the
       fixed top/bottom padding always leaves clear empty space below the content
       for the search card to overlap into - regardless of how much the headline
       or paragraph wraps on a given screen width. */
    display: flex;
    align-items: center;
    min-height: 520px;
    padding: 70px 0;
    color: #fff;
}
.hero-slide h1 { font-weight: 700; font-size: 2.6rem; margin-bottom: .75rem; }
.hero-slide p { font-size: 1.1rem; opacity: .92; max-width: 520px; }
.hero-slide .container { position: relative; z-index: 2; }
.slide-1 { background: linear-gradient(135deg, #0a5c46 0%, #063d2f 100%); }
.slide-2 { background: linear-gradient(135deg, #0e6ba8 0%, #0a4a75 100%); }
.slide-3 { background: linear-gradient(135deg, #c2610a 0%, #8a4407 100%); }

/* Right-side flat-illustration artwork (villa / apartment / farmhouse) */
.hero-illustration { text-align: center; }
.hero-illustration-svg {
    width: 100%;
    max-width: 380px;
    height: auto;
    filter: drop-shadow(0 25px 25px rgba(0,0,0,.25));
}
.hero-carousel .carousel-indicators { bottom: 90px; }
.hero-carousel .carousel-indicators button {
    width: 10px; height: 10px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.5);
    transition: background .2s, transform .2s;
}
.hero-carousel .carousel-indicators button.active { background: #ffce7a; transform: scale(1.3); }
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 60px; height: 60px; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.12);
    border-radius: 50%;
    opacity: .9;
    transition: background .2s;
}
.hero-carousel .carousel-control-prev { left: 20px; }
.hero-carousel .carousel-control-next { right: 20px; }
.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover { background: rgba(255,255,255,.28); }

.text-accent { color: #ffce7a; }

/* Small pill badge above each slide's headline */
.slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 1rem;
}

/* Live stat counters (slide 1) */
.slide-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2.5rem;
}
.slide-stats div { text-align: center; }
.slide-stats strong { display: block; font-size: 1.9rem; font-weight: 700; color: #ffce7a; line-height: 1; }
.slide-stats span { font-size: .82rem; opacity: .85; }

/* Feature tag chips (slides 2 & 3) */
.slide-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .6rem 1.4rem;
    margin-top: 2rem;
    font-size: .88rem;
}
.slide-tags span i { color: #ffce7a; margin-right: 5px; }

/* Gentle float animation for the illustration artwork */
.hero-illustration-svg { animation: illustrationFloat 4s ease-in-out infinite; }
@keyframes illustrationFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Caption fade/slide-up entrance, replayed on every slide change */
.hero-slide .animate-caption > * {
    animation: captionUp .7s ease both;
}
.hero-slide .animate-caption > *:nth-child(1) { animation-delay: 0s; }
.hero-slide .animate-caption > *:nth-child(2) { animation-delay: .1s; }
.hero-slide .animate-caption > *:nth-child(3) { animation-delay: .2s; }
.hero-slide .animate-caption > *:nth-child(4) { animation-delay: .3s; }
.hero-slide .animate-caption > *:nth-child(5) { animation-delay: .4s; }
@keyframes captionUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Search card - the hero slide's fixed 70px top/bottom padding (see .hero-slide)
   always leaves clear empty space below the caption, so a modest -55px overlap
   here can never collide with the headline/tabs no matter how text wraps. */
.search-card {
    position: relative;
    z-index: 3;
    margin-top: -55px;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,.15);
    border: none;
}
.search-tabs .nav-link {
    font-weight: 600;
    color: var(--ph-gray);
    border-radius: 8px 8px 0 0;
}
.search-tabs .nav-link.active {
    color: var(--ph-primary);
    background: #eef7f3;
    border-color: transparent;
}

/* Property card */
.property-card {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    background: #fff;
    height: 100%;
}
.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,.1);
}
.property-card .img-wrap {
    position: relative;
    height: 210px;
    overflow: hidden;
    background: #eee;
}
.property-card .img-wrap img {
    width: 100%; height: 100%; object-fit: cover;
}
.property-card .badge-type {
    position: absolute; top: 10px; left: 10px;
}
.property-card .badge-listing {
    position: absolute; top: 10px; right: 10px;
}
.property-card .price {
    color: var(--ph-primary);
    font-weight: 700;
    font-size: 1.25rem;
}
.property-card .meta-row {
    font-size: .85rem;
    color: var(--ph-gray);
}
.property-card .meta-row i { color: var(--ph-primary); margin-right: 4px; }

/* Section titles */
.section-title { font-weight: 700; margin-bottom: 2rem; }
.section-title span { color: var(--ph-accent); }

.footer-ph {
    background: var(--ph-primary-dark);
    color: #dcdcdc;
    padding: 50px 0 20px;
    margin-top: 60px;
}
.footer-ph a { color: #cfd9d5; }
.footer-ph a:hover { color: #fff; }
.footer-ph h5 { color: #fff; font-weight: 600; }

/* Dashboard */
.stat-card {
    border-radius: 12px;
    border: none;
    color: #fff;
    padding: 1.5rem;
}
.stat-card h3 { font-weight: 700; margin-bottom: 0; }
.stat-card.bg-total { background: #34495e; }
.stat-card.bg-pending { background: #e67e22; }
.stat-card.bg-approved { background: #27ae60; }
.stat-card.bg-rejected { background: #c0392b; }

.sidebar-ph {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #eee;
}
.sidebar-ph .nav-link {
    color: #333;
    border-radius: 8px;
    padding: .6rem 1rem;
    font-weight: 500;
}
.sidebar-ph .nav-link.active {
    background: var(--ph-primary);
    color: #fff;
}
.sidebar-ph .nav-link:hover:not(.active) { background: #f1f3f2; }

/* Auth pages */
.auth-card {
    max-width: 480px;
    margin: 60px auto;
    border-radius: 14px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,.08);
}

/* Property details */
.detail-gallery-main {
    height: 420px; object-fit: cover; border-radius: 12px; width:100%;
}
.detail-gallery-thumb {
    height: 90px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: .7;
}
.detail-gallery-thumb.active { opacity: 1; border: 2px solid var(--ph-primary); }
.owner-box {
    background: #eef7f3;
    border-radius: 12px;
    padding: 1.5rem;
}
.amenity-pill {
    display: inline-block;
    background: #f1f3f2;
    border-radius: 20px;
    padding: 6px 14px;
    margin: 4px 4px 0 0;
    font-size: .85rem;
}

@media (max-width: 768px) {
    .hero-slide { min-height: 460px; padding: 50px 0 60px; }
    .hero-slide h1 { font-size: 1.9rem; }
    .hero-slide p { font-size: 1rem; max-width: 100%; }
    .search-card { margin-top: -40px; }
    .slide-stats { gap: 1.4rem; }
    .slide-stats strong { font-size: 1.5rem; }
    /* Arrows collide with the caption text on narrow screens - dots + swipe are enough there */
    .hero-carousel .carousel-control-prev,
    .hero-carousel .carousel-control-next { display: none; }
}
