/* =============================================
   MOREX Homepage - Premium Redesign Styles
   ============================================= */

/* ============================================
   HERO SECTION - Split Layout
   ============================================ */
.hero-new {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: calc(80px + var(--space-12)) 0 var(--space-16);
    overflow: hidden;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

/* Hero Content (Left) */
.hero-content {
    max-width: 600px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: rgba(27, 58, 95, 0.1);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--primary);
    margin-bottom: var(--space-6);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.hero-headline {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--gray-900);
    margin-bottom: var(--space-6);
}

.hero-headline .highlight {
    color: var(--primary);
    position: relative;
}

.hero-headline .highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(232, 119, 34, 0.3);
    z-index: -1;
    border-radius: 4px;
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: var(--space-8);
}

/* Hero Search */
.hero-search {
    display: flex;
    gap: var(--space-2);
    background: white;
    padding: var(--space-2);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: var(--space-8);
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
}

.search-input-group ion-icon {
    font-size: 20px;
    color: var(--gray-400);
}

.search-input-group input {
    border: none;
    outline: none;
    background: transparent;
    font-size: var(--text-base);
    width: 100%;
    color: var(--gray-800);
}

.search-input-group input::placeholder {
    color: var(--gray-400);
}

.search-submit {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Trust Row */
.trust-row {
    display: flex;
    gap: var(--space-8);
}

.trust-stat {
    display: flex;
    flex-direction: column;
}

.trust-stat strong {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--gray-900);
}

.trust-stat span {
    font-size: var(--text-sm);
    color: var(--gray-500);
}

/* Hero Visual (Right) */
.hero-visual {
    position: relative;
}

.hero-image-stack {
    position: relative;
}

.hero-img {
    border-radius: var(--radius-2xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hero-img.main {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.hero-img.secondary {
    position: absolute;
    bottom: -40px;
    left: -60px;
    width: 200px;
    aspect-ratio: 1;
    object-fit: cover;
    border: 4px solid white;
}

/* Floating Card */
.floating-card {
    position: absolute;
    top: 40px;
    right: -20px;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.fc-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    color: white;
    font-size: 24px;
}

.fc-text strong {
    display: block;
    font-size: var(--text-sm);
    color: var(--gray-900);
}

.fc-text span {
    font-size: var(--text-xs);
    color: var(--gray-500);
}

/* ============================================
   SECTIONS - General
   ============================================ */
.section {
    padding: var(--space-20) 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--space-10);
}

.section-header.center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section-tag {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: rgba(232, 119, 34, 0.1);
    color: var(--accent);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-2);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--gray-900);
}

.btn-outline-dark {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    color: var(--gray-700);
    font-weight: var(--font-semibold);
    transition: all 0.3s ease;
}

.btn-outline-dark:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   PROPERTY CARDS
   ============================================ */
.property-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.property-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.property-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.pc-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.pc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .pc-image img {
    transform: scale(1.05);
}

.pc-badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    padding: var(--space-1) var(--space-3);
    background: var(--primary);
    color: white;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
}

.pc-badge.rent {
    background: var(--accent);
}

.pc-favorite {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pc-favorite:hover {
    background: #fee2e2;
    color: #ef4444;
}

.pc-content {
    padding: var(--space-5);
}

.pc-location {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-bottom: var(--space-2);
}

.pc-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-3);
}

.pc-title a {
    color: var(--gray-900);
    transition: color 0.3s ease;
}

.pc-title a:hover {
    color: var(--primary);
}

.pc-features {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-3) 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: var(--space-4);
}

.pc-features span {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.pc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pc-price {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--primary);
}

.pc-link {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--gray-600);
    transition: color 0.3s ease;
}

.pc-link:hover {
    color: var(--primary);
}

/* Compact Card Variant */
.property-card.compact .pc-content {
    padding: var(--space-4);
}

.property-card.compact .pc-title {
    font-size: var(--text-base);
    margin-bottom: var(--space-2);
}

.property-card.compact .pc-price {
    font-size: var(--text-lg);
}

/* ============================================
   PROPERTY TYPES SECTION
   ============================================ */
.types-section {
    background: var(--gray-50);
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-4);
}

.type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-6);
    background: white;
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
}

.type-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.tc-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(27, 58, 95, 0.1) 0%, rgba(27, 58, 95, 0.05) 100%);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-4);
    font-size: 28px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.type-card:hover .tc-icon {
    background: var(--primary);
    color: white;
}

.type-card h3 {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.type-card span {
    font-size: var(--text-sm);
    color: var(--gray-500);
}

/* ============================================
   CITIES SECTION
   ============================================ */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 200px);
    gap: var(--space-4);
}

.city-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.city-card.large {
    grid-row: span 2;
}

.city-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.city-card:hover img {
    transform: scale(1.1);
}

.city-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-5);
    color: white;
}

.city-overlay h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
}

