/* --- Global Reset & Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;600&family=Orbitron:wght@400;700&display=swap');

:root {
    /* Theme Colors from Video */
    --bg-dark: #0f172a;       /* Deep Navy Background */
    --bg-card: #1e293b;       /* Lighter Navy for cards */
    --primary-color: #7c3aed; /* Electric Purple */
    --secondary-color: #2563eb; /* Bright Blue */
    --accent-cyan: #06b6d4;   /* Cyan Glow */
    --text-light: #f8fafc;
    --text-gray: #94a3b8;
    
    --gradient-main: linear-gradient(135deg, #7c3aed, #2563eb);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    background-color: var(--bg-dark); 
    color: var(--text-light); 
    font-family: 'Exo 2', sans-serif; /* Techy Body Font */
    line-height: 1.6; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

h1, h2, h3, .logo, .btn {
    font-family: 'Orbitron', sans-serif; /* Futuristic Header Font */
    letter-spacing: 1px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- Navigation --- */
.navbar { 
    background: rgba(15, 23, 42, 0.95); 
    border-bottom: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 1000; 
}
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 80px; }

.logo { 
    font-size: 1.8rem; 
    font-weight: 700; 
    color: white; 
    text-decoration: none; 
    text-transform: uppercase;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links { list-style: none; display: flex; }
.nav-links li { margin-left: 30px; }
.nav-links a { 
    text-decoration: none; 
    color: var(--text-gray); 
    font-weight: 500; 
    transition: var(--transition); 
    font-size: 0.95rem;
    text-transform: uppercase;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-cyan); text-shadow: 0 0 10px rgba(6, 182, 212, 0.5); }
.menu-toggle { display: none; cursor: pointer; color: white; font-size: 1.5rem; }

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 80vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;

    /* COMBINED: Animated Gradient + Handshake Image */
    /* Layer 1 (Top): Transparent to Dark Gradient */
    /* Layer 2 (Bottom): Handshake Image positioned to the right (70%) */
    background: 
        linear-gradient(135deg, rgba(2, 0, 36, 0.9) 0%, rgba(9, 9, 121, 0.7) 35%, rgba(0, 45, 90, 0.5) 70%, rgba(76, 44, 150, 0.4) 100%),
        url('https://images.unsplash.com/photo-1521791136064-7986c2923216?auto=format&fit=crop&w=1500&q=80');
    
    background-repeat: no-repeat;
    background-size: 400% 400%, cover; /* 400% size for the gradient to allow it to 'flow' */
    background-position: center, 70% 50%;
    background-attachment: fixed;

    /* Triggers the smooth color shift animation */
    animation: gradientFlow 10s ease infinite;
}

/* Background Animation for the Gradient Flow */
@keyframes gradientFlow {
    0% { background-position: 0% 50%, 70% 50%; }
    50% { background-position: 100% 50%, 70% 50%; }
    100% { background-position: 0% 50%, 70% 50%; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient overlay: Darker on the left to make the white text pop */
    background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

/* Layout for the Hero Container */
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    z-index: 10;
    width: 100%;
}

/* The Floating Image Container */
.hero-image-front {
    flex: 1;
    order: 2; /* Moves it to the right side */
    display: flex;
    justify-content: center;
    /* This triggers the smooth floating motion */
    animation: floatHandshake 4s ease-in-out infinite; 
}

.hero-image-front img {
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.hero-text-side {
    flex: 1;
    text-align: left;
    order: 1;
}

/* Up and Down Animation Keyframes */
@keyframes floatHandshake {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-25px); /* Moves up by 25 pixels */
    }
    100% {
        transform: translateY(0px); /* Returns to start */
    }
}

/* Responsive fix: Stack on top of each other on mobile */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-text-side { order: 2; }
    .hero-image-front { order: 1; margin-bottom: 30px; }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}
.hero p { max-width: 600px; margin-bottom: 40px; font-size: 1.2rem; color: var(--text-gray); }

.btn { 
    display: inline-block; 
    padding: 15px 35px; 
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: bold; 
    transition: var(--transition); 
    cursor: pointer; 
    border: none; 
    text-transform: uppercase;
    font-size: 0.9rem;
}
.btn-primary { 
    background: var(--gradient-main); 
    color: white; 
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(124, 58, 237, 0.6); }
.btn-outline { 
    background: transparent;
    border: 2px solid var(--secondary-color); 
    color: white; 
    margin-left: 15px; 
}
.btn-outline:hover { background: var(--secondary-color); color: white; box-shadow: 0 0 20px rgba(37, 99, 235, 0.4); }

