/* 
 * POLITEKNIK LP3I PEKANBARU
 * FINAL PERFECT CSS v3.0
 * 100% Mobile Optimized - Tested & Perfected
 */

/* ==========================================
   CSS VARIABLES
   ========================================== */
:root {
    --topbar-height: 42px;
    
    --primary: #0056b3;
    --primary-dark: #003d82;
    --primary-light: #4d8bd9;
    --primary-rgb: 0, 86, 179;
    
    --secondary: #ff6b35;
    --secondary-rgb: 255, 107, 53;
    
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: 0.3s ease;
    
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
}

/* ==========================================
   RESET & BASE
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

section {
    padding: 5rem 0;
}

/* ==========================================
   TYPOGRAPHY - RESPONSIVE
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.2;
}

/* Mobile First */
.display-1 { font-size: 2.5rem; }
.display-2 { font-size: 2.25rem; }
.display-3 { font-size: 2rem; }
.display-4 { font-size: 1.75rem; }
.display-5 { font-size: 1.5rem; }

.lead { 
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.8;
}

/* Tablet */
@media (min-width: 768px) {
    .display-1 { font-size: 4rem; }
    .display-2 { font-size: 3.5rem; }
    .display-3 { font-size: 3rem; }
    .display-4 { font-size: 2.5rem; }
    .display-5 { font-size: 2rem; }
}

/* Desktop */
@media (min-width: 1200px) {
    .display-1 { font-size: 5rem; }
    .display-2 { font-size: 4.5rem; }
}

/* ==========================================
   NAVBAR - PERFECT MOBILE & DESKTOP
   ========================================== */
.top-bar {
    background: var(--primary);
    font-size: 0.875rem;
}

.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
}

/* Logo Sizing - FIXED */
.navbar-brand img {
    height: 50px;
    transition: height 0.3s ease;
}

@media (max-width: 991px) {
    .navbar {
        padding: 0.5rem 0 !important;
        box-shadow: var(--shadow-md) !important;
    }
    
    .navbar-brand img {
        height: 40px !important; /* Smaller on mobile */
    }
    
    .brand-text {
        display: none !important;
    }
}

/* Hamburger Menu */
.navbar-toggler {
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

/* ==========================================
   HERO SLIDER - PERFECT RESPONSIVE
   ========================================== */
.hero-slider {
    position: relative;
    width: 100%;
    min-height: 100svh; /* FIX mobile modern */
    overflow: hidden;
}

.hero-slide {
    min-height: 100svh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-row {
    min-height: calc(100svh - var(--navbar-height, 80px));
}

/* LIGHTER OVERLAY - GAMBAR LEBIH TERANG */
.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 100%;
}

/* TEXT SHADOW FOR READABILITY */
.hero-content h1,
.hero-content .lead,
.hero-content .badge {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

/* Mobile Optimization */
@media (max-width: 576px) {
    .hero-slider,
    .hero-slide {
        height: 100vh;
        min-height: 650px;
        max-height: 100vh;
    }
    
    .hero-content {
        padding: 80px 1rem 1rem !important; /* Account for navbar */
    }
    
    .hero-content .badge {
        font-size: 0.75rem !important;
        padding: 0.5rem 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-content h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-content .lead {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1.5rem !important;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .hero-slider,
    .hero-slide {
        min-height: 700px;
    }
    
    .hero-content h1 {
        font-size: 2.25rem !important;
    }
}

/* Hero Buttons - RESPONSIVE */
.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-buttons .btn {
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.95rem;
}

@media (min-width: 576px) {
    .hero-buttons {
        flex-direction: row;
    }
}

/* Swiper Controls - MOBILE FRIENDLY */
.swiper-button-next,
.swiper-button-prev {
    width: 35px !important;
    height: 35px !important;
    border-radius: 50%;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--primary) !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.25rem !important;
    color: white !important;
    font-weight: bold !important;
}

@media (max-width: 768px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 35px !important;
        height: 35px !important;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 1rem !important;
    }
}

.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: white;
    width: 25px;
    border-radius: 5px;
}

/* Scroll Indicator - DON'T OVERLAP */
.scroll-down {
    position: absolute;
    bottom: 80px; /* Higher to avoid WA button */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

@media (max-width: 768px) {
    .scroll-down {
        bottom: 90px !important;
    }
}

.scroll-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 50%;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ==========================================
   STATISTICS - NO OVERLAP
   ========================================== */
.statistics-section {
    background: linear-gradient(-45deg, var(--primary), var(--primary-dark), var(--primary), var(--primary-light));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    padding: 4rem 0;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.stat-glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 2rem 1rem;
    text-align: center;
    transition: var(--transition);
}

.stat-glass-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-10px);
}

.stat-glass-card .count {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
}

@media (max-width: 768px) {
    .stat-glass-card {
        margin-bottom: 1rem;
        padding: 1.5rem 1rem;
    }
    
    .stat-glass-card .count {
        font-size: 2rem;
    }
}

/* ==========================================
   EXPERIENCE BADGE - NO OVERLAP
   ========================================== */
.experience-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 2;
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .experience-badge {
        bottom: 10px;
        left: 10px;
        padding: 1rem;
    }
    
    .experience-badge h2 {
        font-size: 2rem !important;
    }
    
    .experience-badge p {
        font-size: 0.875rem !important;
    }
}

/* ==========================================
   CARDS - PREMIUM
   ========================================== */
.card-premium {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-premium:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   BUTTONS - OPTIMIZED
   ========================================== */
.btn {
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

/* ==========================================
   WHATSAPP BUTTON - NO OVERLAP
   ========================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 25px;
    z-index: 996; /* Lower than modals */
}

.whatsapp-float a {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    animation: pulseWhatsApp 2s ease-in-out infinite;
}

.whatsapp-float a:hover {
    transform: scale(1.1);
    animation: none;
}

@keyframes pulseWhatsApp {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 8px 30px rgba(37, 211, 102, 0.7), 0 0 0 20px rgba(37, 211, 102, 0);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 30px;
        right: 20px;
    }
    
    .whatsapp-float a {
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
    }
}

/* ==========================================
   BACK TO TOP - NO OVERLAP
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 995;
    box-shadow: var(--shadow-lg);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 100px;
        right: 32px;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.py-7 { padding: 5rem 0; }
.mb-6 { margin-bottom: 4rem; }
.mt-6 { margin-top: 4rem; }

@media (max-width: 768px) {
    section { padding: 3rem 0; }
    .py-7 { padding: 3rem 0; }
    .mb-6 { margin-bottom: 2rem; }
    .mt-6 { margin-top: 2rem; }
}

/* Image Effects */
.img-hover-zoom {
    overflow: hidden;
    border-radius: var(--radius-md);
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Icon Wrapper */
.icon-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin: 0 auto;
}

/* Soft background colors */
.bg-primary-soft {
    background-color: rgba(13, 110, 253, 0.12);
}

.bg-success-soft {
    background-color: rgba(25, 135, 84, 0.12);
}

.bg-warning-soft {
    background-color: rgba(255, 193, 7, 0.15);
}

.icon-box {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

/* Float Animation */
.float-animation {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ==========================================
   SCROLLBAR
   ========================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    .whatsapp-float,
    .scroll-down {
        display: none !important;
    }
}