.city-overlay span {
    font-size: var(--text-sm);
    opacity: 0.8;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: var(--space-16) 0;
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    color: white;
}

.cta-content h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: var(--space-4);
}

.cta-content p {
    font-size: var(--text-lg);
    opacity: 0.9;
    margin-bottom: var(--space-8);
}

.cta-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    color: white;
    font-weight: var(--font-semibold);
    transition: all 0.3s ease;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* ============================================
   WHY SECTION
   ============================================ */
.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.why-card {
    text-align: center;
    padding: var(--space-8);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.why-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.wc-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(232, 119, 34, 0.1) 0%, rgba(232, 119, 34, 0.05) 100%);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-5);
    font-size: 32px;
    color: var(--accent);
}

.why-card h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--gray-900);
    margin-bottom: var(--space-3);
}

.why-card p {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .property-grid.cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .types-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-visual {
        display: none;
    }

    .trust-row {
        justify-content: center;
    }

    .property-grid,
    .property-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .city-card.large {
        grid-row: span 1;
    }
}

@media (max-width: 640px) {

    /* Compact Hero for Mobile */
    .hero-new {
        padding: calc(70px + var(--space-4)) 0 var(--space-6);
    }

    .hero-container {
        padding: 0 var(--space-4);
    }

    .hero-tag {
        font-size: 11px;
        padding: 6px 12px;
        margin-bottom: var(--space-3);
    }

    .hero-headline {
        font-size: 1.75rem;
        margin-bottom: var(--space-3);
    }

    .hero-description {
        font-size: var(--text-sm);
        margin-bottom: var(--space-4);
        line-height: 1.5;
    }

    .hero-search {
        flex-direction: column;
        margin-bottom: var(--space-4);
        padding: 6px;
        border-radius: var(--radius-lg);
    }

    .search-input-group {
        padding: 10px 12px;
    }

    .search-input-group input {
        font-size: var(--text-sm);
    }

    .search-submit {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .trust-row {
        gap: var(--space-4);
    }

    .trust-stat strong {
        font-size: var(--text-lg);
    }

    .trust-stat span {
        font-size: 10px;
    }

    /* Compact Sections */
    .section {
        padding: var(--space-8) 0;
    }

    .section-header {
        margin-bottom: var(--space-6);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .section-title {
        font-size: 1.25rem;
    }

    .btn-outline-dark {
        font-size: var(--text-sm);
        padding: 8px 14px;
    }

    /* Horizontal Scroll Property Cards */
    .property-grid,
    .property-grid.cols-4 {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: var(--space-4);
        padding-bottom: var(--space-2);
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .property-grid::-webkit-scrollbar {
        height: 4px;
    }

    .property-grid::-webkit-scrollbar-thumb {
        background: var(--gray-300);
        border-radius: 4px;
    }

    .property-card {
        min-width: 280px;
        max-width: 300px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .property-card:hover {
        transform: none;
    }

    .pc-image {
        aspect-ratio: 16/9;
    }

    .pc-content {
        padding: var(--space-3);
    }

    .pc-title {
        font-size: var(--text-base);
        margin-bottom: var(--space-2);
    }

    .pc-features {
        gap: var(--space-3);
        padding: var(--space-2) 0;
        margin-bottom: var(--space-2);
    }

    .pc-features span {
        font-size: 11px;
    }

    .pc-price {
        font-size: var(--text-lg);
    }

    .pc-link {
        font-size: 11px;
    }

    /* Compact Card Variant */
    .property-card.compact {
        min-width: 200px;
        max-width: 220px;
    }

    .property-card.compact .pc-image {
        aspect-ratio: 4/3;
    }

    .property-card.compact .pc-content {
        padding: var(--space-2);
    }

    .property-card.compact .pc-title {
        font-size: var(--text-sm);
    }

    .property-card.compact .pc-price {
        font-size: var(--text-base);
    }

    /* Types Grid - 2 columns */
    .types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .type-card {
        padding: var(--space-4);
    }

    .tc-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
        margin-bottom: var(--space-2);
    }

    .type-card h3 {
        font-size: var(--text-sm);
    }

    .type-card span {
        font-size: 10px;
    }

    /* Cities Grid */
    .cities-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .city-card {
        height: 150px;
    }

    /* Why Grid */
    .why-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .why-card {
        padding: var(--space-5);
    }

    .wc-icon {
        width: 56px;
        height: 56px;
        font-size: 26px;
    }

    .why-card h3 {
        font-size: var(--text-base);
    }

    /* CTA Section */
    .cta-section {
        padding: var(--space-10) 0;
    }

    .cta-content h2 {
        font-size: 1.25rem;
    }

    .cta-content p {
        font-size: var(--text-sm);
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--space-3);
    }
}

/* No Properties State */
.no-properties {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-16);
    color: var(--gray-400);
}

.no-properties ion-icon {
    font-size: 64px;
    margin-bottom: var(--space-4);
}