/* ==========================================================================
   SISCOP SYSTEMS - DESIGN SYSTEM V2 (ENTERPRISE THEME)
   ========================================================================== */

:root {
    /* Brand Colors */
    --primary-color: #0033A0;
    /* SISCOP Blue */
    --primary-dark: #002270;
    --primary-light: #e6efff;
    --accent-color: #00C2CB;
    /* Modern Cyan Accent */

    /* Neutral Colors */
    --text-main: #1A1F2C;
    --text-secondary: #4A5568;
    --text-light: #718096;
    --bg-white: #FFFFFF;
    --bg-light: #F4F7FA;
    --bg-dark: #0F172A;

    /* UI Elements */
    --border-color: #E2E8F0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Layout */
    --container-width: 1280px;
    --header-height: 80px;

    /* Typography */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(0, 51, 160, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 51, 160, 0.23);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary-color) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Animation Utilities */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 48px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Specific styling for buttons inside the navbar */
.nav-menu .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    white-space: nowrap;
    border-radius: 8px;
}

.nav-menu .btn-secondary {
    border-color: var(--primary-color);
    background: transparent;
}

.nav-menu .btn-secondary:hover {
    background: var(--primary-light);
}

.nav-menu .btn-primary {
    box-shadow: none;
}

.nav-menu .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(0, 51, 160, 0.2);
}

.nav-menu .btn:first-of-type {
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .nav-menu .btn {
        width: 100%;
        margin-left: 0 !important;
    }
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s ease;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding: calc(var(--header-height) + 4rem) 0 6rem;
    background: radial-gradient(circle at top left, #f8faff 0%, #ffffff 100%);
    overflow: hidden;
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="%23e2e8f0"/></svg>') repeat;
    opacity: 0.4;
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual img {
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Floating Badge Styles for Large Hero */
.floating-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: float 6s ease-in-out infinite;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.5);
    min-width: 200px;
}

.badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.badge-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.badge-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Specific positioning for large layout */
.badge-top-right {
    top: 10%;
    right: 5%;
    animation-delay: 0s;
}

.badge-bottom-left {
    bottom: 15%;
    left: 5%;
    animation-delay: 2s;
}

/* Responsive Hide for Badges */
@media (max-width: 768px) {
    .floating-badge {
        display: none;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ==========================================================================
   LARGE HERO CAROUSEL STYLES
   ========================================================================== */
/* ==========================================================================
   HERO SECTION REDESIGN - MODERN 3D IMPACT
   ========================================================================== */
.hero-large-carousel {
    min-height: 100vh;
    padding: calc(var(--header-height) + 1rem) 0 2rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    /* Dynamic vibrant background */
    background: radial-gradient(circle at 70% 30%, rgba(224, 242, 254, 0.5) 0%, rgba(248, 250, 255, 1) 60%);
}

.hero-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-carousel-slides {
    position: relative;
    width: 100%;
    min-height: 80vh;
}

.hero-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.hero-carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-slide-content {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    padding: 0 2%;
    min-height: 80vh;
}

/* --- Improved Typography --- */
.hero-text-content {
    z-index: 20;
    max-width: 600px;
    padding-left: 1rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-text-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
    color: var(--text-main);
}

.hero-text-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 90%;
}

/* --- 3D Image Container --- */
.hero-image-content {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1500px;
    /* Essential for 3D depth */
    transform-style: preserve-3d;
    z-index: 1;
}

/* --- The 3D Screenshot Effect --- */
.hero-large-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 80vh;

    /* 3D Transform State */
    transform: rotateY(-12deg) rotateX(6deg) scale(0.95);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease;
    transform-origin: center center;

    /* Deep Shadow for Levitation */
    box-shadow:
        -30px 40px 80px -10px rgba(0, 51, 160, 0.15),
        -10px 20px 30px -5px rgba(0, 0, 0, 0.05);

    border-radius: 20px;
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Interactive Hover state */
.hero-image-content:hover .hero-large-image {
    transform: rotateY(0deg) rotateX(0deg) scale(1);
    box-shadow:
        0 30px 60px -15px rgba(0, 51, 160, 0.2),
        0 15px 30px -10px rgba(0, 0, 0, 0.08);
}

@keyframes heroFloat3D {

    0%,
    100% {
        transform: rotateY(-12deg) rotateX(6deg) translateY(0);
    }

    50% {
        transform: rotateY(-12deg) rotateX(6deg) translateY(-20px);
    }
}

/* Apply float animation when not hovering */
.hero-image-content:not(:hover) .hero-large-image {
    animation: heroFloat3D 6s ease-in-out infinite;
}

/* Carousel Controls */
.hero-carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    /* More transparent */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.hero-carousel-control:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.hero-carousel-control.prev {
    left: 1rem;
}

.hero-carousel-control.next {
    right: 1rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero-slide-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        gap: 2rem;
        text-align: center;
        padding-top: 4rem;
        /* Space for header */
    }

    .hero-image-content {
        align-items: flex-start;
    }

    .hero-large-image {
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .hero-large-carousel {
        min-height: auto;
        padding: calc(var(--header-height) + 1rem) 0 2rem;
    }

    .hero-carousel-slides {
        min-height: auto;
    }

    .hero-slide-content {
        min-height: auto;
        padding: 1rem 0;
    }

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

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

    .hero-large-image {
        max-height: 40vh;
    }

    .hero-carousel-control {
        width: 40px;
        height: 40px;
    }

    .hero-carousel-control svg {
        width: 24px;
        height: 24px;
    }

    .hero-carousel-indicators {
        bottom: 1.5rem;
    }
}


/* ==========================================================================
   FEATURES GRID (BENTO STYLE)
   ========================================================================== */
.features {
    padding: 6rem 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, minmax(250px, auto));
    gap: 1.5rem;
}

.bento-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.bento-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

.bento-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.bento-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.bento-large {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--bg-white) 0%, #f0f7ff 100%);
}

