/* Color Palette & Scroll Config */
:root {
    --primary-red: #8B0000;      
    --secondary-dark: #2F2F2F;   
    --bg-light: #F8F9FA;        
    --text-main: #333333;       
    --accent-gray: #E5E5E5;     
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-light);
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    color: var(--secondary-dark);
    text-align: center;
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-size: 2.2rem;
}

h2::after {
    content: '';
    background: var(--primary-red);
    height: 4px;
    width: 60px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-red);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-dark);
    transform: scale(1.05);
}

/* Header & Navbar */
header {
    background-color: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 
    border-bottom: 3px solid var(--primary-red);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); 
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease; 
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    transition: padding 0.3s ease; 
}

.logo {
    width: 55px;
    height: 55px;
    background-color: var(--white);
    border: 2px solid var(--accent-gray);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    overflow: hidden; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    border-color: var(--primary-red);
    box-shadow: 0 4px 8px rgba(139, 0, 0, 0.4);
    cursor: pointer;
}

.logo img {
    width: 55px; 
    height: auto;
    object-fit: cover;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 25px; 
    position: relative; 
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-dark); 
    font-weight: 600; 
    font-size: 1.05rem;
    transition: color 0.3s;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px; 
    left: 0;
    width: 0; 
    height: 3px; 
    background-color: var(--primary-red);
    transition: width 0.3s ease; 
}

.nav-links a:hover {
    color: var(--primary-red);
}

.nav-links a:hover::after {
    width: 100%; 
}

/* Home Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('https://images.unsplash.com/photo-1517524206127-48bbd363f3d7?q=80&w=1200&auto=format&fit=crop') center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-color: var(--white);
    text-align: center;
}

.company-banner {
    max-width: 100%;
    height: auto;
    margin-bottom: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.about-section p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: #555;
}

/* Service Section */
.service-section {
    padding: 80px 0;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 5px solid var(--primary-red);
    transition: 0.4s;
}

.service-card:hover {
    border-top: 5px solid var(--secondary-dark);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateY(-10px);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--text-main);
}
/* Service Section */

/* Product Section */
.product-section {
    padding: 80px 0;
    background-color: var(--bg-light);
    text-align: center;
}

.section-subtitle {
    margin-top: -20px;
    margin-bottom: 40px;
    color: #777;
    font-size: 1rem;
}

.product-grid {
    display: grid;
    /* Menjaga grid tetap responsif */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: left;
    /* Pastikan item grid meregang penuh */
    align-items: stretch; 
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* STRATEGI UTAMA: Menggunakan Flexbox vertikal pada kartu */
    display: flex;
    flex-direction: column;
    /* Memastikan kartu mengisi tinggi penuh baris grid */
    height: 100%; 
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Bagian Gambar Tetap */
.product-img-wrapper {
    width: 100%;
    height: 250px; /* Tinggi gambar tetap */
    overflow: hidden;
    position: relative;
    display: block;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    /* Jangan biarkan gambar menyusut */
    flex-shrink: 0; 
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.1);
}

.photo-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
}

.hidden-gallery {
    display: none;
}

/* Bagian Info Produk */
.product-info {
    padding: 20px;
    border-top: 3px solid var(--primary-red);
    
    /* Membuat bagian info mengisi sisa tinggi kartu */
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

.product-info h3 {
    color: var(--secondary-dark);
    margin-bottom: 10px;
    font-size: 1.3rem;
    /* Membatasi judul 1 baris agar seragam */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* PENYESUAIAN UTAMA: Menyamakan tinggi deskripsi */
.product-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5; /* Atur line-height agar hitungan tinggi akurat */
    
    /* Membatasi teks maksimal 3 baris */
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    
    /* Memaksa tinggi area teks sama dengan 3 baris (1.5 * 3) */
    height: calc(1.5em * 3); 
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: var(--white);
}

.contact-details {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1rem;
    color: #444;
}

.contact-details p {
    margin-bottom: 10px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-social-action {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.contact-social-action h3 {
    color: var(--secondary-dark);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.contact-social-action p {
    margin-bottom: 20px;
    color: #555;
}

/* WhatsApp Button */
.btn-whatsapp {
    display: inline-block;
    padding: 15px 25px;
    background-color: #25D366;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    margin-bottom: 30px;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
    color: #fff;
}

/* Social Media Buttons */
.social-media-links p {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--secondary-dark);
}

.social-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.socmed-btn {
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 20px;
    background-color: var(--accent-gray);
    color: var(--secondary-dark);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.socmed-btn i {
    font-size: 1.2rem;
}

.socmed-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff;
}

.socmed-btn.facebook:hover {
    background-color: #1877F2;
    color: #fff;
}

.socmed-btn.linkedin:hover {
    background-color: #0A66C2;
    color: #fff;
}

/* Map Container */
.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Footer */
footer {
    background-color: var(--secondary-dark);
    color: var(--accent-gray);
    padding: 40px 0;
    text-align: center;
    border-top: 5px solid var(--primary-red);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 15px;
    }
    
    .logo img {
        margin-bottom: 15px;
    }

    .nav-links {
        margin-top: 0;
    }
    
    .nav-links li {
        margin: 0 10px;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
}