/* Modern Homepage Style - SPMB Politeknik Indonusa */
/* Inspired by SPMB UNS with Politeknik Indonusa branding */

/* Performance Optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body.homepage {
    overflow-x: hidden;
}

/* Hardware acceleration untuk animasi */
.quick-menu-section::before,
.content-pattern,
.brosur-section::before,
.pengumuman-section-wrapper,
.informasi-section-wrapper,
section[style*="linear-gradient(135deg, #007bff, #0056b3)"]::before {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

:root {
    --primary-color: #0056b3;
    --secondary-color: #007bff;
    --dark-color: #004494;
    --light-bg: #f8f9fa;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --hover-shadow: 0 8px 30px rgba(0,0,0,0.15);
    /* Unified Site Pattern (modern academic dots + grid + subtle cross) */
    --pattern-unified: 
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230056b3' fill-opacity='0.10'%3E%3Ccircle cx='40' cy='40' r='2'/%3E%3Ccircle cx='0' cy='0' r='2'/%3E%3Ccircle cx='0' cy='80' r='2'/%3E%3Ccircle cx='80' cy='0' r='2'/%3E%3Ccircle cx='80' cy='80' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        repeating-linear-gradient(0deg, transparent, transparent 36px, rgba(0,86,179,0.06) 36px, rgba(0,86,179,0.06) 37px),
        repeating-linear-gradient(90deg, transparent, transparent 36px, rgba(0,86,179,0.06) 36px, rgba(0,86,179,0.06) 37px),
        repeating-linear-gradient(45deg, rgba(0,86,179,0.05), rgba(0,86,179,0.05) 2px, transparent 2px, transparent 28px),
        repeating-linear-gradient(-45deg, rgba(0,86,179,0.04), rgba(0,86,179,0.04) 2px, transparent 2px, transparent 28px);
}

/* Animated background keyframes (subtle parallax drift) - ULTRA Optimized for performance */
@keyframes spmbPatternDrift {
    0% { 
        background-position: 0 0;
    }
    100% { 
        background-position: 100px 100px;
    }
}

/* Disable animation untuk user yang prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .quick-menu-section::before,
    .content-pattern,
    .brosur-section::before,
    .pengumuman-section-wrapper,
    .informasi-section-wrapper,
    section[style*="linear-gradient(135deg, #007bff, #0056b3)"]::before {
        animation: none !important;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 500px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%), 
                url('https://poltekindonusa.ac.id/wp-content/uploads/2014/10/4-scaled.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 0;
    padding: 100px 0 80px 0;
}

/* Video Background */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.85) 0%, rgba(0, 86, 179, 0.90) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 40px 0;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
    animation: fadeInUp 1s ease;
}

.hero-cta {
    animation: fadeInUp 1.2s ease;
}

.btn-hero {
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px;
    margin: 10px;
    transition: all 0.3s ease;
    border: 2px solid white;
    background: white;
    color: var(--primary-color);
    font-weight: 600;
}

.btn-hero:hover {
    background: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn-hero.outline {
    background: transparent;
    color: white;
}

.btn-hero.outline:hover {
    background: white;
    color: var(--primary-color);
}

/* Quick Menu Cards */
.quick-menu-section {
    padding: 60px 0;
    background: var(--light-bg);
    position: relative;
    overflow: hidden;
}

.quick-menu-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--pattern-unified);
    background-size: 100px 100px;
    opacity: 1;
    animation: spmbPatternDrift 90s linear infinite alternate;
    z-index: 0;
    pointer-events: none;
}

.quick-menu-section .container,
.quick-menu-section .section-title,
.quick-menu-section .row {
    position: relative;
    z-index: 1;
}

/* Content Section Pattern */
.content-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    background-image: var(--pattern-unified);
    background-size: 100px 100px;
    opacity: 1;
    animation: spmbPatternDrift 90s linear infinite alternate;
    z-index: 0;
    pointer-events: none;
}

/* Equal height columns untuk cards */
.row.equal-height {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

.row.equal-height > [class*='col-'] {
    display: flex;
    flex-direction: column;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.section-title p {
    font-size: 18px;
    color: #666;
}

.menu-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    height: 100%;
    border: 2px solid transparent;
}

.menu-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary-color);
}

.menu-card-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.3);
    transition: all 0.3s ease;
}

