/**
 * Main Stylesheet
 * PT GenbaTek Sistem Indonesia - Company Profile Website
 */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Global Page Skeleton Loading */
.page-skeleton {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #f5f7fb;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.page-skeleton.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-skeleton-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.skeleton-block {
    border-radius: 10px;
    background: linear-gradient(90deg, #e7ebf3 25%, #f2f5fb 50%, #e7ebf3 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s linear infinite;
}

.skeleton-nav {
    height: 56px;
    margin-bottom: 18px;
}

.skeleton-hero {
    height: 180px;
    margin-bottom: 20px;
}

.skeleton-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.skeleton-card {
    height: 230px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 991.98px) {
    .skeleton-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .page-skeleton-inner {
        padding: 16px;
    }

    .skeleton-hero {
        height: 120px;
    }

    .skeleton-row {
        grid-template-columns: 1fr;
    }

    .skeleton-card {
        height: 180px;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #1a1a1a;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Navbar Styling */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-search-item {
    display: flex;
    align-items: center;
}

.nav-search-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}

.nav-search-link::after {
    display: none;
}

.nav-search-link i {
    pointer-events: none;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 100vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,64L48,80C96,96,192,128,288,128C384,128,480,96,576,90.7C672,85,768,107,864,112C960,117,1056,107,1152,96C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat center;
    background-size: cover;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(20px); }
}

/* Cards */
.card {
    border-radius: 10px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 5px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Sections */
section {
    padding: 5rem 0;
}

section h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* About - Team readability */
.team-card {
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.team-card .card-body {
    padding: 1.25rem 1.15rem 1.35rem;
}

.team-name {
    font-size: 1.32rem;
    line-height: 1.25;
    letter-spacing: 0.01em;
    margin-bottom: 0.35rem;
}

.team-position {
    font-size: 1.02rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.8rem;
}

.team-bio {
    font-size: 0.98rem;
    line-height: 1.8;
    color: #1f2937;
    text-align: left;
    margin: 0;
}

@media (max-width: 767.98px) {
    .team-name {
        font-size: 1.16rem;
    }

    .team-position,
    .team-bio {
        font-size: 0.95rem;
    }
}

/* Footer */
footer {
    background-color: #0f0f0f;
    border-top: 1px solid var(--primary-color);
    color: #d7deea;
}

footer h5,
footer h6 {
    color: #ffffff;
}

footer p,
footer li,
footer span {
    color: #d7deea;
}

footer a {
    color: #f8fbff;
    text-decoration: none;
}

footer a:hover {
    color: var(--primary-color);
}

footer hr {
    border-color: rgba(255, 255, 255, 0.18);
    opacity: 1;
}

footer ul li {
    margin-bottom: 0.5rem;
}

.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
    color: var(--primary-color) !important;
}

/* Badge */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
}

.page-link:hover {
    color: var(--secondary-color);
    background-color: #e9ecef;
}

.page-link.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Forms */
.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Utilities */
.min-vh {
    min-height: 100vh;
}

.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-gradient-dark {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Blog */
.blog-card {
    border-left: 4px solid var(--primary-color);
}

.blog-card:hover {
    border-left-color: var(--secondary-color);
}

.blog-meta {
    font-size: 0.9rem;
    color: #999;
}

/* Admin Panel */
.sidebar {
    min-height: 100vh;
    background-color: #1a1a1a;
    padding: 2rem 0;
}

.sidebar .nav-link {
    color: #fff;
    border-left: 3px solid transparent;
    padding-left: 1.5rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    border-left-color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    
    section {
        padding: 3rem 0;
    }
    
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }

    .nav-search-link {
        justify-content: flex-start;
        min-width: 0;
        min-height: 0;
        padding-left: 0;
        padding-right: 0;
    }
    
    section h2::after {
        width: 40px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .display-4 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* Responsive refinements for mobile UX */
img,
video,
iframe {
    max-width: 100%;
}

@media (max-width: 991.98px) {
    .sticky-top {
        position: static !important;
        top: auto !important;
    }
}

@media (max-width: 767.98px) {
    .card:hover {
        transform: none;
    }

    .social-links .btn {
        width: 100%;
        margin-right: 0 !important;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.35rem;
        justify-content: center;
    }

    .page-link {
        padding: 0.375rem 0.65rem;
    }

    .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    .card iframe {
        height: min(62vw, 320px) !important;
    }
}

/* Loading Animation */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert */
.alert {
    border-radius: 5px;
    border-left: 4px solid var(--primary-color);
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
