/* Custom CSS for CV. Berkah Sandhi Abadi */

/* Root variables for consistent theming */
:root {
    --wood-brown: #8B4513;
    --wood-light: #D2691E;
    --wood-dark: #654321;
    --wood-accent: #F4A460;
    --wood-lighter: #DEB887;
}

/* Custom animations */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-grow {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wood-grain {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes navbar-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Apply animations */
.animate-fade-in-up {
    animation: fade-in-up 1s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-grow {
    animation: pulse-grow 2s ease-in-out infinite;
}

.animate-slide-in-left {
    animation: slide-in-left 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slide-in-right 0.8s ease-out forwards;
}

/* Custom Animations and Effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGrow {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Enhanced Navbar Styling */
#navbar {
    animation: navbar-slide-down 0.8s ease-out;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
    transition: all 0.3s ease-in-out;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(244, 164, 96, 0.2);
}

/* Navbar Color Transition */
.nav-link, .mobile-nav-link, #logo-title, #logo-subtitle, #mobile-menu-button {
    transition: color 0.3s ease-in-out;
}

#mobile-menu {
    transition: background-color 0.3s ease-in-out;
}

/* Enhanced Navigation Links */
.nav-link {
    position: relative;
    overflow: hidden;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--wood-brown), var(--wood-accent));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

.nav-link:hover {
    background: rgba(244, 164, 96, 0.1);
    color: var(--wood-brown) !important;
}

.nav-link.active {
    color: var(--wood-brown) !important;
    font-weight: 600;
}

/* Navbar Responsive Colors */
.navbar-transparent .nav-link,
.navbar-transparent .mobile-nav-link,
.navbar-transparent #logo-title,
.navbar-transparent #mobile-menu-button {
    color: white !important;
}

.navbar-transparent #logo-subtitle {
    color: #F4A460 !important;
}

.navbar-sticky .nav-link,
.navbar-sticky .mobile-nav-link,
.navbar-sticky #logo-title,
.navbar-sticky #mobile-menu-button {
    color: #374151 !important;
}

.navbar-sticky #logo-subtitle {
    color: #8B4513 !important;
}

/* Hero background parallax effect */
.hero-bg {
    animation: wood-grain 20s ease infinite;
    background-size: 400% 400%;
    filter: brightness(0.8) contrast(1.1);
}

/* Enhanced Hero Section */
#home {
    position: relative;
    overflow: hidden;
}

/* Removed brown backdrop overlay */
/*
#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(139, 69, 19, 0.85) 0%,
        rgba(101, 67, 33, 0.75) 50%,
        rgba(0, 0, 0, 0.65) 100%
    );
    z-index: 15;
}
*/

/* Enhanced Buttons */
.btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--wood-accent), var(--wood-light));
    border: none;
    box-shadow: 0 8px 25px rgba(244, 164, 96, 0.3);
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 35px rgba(244, 164, 96, 0.4);
}

.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-secondary:hover::before {
    width: 100%;
}

/* Enhanced Card Effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(244, 164, 96, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-hover::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--wood-accent), var(--wood-light), var(--wood-brown));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.card-hover:hover::before {
    opacity: 1;
}

.card-hover:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(139, 69, 19, 0.2);
}

/* Wood texture overlay */
.wood-texture {
    position: relative;
}

.wood-texture::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            rgba(139,69,19,0.08) 0px,
            rgba(139,69,19,0.08) 2px,
            transparent 2px,
            transparent 4px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(101,67,33,0.04) 0px,
            rgba(101,67,33,0.04) 1px,
            transparent 1px,
            transparent 3px
        );
    pointer-events: none;
}

/* Loading animation */
#preloader {
    background: linear-gradient(135deg, var(--wood-brown), var(--wood-light));
}

.loading-animation {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Enhanced Text Effects */
.text-gradient {
    background: linear-gradient(45deg, var(--wood-brown), var(--wood-accent), var(--wood-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: wood-grain 5s ease infinite;
    background-size: 400% 400%;
}

/* Enhanced Gallery Effects */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: all 0.4s ease;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(139,69,19,0.85), 
        rgba(244,164,96,0.7), 
        rgba(210,105,30,0.85)
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(139, 69, 19, 0.3);
}

.gallery-item .overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-item:hover .overlay-content {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Enhanced Form Effects */
.form-input {
    position: relative;
}

.form-input input:focus,
.form-input textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(244,164,96,0.4);
    border-color: var(--wood-accent);
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(244, 164, 96, 0.1);
    border-color: #F4A460;
}

/* Enhanced Back to Top Button */
#back-to-top {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(244, 164, 96, 0.3);
    backdrop-filter: blur(10px);
}

#back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

#back-to-top:not(.show) {
    transform: translateY(20px) scale(0.8);
}

#back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 35px rgba(244, 164, 96, 0.4);
}

/* Enhanced Section Dividers */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--wood-accent), var(--wood-brown), var(--wood-accent), transparent);
    margin: 5rem auto;
    width: 60%;
    border-radius: 1px;
}