.menu-card:hover .menu-card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(0, 86, 179, 0.4);
}

.menu-card-icon img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.menu-card-icon.has-logo {
    background: white;
    border: 3px solid var(--primary-color);
}

.menu-card-icon.has-logo img {
    width: 65px;
    height: 65px;
    filter: none;
}

/* Special styling untuk icon graduation cap */
.menu-card-icon.icon-graduation {
    background: linear-gradient(135deg, #004494, #0056b3);
    border: 3px solid #007bff;
}

.menu-card-icon.icon-graduation i {
    color: #4da3ff;
    font-size: 42px;
}

.menu-card:hover .menu-card-icon.icon-graduation {
    background: linear-gradient(135deg, #0056b3, #007bff);
    border-color: #4da3ff;
    box-shadow: 0 12px 30px rgba(77, 163, 255, 0.4);
}

.menu-card:hover .menu-card-icon.icon-graduation i {
    color: #4da3ff;
}

.menu-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.menu-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.menu-card .btn {
    background: #0056b3;
    color: white;
    border-radius: 25px;
    padding: 8px 25px;
    border: none;
    transition: all 0.3s ease;
}

.menu-card .btn:hover {
    background: #004494;
    transform: scale(1.05);
}

/* Modern Panel Styling */
.modern-panel {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    overflow: hidden;
    border: none;
}

.modern-panel-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 20px 25px;
    border-bottom: none;
}

.modern-panel-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: white;
}

.modern-panel-header i {
    margin-right: 10px;
}

.modern-panel-body {
    padding: 30px 25px;
}

/* Article List Modern */
.article-item {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin-bottom: 15px;
}

.article-item:hover {
    background: var(--light-bg);
    transform: translateX(10px);
}

.article-item:last-child {
    border-bottom: none;
}

.article-title-main {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.article-title-main:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
}

.article-meta-item {
    color: #666;
}

.article-meta-item i {
    color: var(--primary-color);
    margin-right: 5px;
}

.article-content {
    color: #555;
    line-height: 1.8;
}

/* Brosur Section */
.brosur-section {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.brosur-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--pattern-unified);
    background-size: 100px 100px;
    animation: spmbPatternDrift 90s linear infinite alternate;
    z-index: 0;
    pointer-events: none;
}

.brosur-section::after { content: none; }

.brosur-section > * {
    position: relative;
    z-index: 1;
}

.brosur-header {
    text-align: center;
    margin-bottom: 30px;
}

.brosur-header h2 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 15px;
}

.info-alert {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: none;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
}

.brosur-actions {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    width: 100%;
}

.btn-brosur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
    height: 56px;
    line-height: 56px; /* normalize with bootstrap .btn */
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    flex: 1 1 320px; /* kedua tombol akan sama panjang */
    white-space: nowrap; /* hindari teks turun baris */
    box-sizing: border-box;
}

.btn-brosur::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn-brosur:hover::before {
    left: 100%;
}

.btn-brosur:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn-brosur i {
    margin-right: 10px;
    font-size: 18px;
    line-height: 1; /* pastikan icon tidak menambah tinggi */
}

/* Tingkatkan spesifisitas untuk menimpa bootstrap .btn */
.brosur-actions .btn.btn-brosur {
    height: 56px !important;
    padding: 0 32px !important;
    line-height: 56px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-brosur.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
    min-width: 260px;
}

.btn-brosur.btn-success {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
    min-width: 260px;
}

.btn-brosur.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004494);
    box-shadow: 0 10px 25px rgba(0, 86, 179, 0.5);
}

.btn-brosur.btn-success:hover {
    background: linear-gradient(135deg, #0056b3, #004494);
    box-shadow: 0 10px 25px rgba(0, 86, 179, 0.5);
}

.flipbook-wrapper {
    background: #f5f5f5;
    padding: 30px;
    border-radius: 15px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
}

.flipbook-wrapper iframe {
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    padding: 60px 0;
    color: white;
}

/* Call to Action Section Pattern */
section[style*="linear-gradient(135deg, #007bff, #0056b3)"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--pattern-unified);
    background-size: 100px 100px;
    opacity: 0.25;
    animation: spmbPatternDrift 90s linear infinite alternate;
    z-index: 0;
    pointer-events: none;
}