/* --- Grid & Cards --- */
.articles-section { padding: 80px 0; }
.section-title { 
    text-align: left; 
    margin-bottom: 50px; 
    color: white; 
    font-size: 2.2rem; 
    border-left: 5px solid var(--accent-cyan);
    padding-left: 15px;
}

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.card { 
    background: var(--bg-card); 
    border-radius: 15px; 
    overflow: hidden; 
    box-shadow: var(--shadow); 
    transition: var(--transition); 
    border: 1px solid rgba(255,255,255,0.05);
    display: flex; flex-direction: column;
}
.card:hover { 
    transform: translateY(-10px); 
    border-color: var(--primary-color);
    box-shadow: 0 20px 30px rgba(0,0,0,0.4); 
}
.card-image { height: 200px; position: relative; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.card:hover .card-image img { transform: scale(1.1); }

.badge { 
    position: absolute; top: 15px; right: 15px; 
    background: var(--gradient-main); 
    color: white; 
    padding: 5px 12px; 
    border-radius: 4px; 
    font-size: 0.7rem; 
    font-weight: bold; 
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
}

.card-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.card-content h3 { margin-bottom: 15px; color: white; font-size: 1.3rem; }
.card-content p { font-size: 0.95rem; color: var(--text-gray); margin-bottom: 20px; flex-grow: 1; }

.read-more { 
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    color: var(--accent-cyan);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}
.read-more:hover { background: var(--accent-cyan); color: var(--bg-dark); }

/* --- Footer --- */
footer { 
    background: black; 
    color: var(--text-gray); 
    text-align: center; 
    padding: 40px 0; 
    margin-top: auto; 
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links { 
        position: fixed; left: -100%; top: 80px; 
        flex-direction: column; 
        background: var(--bg-card); 
        width: 100%; height: calc(100vh - 80px); 
        text-align: center; 
        transition: 0.3s; 
    }
    .nav-links.active { left: 0; }
    .nav-links li { margin: 30px 0; }
    .hero { text-align: center; padding: 60px 20px; }
    .hero h1 { font-size: 2.5rem; }
    .section-title { text-align: center; border: none; padding: 0; }
    .btn { width: 100%; margin: 10px 0; }
}

/* --- Forms (Registration/Contact) --- */
.page-header { 
    background: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.95)), url('https://images.unsplash.com/photo-1518770660439-4636190af475?w=1000');
    background-size: cover;
    padding: 80px 0; text-align: center; margin-bottom: 50px; 
}
.page-header h1 { color: white; text-shadow: 0 0 20px var(--primary-color); font-size: 2.5rem; }

.form-box { 
    background: var(--bg-card); 
    padding: 40px; 
    border-radius: 15px; 
    box-shadow: var(--shadow); 
    max-width: 600px; 
    margin: 0 auto 50px auto; 
    border: 1px solid rgba(255,255,255,0.05);
}
.form-group label { color: var(--accent-cyan); margin-bottom: 10px; }
.form-group input, .form-group select, .form-group textarea { 
    background: rgba(0,0,0,0.2); 
    border: 1px solid rgba(255,255,255,0.1); 
    color: white; 
    border-radius: 8px;
}
.form-group input:focus { border-color: var(--primary-color); box-shadow: 0 0 10px rgba(124, 58, 237, 0.3); }

/* --- Article Detail View --- */
.article-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; padding-bottom: 60px; }
.article-main img { width: 100%; border-radius: 15px; margin-bottom: 25px; box-shadow: var(--shadow); }
.article-meta { color: var(--accent-cyan); border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-widget { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.05); }
.sidebar-widget h4 { color: white; border-bottom: 2px solid var(--primary-color); }
.sidebar-links a { color: var(--text-gray); }
.sidebar-links a:hover { color: var(--accent-cyan); padding-left: 10px; }

.article-list {
    list-style: none;
    margin: 25px 0;
    padding-left: 0;
}

.article-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.article-list li::before {
    content: '→'; /* A techy-looking arrow */
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-weight: bold;
}

.article-list li strong {
    color: #fff;
    display: block; /* Puts the detail on a new line for a "longer" scroll */
    margin-bottom: 5px;
}
/* Sidebar Widget Container */
.sidebar-widget {
    background: rgba(15, 23, 42, 0.6); /* Deep Navy Translucent */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.2); /* Subtle Cyan Border */
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.5);
}

/* Heading Styling */
.sidebar-widget h4 {
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-weight: 700;
}

/* Neon Dot Indicator before Heading */
.sidebar-widget h4::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #38bdf8;
    border-radius: 50%;
    margin-right: 12px;
    box-shadow: 0 0 10px #38bdf8;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* Link List Styling */
.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-links li {
    margin-bottom: 12px;
}

.sidebar-links li:last-child {
    margin-bottom: 0;
}

/* Individual Link Styling */
.sidebar-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Hover State for Links */
.sidebar-links a:hover {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
    padding-left: 24px; /* Smooth slide effect */
}

/* Left Accent Line on Hover */
.sidebar-links a::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #38bdf8;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-links a:hover::after {
    transform: scaleY(1);
}

/* Registration Page Specific Styles */
body {
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    min-height: 100vh;
}

.page-header {
    padding: 80px 0 40px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), transparent);
}

.page-header h1 {
    font-size: 2.5rem;
    letter-spacing: -1px;
    color: #f8fafc;
    margin-bottom: 10px;
}

.page-header p {
    color: #38bdf8; /* Cyber Blue */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
}

/* Glassmorphism Form Box */
.form-box {
    max-width: 500px;
    margin: 40px auto;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Subtle Glow Effect behind form */
.form-box::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, #38bdf8, transparent, #38bdf8);
    z-index: -1;
    border-radius: 26px;
    opacity: 0.15;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #94a3b8;
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Advanced Input Styling */
input[type="text"], select {
    width: 100%;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

input[type="text"]:focus, select:focus {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

/* Custom Select Arrow Styling */
select {
    appearance: none;
    cursor: pointer;
}

/* Button Styling */
.btn-primary {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(56, 189, 248, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(56, 189, 248, 0.6);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Result Box Styling */
.result-box {
    font-weight: 600;
    text-align: center;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Adding styling for Email and Message Box to match the 'Advanced' theme */

input[type="email"], 
textarea {
    width: 100%;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: inherit; /* Ensures the font matches the rest of the portal */
}

/* Specific styling for the Message Box (Textarea) */
textarea {
    min-height: 120px;
    resize: none; /* Keeps the professional look without user resizing it */
    line-height: 1.6;
}

/* Hover and Focus states for Email and Textarea */
input[type="email"]:focus, 
textarea:focus {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

/* Optional: Placeholder color to match the subtle 2026 UI */
::placeholder {
    color: rgba(148, 163, 184, 0.4);
}