/* Enhanced Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, #f1f1f1, #e8e8e8);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--wood-brown), var(--wood-dark));
    border-radius: 5px;
    border: 1px solid rgba(244, 164, 96, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--wood-dark), var(--wood-brown));
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .hero-bg {
        animation-duration: 30s;
    }
    
    .animate-fade-in-up {
        animation-duration: 0.8s;
    }
    
    .card-hover:hover {
        transform: translateY(-8px) scale(1.01);
    }

    .nav-link {
        padding: 12px 16px;
        margin: 4px 0;
    }

    #navbar {
        height: auto;
    }
}

@media (max-width: 480px) {
    .btn-primary, .btn-secondary {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .card-hover {
        margin-bottom: 20px;
    }
}

/* Enhanced Print Styles */
@media print {
    .fixed,
    #preloader,
    #back-to-top,
    .btn-primary,
    .btn-secondary {
        display: none !important;
    }
    
    * {
        animation: none !important;
        transition: none !important;
        box-shadow: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* Enhanced Accessibility */
@media (prefers-contrast: high) {
    .text-wood-brown {
        color: #000 !important;
    }
    
    .bg-wood-brown {
        background-color: #000 !important;
    }

    .nav-link:hover {
        background: #000 !important;
        color: #fff !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Enhanced Focus Styles */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--wood-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.nav-link:focus {
    background: rgba(244, 164, 96, 0.2);
    outline: 2px solid var(--wood-accent);
}

/* Enhanced Selection Colors */
::selection {
    background-color: var(--wood-accent);
    color: var(--wood-dark);
}

::-moz-selection {
    background-color: var(--wood-accent);
    color: var(--wood-dark);
}

/* Page-specific enhancements */
.page-header {
    background: linear-gradient(135deg, var(--wood-brown), var(--wood-dark));
    padding: 120px 0 80px;
    margin-top: 80px;
}

.breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 8px 20px;
    display: inline-block;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--wood-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

/* Enhanced Icon Animations */
.icon-float {
    transition: all 0.3s ease;
}

.icon-float:hover {
    transform: translateY(-8px) rotate(15deg) scale(1.1);
    color: var(--wood-accent);
}

/* Statistics Section */
.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--wood-accent);
}

/* Hero Slider Styles */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 1000ms ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide.active {
    opacity: 1 !important;
    z-index: 1;
}

.slide:not(.active) {
    opacity: 0;
    z-index: 0;
}

/* Slider Navigation Dots */
.slider-dot {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.slider-dot:hover {
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 1);
}

.slider-dot.active {
    background-color: rgba(255, 255, 255, 1) !important;
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Slider Arrow Controls */
.hero-slider button {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-slider button:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

/* Responsive adjustments for slider */
@media (max-width: 768px) {
    .hero-slider button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .slider-dot {
        width: 8px;
        height: 8px;
    }
}

/* Smooth Scrolling Enhancement */
html {
    scroll-behavior: smooth;
}

/* Loading States */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #8B4513;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Notification Styles Enhancement */
.notification {
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Gallery Lightbox Improvements */
.lightbox-backdrop {
    backdrop-filter: blur(5px);
}

/* Armada Gallery Styles */
.armada-gallery-modal {
    backdrop-filter: blur(10px);
}

.armada-gallery-modal .carousel-container {
    transition: all 0.3s ease;
}

.armada-gallery-modal .thumbnail-container {
    scrollbar-width: thin;
    scrollbar-color: var(--wood-accent) transparent;
}

.armada-gallery-modal .thumbnail-container::-webkit-scrollbar {
    height: 6px;
}

.armada-gallery-modal .thumbnail-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.armada-gallery-modal .thumbnail-container::-webkit-scrollbar-thumb {
    background: var(--wood-accent);
    border-radius: 3px;
}

.armada-gallery-modal .thumbnail-container::-webkit-scrollbar-thumb:hover {
    background: var(--wood-light);
}

/* Armada Gallery Animations */
.armada-fade-in {
    animation: armadaFadeIn 0.5s ease-out;
}

@keyframes armadaFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.armada-slide-in {
    animation: armadaSlideIn 0.4s ease-out;
}

@keyframes armadaSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Armada Thumbnail Styles */
.armada-thumbnail {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.armada-thumbnail:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

.armada-thumbnail.active {
    border-color: var(--wood-accent) !important;
    box-shadow: 0 0 15px rgba(244, 164, 96, 0.5);
}

/* Armada Navigation Buttons */
.armada-nav-btn {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.armada-nav-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Armada Modal Responsive */
@media (max-width: 768px) {
    .armada-gallery-modal .carousel-container {
        margin-top: 80px;
    }
    
    .armada-gallery-modal .thumbnail-container {
        padding: 0 10px;
    }
    
    .armada-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .armada-gallery-modal .main-image {
        max-height: 50vh;
    }
    
    .armada-thumbnail {
        width: 50px;
        height: 50px;
    }
}

/* Gallery Cards - Ensure clicks work */
.gallery-item {
    pointer-events: auto !important;
    cursor: pointer;
}

.gallery-item .cursor-pointer {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 1;
}

.gallery-item img {
    pointer-events: none; /* Prevent image from blocking clicks */
}

.gallery-item .absolute {
    pointer-events: none; /* Prevent overlay elements from blocking clicks */
}

/* Ensure gallery cards are clickable */
#proses-card,
#k3-card, 
#bibit-card,
#armada-card,
#cucipapan-card,
#sertifikat-card {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative;
    z-index: 1;
}