/* --- Base Styles & Typography --- */
:root {
    --bg-dark: #010409;
    --bg-medium: #0d1117;
    --border-color: rgba(0, 255, 0, 0.2);
    --accent: #00ff00;
    --text-primary: #e6edf3;
    --text-secondary: #7d8590;
    --font-body: 'Poppins', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* --- Responsive Container --- */
.container {
    width: 100%;
    max-width: 1280px; /* Default max-width for large screens */
}
@media (min-width: 1600px) {
    .container {
        max-width: 1500px; /* Wider container for TV screens */
    }
}


/* --- Particle.js Background --- */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

/* --- Navigation Bar --- */
nav {
    background-color: rgba(1, 4, 9, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.logo-container:hover .glitch {
    animation: glitch-sm 0.5s linear infinite;
}

.nav-links a {
    position: relative;
    color: var(--text-primary);
    font-family: var(--font-mono);
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 5px 0;
}
.nav-links a span {
    position: relative;
    z-index: 2;
}
.nav-links a::before, .nav-links a::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    overflow: hidden;
    color: var(--accent);
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    transition: clip-path 0.4s ease;
}
.nav-links a::after {
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
}
.nav-links a:hover::before {
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}
.nav-links a:hover::after {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

/* --- Header Section --- */
.hero-title {
    /* Responsive font size using clamp() - Adjusted for better mobile view */
    font-size: clamp(1.8rem, 8vw, 4.5rem);
}
.typewriter {
    border-right: 0.15em solid var(--accent);
    white-space: nowrap;
    overflow: hidden;
    margin: 0 auto;
    display: inline-block;
}
.cursor-blink {
    animation: blink-caret 0.75s step-end infinite;
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent); }
}
.hero-subtitle {
    opacity: 0;
    animation: fadeIn 1s ease 3s forwards;
}

/* --- Cyberpunk Button --- */
.cybr-btn {
 --primary: hsl(var(--primary-hue), 85%, calc(var(--primary-lightness, 50) * 1%));
 --shadow-primary: hsl(var(--shadow-primary-hue), 90%, 50%);
 --primary-hue: 120;
 --primary-lightness: 50;
 --color: hsl(0, 0%, 100%);
 --font-size: 22px; /* Adjusted for better responsiveness */
 --shadow-primary-hue: 120;
 --label-size: 9px;
 --shadow-secondary-hue: 60;
 --shadow-secondary: hsl(var(--shadow-secondary-hue), 90%, 60%);
 --clip: polygon(0 0, 100% 0, 100% 100%, 95% 100%, 95% 90%, 85% 90%, 85% 100%, 8% 100%, 0 70%);
 --border: 4px;
 font-family: var(--font-mono);
 color: var(--color);
 cursor: pointer;
 background: transparent;
 text-transform: uppercase;
 font-size: var(--font-size);
 outline: transparent;
 letter-spacing: 2px;
 position: relative;
 font-weight: 700;
 border: 0;
 min-width: 250px;
 max-width: 100%;
 height: 65px;
 line-height: 65px;
 transition: background 0.2s;
 opacity: 0;
 animation: fadeIn 1s ease 3.5s forwards;
}
.cybr-btn.small {
    width: 180px;
    height: 60px;
    line-height: 60px;
    font-size: 20px;
}
/* Secondary (outline) style for the second button */
.cybr-btn--secondary {
    --primary-lightness: 0; /* Makes the main background transparent */
    color: var(--accent);
}
.cybr-btn--secondary:hover {
    --primary-lightness: 50;
    color: var(--bg-dark);
}

.cybr-btn:after, .cybr-btn:before {
 content: '';
 position: absolute;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 clip-path: var(--clip);
 z-index: -1;
}
.cybr-btn:before {
 background: var(--shadow-primary);
 transform: translate(var(--border), 0);
}
.cybr-btn:after {
 background: var(--primary);
}
.cybr-btn__tag {
 position: absolute;
 padding: 1px 4px;
 letter-spacing: 1px;
 line-height: 1;
 bottom: -5%;
 right: 5%;
 font-weight: normal;
 color: hsl(0, 0%, 0%);
 font-size: var(--label-size);
 background: var(--shadow-secondary);
 box-shadow: 2px 0 0 var(--shadow-secondary);
 clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.cybr-btn__glitch {
 position: absolute;
 top: calc(var(--border) * -1);
 left: calc(var(--border) * -1);
 right: calc(var(--border) * -1);
 bottom: calc(var(--border) * -1);
 background: var(--shadow-primary);
 text-shadow: 2px 2px var(--shadow-primary), -2px -2px var(--shadow-secondary);
 clip-path: var(--clip);
 animation: glitch 2s infinite;
 display: none;
}
.cybr-btn:hover .cybr-btn__glitch { display: block; }
.cybr-btn__glitch:before {
 content: '';
 position: absolute;
 top: calc(var(--border) * 1);
 right: calc(var(--border) * 1);
 bottom: calc(var(--border) * 1);
 left: calc(var(--border) * 1);
 clip-path: var(--clip);
 background: var(--primary);
 z-index: -1;
}

/* --- General & On-Scroll Animations --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.scroll-target {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transition-delay: var(--animation-delay, 0ms);
}
.scroll-target.in-view { opacity: 1; transform: translateY(0); }

/* --- Section Title --- */
.section-title {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 5vw, 2.5rem); /* Responsive font size */
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}
.section-title::before, .section-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    overflow: hidden;
}
.section-title::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent);
    animation: glitch-md 2s infinite linear alternate-reverse;
}
.section-title::after {
    left: -2px;
    text-shadow: -2px 0 #ff00c1;
    animation: glitch-md 3s infinite linear alternate-reverse;
}

