/* ===== PROJECTS PAGE STYLES ===== */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    padding: 180px 5% 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/image-1.jpg') center/cover no-repeat;
    opacity: 0.15;
}

.page-header-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--primary-white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-title span {
    color: var(--primary-gold);
}

.page-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Projects Section */
.projects-section {
    padding: 100px 5%;
    background: var(--bg-light);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Project Card */
.project-card {
    background: var(--primary-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-smooth);
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

/* Project Image */
.project-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-elegant);
}

.project-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

.project-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-gold);
    color: var(--primary-white);
    padding: 8px 16px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 4px;
}

.project-badge.emaar {
    background: #006837;
}

.project-badge.forest {
    background: #2d5a27;
}

.project-badge.waterfront {
    background: #1e5f8a;
}

.project-badge.island {
    background: #00a0b0;
}

/* Project Info */
.project-info {
    padding: 30px;
}

.project-developer {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-gold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.project-name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.project-location {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.project-location i {
    color: var(--primary-gold);
    margin-right: 8px;
}

/* Project Details */
.project-details {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.project-detail {
    text-align: center;
}

.detail-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-lighter);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}

.detail-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Project Types */
.project-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.type-tag {
    background: var(--cream);
    color: var(--text-medium);
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-radius: 20px;
}

/* CTA Section */
.cta-section {
    padding: 120px 5%;
    text-align: center;
    background: var(--primary-dark);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--primary-white);
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    line-height: 1.7;
}

/* Footer */
.footer {
    background: #050505;
    padding: 100px 5% 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 80px;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1200px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 50px;
    }

    .footer-newsletter {
        grid-column: 1 / -1;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-newsletter {
        max-width: 100%;
    }
}

.footer-brand .footer-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary-white);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 25px;
}

.footer-brand .footer-logo span {
    color: var(--primary-gold);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.9;
    margin-bottom: 35px;
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 45px;
    height: 45px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-white);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: var(--primary-dark);
}

.footer-column h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-white);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 18px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    position: relative;
    display: inline-block;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-gold);
    transition: width var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-gold);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.footer-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-newsletter-form input {
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.footer-newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.footer-newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.footer-newsletter-form button {
    padding: 16px 25px;
    background: var(--primary-gold);
    border: none;
    color: var(--primary-dark);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.footer-newsletter-form button:hover {
    background: var(--gold-dark);
    color: var(--primary-white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 50px auto 0;
    flex-wrap: wrap;
    gap: 20px;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .footer-legal {
        gap: 20px;
        justify-content: center;
    }
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--primary-gold);
}

/* ===== PROJECT DETAIL PAGE STYLES ===== */

/* Project Hero */
.project-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 120px 5% 80px;
    background-color: #000;
}

.project-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.7;
}

.project-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

.project-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.project-hero-developer {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--primary-gold);
    margin-bottom: 20px;
    border-radius: 4px;
}

.project-hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    color: var(--primary-white);
    margin-bottom: 20px;
    line-height: 1.1;
}

.project-hero-location {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.project-hero-location i {
    color: var(--primary-gold);
    margin-right: 10px;
}

/* Project Badges Row */
.project-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.project-badge-item {
    background: var(--primary-white);
    color: var(--text-dark);
    padding: 15px 25px;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-badge-item i {
    color: var(--text-light);
}

.project-badge-item.price {
    background: var(--primary-gold);
    color: var(--primary-white);
}

.project-badge-item.price i {
    color: rgba(255, 255, 255, 0.8);
}

/* Project Buttons */
.project-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Project About */
.project-about {
    padding: 120px 5%;
}

.project-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

@media (max-width: 992px) {
    .project-about-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

.project-about-content .section-label {
    text-align: left;
}

.project-about-content .section-label::before,
.project-about-content .section-label::after {
    display: none;
}

.project-about-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.2;
}

.project-about-title span {
    color: var(--primary-gold);
}

.project-about-text {
    font-size: 1.05rem;
    color: var(--text-medium);
    line-height: 1.8;
    margin-bottom: 30px;
}

/* Animated Image Frame Container */
.project-about-image {
    position: relative;
    border-radius: 8px;
    overflow: visible;
    box-shadow: var(--shadow-medium);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Prevent layout shift */
    display: block;
}

/* Main image wrapper with overflow hidden */
.project-about-image::before,
.project-about-image::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid var(--primary-gold);
    transition: all 0.4s ease;
    z-index: 10;
    opacity: 0;
    animation: frameReveal 0.8s ease forwards;
    animation-delay: 0.5s;
    pointer-events: none;
}

/* Top-left corner */
.project-about-image::before {
    top: -15px;
    left: -15px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 8px;
}

/* Bottom-right corner */
.project-about-image::after {
    bottom: -15px;
    right: -15px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 8px;
}

/* Image styling with proper clipping */
.project-about-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Clip to rounded rectangle to prevent overflow */
    clip-path: inset(0 round 8px);
    /* Prevent image from breaking out of container */
    transform-origin: center center;
}

