/* =========================================
   1. SETUP & FONTS
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    --theme-red-dark: #8B0000;
    --theme-gold-light: #F9F295;
    --theme-gold-medium: #E0AA3E;
    --theme-gold-dark: #B88A44;
}

body {
    font-family: 'Prompt', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #f8fafc;
}

html {
    scroll-behavior: smooth;
}

/* =========================================
   2. HERO SECTION
   ========================================= */
@keyframes heroZoom {
    0% {
        transform: scale(1); /* ขนาดปกติ */
    }
    100% {
        transform: scale(1.15); /* ซูมขยายขึ้น 15% */
    }
}

.hero-wrapper {
    position: relative;
    height: 650px;
    overflow: hidden; /* สำคัญมาก! เพื่อไม่ให้ภาพที่ซูมล้นออกมาบัง Scrollbar */
    margin-top: 80px; 
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2c0b0e;
}

.hero-bg-fixed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* เผื่อความสูงไว้สำหรับ Parallax หรือ Animation */
    background-color: #5f0a0a; 
    
    /* รูปพื้นหลัง */
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6)), url('../images/project.jpg');
    
    background-size: cover;
    background-position: center;
    z-index: 0;
    
    /* --- ส่วนที่เพิ่มเข้ามาเพื่อทำ Animation --- */
    /* ชื่อ keyframes | เวลา 25วิ | เล่นวนซ้ำ | เล่นสลับหน้า-หลัง (ซูมเข้าแล้วซูมออก) | จังหวะนุ่มนวล */
    animation: heroZoom 25s infinite alternate ease-in-out;
    
    /* ช่วยให้ลื่นขึ้นและไม่กระตุก */
    will-change: transform;
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    text-align: center;
}

/* =========================================
   3. TEXT THEME 
SUBMARUM REAL ESTATE
By TheSuperland Nakhonnayok
   ========================================= */
.text-gold-red-theme {
    /* ไล่สี: ทองสว่าง -> ทองเข้ม -> เริ่มอมแดง -> แดงเข้ม */
    background: linear-gradient(
        to bottom, 
        #F9F295 0%,   /* ทองสว่างสุด (ยอด) */
        #E0AA3E 40%,  /* ทองเข้ม (กลางบน) */
        #C5582D 70%,  /* ส้มทองแดง (ตัวเชื่อมสี) */
        #8B0000 100%  /* แดงเลือดหมู (ฐาน) */
    );
    
    -webkit-background-clip: text;
    background-clip: text; 
    
    -webkit-text-fill-color: transparent;
    color: transparent;
    
    /* เพิ่มเงาบางๆ ให้ตัวหนังสือลอยเด่นขึ้น */
    filter: drop-shadow(0px 2px 2px rgba(139, 0, 0, 0.3));
    
    letter-spacing: 0.05em;
}


/* =========================================
   4. ANIMATIONS
   ========================================= */
@keyframes luxuryFadeInUp {
    0% { opacity: 0; transform: translateY(40px); filter: blur(5px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.animate-luxury { 
    opacity: 0; 
    animation: luxuryFadeInUp 1.5s cubic-bezier(0.25, 1, 0.5, 1) both; 
}

.delay-300 { animation-delay: 0.3s; }

/* Shine Effect */
@keyframes shine-pass {
    0% { left: -100%; opacity: 0; }
    20% { opacity: 0.6; }
    100% { left: 100%; opacity: 0; }
}

.hover-shine { position: relative; overflow: hidden; }

/* Shine สีขาว/ทอง */
.hover-shine::before {
    content: ''; 
    position: absolute; 
    top: 0; 
    left: -100%; 
    width: 50%; 
    height: 100%;
    
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.6), transparent);
    
    transform: skewX(-25deg); 
    pointer-events: none;
}

.group:hover .hover-shine::before { animation: shine-pass 0.8s ease-in-out forwards; }



/* --- Styles for Project Cards --- */
/* 1. Header Styles */
/* --- PROJECT CARD STYLES --- */

/* หัวข้อ Section */
.section-title {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700;
    color: #8B0000;
}
.title-divider {
    width: 4rem; height: 0.25rem;
    background-color: #E0AA3E;
    margin: 0.5rem auto 0;
    border-radius: 9999px;
}

/* ตัวการ์ด */
.project-card {
    background-color: white;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #f3f4f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
}
.project-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #E0AA3E;
    transform: translateY(-5px);
}

.card-image {
    width: fit-content; 
    height: fit-content; /* เพิ่มความสูงจาก 240px เป็น 300px หรือตัวเลขที่ชอบ */
    object-fit: cover; 
    object-position: center; 
    display: block; 
    transition: transform 700ms ease-in-out;
}
/* Badges (ป้าย) */
.badge {
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 0.5rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: auto; /* ให้เมาส์ชี้ได้ */
}
.badge-recommend { background-color: #ff0000; }
.badge-type { background-color: #8B0000; }

/* Location Overlay (แถบดำด้านล่างรูป) */
.location-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1rem;
}

/* เนื้อหาการ์ด */
.card-title {
    font-size: 1.25rem; font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
    /* ตัดคำถ้ายาวเกิน 1 บรรทัด */
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}

/* Footer */
.card-footer {
    background-color: #f9fafb;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #f3f4f6;
    display: flex; align-items: center; justify-content: space-between;
}
.company-logo {
    width: 1.5rem; height: 1.5rem;
    background-color: #d1d5db00;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: white;
}


/* =========================================
   5. CUSTOM UTILITIES & NEW GIMMICKS
   ========================================= */

/* ซ่อน Scrollbar ของ Navbar ขนมปัง (Breadcrumb) แต่ให้เลื่อนได้ */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom Scrollbar ให้แผนผังแนวนอน ดูหรูหราขึ้น */
.custom-scrollbar::-webkit-scrollbar {
    height: 8px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #E0AA3E; 
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #B88A44; 
}

/* แอนิเมชันตอนเลื่อนหน้าจอ (Scroll Reveal) */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}
.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }

/* แอนิเมชันลอยขึ้น-ลงเบาๆ (Floating) */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}
.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* แอนิเมชันปุ่มสั่น/มีแสงกระพริบดึงดูดสายตา (Pulse/Glow) */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(139, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 0, 0, 0); }
}
.btn-pulse {
    animation: pulseGlow 2s infinite;
}

/* แอนิเมชันไอคอนสั่นช้าๆ */
@keyframes bounce-slow {
    0%, 100% { transform: translateY(-10%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
    50% { transform: none; animation-timing-function: cubic-bezier(0,0,0.2,1); }
}
.animate-bounce-slow {
    animation: bounce-slow 2s infinite;
}

/* แอนิเมชันพื้นหลังลอยๆ (Blob) สำหรับส่วน Project Details */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}
.animate-blob {
    animation: blob 7s infinite;
}
.animation-delay-2000 {
    animation-delay: 2s;
}
.animation-delay-4000 {
    animation-delay: 4s;
}

/* แอนิเมชันตอนเปิดเมนูมือถือ */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-down {
    animation: fadeInDown 0.3s ease-out forwards;
}