/* ==========================================
   PT MODERNLAND REALTY - HOME PAGE STYLES
   Style khusus untuk halaman home saja
   ========================================== */

/* === HOME PAGE WRAPPER === */
.home-page {
    position: relative;
    background: white;
    overflow: hidden;
    padding-top: 0;
}

/* === BACKGROUND DECORATIONS (Home Only) === */
.bg-decoration {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
}

.bg-decoration-1 {
    left: -494px;
    top: 1894px;
    background: rgba(244, 244, 245, 0.6);
    filter: blur(50px);
}

.bg-decoration-2 {
    left: 1109px;
    top: 2814px;
    background: rgba(244, 244, 245, 0.5);
    filter: blur(120px);
}

/* === HERO SECTION === */
.hero-section {
    position: relative;
    width: 100%;
    height: 635px;
    overflow: hidden;
}

.hero-image,
.hero-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 177.78vh;
    height: 56.25vw;
    min-width: 100%;
    min-height: 100%;
    pointer-events: none;
    border: none;
}

/* === ABOUT SECTION === */
.about-section {
    max-width: 1296px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.about-text {
    font-size: 1rem;
    line-height: 1.75;
    text-align: justify;
    color: #000;
    margin-bottom: 2rem;
}

.about-cta {
    text-align: center;
    margin-top: 2rem;
}

.about-cta .btn-primary {
    padding: 0.875rem 2.5rem;
}

/* === PORTFOLIO SECTION === */
.portfolio-section {
    position: relative;
    width: 100%;
    height: 701px;
    overflow: hidden;
}

.portfolio-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.portfolio-overlay-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 144px;
    background: rgba(0, 0, 0, 0.3);
}

.portfolio-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    max-width: 1440px;
    height: 144px;
    z-index: 1;
    margin-top: 0;
}

.portfolio-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 2rem;
    height: 100%;
    text-decoration: none;
}

.portfolio-divider {
    width: 2px;
    height: 64px;
    background: white;
    flex-shrink: 0;
}

.portfolio-title {
    font-size: 20px;
    font-weight: 500;
    color: white;
    margin-bottom: 0.5rem;
    transition: font-weight 0.3s ease;
}

.portfolio-item:hover .portfolio-title,
.portfolio-item-active .portfolio-title {
    font-weight: 700;
}

.portfolio-count {
    font-size: 1.125rem;
    font-weight: 400;
    color: white;
}

/* === AWARDS SECTION === */
.awards-section {
    max-width: 1296px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.awards-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    overflow: hidden;
    max-height: 420px;
}

/* Slide keluar ke kiri (next) */
.awards-content.slide-exit-left {
    animation: slideExitLeft 0.2s ease forwards;
}

/* Slide keluar ke kanan (prev) */
.awards-content.slide-exit-right {
    animation: slideExitRight 0.2s ease forwards;
}

/* Posisi awal masuk dari kanan (next) */
.awards-content.slide-enter-right {
    transform: translateX(60px);
    opacity: 0;
}

/* Posisi awal masuk dari kiri (prev) */
.awards-content.slide-enter-left {
    transform: translateX(-60px);
    opacity: 0;
}

/* Animasi masuk ke posisi normal */
.awards-content.slide-active {
    transform: translateX(0);
    opacity: 1;
    transition:
        transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.35s ease;
}

@keyframes slideExitLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-60px);
        opacity: 0;
    }
}

@keyframes slideExitRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(60px);
        opacity: 0;
    }
}

.awards-text {
    padding-right: 2rem;
}

.award-year {
    font-size: 1.25rem;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 0.5rem;
}

.award-event {
    font-size: 1.25rem;
    font-weight: 600;
    color: #71717a;
    margin-bottom: 1rem;
}

.award-description {
    font-size: 1rem;
    color: #000;
    line-height: 1.5;
}

.awards-image {
    width: 100%;
    height: 420px;
    max-height: 420px;
    overflow: hidden;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    flex-shrink: 0;
}

.awards-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* === NEWS SECTION === */
.news-section {
    max-width: 1296px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 2rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.news-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-image-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f4f4f5;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image {
    transform: scale(1.1);
}

.news-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, 0.3)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover .news-overlay {
    opacity: 1;
}