.bento-large h3 {
    font-size: 2rem;
}

/* ==========================================================================
   PRODUCTS SECTION
   ========================================================================== */
.products {
    background-color: var(--bg-white);
    padding: 6rem 0;
}

.product-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.product-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: white;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.product-image-container {
    height: 240px;
    overflow: hidden;
    position: relative;
    background-color: #f1f1f1;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Changed from cover to contain for clarity */
    padding: 1rem;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image-container img {
    transform: scale(1.05);
}

.product-details {
    padding: 2rem;
}

.product-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.product-features li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   VIDEO MANUALS (SIDEBAR LAYOUT)
   ========================================================================== */
.videos-section {
    padding: 6rem 0;
    background-color: #f8faff;
}

.video-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

.video-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    height: fit-content;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.video-filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.video-filter-item {
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-filter-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.video-filter-item.active {
    background-color: var(--primary-color);
    color: white;
}

.video-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.video-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

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

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Video Facade (Lazy Load Optimization) --- */
.video-facade {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.video-facade:hover img {
    opacity: 0.6;
}

.play-btn {
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.play-btn::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 16px solid white;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 4px;
}

.video-facade:hover .play-btn {
    transform: scale(1.1);
    background-color: red;
}

.video-info {
    padding: 1.25rem;
}

.video-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.video-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    background-color: #eee;
    color: #666;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* ==========================================================================
   CONTACT SECTION (SPLIT)
   ========================================================================== */
.contact-section {
    padding: 6rem 0;
    background: white;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.contact-info-card {
    background: var(--primary-color);
    color: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.contact-info-card::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-icon {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 10px;
}

.contact-form-wrapper form {
    display: grid;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 51, 160, 0.1);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: var(--bg-dark);
    color: #fff;
    padding: 5rem 0 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo img {
    height: 40px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
    /* Make logo white */
}

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

.footer-links a {
    color: #94A3B8;
}

.footer-links a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-actions {
        justify-content: center;
    }

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

    .video-sidebar {
        position: relative;
        top: 0;
        overflow-x: auto;
        white-space: nowrap;
    }

    .video-filter-list {
        flex-direction: row;
        padding-bottom: 10px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: all 0.4s ease-in-out;
    }

    .nav-menu.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .mobile-menu-btn {
        display: flex;
    }

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

    .bento-large {
        grid-column: span 1;
    }

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

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

/* ==========================================================================
   HERO CAROUSEL STYLES
   ========================================================================== */
.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide .hero-image {
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.badge-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 1s;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.carousel-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px 0 rgba(0, 51, 160, 0.39);
}

.carousel-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.carousel-indicators {
    display: flex;
    gap: 0.75rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--primary-color);
    width: 32px;
    border-radius: 6px;
}

.indicator:hover {
    background: var(--primary-light);
}

/* ==========================================================================
   EDUCATION SECTION STYLES
   ========================================================================== */
.education-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8faff 0%, #ffffff 100%);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 3rem;
}

.education-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.education-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.education-icon {
    font-size: 4rem;
    background: var(--primary-light);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 8px 16px rgba(0, 51, 160, 0.15);
}

.education-content h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.education-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.education-list {
    list-style: none;
    margin-bottom: 2rem;
}

.education-list li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.education-list li:last-child {
    border-bottom: none;
}

.education-card .btn {
    align-self: flex-start;
}

@media (max-width: 768px) {
    /* ... existing rules ... */

    /* Reset 3D effects for mobile */
    .hero-slide-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding-top: 4rem;
        /* More space from top */
    }

    .hero-text-content {
        padding-left: 0;
        max-width: 100%;
        margin: 0 auto;
    }

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

    .hero-text-content p {
        margin: 0 auto 2rem;
    }

    .hero-actions {
        justify-content: center;
    }

    /* Flatten the image for better mobile visibility */
    .hero-image-content {
        perspective: none;
        height: auto;
        margin-bottom: 2rem;
    }

    .hero-large-image {
        transform: none !important;
        /* Force flat */
        max-height: 50vh;
        /* Allow it to fit */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border: none;
    }

    /* Disable complex hover/float animations on mobile to save battery/performance */
    .hero-image-content:not(:hover) .hero-large-image {
        animation: none;
    }

    /* Adjust controls position */
    .hero-carousel-control {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.9);
    }

    .hero-carousel-control.prev {
        left: 10px;
    }

    .hero-carousel-control.next {
        right: 10px;
    }

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

    .carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 1.25rem;
    }

    .carousel-controls {
        gap: 1rem;
    }

    /* Mobile Navigation Adjustments */
    .nav-container {
        padding: 0.5rem 1rem;
        /* Reduce padding slightly */
    }

    .logo img {
        height: 35px;
        width: auto;
    }

    .mobile-menu-btn {
        margin-left: 1rem;
    }

    /* FIX: Video Categories as Tag Cloud on Mobile */
    .video-filter-list {
        display: flex;
        flex-direction: row;
        /* Ensure horizontal flow */
        flex-wrap: wrap;
        /* Wrap items to next line */
        overflow-x: visible;
        /* Disable horizontal scroll */
        gap: 0.5rem;
        /* Tighter gap */
        justify-content: flex-start;
        padding-bottom: 0;
    }

    .video-filter-item {
        flex: 0 0 auto;
        width: auto !important;
        /* Auto width based on content */
        font-size: 0.8rem;
        /* Smaller text */
        padding: 0.4rem 0.8rem;
        /* Compact pill */
        border-radius: 50px;
        margin-bottom: 0 !important;
        background: white;
        border: 1px solid #e2e8f0;
    }

    .video-filter-item.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

    /* --- MOBILE EMERGENCY FIX (Visibility & Layout) --- */
    .hero-large-carousel {
        height: auto;
        min-height: auto;
        /* FIX: Remove huge gap */
        align-items: flex-start;
        /* Flow from top */
        padding-top: 100px;
        /* Space for nav */
        padding-bottom: 3rem;
        /* Reasonable bottom space */
        background: #f8fafc;
        /* SIMPLE BACKGROUND for Mobile (Performance) */
    }

    .hero-slide-content {
        display: flex;
        /* Force flex column */
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 0;
        gap: 1.5rem;
        /* Reduce gap */
    }

    .hero-text-content h1 {
        font-size: 2.5rem;
        /* Smaller title to save vertical space */
    }


    .hero-text-content {
        animation: none !important;
        /* Disable potential broken anims */
        opacity: 1 !important;
        /* Force visible */
        order: 1;
        /* Ensure text is first */
    }

    .hero-image-content {
        order: 2;
        /* Image second */
        height: auto;
        margin-bottom: 2rem;
    }

    /* --- ULTRA STABILITY FIX (Kill complex layers) --- */
    .floating-badge {
        display: none !important;
        /* Hide floating cards on mobile to save memory */
    }

    .gradient-text {
        background: none !important;
        -webkit-text-fill-color: initial !important;
        color: var(--primary-color) !important;
        /* Solid color instead of complex gradient */
    }

    .hero-large-image {
        max-height: 250px;
        transform: none !important;
        /* Reduce GPU stress */
        will-change: auto !important;
        /* Stop forcing GPU memory allocation */
    }

    /* FIX: Dynamic Height for Mobile Carousel */
    .hero-carousel-slides {
        height: auto;
        min-height: auto;
    }

    .hero-carousel-slide {
        /* Make slides participate in flow, not absolute */
        position: relative !important;
        height: auto !important;
        display: none !important;
        /* Hide inactive */
        opacity: 1 !important;
        left: auto;
        overflow: visible;
        /* Allow content to be seen */
    }

    .hero-carousel-slide.active {
        display: flex !important;
        /* Show active */
        flex-direction: column;
        visibility: visible !important;
        z-index: 10;
    }
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color) !important;
    /* Force Background */
    color: white !important;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    -webkit-appearance: none;
    /* Remove iOS styles */
    appearance: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* FIX: Force colors on all states to prevent empty silhouette */