/* Hover effects */
.project-about-image:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(194, 167, 118, 0.25), 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-about-image:hover::before,
.project-about-image:hover::after {
    width: 80px;
    height: 80px;
    border-color: var(--primary-gold);
}

.project-about-image:hover::before {
    top: -20px;
    left: -20px;
}

.project-about-image:hover::after {
    bottom: -20px;
    right: -20px;
}

.project-about-image:hover img {
    transform: scale(1.03);
}

/* Frame reveal animation */
@keyframes frameReveal {
    0% {
        opacity: 0;
        width: 0;
        height: 0;
    }

    50% {
        opacity: 1;
        width: 30px;
        height: 30px;
    }

    100% {
        opacity: 1;
        width: 60px;
        height: 60px;
    }
}



/* Responsive adjustments */
@media (max-width: 992px) {

    .project-about-image::before,
    .project-about-image::after {
        width: 40px;
        height: 40px;
    }

    .project-about-image::before {
        top: -10px;
        left: -10px;
    }

    .project-about-image::after {
        bottom: -10px;
        right: -10px;
    }

    .project-about-image:hover::before,
    .project-about-image:hover::after {
        width: 60px;
        height: 60px;
    }

    .project-about-image:hover::before {
        top: -15px;
        left: -15px;
    }

    .project-about-image:hover::after {
        bottom: -15px;
        right: -15px;
    }
}

/* Key Features */
.key-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 576px) {
    .key-features {
        grid-template-columns: 1fr;
    }
}

.key-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--cream);
    border-radius: 8px;
}

.key-feature i {
    color: var(--primary-gold);
    font-size: 1.2rem;
    width: 24px;
}

.key-feature span {
    font-weight: 500;
    color: var(--text-dark);
}

/* Project Stats */
.project-stats {
    display: flex;
    gap: 50px;
    padding: 40px 0;
    border-top: 1px solid var(--border-light);
    margin-top: 40px;
}

@media (max-width: 576px) {
    .project-stats {
        flex-direction: column;
        gap: 30px;
    }
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--primary-gold);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===== UNIT TYPES SECTION (Individual Property Pages) ===== */

/* Units Grid - matches projects-grid styling */
.units-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .units-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .units-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Unit Card - matches project-card styling */
.unit-card {
    background: var(--primary-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-smooth);
    cursor: pointer;
    text-decoration: none;
    display: block;
    position: relative;
}

.unit-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.unit-card:hover .unit-image img {
    transform: scale(1.08);
}

/* Unit Image - matches project-image styling */
.unit-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.unit-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-elegant);
}

.unit-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

.unit-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-gold);
    color: var(--primary-white);
    padding: 8px 16px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 4px;
}

/* Unit Quick View Button */
.unit-quick-view {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.unit-card:hover .unit-quick-view {
    transform: translate(-50%, -50%) scale(1);
}

.unit-quick-view i {
    color: var(--primary-gold);
    font-size: 1.2rem;
}

/* Unit Info - matches project-info styling */
.unit-info {
    padding: 30px;
}

.unit-type {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.unit-specs {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.spec-item {
    text-align: center;
}

.spec-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-lighter);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}

.spec-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}
/* ===== Phase 2 SEO: Context Links + Related Projects ===== */
.projects-context-links {
    padding: 20px 5% 40px;
    background: var(--bg-light);
}

.context-links-card {
    max-width: 1100px;
    margin: 0 auto;
    background: var(--primary-white);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary-gold);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.context-links-card h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.context-links-card a {
    color: var(--gold-dark);
    font-weight: 600;
}

.related-projects-section {
    background: var(--bg-light);
    padding: 80px 5% 70px;
}

.related-projects-links {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.related-link {
    text-decoration: none;
    color: var(--text-dark);
    background: var(--primary-white);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary-gold);
    padding: 14px 16px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-fast);
}

.related-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    color: var(--gold-dark);
}

.related-projects-utility {
    max-width: 1200px;
    margin: 20px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.related-utility-link {
    text-decoration: none;
    background: var(--primary-dark);
    color: var(--primary-white);
    padding: 10px 16px;
    border-radius: 999px;
    transition: var(--transition-fast);
}

.related-utility-link:hover {
    background: var(--gold-dark);
}

@media (max-width: 768px) {
    .context-links-card { padding: 18px; }
    .related-projects-utility { flex-direction: column; }
}