.news-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.news-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.news-category-csr {
    background: #16a34a;
    color: white;
}

.news-category-corporate {
    background: #2563eb;
    color: white;
}

.news-category-emagz {
    background: #dc2626;
    color: white;
}

.news-date {
    font-size: 0.875rem;
    color: #71717a;
    font-weight: 400;
}

.news-title {
    font-family: "Poppins", sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: #000;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.news-card:hover .news-title {
    color: #dc2626;
}

.news-excerpt {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #52525b;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #dc2626;
    margin-top: auto;
    transition: all 0.3s ease;
}

.news-card:hover .read-more {
    gap: 0.5rem;
}

/* === HISTORY SECTION === */
.history-section {
    max-width: 1296px;
    margin: 0 auto;
    padding: 4rem 2rem;
    overflow: visible;
}

.history-carousel-wrapper {
    overflow: hidden;
    width: 100%;
    margin-bottom: 3rem;
    position: relative;
}

.history-timeline {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    transition: transform 0.5s ease;
    width: max-content;
    position: relative;
    padding: 40px 0;
}

.history-timeline::before {
    content: "";
    position: absolute;
    top: 93px;
    left: 115px;
    right: 115px;
    height: 2px;
    background: #dc2626;
    z-index: 0;
    pointer-events: none;
}

