/* Custom CSS for Clay Roof Tile Landing Page */

/* Global Styles */
:root {
    --primary: #b45309;
    --primary-hover: #92400e;
    --primary-light: #fef3c7;
    --secondary: #d97706;
    --dark: #78350f;
    --light: #fffbeb;
    --muted: #92400e80;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--dark);
    font-weight: 600;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

/* Utility Classes */
.section-title {
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-divider {
    width: 80px;
    height: 4px;
    background-color: var(--secondary);
    margin: 0 auto 2rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Header/Navbar */
#mainHeader {
    transition: var(--transition);
}

#mainHeader.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand-color-dark {
    color: var(--dark);
}

.navbar-brand-color-white {
    color: var(--white);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand:hover {
    color: var(--primary);
}

.brand-logo {
    width: 32px;
    height: auto;
    /* background-color: var(--primary); */
    /* border-radius: 6px; */
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.navbar-toggler {
    border: none;
    /* color: var(--dark); */
    font-size: 1.5rem;
}
.navbar-toggler-dark {
    color: var(--dark);
}
.navbar-toggler-white {
    color: var(--white);
}
.navbar-toggler:focus {
    box-shadow: none;
}

.nav-link-dark {
    color: var(--dark);
}
.nav-link-white {
    color: var(--white);
}

.nav-link {
    /* color: var(--dark); */
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.nav-link:hover {
    color: var(--primary);
}

/* Hero Section */
/* #hero {
    background-image: url('https://akcdn.detik.net.id/community/media/visual/2023/12/28/genteng-metal_169.jpeg?w=700&q=90');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    position: relative;
} */

#hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

/* Semua slide berada di posisi yang sama, hanya opacity yang berubah */
#hero .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fade 9s infinite;
}

/* Delay untuk tiap slide agar muncul bergantian */
#hero .slide:nth-child(1) {
    animation-delay: 0s;
}
#hero .slide:nth-child(2) {
    animation-delay: 3s;
}
#hero .slide:nth-child(3) {
    animation-delay: 6s;
}

/* Keyframes untuk animasi fade in dan fade out */
@keyframes fade {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    40% {
        opacity: 1;
    }
    60% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(120, 53, 15, 0.8),
        rgba(146, 64, 14, 0.6)
    );
}

.hero-content {
    padding-top: 6rem;
}

.hero-content h1 {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* About Section */
#about {
    background-color: var(--light);
    padding: 5rem 0;
}

.about-image-container {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-accent-box {
    position: absolute;
    width: 120px;
    height: 120px;
    background-color: var(--secondary);
    border-radius: 0.5rem;
    bottom: -24px;
    left: -24px;
    z-index: -1;
}

.stat-card {
    background-color: var(--white);
}

.stat-card h4 {
    color: var(--dark);
    font-size: 1.5rem;
}

/* Products Section */
#products {
    padding: 5rem 0;
}

.product-card {
    transition: var(--transition);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.product-img-container {
    height: 250px;
    overflow: hidden;
}

.product-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-container img {
    transform: scale(1.05);
}

.product-link {
    color: var(--primary);
    font-weight: 500;
    display: inline-block;
    margin-top: 1rem;
}

.product-link:hover {
    color: var(--primary-hover);
}

.carousel-control-prev,
.carousel-control-next {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1) brightness(0.5) sepia(1) saturate(5) hue-rotate(0deg);
}

.carousel-indicators {
    margin-bottom: 0;
}

.carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--gray-300);
    opacity: 1;
}

.carousel-indicators button.active {
    background-color: var(--primary);
}

/* Contact Section */
#contact {
    background-color: var(--primary-light);
}

.contact-form-container {
    background-color: var(--white);
}

.contact-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background-color: rgba(180, 83, 9, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}

.hours-card {
    background-color: var(--light);
    border: 1px solid var(--gray-200);
}

.addres {
    text-decoration: underline;
    text-decoration-color: var(--dark);
}

.addres:hover {
    text-decoration: none;
    /* transition: var(--transition); */
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: var(--light);
    padding-top: 4rem;
}

.footer h5 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    color: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* whatsapp buttotn */
.wa-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #2dc553;
    color: var(--white);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.wa-button:hover {
    background-color: #21923d;
}

.wa-button.visible {
    opacity: 1;
    visibility: visible;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 80px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-hover);
    color: var(--white);
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .hero-content {
        padding-top: 8rem;
    }
}

@media (max-width: 767.98px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* blog section */
#blog {
    padding: 5rem 0;
}

/* Featured */
.blog-featured {
    border-radius: 12px;
    overflow: hidden;
    height: 300px; /* ubah sesuai kebutuhan */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    background: #fff;
}
.blog-featured img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* TRANSITION sama untuk featured & post-card */
    transition: transform 0.45s cubic-bezier(0.22, 0.9, 0.35, 1);
    will-change: transform;
    transform-origin: center center;
}
.blog-featured:hover img {
    transform: scale(1.03);
}

/* Featured right content (flex column supaya link nempel di bawah) */
.featured-row {
    align-items: stretch;
} /* buat kolom kanan setinggi gambar */
.featured-right {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-left: 1rem;
}
.featured-title {
    margin-bottom: 0.35rem;
    font-weight: 700;
    font-size: 1.6rem;
    color: #5a2a00;
}
.featured-meta {
    margin-bottom: 0.6rem;
    color: #8a8f94;
    font-size: 0.9rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

/* Read more / link selalu di paling bawah */
.read-more {
    margin-top: auto;
    display: inline-block;
    color: var(--primary, #b14f00);
    font-weight: 600;
    text-decoration: none;
}
.read-more:hover {
    color: var(--primary-hover, #9b3f00);
    text-decoration: underline;
}

/* Post cards */
.post-card {
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}
.post-card .img-col {
    overflow: hidden;
    position: relative;
    min-height: 120px;
    display: block;
}
.post-card .img-col img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* TRANSITION sama dengan featured */
    transition: transform 0.45s cubic-bezier(0.22, 0.9, 0.35, 1);
    will-change: transform;
    transform-origin: center center;
}

/* Card content as column so read-more dapat dipush ke bawah */
.post-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.7rem 0.9rem;
}
.post-card .card-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}
.post-card .card-meta {
    margin-bottom: 0.5rem;
    color: #8a8f94;
    font-size: 0.85rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.post-card .card-excerpt {
    flex: 0 0 auto;
    color: #6b6f73;
    font-size: 0.9rem;
}

/* clamp excerpt */
.clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* hover elevation (tetap dikomentari sesuai permintaan) */
.card-hover {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
/* .card-hover:hover {
     transform: translateY(-6px);
     box-shadow: 0 12px 30px rgba(0,0,0,0.09);
} */

/* zoom on hover (desktop only) */
@media (hover: hover) and (pointer: fine) {
    .post-card.card-hover:hover .img-col img,
    .post-card.card-hover:focus-within .img-col img {
        transform: scale(1.12);
    }
}

/* Responsif: non-aktifkan transform di layar kecil */
@media (max-width: 767.98px) {
    .featured-title {
        font-size: 1.25rem;
    }
    .blog-featured {
        height: 260px;
        margin-bottom: 1rem;
    }
    .post-card .img-col img {
        transition: none;
        transform: none;
    }
}
