/* ==========================================================================
   FST Theme - Main Stylesheet
   Faculty of Science and Technology
   ========================================================================== */

/* ==========================================================================
   CSS Variables & Design Tokens
   ========================================================================== */
:root {
    /* Colors - Modern Blue Palette */
    --color-primary: #2563eb;
    --color-primary-dark: #1e40af;
    --color-primary-light: #3b82f6;
    --color-secondary: #10b981;
    --color-accent: #f59e0b;
    --color-dark: #1f2937;
    --color-gray: #6b7280;
    --color-light-gray: #f3f4f6;
    --color-white: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --gradient-hero: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(30, 64, 175, 0.95) 100%);
    --gradient-overlay: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-dark);
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-dark);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-base);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo img {
    height: 60px;
    width: auto;
}

.site-title-wrapper {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
    line-height: 1.2;
}

.site-description {
    font-size: 0.875rem;
    color: var(--color-gray);
    margin: 0;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.primary-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.primary-menu li {
    position: relative;
}

.primary-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--color-dark);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color var(--transition-fast);
}

.primary-menu a::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 1.25rem;
    right: 1.25rem;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.primary-menu a:hover {
    color: var(--color-primary);
}

.primary-menu a:hover::after,
.primary-menu .current-menu-item a::after {
    transform: scaleX(1);
    transform-origin: left;
}

.primary-menu .current-menu-item a {
    color: var(--color-primary);
}

/* Parent menu with children - non-clickable */
.primary-menu li.menu-item-has-children>a {
    cursor: default;
}

.primary-menu li.menu-item-has-children>a:hover {
    color: var(--color-primary);
}

/* Dropdown Menu Styles */
.primary-menu li.menu-item-has-children {
    position: relative;
}

.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: 1000;
    list-style: none;
}

.primary-menu li.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu .sub-menu li {
    padding: 0;
}

.primary-menu .sub-menu a {
    padding: 0.75rem 1.25rem;
    display: block;
    color: var(--color-dark);
    transition: all var(--transition-fast);
	/* ditambahkan	 */
	white-space: nowrap;
}

.primary-menu .sub-menu a::after {
    display: none;
}

.primary-menu .sub-menu a:hover {
    background: var(--color-light-gray);
    color: var(--color-primary);
    padding-left: 1.5rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-dark);
    padding: 0.5rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 650px;
    display: flex;
    align-items: center;
    color: var(--color-white);
    overflow: hidden;
    background: var(--gradient-hero);
    /* Fallback background */
}

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

/* Dark Overlay for Text Readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Dark overlay instead of blue */
    z-index: 1;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--color-white);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.8;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

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

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-description {
    font-size: 1.125rem;
    color: var(--color-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--color-light-gray);
}

.card-content {
    padding: var(--spacing-md);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-dark);
}

.card-excerpt {
    color: var(--color-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--color-gray);
    margin-bottom: 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
    transition: gap var(--transition-fast);
}

.read-more:hover {
    gap: 0.75rem;
}

/* ==========================================================================
   Program Section
   ========================================================================== */
.program-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    border: 2px solid var(--color-primary-light);
    text-align: center;
}

