/* 
 * Afif Azman - Perunding Hartanah Johor
 * Main Stylesheet
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6b0f1a;
    --primary-rgb: 107, 15, 26;
    --primary-dark: #4a0a12;
    --secondary: #111111;
    --secondary-rgb: 17, 17, 17;
    --accent: #2b2b2b;
    --bg-light: #f8f8f8;
    --text-dark: #111111;
    --text-muted: #666666;
    --white: #ffffff;
    --transition: all 0.3s ease;
    --container-width: 1200px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

/* Typography */
.text-maroon { color: var(--primary); }
.bg-maroon { background-color: var(--primary); color: var(--white); }
.text-center { text-align: center; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(107, 15, 26, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary);
}

/* Header */
header {
    height: var(--header-height);
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

header .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -1px;
    white-space: nowrap;
}

.logo span {
    color: var(--primary);
}

nav ul {
    display: flex;
    gap: 30px;
}

nav ul li a {
    font-weight: 500;
    color: var(--text-dark);
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../img/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: var(--header-height);
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    letter-spacing: 2px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* Specialization Cards */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.spec-card {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.spec-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--primary);
    box-shadow: 0 20px 40px rgba(107, 15, 26, 0.1);
}

.spec-card .icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.spec-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Property Cards */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.property-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    transition: var(--transition);
}

.property-card:hover {
    transform: scale(1.02);
}

.property-img {
    height: 250px;
    position: relative;
}

.property-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 15px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
}

.status-badge.sold {
    background: var(--secondary);
}

.property-info {
    padding: 25px;
}

.property-info .location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.property-info h3 {
    height: 60px;
    overflow: hidden;
    margin-bottom: 15px;
}

.property-info .price {
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 800;
}

/* About Section */
.about-flex {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.about-img {
    flex: 1;
    min-width: 350px;
    position: relative;
}

.about-img::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 10px solid var(--primary);
    z-index:2;
}

.about-content {
    flex: 1.2;
    min-width: 350px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-item h4 {
    font-size: 2.5rem;
    color: var(--primary);
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

/* Testimonials */
.testimonials {
    background-color: var(--bg-light);
}

.testimonial-card {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    margin: 20px 0;
}

.testimonial-card p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.testimonial-card .client {
    font-weight: 700;
    color: var(--primary);
}

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: start;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

/* Social Icons styling for Contact Section */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-icons a:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    color: var(--white);
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.contact-form textarea {
    height: 150px;
}

/* Footer */
footer {
    background: var(--secondary);
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.footer-logo span {
    color: var(--primary);
}

.footer-links h4 {
    margin-bottom: 25px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a:hover {
    padding-left: 5px;
    color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1001;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Book Stack Design (Premium Revert) */
.book-stack-wrapper {
    overflow: hidden;
    padding: 100px 0;
    perspective: 2000px;
    display: flex;
    justify-content: center;
    width: 100%;
    background: #fafafa;
}

.book-stack-container {
    display: flex;
    justify-content: center;
    padding-left: 100px; /* Offset for the overlap skew */
}

.ebook-card-mini {
    flex: 0 0 240px;
    height: 350px;
    background: var(--white);
    border-radius: 4px 12px 12px 4px;
    position: relative;
    transform: rotateY(-35deg) skewY(2deg);
    transform-origin: left center;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    margin-right: -130px; /* Overlap to look like a stack */
    box-shadow: -15px 10px 30px rgba(0,0,0,0.25);
    z-index: 1;
    border: none;
    cursor: pointer;
}

.ebook-card-mini::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 25px;
    height: 100%;
    background: #444; /* Warna solid untuk tulang buku */
    box-shadow: inset -5px 0 10px rgba(0,0,0,0.3);
    z-index: 2;
    border-radius: 4px 0 0 4px;
}

.ebook-card-mini:hover {
    transform: rotateY(0deg) skewY(0deg) scale(1.1) translateZ(100px);
    margin-right: 40px;
    margin-left: 20px;
    z-index: 100;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.ebook-cover-mini {
    position: absolute;
    top: 0;
    left: 25px; /* Mulakan gambar selepas tulang buku (25px) */
    width: calc(100% - 25px);
    height: 100%;
    overflow: hidden;
    border-radius: 0 12px 12px 0;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ebook-cover-mini img {
    width: 100%;
    height: 100%;
    object-fit: fill; /* Gunakan fill supaya keseluruhan design cover masuk ke ruang front cover */
}

.ebook-info-mini {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 20px;
    background: linear-gradient(transparent, rgba(var(--secondary-rgb), 0.95));
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    text-align: center;
    white-space: normal;
    z-index: 3;
}

.ebook-card-mini:hover .ebook-info-mini {
    opacity: 1;
    transform: translateY(0);
}

.ebook-info-mini h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: white;
}

/* Content Gallery */
.content-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.content-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: #222;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.content-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(107, 15, 26, 0.2);
}

.content-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.content-item:hover img {
    transform: scale(1.08);
}

.content-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: rgba(255,255,255,0.3);
    font-size: 4rem;
}

.content-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 5;
}

.content-item:hover .content-play-overlay {
    transform: translate(-50%, -50%) scale(1.15);
    background: var(--primary);
    color: white;
}

.content-item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 15px 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 4;
}

/* Content Gallery Modal / Lightbox */
.content-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.content-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 3001;
    transition: var(--transition);
    line-height: 1;
}

.content-modal-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.content-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
}


@media (max-width: 992px) {
    .container { padding: 0 30px; }
    .hero h1 { font-size: 3.2rem; }
    .contact-container { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .about-flex { gap: 40px; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; order: 2; margin-left: 20px; }
    .logo { font-size: 1.1rem; order: 1; }
    header .nav-container .btn { display: none; } 

    header nav {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - var(--header-height));
        background: var(--white);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: block;
        padding: 40px 20px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 1000;
        overflow-y: auto;
    }

    header nav.active {
        right: 0;
    }

    header nav ul {
        flex-direction: column;
        gap: 10px;
        text-align: left;
    }

    header nav ul li a {
        font-size: 1.1rem;
        padding: 12px 0;
        border-bottom: 1px solid #eee;
        display: block;
    }

    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; margin-bottom: 30px; letter-spacing: 1px; }
    .hero-btns { flex-direction: column; width: 100%; }
    .hero-btns .btn { width: 100%; text-align: center; }
    
    .section-padding { padding: 80px 0; }
    
    .stats { grid-template-columns: 1fr; gap: 40px; }
    .stat-item h4 { font-size: 3rem; }
    .about-img::before { display: none; }
    .about-flex { gap: 40px; text-align: center; }

    .spec-card { padding: 40px 30px; }
    
    .content-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .book-stack-wrapper {
        padding: 40px 0;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .book-stack-container {
        padding: 0 40px 40px 80px;
    }

    .ebook-card-mini {
        flex: 0 0 170px;
        height: 250px;
        margin-right: -100px;
    }

    .ebook-card-mini:hover {
        transform: rotateY(0) scale(1.05);
        margin-right: 15px;
    }
}

@media (max-width: 576px) {
    .container { padding: 0 20px; }
    .hero h1 { font-size: 1.8rem; }
    .section-padding { padding: 60px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .property-grid { grid-template-columns: 1fr; }
    .spec-grid { grid-template-columns: 1fr; }
    .whatsapp-float { width: 50px; height: 50px; font-size: 24px; bottom: 20px; right: 20px; }
}