section[style*="linear-gradient(135deg, #007bff, #0056b3)"] .container {
    position: relative;
    z-index: 1;
}

.stat-box {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.stat-label {
    font-size: 16px;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .menu-card {
        margin-bottom: 20px;
    }
    
    .brosur-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-brosur {
        width: 100%;
        flex: 1 1 auto;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Loading Animation for Cards */
.menu-card,
.article-item {
    animation: fadeInUp 0.6s ease both;
}

.menu-card:nth-child(1) { animation-delay: 0.1s; }
.menu-card:nth-child(2) { animation-delay: 0.2s; }
.menu-card:nth-child(3) { animation-delay: 0.3s; }
.menu-card:nth-child(4) { animation-delay: 0.4s; }
.menu-card:nth-child(5) { animation-delay: 0.5s; }
.menu-card:nth-child(6) { animation-delay: 0.6s; }

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--secondary-color);
    color: var(--dark-color);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* Hero Background Pattern */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.02) 10px,
        rgba(255, 255, 255, 0.02) 20px
    );
    z-index: 1;
    pointer-events: none;
}

/* Pengumuman Card Layout */
.pengumuman-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    padding: 0;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.pengumuman-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary-color);
}

.pengumuman-card-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 30px 25px;
    text-align: center;
    font-size: 36px;
}

.pengumuman-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 20px 20px 15px 20px;
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pengumuman-card-meta {
    padding: 0 20px;
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
}

.pengumuman-card-meta i {
    color: var(--primary-color);
    margin-right: 5px;
}

.pengumuman-card-content {
    padding: 0 20px 20px 20px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    flex-grow: 1;
}

.pengumuman-card-content p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pengumuman-card-footer {
    background: #f8f9fa;
    padding: 12px 20px;
    border-top: 1px solid #e9ecef;
    color: #0056b3;
    font-size: 13px;
    font-weight: 600;
}

.pengumuman-card-footer i {
    margin-right: 5px;
}

/* Pengumuman Section Background */
.pengumuman-section-wrapper {
    position: relative;
    padding: 40px 0;
    margin: 0 -15px;
    background-image: var(--pattern-unified);
    background-size: 100px 100px;
    animation: spmbPatternDrift 90s linear infinite alternate;
}

.pengumuman-section-wrapper::before { content: none; }

.pengumuman-section-wrapper > * {
    position: relative;
    z-index: 1;
}

/* Responsive untuk pengumuman cards */
@media (max-width: 992px) {
    .pengumuman-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .pengumuman-card-title {
        font-size: 16px;
        min-height: auto;
    }
    
    .pengumuman-card-header {
        padding: 20px 15px;
        font-size: 28px;
    }
}

/* Informasi Card Layout (sama seperti Pengumuman) */
.informasi-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    padding: 0;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.informasi-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
    border-color: #ffa900;
}

.informasi-card-header {
    background: linear-gradient(135deg, #ffa900, #ff8c00);
    color: white;
    padding: 30px 25px;
    text-align: center;
    font-size: 36px;
}

.informasi-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 20px 20px 15px 20px;
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.informasi-card-meta {
    padding: 0 20px;
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
}

.informasi-card-meta i {
    color: #ffa900;
    margin-right: 5px;
}

.informasi-card-content {
    padding: 0 20px 20px 20px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    flex-grow: 1;
}

.informasi-card-content p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.informasi-card-footer {
    background: #fff9f0;
    padding: 12px 20px;
    border-top: 1px solid #ffe4b3;
    color: #ff8c00;
    font-size: 13px;
    font-weight: 600;
}

.informasi-card-footer i {
    margin-right: 5px;
}

/* Informasi Section Background */
.informasi-section-wrapper {
    position: relative;
    padding: 40px 0;
    margin: 0 -15px;
    background-image: var(--pattern-unified);
    background-size: 100px 100px;
    animation: spmbPatternDrift 90s linear infinite alternate;
}

.informasi-section-wrapper::before { content: none; }

.informasi-section-wrapper > * {
    position: relative;
    z-index: 1;
}

/* Responsive untuk informasi cards */
@media (max-width: 992px) {
    .informasi-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .informasi-card-title {
        font-size: 16px;
        min-height: auto;
    }
    
    .informasi-card-header {
        padding: 20px 15px;
        font-size: 28px;
    }
}

