/* ==========================================================
   SAN AI & MECHATRONICS | ROBOTICS VIDEO GALLERY
   Dark navy / electric blue / cyan · responsive · AOS ready
========================================================== */
.san-reels-page {
    --reel-bg: #050D1B;
    --reel-panel: #0B192D;
    --reel-blue: #168BFF;
    --reel-cyan: #43D9FF;
    --reel-white: #F4F8FF;
    --reel-muted: #9AABC3;
    overflow: hidden;
    color: var(--reel-white);
    background: var(--reel-bg);
    font-family: 'Inter', Arial, sans-serif;
}
.san-reels-page *, .san-reels-page *::before, .san-reels-page *::after { box-sizing: border-box; }
.san-reels-page a { text-decoration: none; }
.san-reels-page a:focus-visible, .san-reels-page input:focus-visible, .san-reels-page button:focus-visible { outline: 2px solid var(--reel-cyan); outline-offset: 4px; }
.san-reels-page [hidden] { display: none !important; }

/* Compact hero */
.reels-hero { position: relative; isolation: isolate; overflow: hidden; padding: 56px 5.5% 52px; border-bottom: 1px solid rgba(83,160,255,.13); background: radial-gradient(ellipse at 82% 30%,rgba(0,132,255,.17),transparent 35%),linear-gradient(120deg,#050D1B,#07162B 68%,#081A32); }
.reels-grid-bg { position: absolute; inset: 0; z-index: -1; opacity: .13; background-image: linear-gradient(rgba(69,161,255,.15) 1px,transparent 1px),linear-gradient(90deg,rgba(69,161,255,.15) 1px,transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(90deg,transparent,#000 22%,#000); pointer-events: none; }
.reels-glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(75px); pointer-events: none; }
.reels-glow-one { top: -65px; right: 12%; width: 240px; height: 240px; background: rgba(0,122,255,.19); }
.reels-glow-two { bottom: -125px; left: 38%; width: 230px; height: 200px; background: rgba(0,216,255,.08); }
.reels-hero-inner { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(260px,.6fr); align-items: center; gap: 50px; width: 100%; max-width: 1300px; margin: 0 auto; }
.reels-hero-copy { position: relative; z-index: 1; }
.reels-eyebrow,.reels-section-label { display: flex; align-items: center; gap: 10px; color: var(--reel-cyan); font-size: 10px; font-weight: 800; letter-spacing: 2px; }
.reels-status-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--reel-cyan); box-shadow: 0 0 13px rgba(67,217,255,.85); }
.reels-hero h1 { margin: 18px 0 14px; color: #F5F9FF; font-family: 'Space Grotesk',sans-serif; font-size: clamp(38px,5vw,62px); font-weight: 800; line-height: 1.08; letter-spacing: -2px; }
.reels-hero h1 span,.reels-heading h2 span { color: transparent; background: linear-gradient(100deg,#36A5FF,#54E1FF); background-clip: text; -webkit-background-clip: text; }
.reels-hero-copy > p { max-width: 660px; margin: 0; color: #A8B7CC; font-size: 14px; line-height: 1.85; }
.reels-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-top: 24px; }
.reels-hero-btn,.reels-hero-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 17px; border-radius: 8px; font-size: 11px; font-weight: 800; transition: transform .25s ease,box-shadow .25s ease,border-color .25s ease,color .25s ease; }
.reels-hero-btn { border: 1px solid rgba(65,172,255,.4); color: #fff; background: linear-gradient(110deg,#0879E8,#16A4FF); box-shadow: 0 8px 26px rgba(0,125,255,.19); }
.reels-hero-btn:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,145,255,.38); }
.reels-hero-secondary { border: 1px solid rgba(116,159,211,.24); color: #D7E9FF; background: rgba(255,255,255,.025); }
.reels-hero-secondary i { color: #ff5151; font-size: 15px; }
.reels-hero-secondary:hover { color: var(--reel-cyan); border-color: rgba(67,217,255,.6); transform: translateY(-2px); }
.reels-hero-stat { position: relative; overflow: hidden; padding: 25px; border: 1px solid rgba(86,164,255,.25); border-radius: 15px; background: linear-gradient(145deg,rgba(14,38,67,.94),rgba(6,19,36,.92)); box-shadow: 0 20px 55px rgba(0,0,0,.22),inset 0 1px rgba(255,255,255,.035); }
.reels-hero-stat::after { position: absolute; top: -55px; right: -45px; width: 150px; height: 150px; border-radius: 50%; background: rgba(0,157,255,.15); content: ''; filter: blur(36px); pointer-events: none; }
.reels-stat-icon { display: grid; place-items: center; width: 47px; height: 47px; margin-bottom: 19px; border: 1px solid rgba(67,217,255,.32); border-radius: 12px; color: var(--reel-cyan); background: rgba(22,139,255,.12); box-shadow: 0 0 25px rgba(0,150,255,.12); font-size: 21px; }
.reels-stat-number { display: block; color: #F1F7FF; font-family: 'Space Grotesk',sans-serif; font-size: clamp(17px,2vw,22px); font-weight: 800; }
.reels-stat-caption { display: block; margin-top: 8px; color: #9BAEC6; font-size: 11px; line-height: 1.7; }
.reels-stat-line { height: 1px; margin: 19px 0 15px; background: linear-gradient(90deg,rgba(67,217,255,.4),rgba(67,217,255,0)); }
.reels-stat-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.reels-stat-tags span { padding: 6px 9px; border: 1px solid rgba(88,168,255,.2); border-radius: 5px; color: #A9DFFF; background: rgba(22,139,255,.07); font-size: 8px; font-weight: 800; letter-spacing: 1px; }

/* Gallery heading and search */
.reels-gallery { width: 100%; max-width: 1540px; margin: 0 auto; padding: 58px 4.5% 76px; }
.reels-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.reels-section-label { font-size: 9px; letter-spacing: 2.1px; }
.reels-heading h2 { margin: 11px 0 9px; color: var(--reel-white); font-family: 'Space Grotesk',sans-serif; font-size: clamp(29px,3vw,41px); font-weight: 800; letter-spacing: -1.2px; }
.reels-heading p { margin: 0; color: var(--reel-muted); font-size: 12px; line-height: 1.8; }
.reels-channel-link { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; padding: 12px 14px; border: 1px solid rgba(116,159,211,.22); border-radius: 7px; color: #D7E9FF; background: rgba(255,255,255,.025); font-size: 9px; font-weight: 800; letter-spacing: .35px; transition: all .25s ease; }
.reels-channel-link > i:first-child { color: #FF5151; font-size: 16px; }
.reels-channel-link:hover { color: var(--reel-cyan); border-color: rgba(67,217,255,.6); box-shadow: 0 0 25px rgba(0,140,255,.1); }
.reels-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.reels-search { display: flex; align-items: center; gap: 11px; width: min(100%,470px); min-height: 46px; padding: 0 13px; border: 1px solid rgba(116,159,211,.19); border-radius: 8px; background: #091629; transition: border-color .25s ease,box-shadow .25s ease; }
.reels-search:focus-within { border-color: rgba(67,217,255,.65); box-shadow: 0 0 24px rgba(0,135,255,.1); }
.reels-search > i { color: #7299C5; font-size: 12px; }
.reels-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; color: #F4F8FF; background: transparent; font: inherit; font-size: 11px; }
.reels-search input::placeholder { color: #71839D; }
.reels-clear-search { display: none; flex: 0 0 auto; width: 27px; height: 27px; border: 0; border-radius: 6px; color: #91A9C7; background: transparent; cursor: pointer; }
.reels-clear-search.is-visible { display: inline-grid; place-items: center; }
.reels-clear-search:hover { color: var(--reel-cyan); background: rgba(67,217,255,.08); }
.reels-toolbar-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #8196B2; font-size: 9px; font-weight: 700; letter-spacing: .8px; }
.reels-toolbar-note .reels-status-dot { width: 6px; height: 6px; }
.reels-note-divider { color: #426182; }

/* Four cards on desktop */
.reels-video-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 22px; align-items: start; }
.reel-card { min-width: 0; overflow: hidden; border: 1px solid rgba(118,161,211,.15); border-radius: 12px; background: linear-gradient(150deg,#0C1A2E,#081426); box-shadow: 0 10px 28px rgba(0,0,0,.13); transition: transform .32s ease,border-color .32s ease,box-shadow .32s ease; }
.reel-card:hover { transform: translateY(-6px); border-color: rgba(52,177,255,.7); box-shadow: 0 18px 45px rgba(0,0,0,.28),0 0 28px rgba(0,125,255,.18),0 0 2px rgba(67,217,255,.4); }
.reel-player-wrap { position: relative; overflow: hidden; width: 100%; aspect-ratio: 9/16; background: #020812; }
.reel-player-wrap::after { position: absolute; inset: 0; border: 1px solid rgba(80,173,255,.05); content: ''; pointer-events: none; transition: box-shadow .3s ease; }
.reel-card:hover .reel-player-wrap::after { box-shadow: inset 0 0 22px rgba(0,150,255,.13); }
.reel-player-wrap iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: #020812; }
.reel-index { position: absolute; top: 10px; left: 10px; z-index: 2; display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid rgba(255,255,255,.2); border-radius: 7px; color: #EAF6FF; background: rgba(4,16,32,.78); font-family: 'Space Grotesk',sans-serif; font-size: 10px; font-weight: 700; backdrop-filter: blur(8px); pointer-events: none; }
.reel-card-content { padding: 15px 14px 13px; }
.reel-card-kicker { display: flex; align-items: center; gap: 7px; min-height: 14px; color: #5CBFFF; font-size: 8px; font-weight: 800; line-height: 1.5; letter-spacing: .8px; }
.reel-card-kicker i { flex-shrink: 0; font-size: 11px; }
.reel-card h3 { display: -webkit-box; overflow: hidden; min-height: 43px; margin: 11px 0 14px; color: #EAF3FF; font-family: 'Space Grotesk',sans-serif; font-size: 12px; font-weight: 700; line-height: 1.6; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; transition: color .25s ease; }
.reel-card:hover h3 { color: var(--reel-cyan); }
.reel-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 11px; border-top: 1px solid rgba(123,159,202,.12); }
.reel-card-bottom > span { display: flex; align-items: center; gap: 7px; color: #8EA8C6; font-size: 8px; font-weight: 800; letter-spacing: .8px; }
.reel-card-bottom > span i { color: var(--reel-cyan); }
.reel-arrow { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid rgba(90,191,255,.16); border-radius: 6px; color: #5ABFFF; font-size: 10px; transition: transform .25s ease,color .25s ease,background .25s ease,box-shadow .25s ease; }
.reel-card:hover .reel-arrow { transform: translate(2px,-2px); color: var(--reel-cyan); background: rgba(22,139,255,.1); box-shadow: 0 0 13px rgba(0,145,255,.13); }

/* Empty search state */
.reels-no-results { padding: 42px 20px; border: 1px solid rgba(105,161,220,.18); border-radius: 12px; text-align: center; background: #091629; }
.reels-no-results > i { margin-bottom: 13px; color: var(--reel-cyan); font-size: 25px; }
.reels-no-results h3 { margin: 0 0 9px; color: var(--reel-white); font-family: 'Space Grotesk',sans-serif; }
.reels-no-results p { margin: 0; color: var(--reel-muted); font-size: 12px; }
.reels-reset-btn { margin-top: 18px; padding: 10px 14px; border: 1px solid rgba(67,217,255,.3); border-radius: 7px; color: #EAF6FF; background: rgba(22,139,255,.12); font-size: 11px; font-weight: 700; cursor: pointer; transition: box-shadow .2s ease,border-color .2s ease; }
.reels-reset-btn:hover { border-color: var(--reel-cyan); box-shadow: 0 0 20px rgba(0,145,255,.18); }

/* Bottom CTA */
.reels-bottom-cta { position: relative; display: flex; align-items: center; gap: 20px; overflow: hidden; margin-top: 52px; padding: 26px; border: 1px solid rgba(63,159,255,.25); border-radius: 13px; background: linear-gradient(110deg,#0C1E36,#0A172A 65%,#0B203A); }
.reels-bottom-cta::after { position: absolute; top: -90px; right: 15%; width: 220px; height: 170px; border-radius: 50%; background: rgba(0,139,255,.15); content: ''; filter: blur(65px); pointer-events: none; }
.reels-cta-icon { position: relative; z-index: 1; display: grid; place-items: center; flex: 0 0 auto; width: 54px; height: 54px; border: 1px solid rgba(67,217,255,.25); border-radius: 13px; color: var(--reel-cyan); background: rgba(22,139,255,.1); font-size: 22px; }
.reels-cta-copy { position: relative; z-index: 1; flex: 1; }
.reels-cta-copy h3 { margin: 0 0 7px; color: #F1F7FF; font-family: 'Space Grotesk',sans-serif; font-size: 17px; font-weight: 700; }
.reels-cta-copy p { margin: 0; color: #9BAEC6; font-size: 11px; line-height: 1.8; }
.reels-cta-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex-shrink: 0; min-height: 43px; padding: 0 16px; border-radius: 7px; color: #fff; background: linear-gradient(110deg,#0879E8,#16A4FF); font-size: 10px; font-weight: 800; transition: transform .25s ease,box-shadow .25s ease; }
.reels-cta-btn:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,145,255,.3); }

@media (max-width: 1150px) { .reels-gallery { padding-right: 4%; padding-left: 4%; } .reels-video-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; } .reels-hero { padding-right: 5%; padding-left: 5%; } }
@media (max-width: 850px) { .reels-hero-inner { grid-template-columns: minmax(0,1.2fr) minmax(220px,.8fr); gap: 22px; } .reels-hero-stat { padding: 20px; } .reels-video-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; } .reels-heading { align-items: flex-start; flex-direction: column; gap: 17px; } .reels-toolbar { align-items: flex-start; flex-direction: column; } }
@media (max-width: 600px) { .reels-hero { padding: 43px 5% 38px; } .reels-hero-inner { grid-template-columns: 1fr; gap: 24px; } .reels-hero h1 { font-size: clamp(35px,9vw,48px); letter-spacing: -1.6px; } .reels-hero-copy > p { font-size: 13px; } .reels-hero-stat { padding: 18px; } .reels-stat-icon { margin-bottom: 12px; } .reels-gallery { padding: 42px 5% 52px; } .reels-heading h2 { font-size: 31px; } .reels-channel-link { width: 100%; justify-content: center; } .reels-toolbar { gap: 12px; } .reels-search { width: 100%; } .reels-toolbar-note { line-height: 1.7; } .reels-bottom-cta { flex-wrap: wrap; gap: 14px; padding: 19px; } .reels-cta-copy { flex-basis: calc(100% - 70px); } .reels-cta-btn { width: 100%; } }
@media (max-width: 380px) { .reels-video-grid { grid-template-columns: 1fr; } .reel-card-content { padding: 16px; } .reel-card h3 { min-height: auto; } .reels-hero-actions { align-items: stretch; flex-direction: column; } .reels-hero-btn,.reels-hero-secondary { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .san-reels-page *, .san-reels-page *::before, .san-reels-page *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* MOBILE FIX: ONE VIDEO PER ROW */
@media screen and (max-width: 600px) {
    .san-reels-page .reels-video-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 24px;
    }

    .san-reels-page .reel-card {
        width: 100%;
        max-width: 100%;
    }

    .san-reels-page .reel-player-wrap {
        width: 100%;
        aspect-ratio: 9 / 16;
    }
}
