/* Custom CSS untuk CMS Teknologi */

/* Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Top Bar */
.top-bar {
    font-size: 0.875rem;
}

.top-bar a {
    transition: opacity 0.3s ease;
}

.top-bar a:hover {
    opacity: 0.8;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

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

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 70vh;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.8), rgba(0, 123, 255, 0.6));
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.jpg') center/cover;
    z-index: -1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.btn-hero {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Carousel */
.carousel-item {
    height: 70vh;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.carousel-caption {
    z-index: 2;
    bottom: 50%;
    transform: translateY(50%);
}

.carousel-caption h5 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carousel-caption p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Section Styles */
.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.service-card h4 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.service-card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.service-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 2rem;
}

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

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
}

/* Gallery Modal Responsive */
@media (max-width: 768px) {
    .modal {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .modal-dialog {
        margin: 0.25rem !important;
        max-width: calc(100vw - 0.5rem) !important;
        width: calc(100vw - 0.5rem) !important;
        height: auto !important;
        max-height: calc(100vh - 0.5rem) !important;
    }
    
    .modal-lg {
        max-width: calc(100vw - 0.5rem) !important;
    }
    
    .modal-content {
        max-height: calc(100vh - 0.5rem) !important;
        overflow: hidden !important;
        border-radius: 0.5rem !important;
        border: none !important;
    }
    
    #galleryModalImage {
        max-height: calc(100vh - 12rem) !important;
        max-width: 100% !important;
        object-fit: contain !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    .modal-body {
        padding: 0.5rem !important;
        overflow-y: auto !important;
        text-align: center !important;
        max-height: calc(100vh - 6rem) !important;
    }
    
    .modal-header {
        padding: 0.5rem !important;
        min-height: auto !important;
        flex-shrink: 0 !important;
    }
    
    .modal-title {
        font-size: 0.9rem !important;
        line-height: 1.2 !important;
    }
    
    .btn-close {
        padding: 0.25rem !important;
        margin: 0 !important;
    }
    
    /* Prevent body scroll and zoom - Enhanced */
    body.modal-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    /* Prevent modal backdrop from causing issues */
    .modal-backdrop {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
    }
    
    /* Ensure modal stays within bounds */
    .modal.show {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Prevent orphaned gallery images */
body > img[src*="uploads/gallery/"] {
    display: none !important;
}

/* Ensure modal images are properly contained */
.modal-body img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}



/* Clean up any stray images after modal close */
.modal:not(.show) ~ img[src*="uploads/gallery/"] {
    display: none !important;
}

/* Testimonials */
.testimonial-card {
    background: transparent;
    border-radius: 0;
    padding: 0.5rem;
    text-align: center;
    box-shadow: none;
    margin-bottom: 0.5rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.testimonial-stars {
    color: #ffc107;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 0.6rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.3;
}

.testimonial-author {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.85rem;
    margin-bottom: 0.1rem;
}

.testimonial-position {
    font-size: 0.75rem;
    color: var(--secondary-color);
    opacity: 0.8;
}

/* Testimonial Carousel for Mobile */
#testimonialCarousel {
    background: none !important;
}

#testimonialCarousel .carousel-inner {
    background: none !important;
}

#testimonialCarousel .carousel-item {
    background: none !important;
    height: auto !important;
}

#testimonialCarousel .carousel-item::before {
    display: none !important;
}

#testimonialCarousel .carousel-item.active {
    background: none !important;
    height: auto !important;
}

#testimonialCarousel .carousel-item.active::before {
    display: none !important;
}

#testimonialCarousel .carousel-inner::before,
#testimonialCarousel .carousel-inner::after,
#testimonialCarousel::before,
#testimonialCarousel::after {
    display: none !important;
}

#testimonialCarousel .carousel-control-prev,
#testimonialCarousel .carousel-control-next {
    width: 35px;
    height: 35px;
    background: rgba(0, 123, 255, 0.7);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    border: none;
}

#testimonialCarousel .carousel-control-prev {
    left: -15px;
}

#testimonialCarousel .carousel-control-next {
    right: -15px;
}

#testimonialCarousel .carousel-control-prev:hover,
#testimonialCarousel .carousel-control-next:hover {
    opacity: 1;
    background: rgba(0, 123, 255, 0.9);
}

#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Desktop Testimonial Carousel */
#testimonialCarouselDesktop {
    background: none !important;
}

#testimonialCarouselDesktop .carousel-inner {
    background: none !important;
}

#testimonialCarouselDesktop .carousel-item {
    background: none !important;
    height: auto !important;
}

#testimonialCarouselDesktop .carousel-item::before {
    display: none !important;
}

#testimonialCarouselDesktop .carousel-item.active {
    background: none !important;
    height: auto !important;
}

#testimonialCarouselDesktop .carousel-item.active::before {
    display: none !important;
}

#testimonialCarouselDesktop .carousel-inner::before,
#testimonialCarouselDesktop .carousel-inner::after,
#testimonialCarouselDesktop::before,
#testimonialCarouselDesktop::after {
    display: none !important;
}

#testimonialCarouselDesktop .carousel-control-prev,
#testimonialCarouselDesktop .carousel-control-next {
    width: 40px;
    height: 40px;
    background: rgba(0, 123, 255, 0.7);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    border: none;
}

#testimonialCarouselDesktop .carousel-control-prev {
    left: -20px;
}

#testimonialCarouselDesktop .carousel-control-next {
    right: -20px;
}

#testimonialCarouselDesktop .carousel-control-prev:hover,
#testimonialCarouselDesktop .carousel-control-next:hover {
    opacity: 1;
    background: rgba(0, 123, 255, 0.9);
}

#testimonialCarouselDesktop .carousel-control-prev-icon,
#testimonialCarouselDesktop .carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

@media (max-width: 767.98px) {
    #testimonialCarousel .testimonial-card {
        margin: 0 10px;
    }
}

/* Article Cards */
.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.article-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.article-content {
    padding: 1.5rem;
}

.article-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.article-excerpt {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Contact Form */
.contact-form {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-control {
    border-radius: 10px;
    border: 2px solid #eee;
    padding: 12px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-float a {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .carousel-caption h5 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
}

/* Admin Styles */
.admin-sidebar {
    background: var(--dark-color);
    min-height: 100vh;
    padding: 0;
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #495057;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.admin-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.admin-content {
    padding: 2rem;
    background: #f8f9fa;
    min-height: calc(100vh - 76px);
}

.stats-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
}

.stats-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.border-radius-custom {
    border-radius: 15px;
}

/* Visitor Statistics Widget */
.visitor-stats-widget {
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.visitor-stats-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.stat-item {
    padding: 0.5rem;
    transition: all 0.3s ease;
}

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

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .visitor-stats-widget {
        margin: 1rem 0;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
}

/* Animated counter effect */
.stat-number {
    animation: countUp 0.8s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}