:root {
    --primary-red: #d32f2f;
    --dark-red: #b71c1c;
    --light-red: #f44336;
    --black: #212121;
    --dark-gray: #424242;
    --medium-gray: #757575;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --accent-gold: #ffd700;
    --accent-blue: #2196f3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-gray);
    color: var(--black);
    transition: all 0.3s ease;
    overflow-x: hidden;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 100%);
    color: var(--white);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 60px;
    height: 60px;
    background-color: var(--primary-red);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 24px;
    color: var(--white);
    box-shadow: 0 0 15px rgba(211, 47, 47, 0.5);
    overflow: hidden; /* memastikan gambar tidak keluar dari container bulat */
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* memastikan gambar mengisi container tanpa distorsi */
    border-radius: 50%; /* membuat gambar bulat */
}

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.company-name span {
    color: var(--primary-red);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Desktop Toggle Button */
.desktop-toggle {
    position: fixed;
    top: 25px;
    left: 20px;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none; /* Sembunyi default */
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.desktop-toggle:hover {
    background: var(--dark-red);
    transform: scale(1.1);
}

/* Tampilkan di desktop */
@media (min-width: 769px) {
    /* Tampilkan tombol desktop toggle */
    .desktop-toggle {
        display: flex;
        left: 315px;
        transition: left 0.3s ease;
    }

    /* Sembunyikan tombol menu mobile */
    .menu-toggle {
        display: none;
    }

    /* Sidebar default tertutup */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    /* Sidebar terbuka */
    .sidebar.open {
        transform: translateX(0);
    }

    /* Main content default tanpa margin jika sidebar tertutup */
    .main-content {
        margin-left: 0;
        transition: margin-left 0.3s ease;
    }

    /* Main content bergeser saat sidebar terbuka */
    .main-content.expanded {
        margin-left: 250px;
    }
}

/* Animasi tombol desktop */
.desktop-toggle i {
    transition: transform 0.3s ease;
}

.sidebar.open ~ .desktop-toggle i {
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .desktop-toggle {
        display: none !important;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 82px;
    left: 0;
    width: 250px;
    height: calc(100vh - 82px);
    background: var(--black);
    color: var(--white);
    transition: all 0.3s ease;
    z-index: 900;
    overflow-y: auto;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
    /* Pastikan sidebar tersembunyi secara default di desktop */
    transform: translateX(-100%);
}

/* Ketika sidebar dibuka */
.sidebar.open {
    transform: translateX(0);
}

/* Atur margin konten utama */
.main-content {
    margin-left: 0;
    transition: all 0.3s ease;
}

/* Ketika sidebar terbuka di desktop */
.sidebar.open ~ .main-content {
    margin-left: 250px;
}

@media (min-width: 769px) {
    .desktop-toggle {
        display: flex;
    }
    
    /* Geser tombol saat sidebar terbuka */
    .sidebar.open ~ .desktop-toggle {
        left: calc(250px + 20px);
    }
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.sidebar-menu a i {
    margin-right: 10px;
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: var(--primary-red);
    padding-left: 25px;
}

.search-container {
    padding: 15px 20px;
    border-bottom: 1px solid var(--dark-gray);
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border-radius: 30px;
    border: 1px solid var(--dark-gray);
    background: var(--dark-gray);
    color: var(--white);
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    background: var(--white);
    color: var(--black);
    border-color: var(--primary-red);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--medium-gray);
}

/* Main Content */
.main-content {
    margin-left: 0px;
    margin-top: 82px;
    padding: 30px;
    transition: all 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

.page-title {
    font-size: 2.2rem;
    margin-bottom: 25px;
    color: var(--primary-red);
    position: relative;
    padding-bottom: 10px;
}

/* Home Page */
.hero-section {
    background: linear-gradient(rgba(91, 86, 86, 0.9), rgba(120, 119, 119, 0.8)), url('background.jpg') no-repeat center center;
    background-size: cover;
    border-radius: 10px;
    padding: 50px;
    color: var(--white);
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    line-height: 1.7;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-red);
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
}

.btn:hover {
    background: var(--dark-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(211, 47, 47, 0.4);
}

.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.info-card {
    background: var(--white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-red);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    color: var(--primary-red);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.info-card p {
    color: var(--medium-gray);
    line-height: 1.7;
}

.contact-info {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 40px 0;
}

.contact-info h3 {
    color: var(--primary-red);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-icon {
    background: var(--primary-red);
    color: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.contact-text h4 {
    margin-bottom: 5px;
    color: var(--black);
}

.contact-text p, .contact-text a {
    color: var(--medium-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-text a:hover {
    color: var(--primary-red);
}

/* Products Page */
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.product-img {
    height: 200px;
    background: var(--dark-gray);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 3rem;
}

.product-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-red);
}

.product-features {
    margin: 10px 0;
    padding-left: 20px;
}

.product-features li {
    margin-bottom: 5px;
    color: var(--medium-gray);
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--black);
    margin-top: auto;
    padding-top: 15px;
}

/* About Page */
.about-section {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.about-section h3 {
    color: var(--primary-red);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.about-section p {
    color: var(--medium-gray);
    line-height: 1.8;
    margin-bottom: 20px;
}

.history-section, .vision-section {
    margin-top: 40px;
}

.team-section {
    margin-top: 50px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.team-member {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.member-photo {
    height: 200px;
    background: var(--dark-gray);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 4rem;
}

.member-info {
    padding: 20px;
}

.member-info h4 {
    font-size: 1.2rem;
    color: var(--black);
    margin-bottom: 5px;
}

.member-info p {
    color: var(--primary-red);
    font-style: italic;
}

/* Contact Page */
.contact-form-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.contact-form {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--black);
    font-weight: 500;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--primary-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-map {
    background: var(--dark-gray);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-red);
    color: var(--white);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-3px);
    background: var(--dark-red);
}

/* Footer */
footer {
    background: var(--black);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-red);
}

.footer-col p, .footer-col a {
    color: var(--medium-gray);
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--primary-red);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid var(--dark-gray);
    color: var(--medium-gray);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Responsive Styles */
@media (max-width: 992px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-content.expanded {
        margin-left: 0;
    }
    
    .hero-section {
        padding: 30px 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    header {
        padding: 1rem;
    }
    
    .logo {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .company-name {
        font-size: 1.2rem;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .info-section {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Hover Animations */
.btn, .product-card, .sidebar-menu a, .social-link, .team-member, 
.footer-col a, .nav-link, .menu-toggle {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(211, 47, 47, 0.4);
}

.product-card:hover {
    transform: translateY(-7px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.sidebar-menu a:hover {
    transform: translateX(8px);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.15);
}

.team-member:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.footer-col a:hover {
    transform: translateX(5px);
}

.menu-toggle:hover {
    transform: rotate(90deg);
    color: var(--primary-red);
}

/* Pulse effect for product images */
.product-img {
    position: relative;
    overflow: hidden;
}

.product-img i {
    transition: all 0.5s ease;
}

.product-card:hover .product-img i {
    transform: scale(1.2);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* Floating animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.product-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.product-card:hover .product-img::after {
    opacity: 1;
    animation: float 3s ease-in-out infinite;
}

/* For touch devices */
.hover-effect {
    transform: scale(1.05) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
}

/* Gallery Styles */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 250px;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

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

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    background: rgba(255, 2, 2, 0.8);
}