.back-to-top:hover,
.back-to-top:focus,
.back-to-top:active {
    background: var(--primary-dark) !important;
    /* Use existing variable */
    color: white !important;
    outline: none;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top svg {
    stroke: white !important;
    /* Force icon color */
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-3px);
}

/* Adjust for mobile to not cover content */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Define global animation to prevent missing keyframe errors */
/* --- Performance Optimization (Apple/Safari Fix) --- */
.animate-on-scroll {
    will-change: opacity, transform;
    /* Hint to browser */
    -webkit-backface-visibility: hidden;
    /* Fix flickering on iOS */
    backface-visibility: hidden;
}

.hero-large-image {
    -webkit-transform: translate3d(0, 0, 0);
    /* Hardware acceleration trigger */
    transform: translate3d(0, 0, 0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* ==========================================================================
   MOBILE OPTIMIZATIONS (Reduce Memory Usage)
   ========================================================================== */
@media (max-width: 768px) {

    /* Disable heavy glassmorphism on mobile */
    .navbar,
    .floating-badge,
    .bento-card,
    .product-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .navbar {
        background: rgba(255, 255, 255, 0.95) !important;
        /* Solid fallback */
    }

    /* Reduce shadow complexity */
    .hero-large-image,
    .bento-card,
    .product-card,
    .video-card {
        box-shadow: none !important;
        /* Kill shadows completely on mobile */
        filter: none !important;
        animation: none !important;
        transition: none !important;
        /* Stop JS painting computations */
    }

    /* MAGICAL PERFORMANCE FIX for Large Lists */
    .video-card {
        content-visibility: auto;
        /* Don't render if off-screen */
        contain-intrinsic-size: 300px;
        /* Placeholder height estimate */
    }

    .video-facade img {
        transition: none !important;
    }

    /* Ensure visibility is forced */
    .hero-text-content,
    .hero-image-content {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================================================
   PRODUCT CARDS ANIMATION (FLOAT & STAGGER)
   ========================================================================== */
.product-showcase .product-card {
    /* Base state covers opacity and transform from existing styles or animate-on-scroll logic
       We redefine smooth transitions here */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, box-shadow 0.3s ease;
}

/* When the card enters the viewport and gets .animate-in class */
.product-showcase .product-card.animate-in {
    /* Apply continuous float animation AFTER entrance 
       We use a long delay to let the entrance finish, or combine them if possible.
       Since animate-on-scroll sets transform to translateY(0), we need to be careful.
       
       Solution: animate-on-scroll handles the entrance. 
       We use a separate keyframe for the continuous float that starts after a delay.
    */
    animation: productFloat 6s ease-in-out infinite;
    /* Delay the start of the float animation so they don't all float in sync immediately, 
       and to let the entrance finish */
}

/* Staggered Delays for "One by One" Entrance Effect 
   Assuming the JS adds .animate-in to all of them when the section is reached.
   If JS adds them individually, this is redundant but harmless.
*/
.product-showcase .product-card:nth-child(1) {
    transition-delay: 0.1s;
}

.product-showcase .product-card:nth-child(2) {
    transition-delay: 0.4s;
    /* Wait for 1st */
}

.product-showcase .product-card:nth-child(3) {
    transition-delay: 0.7s;
    /* Wait for 2nd */
}

/* Add stagger to the float animation as well so they don't bob up and down in perfect sync */
.product-showcase .product-card:nth-child(1).animate-in {
    animation-delay: 1s;
}

.product-showcase .product-card:nth-child(2).animate-in {
    animation-delay: 1.5s;
}

.product-showcase .product-card:nth-child(3).animate-in {
    animation-delay: 2s;
}

@keyframes productFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
        /* Gentle float up */
    }
}