/* 
 * Custom CSS untuk PT. BIMASENA ADHIRAJASA RADHIKA (BARAK)
 * Melengkapi styling dari Tailwind CSS
 */

/* ===== ROOT VARIABLES ===== */
:root {
    --color-primary: #1e40af;
    --color-primary-dark: #1e3a8a;
    --color-accent: #dc2626;
    --color-accent-dark: #b91c1c;
    --color-support: #16a34a;
    --color-gray-light: #f9fafb;
    --color-gray-dark: #1f2937;
}

/* ===== BASE STYLES ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ENHANCEMENTS ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

p {
    line-height: 1.7;
}

/* ===== CUSTOM ANIMATIONS ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(30, 64, 175, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(30, 64, 175, 0.8);
    }
}

@keyframes slide-in-left {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-in-right {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== CUSTOM UTILITY CLASSES ===== */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.slide-in-left {
    animation: slide-in-left 0.8s ease-out;
}

.slide-in-right {
    animation: slide-in-right 0.8s ease-out;
}

/* ===== CUSTOM BUTTON STYLES ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(30, 64, 175, 0.3);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn-primary:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    transition: all 0.3s ease;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* ===== CUSTOM CARD STYLES ===== */
.service-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #e5e7eb;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-color: var(--color-primary);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-icon {
    transition: transform 0.3s ease;
}

.portfolio-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.portfolio-card:hover {
    transform: translateY(-5px);
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-image {
    transition: transform 0.5s ease;
}

/* ===== NAVBAR ENHANCEMENTS ===== */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== FORM STYLES ===== */
.form-input {
    transition: all 0.3s ease;
    border: 1px solid #d1d5db;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-input.error {
    border-color: var(--color-accent);
}

.form-input.success {
    border-color: var(--color-support);
}

/* ===== TIMELINE STYLES ===== */
.timeline-item {
    position: relative;
    padding-left: 2.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--color-primary);
    border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 1.5rem;
    width: 2px;
    height: calc(100% - 1rem);
    background-color: #e5e7eb;
}

.timeline-item:last-child::after {
    display: none;
}

/* ===== TESTIMONIAL STYLES ===== */
.testimonial-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 80px;
    color: var(--color-primary);
    opacity: 0.1;
    font-family: Georgia, serif;
}

/* ===== STATS COUNTER ===== */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* ===== LOADING ANIMATIONS ===== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 640px) {
    .mobile-menu {
        animation: slide-down 0.3s ease-out;
    }
    
    @keyframes slide-down {
        from {
            transform: translateY(-20px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 90%;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: none;
        color: black;
    }
    
    .service-card, .portfolio-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ===== ACCESSIBILITY ===== */
.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;
}

.focus-visible:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* ===== GRADIENT BACKGROUNDS ===== */
.gradient-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

.gradient-accent {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
}

.gradient-support {
    background: linear-gradient(135deg, var(--color-support), #0d8a3d);
}

/* ===== SHAPES & DECORATIONS ===== */
.shape-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1), rgba(30, 64, 175, 0.05));
    position: absolute;
    z-index: -1;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 173px solid rgba(220, 38, 38, 0.1);
    position: absolute;
    z-index: -1;
}

/* ===== PAGE TRANSITIONS ===== */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s, transform 0.5s;
}

.page-exit {
    opacity: 1;
    transform: translateY(0);
}

.page-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s, transform 0.5s;
}

/* ===== UTILITY CLASSES ===== */
.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

.perspective-1000 {
    perspective: 1000px;
}

.backface-hidden {
    backface-visibility: hidden;
}