/* --- Angled Sections --- */
.angled-section {
    background: var(--bg-medium);
    position: relative;
    clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 95%);
}
.angled-section-top {
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
}

/* --- About Section --- */
.about-image {
    border: 2px solid var(--border-color);
    transition: all 0.4s ease;
    box-shadow: 0 0 0px var(--accent);
}
.about-image:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px -5px var(--accent);
}

/* --- Leads Section --- */
.lead-card {
    background-color: var(--bg-medium);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.lead-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px -5px var(--accent);
}
.lead-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}


/* --- Program Cards Slider --- */
.programs-slider-container {
    position: relative;
}

.programs-slider-wrapper {
    overflow: hidden;
    padding: 2rem 0;
}

.programs-slider {
    display: flex;
    gap: 2.5rem; /* Corresponds to gap-10 in Tailwind */
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    align-items: center; /* Vertically align cards of different sizes */
}

.program-card {
    flex: 0 0 300px; /* Give cards a fixed base width */
    opacity: 0.6;
    transform: scale(0.85);
    transition: transform 0.5s ease, opacity 0.5s ease;
    cursor: pointer;
}

@media (max-width: 768px) {
    .program-card {
        flex-basis: 250px;
    }
}

/* This is the new 'active' state for the centered card */
.program-card.active {
    opacity: 1;
    transform: scale(1.05);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(13, 17, 23, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-nav:hover {
    background-color: var(--bg-medium);
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav::before {
    content: '';
    width: 12px;
    height: 12px;
    border-style: solid;
    border-color: var(--accent);
    border-width: 0 3px 3px 0;
}

.slider-nav.prev {
    left: -15px; /* Adjust position */
}
.slider-nav.prev::before {
    transform: translateX(2px) rotate(135deg);
}

.slider-nav.next {
    right: -15px; /* Adjust position */
}
.slider-nav.next::before {
    transform: translateX(-2px) rotate(-45deg);
}

.slider-nav:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}

.card-inner {
    background-color: var(--bg-medium);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    transition: box-shadow 0.5s;
}

.program-card.active .card-inner {
    box-shadow: 0 0 40px -10px var(--accent);
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    filter: grayscale(50%);
    transition: filter 0.4s ease;
}

.program-card.active .card-image {
    filter: grayscale(0%);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.card-description {
    color: var(--text-secondary);
}

/* --- Gallery --- */
@keyframes scroll-right-to-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.gallery-wrapper {
  overflow: hidden;
  padding: 2rem 0;
  white-space: nowrap;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.gallery-scroll {
  display: flex;
  width: fit-content;
  animation: scroll-right-to-left 80s linear infinite;
}
.gallery-scroll:hover {
    animation-play-state: paused;
}
.gallery-item {
    flex-shrink: 0;
    width: 350px;
    margin: 0 1rem;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    position: relative;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* --- Enquiry Form --- */
.form-group {
    position: relative;
    margin-bottom: 2.5rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    border-radius: 4px;
    font-family: var(--font-mono);
    transition: border-color 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px -5px var(--accent);
}
.form-group label {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    pointer-events: none;
    transition: all 0.3s ease;
}
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.875rem;
    background-color: var(--bg-medium);
    padding: 0 0.5rem;
    color: var(--accent);
}


/* --- Footer / Contact Section --- */
.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 1.25rem;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}
.contact-link:hover {
    color: var(--accent);
    transform: scale(1.05);
}

/* --- Glitch Animations --- */
@keyframes glitch {
  0% { clip-path: var(--clip-one); } 2% { clip-path: var(--clip-two); } 4% { clip-path: var(--clip-three); } 6% { clip-path: var(--clip-four); } 8% { clip-path: var(--clip-five); } 10% { clip-path: var(--clip-six); } 12% { clip-path: var(--clip-seven); } 14% { clip-path: var(--clip); }
}
@keyframes glitch-sm {
    0% { transform: translate(0); } 20% { transform: translate(-2px, 2px); } 40% { transform: translate(-2px, -2px); } 60% { transform: translate(2px, 2px); } 80% { transform: translate(2px, -2px); } 100% { transform: translate(0); }
}
@keyframes glitch-md {
    0% { clip-path: inset(10% 0 70% 0); } 10% { clip-path: inset(80% 0 5% 0); } 20% { clip-path: inset(30% 0 40% 0); } 30% { clip-path: inset(55% 0 25% 0); } 40% { clip-path: inset(0 0 90% 0); } 50% { clip-path: inset(95% 0 2% 0); } 60% { clip-path: inset(70% 0 10% 0); } 70% { clip-path: inset(15% 0 80% 0); } 80% { clip-path: inset(45% 0 45% 0); } 90% { clip-path: inset(85% 0 5% 0); } 100% { clip-path: inset(20% 0 75% 0); }
}
