:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --transition: all 0.3s ease;
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #ffffff;
    --footer-bg: #343a40;
    --nav-bg: #ffffff;
    --gallery-slide-width: 300px;
    --gallery-slide-height: 200px;
    --gallery-gap: 15px;
    --gallery-slides: 7;
}

/* Dark mode styles */
[data-theme="dark"] {
    --primary-color: #3498db;
    --secondary-color: #e74c3c;
    --light-gray: #2d3436;
    --dark-gray: #f8f9fa;
    --bg-color: #1a1a1a;
    --text-color: #f8f9fa;
    --card-bg: #2d3436;
    --footer-bg: #212529;
    --nav-bg: #1a1a1a;
}

.gallery-bg {
    background-color: var(--light-gray) !important;
}

[data-theme="dark"] .gallery-bg {
    background-color: var(--bg-color) !important;
}

.gallery-section {
    overflow: hidden;
    position: relative;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar {
    background-color: var(--nav-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    color: var(--text-color) !important;
    font-size: 1.8rem;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    bottom: 0;
    left: 0;
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 150px 0;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
    color: white; /* Keep white text on hero section */
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease;
    color: white; /* Keep white text on hero section */
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 50px;
    font-weight: 700;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.service-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.05) 100%);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.service-card:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.service-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    color: #e74c3c;
}

.service-card h3 {
    transition: all 0.3s ease;
}

.service-card:hover h3 {
    color: #e74c3c;
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.contact-info {
    margin-bottom: 30px;
}

.contact-info i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.map-container {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    border: 0;
}

footer {
    background-color: var(--footer-bg);
    color: white !important; /* Force white text */
    padding: 50px 0 20px;
}

/* Ensure all text in footer is white */
footer *:not(.text-dark, .text-dark *) {
    color: white !important;
}

/* Style links in footer */
footer a {
    color: #f8f9fa !important; /* Slightly off-white for better visibility */
    text-decoration: none;
    transition: var(--transition);
}

/* Hover effect for footer links */
footer a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Social icons in footer */
.social-icons a {
    color: var(--text-color) !important;
    background: rgba(0, 0, 0, 0.1);
}

.social-icons a:hover {
    background: var(--secondary-color);
    color: white !important;
}

/* Dark mode social icons */
[data-theme="dark"] .social-icons a {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .social-icons a:hover {
    background: var(--secondary-color);
    color: white !important;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    color: white;
    margin-right: 10px;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animation delays for staggered animations */
.animate-on-scroll.delay-1 { animation-delay: 0.2s; }
.animate-on-scroll.delay-2 { animation-delay: 0.3s; }
.animate-on-scroll.delay-3 { animation-delay: 0.4s; }

/* Footer HR styling */
footer hr {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero {
        padding: 100px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--secondary-color);
    color: white;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 50px;
    border-radius: 50%;
    display: none;
    z-index: 99;
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.8;
}

.back-to-top:hover {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* About Section - Fix text color in both light and dark modes */
#o-nama {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

#o-nama .container {
    background-color: transparent !important;
}

#o-nama *:not(.text-white, .text-white *) {
    color: var(--text-color) !important;
}

#o-nama .section-title {
    color: var(--primary-color) !important;
}

#o-nama .text-success {
    color: var(--secondary-color) !important;
}

#o-nama .bg-light {
    background-color: transparent !important;
}

/* Gallery Slider */
.gallery-section {
    overflow: hidden;
    position: relative;
}

.gallery-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.gallery-track {
    display: flex;
    gap: var(--gallery-gap);
    animation: scroll 30s linear infinite;
    width: max-content;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.gallery-slide {
    flex: 0 0 auto;
    width: var(--gallery-slide-width);
    height: var(--gallery-slide-height);
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-slide:hover {
    transform: scale(1.05);
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-slide:hover img {
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(calc(-1 * (var(--gallery-slides) * (var(--gallery-slide-width) + var(--gallery-gap)))), 0, 0);
    }
}

/* Pause animation on hover */
.gallery-track:hover {
    animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    :root {
        --gallery-slide-width: 250px;
        --gallery-slide-height: 150px;
    }

    .gallery-slide {
        width: var(--gallery-slide-width);
        height: var(--gallery-slide-height);
    }
    
    .gallery-track {
        animation: scroll 50s linear infinite;
    }
}

@media (max-width: 576px) {
    :root {
        --gallery-slide-width: 200px;
        --gallery-slide-height: 120px;
    }

    .gallery-slide {
        width: var(--gallery-slide-width);
        height: var(--gallery-slide-height);
    }
    
    .gallery-track {
        animation-duration: 15s;
    }
}