/* ============================================
   Angkasawan Programme Website - Main Stylesheet
   Dark Blue Universe Theme
   ============================================ */

:root {
    --primary-dark: #0a1428;
    --primary-blue: #1a3a52;
    --accent-blue: #2563eb;
    --accent-cyan: #06b6d4;
    --text-light: #e0e7ff;
    --text-muted: #a0aec0;
    --bg-dark: #0f1419;
    --bg-darker: #050a0f;
    --border-color: #1e3a5f;
    --success: #10b981;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--primary-dark) 50%, var(--bg-dark) 100%);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Starfield Background Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 60px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 50px, #ddd, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 10px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 5s infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header & Navigation */
header {
    background: rgba(10, 20, 40, 0.95);
    border-bottom: 2px solid var(--accent-cyan);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-cyan);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--accent-blue);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--accent-cyan);
}

nav a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--accent-cyan);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 600px;
    background: linear-gradient(135deg, rgba(26, 58, 82, 0.8) 0%, rgba(10, 20, 40, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--accent-blue);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(30px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: var(--bg-dark);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
    border-color: var(--accent-cyan);
}

.cta-button-secondary {
    background: transparent;
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
    margin-left: 1rem;
}

.cta-button-secondary:hover {
    background: rgba(6, 182, 212, 0.1);
}

/* Main Content */
main {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 400px);
}

section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

section:last-of-type {
    border-bottom: none;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--accent-cyan);
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent-blue);
}

h4 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-light);
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Cards */
.card {
    background: rgba(26, 58, 82, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    transform: translateY(-5px);
}

.card h3 {
    margin-top: 0;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.grid-item {
    background: rgba(26, 58, 82, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.grid-item:hover {
    border-color: var(--accent-cyan);
    background: rgba(26, 58, 82, 0.6);
    transform: translateY(-5px);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.image-container {
    margin: 2rem 0;
    text-align: center;
}

.image-container img {
    max-width: 100%;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    border: 1px solid var(--border-color);
}

/* Lists */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* Links */
a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

a[rel="nofollow"] {
    opacity: 0.8;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(26, 58, 82, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

th {
    background: rgba(37, 99, 235, 0.3);
    color: var(--accent-cyan);
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--accent-blue);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
}

tr:hover {
    background: rgba(37, 99, 235, 0.1);
}

/* Footer */
footer {
    background: rgba(10, 20, 40, 0.95);
    border-top: 2px solid var(--accent-cyan);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--accent-cyan);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    margin-left: 0;
}

.footer-section a {
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-cyan);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--accent-cyan);
}

.breadcrumb span {
    color: var(--text-muted);
}

/* Forms */
input, textarea, select {
    width: 100%;
    padding: 0.8rem;
    background: rgba(26, 58, 82, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 5px;
    font-family: inherit;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

button {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: var(--bg-dark);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--primary-dark);
        padding: 1rem;
        gap: 1rem;
        border-bottom: 2px solid var(--accent-cyan);
    }

    nav ul.active {
        display: flex;
    }

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

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

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

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

    .cta-button-secondary {
        margin-left: 0;
        margin-top: 1rem;
        display: block;
    }

    section {
        padding: 40px 0;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1.4rem;
    }

    .hero {
        min-height: 400px;
        padding: 40px 15px;
    }

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

    .hero p {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .card, .grid-item {
        padding: 1rem;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

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

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.p-3 { padding: 3rem; }

.hidden {
    display: none;
}

.visible {
    display: block;
}

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

.animate-in {
    animation: slideInUp 0.6s ease-out;
}

/* Print Styles */
@media print {
    header, footer, nav {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
    }
}