/* === HISTORY ITEM - FIXED === */
.history-item {
    text-align: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    min-width: 230px;
    min-height: unset;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.history-image {
    width: 149px;
    height: 149px;
    margin: 0 auto 0.5rem;
    border: 1px solid #000;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0px 2.38px 7.14px rgba(0, 0, 0, 0.25);
    background: white;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.history-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-item-active .history-image {
    width: 186px;
    height: 186px;
    border: 2px solid #dc2626;
}

.history-year {
    font-size: 1.25rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.25rem;
    margin-top: 0.25rem;
    transition: color 0.3s ease;
}

.history-item-active .history-year {
    color: #dc2626;
    font-weight: 700;
}

.history-text {
    font-size: 1rem;
    color: #000;
    line-height: 1.5;
    max-width: 200px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    height: auto;
    margin: 0 auto;
}

/* ==========================================
   RESPONSIVE - HOME PAGE
   ========================================== */

/* Desktop Medium (1200px - 1439px) */
@media (max-width: 1439px) {
    .about-section,
    .awards-section,
    .news-section,
    .history-section {
        padding: 3.5rem 2rem;
    }

    .hero-section {
        height: 550px;
    }

    .portfolio-section {
        height: 620px;
    }

    .portfolio-title {
        font-size: 18px;
    }

    .portfolio-count {
        font-size: 1rem;
    }

    .news-grid {
        gap: 2rem 1.5rem;
    }
}

/* Tablet Large (1024px - 1199px) */
@media (max-width: 1199px) {
    .hero-section {
        height: 500px;
    }

    .about-section,
    .awards-section,
    .news-section,
    .history-section {
        padding: 3rem 1.5rem;
    }

    .portfolio-section {
        height: 560px;
    }

    .portfolio-content {
        height: 130px;
    }

    .portfolio-overlay-bg {
        height: 130px;
    }

    .portfolio-item {
        padding: 0 1.5rem;
    }

    .portfolio-title {
        font-size: 17px;
    }

    .portfolio-divider {
        height: 56px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.5rem;
    }

    .news-image-wrapper {
        height: 220px;
    }

    .awards-content {
        gap: 1.5rem;
    }

    .awards-text {
        padding-right: 1rem;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .hero-section {
        height: 450px;
    }

    .about-section,
    .awards-section,
    .news-section,
    .history-section {
        padding: 2.5rem 1.5rem;
    }

    .about-text {
        font-size: 0.9375rem;
        line-height: 1.7;
        margin-bottom: 1.75rem;
    }

    .portfolio-section {
        height: auto;
        min-height: 500px;
        display: flex;
        align-items: stretch;
    }

    .portfolio-bg {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .portfolio-overlay {
        position: relative;
        width: 100%;
        height: 100%;
        min-height: 500px;
    }

    .portfolio-overlay-bg {
        position: absolute;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
    }

    .portfolio-content {
        position: relative;
        flex-direction: column;
        height: 100%;
        min-height: 500px;
        padding: 1.5rem 0;
        justify-content: center;
    }

    .portfolio-item {
        width: 100%;
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }

    .portfolio-item:last-child {
        border-bottom: none;
    }

    .portfolio-divider {
        display: none;
    }

    .portfolio-title {
        font-size: 18px;
        margin-bottom: 0.375rem;
    }

    .portfolio-count {
        font-size: 1rem;
    }

    .awards-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .awards-text {
        padding-right: 0;
    }

    .awards-image {
        max-height: 350px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .awards-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
    }

    .award-year,
    .award-event {
        font-size: 1.125rem;
    }

    .award-description {
        font-size: 0.9375rem;
    }

    .news-image-wrapper {
        height: 200px;
    }

    .news-content {
        padding: 1.25rem;
    }

    .news-title {
        font-size: 1.0625rem;
    }

    .news-excerpt {
        font-size: 0.875rem;
    }

    .history-item {
        min-width: 200px;
        min-height: unset;
    }

    .history-image {
        width: 130px;
        height: 130px;
    }

    .history-item-active .history-image {
        width: 160px;
        height: 160px;
    }

    .history-year {
        font-size: 1.125rem;
    }

    .history-text {
        font-size: 0.9375rem;
        max-width: 180px;
        -webkit-line-clamp: 3;
    }
}

/* Tablet Small (768px - 899px) */
@media (max-width: 899px) {
    .bg-decoration-1,
    .bg-decoration-2 {
        display: none;
    }
}

/* Mobile Large (640px - 767px) */
@media (max-width: 767px) {
    .hero-section {
        height: 380px;
    }

    .about-section,
    .awards-section,
    .news-section,
    .history-section {
        padding: 2rem 1rem;
    }

    .about-text {
        text-align: left;
        font-size: 0.875rem;
        line-height: 1.65;
        margin-bottom: 1.5rem;
    }

    .portfolio-section {
        min-height: 450px;
    }

    .portfolio-overlay {
        min-height: 450px;
    }

    .portfolio-content {
        padding: 1.25rem 0;
        min-height: 450px;
    }

    .portfolio-item {
        padding: 1rem 1rem;
    }

    .portfolio-title {
        font-size: 16px;
    }

    .portfolio-count {
        font-size: 0.9375rem;
    }

    .awards-content {
        gap: 1.5rem;
    }

    .awards-image {
        max-height: 280px;
    }

    .awards-image img {
        object-fit: contain;
    }

    .award-year {
        font-size: 1.0625rem;
    }

    .award-event {
        font-size: 1.0625rem;
        margin-bottom: 0.75rem;
    }

    .award-description {
        font-size: 0.875rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .news-card {
        border-radius: 10px;
    }

    .news-image-wrapper {
        height: 220px;
    }

    .news-content {
        padding: 1.25rem;
        gap: 0.625rem;
    }

    .news-title {
        font-size: 1rem;
    }

    .news-excerpt {
        font-size: 0.875rem;
        -webkit-line-clamp: 2;
    }

    .news-category {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.625rem;
    }

    .news-date {
        font-size: 0.8125rem;
    }

    .read-more {
        font-size: 0.8125rem;
    }

    .history-carousel-wrapper {
        margin-bottom: 2rem;
    }

    .history-timeline {
        gap: 1.5rem;
        padding: 30px 0;
    }

    .history-item {
        min-width: 180px;
        min-height: unset;
    }

    .history-image {
        width: 120px;
        height: 120px;
    }

    .history-item-active .history-image {
        width: 145px;
        height: 145px;
    }

    .history-year {
        font-size: 1.0625rem;
    }

    .history-text {
        font-size: 0.875rem;
        max-width: 160px;
        -webkit-line-clamp: 3;
    }
}

/* Mobile (480px - 639px) */
@media (max-width: 639px) {
    .hero-section {
        height: 320px;
    }

    .portfolio-section {
        min-height: 420px;
    }

    .portfolio-overlay {
        min-height: 420px;
    }

    .portfolio-content {
        min-height: 420px;
        padding: 1rem 0;
    }

    .awards-image {
        max-height: 240px;
    }

    .awards-image img {
        object-fit: contain;
    }

    .news-image-wrapper {
        height: 200px;
    }

    .history-item {
        min-width: 160px;
        min-height: unset;
    }

    .history-image {
        width: 110px;
        height: 110px;
    }

    .history-item-active .history-image {
        width: 130px;
        height: 130px;
    }

    .history-text {
        max-width: 150px;
    }
}

/* Mobile Small (max-width: 479px) */
@media (max-width: 479px) {
    .hero-section {
        height: 280px;
    }

    .about-section,
    .news-section,
    .history-section {
        padding: 1.75rem 0.75rem;
    }

    .awards-section {
        padding: 1.75rem 0.75rem;
    }

    .about-text {
        font-size: 0.8125rem;
        line-height: 1.6;
        margin-bottom: 1.25rem;
    }

    .portfolio-section {
        min-height: 400px;
    }

    .portfolio-overlay {
        min-height: 400px;
    }

    .portfolio-content {
        padding: 1rem 0;
        min-height: 400px;
    }

    .portfolio-item {
        padding: 0.875rem 0.75rem;
    }

    .portfolio-title {
        font-size: 15px;
    }

    .portfolio-count {
        font-size: 0.875rem;
    }

    .awards-content {
        gap: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .awards-image {
        max-height: 220px;
        border-radius: 0.375rem;
    }

    .awards-image img {
        object-fit: contain;
        padding: 0.5rem;
    }

    .award-year {
        font-size: 1rem;
        margin-bottom: 0.375rem;
    }

    .award-event {
        font-size: 1rem;
        margin-bottom: 0.625rem;
    }

    .award-description {
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .news-grid {
        gap: 1.5rem;
    }

    .news-card {
        border-radius: 8px;
    }

    .news-image-wrapper {
        height: 180px;
    }

    .news-content {
        padding: 1rem;
        gap: 0.5rem;
    }

    .news-meta {
        gap: 0.5rem;
    }

    .news-title {
        font-size: 0.9375rem;
        line-height: 1.35;
    }

    .news-excerpt {
        font-size: 0.8125rem;
        line-height: 1.5;
    }

    .news-category {
        font-size: 0.625rem;
        padding: 0.125rem 0.5rem;
    }

    .news-date {
        font-size: 0.75rem;
    }

    .read-more {
        font-size: 0.75rem;
        margin-top: 0.25rem;
    }

    .history-timeline {
        gap: 1.25rem;
        padding: 25px 0;
    }

    .history-item {
        min-width: 140px;
        min-height: unset;
    }

    .history-image {
        width: 100px;
        height: 100px;
        margin-bottom: 0.75rem;
    }

    .history-item-active .history-image {
        width: 120px;
        height: 120px;
    }

    .history-year {
        font-size: 1rem;
        margin-bottom: 0.375rem;
    }

    .history-text {
        font-size: 0.8125rem;
        max-width: 130px;
        line-height: 1.4;
        -webkit-line-clamp: 3;
    }
}

/* Mobile Extra Small (max-width: 374px) */
@media (max-width: 374px) {
    .hero-section {
        height: 240px;
    }

    .about-section,
    .awards-section,
    .news-section,
    .history-section {
        padding: 1.5rem 0.625rem;
    }

    .about-text {
        font-size: 0.75rem;
    }

    .portfolio-title {
        font-size: 14px;
    }

    .portfolio-count {
        font-size: 0.8125rem;
    }

    .awards-image {
        max-height: 200px;
    }

    .awards-image img {
        object-fit: contain;
        padding: 0.375rem;
    }

    .award-year,
    .award-event {
        font-size: 0.9375rem;
    }

    .award-description {
        font-size: 0.75rem;
    }

    .news-image-wrapper {
        height: 160px;
    }

    .news-content {
        padding: 0.875rem;
    }

    .news-title {
        font-size: 0.875rem;
    }

    .news-excerpt {
        font-size: 0.75rem;
    }

    .history-item {
        min-width: 120px;
        min-height: unset;
    }

    .history-image {
        width: 90px;
        height: 90px;
    }

    .history-item-active .history-image {
        width: 105px;
        height: 105px;
    }

    .history-year {
        font-size: 0.9375rem;
    }

    .history-text {
        font-size: 0.75rem;
        max-width: 110px;
    }
}