.program-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--color-white);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: linear-gradient(135deg, #1a2332 0%, #0f1419 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 0;
    margin-top: 4rem;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1.7fr;
    gap: 3.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* About Column */
.footer-about .footer-logo {
    margin-bottom: 1.2rem;
}

.footer-logo-img {
    height: 60px;
    width: auto;
    filter: brightness(1.1);
}

.footer-brand {
    color: var(--color-white);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* Column Headings */
.footer-column h3 {
    color: var(--color-white);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary-light);
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Contact Section */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.contact-details {
    flex: 1;
}

.contact-details strong {
    display: block;
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}

.contact-details a {
    color: var(--color-primary-light);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
    display: block;
}

.contact-details a:hover {
    color: var(--color-primary);
}

.contact-details p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    line-height: 1.8;
    margin: 0;
}

/* Footer Bottom */
.footer-bottom {
    padding: 2rem 0;
}

.footer-bottom-content {
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0.3rem 0;
}

.footer-credits {
    font-size: 0.8rem !important;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding: 2.5rem 0 0;
        margin-top: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding-bottom: 2rem;
    }

    .footer-about {
        grid-column: auto;
        text-align: center;
    }

    .footer-logo {
        display: flex;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .footer-logo-img {
        height: 45px;
    }

    .footer-about .contact-item p {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .footer-column {
        padding: 0 1rem;
    }

    .footer-column h3 {
        font-size: 1rem;
        margin-bottom: 1.25rem;
        text-align: center;
    }

    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links {
        text-align: center;
    }

    .footer-links li {
        margin-bottom: 0.6rem;
    }

    .footer-links a {
        font-size: 0.9rem;
    }

    .footer-links a::before {
        display: none;
    }

    .footer-contact {
        gap: 1.5rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 0.5rem;
    }

    .contact-icon {
        font-size: 1.5rem;
    }

    .contact-details strong {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .contact-details a {
        font-size: 0.9rem;
    }

    .footer-bottom {
        padding: 1.5rem 0;
    }

    .footer-bottom p {
        font-size: 0.8rem;
        padding: 0 1rem;
        line-height: 1.6;
    }
}

/* ==========================================================================
   Responsive Design
   ==========================================================================*/
/* Responsive Design - Mobile */
@media (min-width: 993px) {
    .menu-toggle {
        display: none;
    }

    .primary-menu {
        display: flex !important;
    }
}

@media (max-width: 992px) {
    .site-header .container {
        padding: 0.75rem 1rem;
    }

    .site-logo img {
        height: 50px;
    }

    .menu-toggle {
        display: flex;
    }

    .primary-menu {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--color-white);
        box-shadow: var(--shadow-xl);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        padding: 1rem 0;
        z-index: 9999;
    }

    .primary-menu.active {
        display: block;
    }

    .primary-menu ul {
        flex-direction: column;
        gap: 0;
    }

    .primary-menu li {
        border-bottom: 1px solid var(--color-light-gray);
    }

    .primary-menu a {
        padding: 1rem 1.5rem;
        display: block;
    }

    .primary-menu a::after {
        display: none;
    }

    /* Dropdown adjustments for mobile */
    .primary-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--color-light-gray);
        border-radius: 0;
        padding: 0;
        min-width: auto;
        display: none;
    }

    .primary-menu li.menu-item-has-children>a::after {
        content: ' ▼';
        font-size: 0.7rem;
        margin-left: 0.5rem;
    }

    .primary-menu li.menu-item-has-children:hover .sub-menu,
    .primary-menu li.menu-item-has-children.active .sub-menu {
        display: block;
    }

    .primary-menu .sub-menu a {
        padding-left: 2.5rem;
        font-size: 0.9rem;
    }

    /* Hero Section Mobile */
    .hero-section {
        min-height: 500px;
    }

    .hero-content {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-cta .btn {
        width: 100%;
    }
}

/* Tablet and smaller */
@media (max-width: 768px) {
    .hero-section {
        min-height: 450px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .hero-section {
        min-height: 400px;
    }

    .hero-content {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }

    .btn {
        padding: 0.875rem 2rem;
        font-size: 0.95rem;
    }
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

@media (max-width: 768px) {
    .site-logo img {
        height: 45px;
    }

    .site-title {
        font-size: 1rem;
    }

    .site-description {
        font-size: 0.75rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

.bg-light {
    background-color: var(--color-light-gray);
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

/* ==========================================================================
   Animations & Keyframes
   ========================================================================== */

/* Keyframe Definitions */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Animation Classes */
.fade-in,
.slide-up,
.slide-left,
.slide-right,
.scale-in {
    opacity: 0;
}

.fade-in.animate-in {
    animation: fadeIn 0.8s ease forwards;
}

.slide-up.animate-in {
    animation: slideUp 0.8s ease forwards;
}

.slide-left.animate-in {
    animation: slideLeft 0.8s ease forwards;
}

.slide-right.animate-in {
    animation: slideRight 0.8s ease forwards;
}

.scale-in.animate-in {
    animation: scaleIn 0.6s ease forwards;
}

/* Stagger Delays for Multiple Elements */
.animate-in.delay-1 {
    animation-delay: 0.1s;
}

.animate-in.delay-2 {
    animation-delay: 0.2s;
}

.animate-in.delay-3 {
    animation-delay: 0.3s;
}

.animate-in.delay-4 {
    animation-delay: 0.4s;
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s ease infinite;
}

/* Scrolled Header State */
.site-header.scrolled {
    box-shadow: var(--shadow-lg);
}