/* ==========================================
   PT MODERNLAND REALTY - GLOBAL STYLES
   Style yang dipakai di semua halaman
   (Header, Footer, Common Components)
   ========================================== */

/* === GLOBAL RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    background: white;
    overflow-x: hidden;
    line-height: 1.5;
}

.font-bold {
    font-weight: 600;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* ==========================================
   HEADER STYLES
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 96px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Header Transparent & Solid States */
.header-transparent {
    background: transparent;
    box-shadow: none;
}

.header-solid {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header with Search Active - Always White */
.header.search-active {
    background: white !important;
    box-shadow: 0 8px 46px rgba(0, 0, 0, 0.25) !important;
}

/* Header Container */
.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 72px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Logo Styles */
.header-logo-link {
    z-index: 10;
}

.header-logo {
    height: 40px;
    width: auto;
    transition: opacity 0.3s ease;
}

.header-logo:hover {
    opacity: 0.8;
}

.header-logo-dark {
    display: block;
}

.header-logo-light {
    display: none;
}

/* Only show light logo on transparent header (homepage) */
.header-transparent .header-logo-dark {
    display: none;
}

.header-transparent .header-logo-light {
    display: block;
}

/* Force dark logo on solid header */
.header-solid .header-logo-dark {
    display: block !important;
}

.header-solid .header-logo-light {
    display: none !important;
}

/* When search is active, always show dark logo */
.header.search-active .header-logo-dark {
    display: block !important;
}

.header.search-active .header-logo-light {
    display: none !important;
}

/* === HEADER SEARCH BAR === */
.header-search {
    position: absolute;
    left: 368px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.header-search.active {
    opacity: 1;
    pointer-events: auto;
}

.search-input {
    width: 820px;
    padding: 0.5rem 0;
    font-size: 1rem;
    font-weight: 400;
    color: #9ca3af;
    background: transparent;
    border: none;
    border-bottom: 1px solid #9ca3af;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-input:focus {
    color: #000;
    border-bottom-color: #000;
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 3rem;
    transition: opacity 0.3s ease;
}

/* Hide navigation when search is active */
.header.search-active .header-nav {
    opacity: 0;
    pointer-events: none;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #dc2626;
}

.nav-link.active {
    color: #dc2626 !important;
    font-weight: 600 !important;
}

/* Header Transparent Colors */
.header-transparent .nav-link,
.header-transparent .lang-btn,
.header-transparent .lang-separator {
    color: white;
}

.header-transparent .search-icon,
.header-transparent .mobile-menu-icon {
    color: white;
}

.header-transparent .nav-link.active {
    color: #dc2626;
}

/* Header Transparent Hover States */
.header-transparent .nav-link:hover {
    color: #dc2626 !important;
}

.header-transparent .lang-btn:hover {
    color: #dc2626 !important;
}

.header-transparent .lang-btn.active {
    color: #dc2626 !important;
}

/* When search active, force black colors for navigation */
.header.search-active .nav-link {
    color: #000 !important;
}

.header.search-active .nav-link:hover {
    color: #dc2626 !important;
}

.header.search-active .lang-separator {
    color: #000 !important;
}

.header.search-active .search-icon,
.header.search-active .close-icon,
.header.search-active .mobile-menu-icon {
    color: #000 !important;
}

/* Language buttons keep their red color when active */
.header.search-active .lang-btn {
    color: #000;
}

.header.search-active .lang-btn.active {
    color: #dc2626 !important;
    font-weight: 600;
}

.header.search-active .lang-btn:hover {
    color: #dc2626 !important;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-btn,
.close-search-btn {
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-icon,
.close-icon {
    width: 20px;
    height: 20px;
}

.search-btn:hover,
.close-search-btn:hover {
    transform: scale(1.1);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn {
    font-size: 1rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
    transition: color 0.3s ease;
}

.lang-btn:hover {
    color: #dc2626;
}

.lang-btn.active {
    color: #dc2626;
    font-weight: 600;
}

.lang-separator {
    color: #000;
    margin: 0 0.25rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-icon {
    width: 24px;
    height: 24px;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu-container {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid #e5e5e5;
}

.mobile-menu-logo {
    height: 32px;
    width: auto;
}

.mobile-menu-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: color 0.3s ease;
}

.mobile-menu-close:hover {
    color: #dc2626;
}

.mobile-menu-close .close-icon {
    width: 24px;
    height: 24px;
}

.mobile-menu-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.mobile-menu-nav .nav-link {
    display: block;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #f4f4f5;
    transition: all 0.3s ease;
}

.mobile-menu-nav .nav-link:hover {
    background: #f9fafb;
    color: #dc2626;
    padding-left: 1.5rem;
}

.mobile-menu-nav .nav-link.active {
    color: #dc2626;
    font-weight: 600;
    background: #fef2f2;
}

.mobile-menu-footer {
    padding: 1.5rem 1.25rem;
    border-top: 1px solid #e5e5e5;
}

.mobile-lang-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mobile-lang-btn {
    font-size: 1rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.mobile-lang-btn:hover {
    color: #dc2626;
}

.mobile-lang-btn.active {
    color: #dc2626;
    font-weight: 600;
}

.mobile-lang-separator {
    color: #000;
    margin: 0 0.25rem;
}

/* ==========================================
   COMMON COMPONENTS
   ========================================== */

/* Section Headers */
.section-header {
    margin-bottom: 2rem;
}

.section-header-center {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.section-underline {
    width: 80px;
    height: 3px;
    background: #dc2626;
    margin-top: 0.5rem;
}

.section-underline-center {
    width: 80px;
    height: 3px;
    background: #dc2626;
    margin: 0.5rem auto 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #dc2626;
    color: white;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0px 4px 8px rgba(220, 38, 38, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: #dc2626;
    border: 2px solid #dc2626;
}

.btn-secondary:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0px 4px 8px rgba(220, 38, 38, 0.2);
}

.btn-outline {
    background: transparent;
    color: #000;
    border: 1px solid #e5e5e5;
}

.btn-outline:hover {
    background: #f5f5f5;
    border-color: #dc2626;
    color: #dc2626;
}

/* Carousel Navigation */
.carousel-nav {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.carousel-btn-prev,
.carousel-btn-next {
    background: #000;
    color: white;
}

.carousel-btn-prev:hover,
.carousel-btn-next:hover {
    background: #1f1f1f;
    transform: scale(1.05);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    transform: none;
}

.carousel-btn-prev:hover {
    transform: scale(1.05);
}

.carousel-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: white;
    color: white;
}

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================
   FOOTER STYLES
   ========================================== */
.footer {
    background: #000;
    color: white;
    padding: 3rem 0;
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 72px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-info {
    max-width: 320px;
}

.footer-logo {
    width: 227px;
    height: 36px;
    margin-bottom: 1.5rem;
}

.footer-address {
    font-size: 0.875rem;
    line-height: 1.75;
    color: white;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.social-link:hover {
    opacity: 0.7;
}

.social-icon {
    width: 16px;
    height: 16px;
    fill: white;
}

.footer-contact {
    margin-left: auto;
    max-width: 240px;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.contact-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: white;
    fill: white;
}

.contact-text {
    font-size: 0.875rem;
    line-height: 1.75;
    color: white;
}

.contact-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: white;
}

.footer-divider {
    width: 100%;
    height: 1px;
    background: white;
    margin-bottom: 1.5rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-size: 0.875rem;
    line-height: 1.75;
    color: white;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    font-size: 0.875rem;
    line-height: 1.75;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
}

/* ==========================================
   HERO BANNER COMPONENT (UNIVERSAL)
   Dipakai di semua halaman kecuali home
   ========================================== */

.hero-banner {
    position: relative;
    width: 100%;
    height: 150px;
    margin-top: 96px;
    overflow: hidden;
    padding: 0;
}

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

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

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    max-width: 1440px;
    width: 100%;
    padding: 0 72px;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

/* Breadcrumb Styles */
.hero-breadcrumb {
    font-size: 1rem;
    color: white;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb-link {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-link:hover {
    color: #dc2626;
}

.breadcrumb-separator {
    color: white;
    user-select: none;
}

.breadcrumb-current {
    color: white;
    font-weight: 400;
}

/* ==========================================
   RESPONSIVE DESIGN - GLOBAL
   ========================================== */

/* Mobile Only - Hide Search Icon */
@media (max-width: 767px) {
    .search-icon {
        display: none !important;
    }
}

/* Desktop Large (1440px+) */
@media (min-width: 1440px) {
    .header-container,
    .footer-container {
        padding: 0 72px;
    }
}

/* Desktop Medium (1200px - 1439px) */
@media (max-width: 1439px) {
    .header-container {
        padding: 0 2rem;
    }

    .header-nav {
        gap: 2rem;
    }

    .header-search {
        left: 300px;
    }

    .search-input {
        width: 600px;
    }

    .footer-container {
        padding: 0 2rem;
    }
}

/* Tablet Large (1024px - 1199px) */
@media (max-width: 1199px) {
    .header-nav {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.9375rem;
    }

    .header-search {
        left: 280px;
    }

    .search-input {
        width: 500px;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .header {
        height: 80px;
    }

    .header-container {
        padding: 0 1.5rem;
    }

    .header-logo {
        height: 36px;
    }

    .header-nav {
        display: none; /* Hide desktop nav on tablet */
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-search {
        left: 200px;
        right: 120px;
    }

    .search-input {
        width: 100%;
        max-width: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-info {
        max-width: 100%;
    }

    .footer-contact {
        margin-left: 0;
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-banner {
        height: 130px;
        margin-top: 80px;
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 1.375rem;
    }

    .hero-breadcrumb {
        font-size: 0.9375rem;
    }

    .section-title {
        font-size: 1.375rem;
    }

    .carousel-btn {
        width: 44px;
        height: 44px;
    }

    .carousel-icon {
        width: 18px;
        height: 18px;
    }
}

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

    .header-container {
        padding: 0 1rem;
    }

    .header-logo {
        height: 32px;
    }

    .header-actions {
        gap: 0.75rem;
    }

    .lang-switcher {
        gap: 0.375rem;
    }

    .lang-btn {
        font-size: 0.875rem;
    }

    .search-btn,
    .close-search-btn {
        width: 18px;
        height: 18px;
    }

    .search-icon,
    .close-icon {
        width: 18px;
        height: 18px;
    }

    .mobile-menu-icon {
        width: 22px;
        height: 22px;
    }

    .header-search {
        left: 120px;
        right: 120px;
    }

    .search-input {
        font-size: 0.9375rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .section-header-center {
        margin-bottom: 2rem;
    }

    .footer-container {
        padding: 0 1rem;
    }

    .footer {
        padding: 2.5rem 0;
    }

    .footer-content {
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .footer-logo {
        width: 180px;
        height: auto;
    }

    .footer-title {
        font-size: 1.125rem;
    }

    .hero-banner {
        height: 110px;
        margin-top: 70px;
    }

    .hero-title {
        font-size: 1.25rem;
    }

    .hero-breadcrumb {
        font-size: 0.875rem;
        gap: 0.375rem;
    }

    .btn {
        padding: 0.5625rem 1.25rem;
        font-size: 0.9375rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-icon {
        width: 16px;
        height: 16px;
    }
}

/* Mobile Small (480px - 639px) */
@media (max-width: 639px) {
    .footer-bottom {
        text-align: center;
        align-items: center;
    }

    .footer-links {
        align-items: center;
    }
}

/* Mobile Extra Small (max-width: 479px) */
@media (max-width: 479px) {
    .header {
        height: 64px;
    }

    .header-container {
        padding: 0 0.75rem;
    }

    .header-logo {
        height: 28px;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .lang-switcher {
        gap: 0.25rem;
    }

    .lang-btn {
        font-size: 0.8125rem;
    }

    .header-search {
        left: 90px;
        right: 90px;
    }

    .search-input {
        font-size: 0.875rem;
        padding: 0.375rem 0;
    }

    .hero-banner {
        height: 100px;
        margin-top: 64px;
    }

    .hero-content {
        padding: 0 0.75rem;
    }

    .hero-title {
        font-size: 1.125rem;
        margin-bottom: 0.375rem;
    }

    .hero-breadcrumb {
        font-size: 0.8125rem;
        gap: 0.25rem;
    }

    .section-title {
        font-size: 1.125rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .carousel-nav {
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
    }

    .carousel-icon {
        width: 14px;
        height: 14px;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .header,
    .footer,
    .mobile-menu-btn,
    .search-btn,
    .close-search-btn {
        display: none;
    }

    body {
        background: white;
    }

    .hero-banner {
        margin-top: 0;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

/* Focus Visible Styles */
*:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Remove focus outline from search input - sudah ada border animation */
.search-input:focus-visible {
    outline: none;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: #dc2626;
    color: white;
    padding: 0.5rem 1rem;
    z-index: 9999;
    text-decoration: none;
}

.skip-to-content:focus {
    top: 0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
