/* --- CORE SETUP --- */
.testimonial-section {
    background-color: #0b0c10;
    --testimonial-cyan: #45f3ff;
    --testimonial-purple: #bc13fe;
    --testimonial-orange: #ffaa00; /* Hazard Color */
    --testimonial-green: #00ff41; /* Success Color */
    perspective: 1500px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.testimonial-bg-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.3; }
.testimonial-text-highlight { color: transparent; -webkit-text-stroke: 1px var(--testimonial-cyan); text-shadow: 0 0 15px rgba(69, 243, 255, 0.6); }
.testimonial-decor-line { width: 60px; height: 4px; background: linear-gradient(90deg, var(--testimonial-cyan), transparent); }

/* --- 3D POP-OUT GYROSCOPE (TRUE DEPTH) --- */
.testimonial-gyro-container {
    width: 250px; 
    height: 250px;
    position: relative;
    margin-left: 80px;
    perspective: 1000px; 
    transform-style: preserve-3d;
}

.testimonial-gyro {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(15deg) rotateY(15deg); 
}

.testimonial-gyro-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 3px solid transparent;
    transform-style: preserve-3d;
    box-shadow: 0 0 20px rgba(69, 243, 255, 0.3);
}

/* OUTER RING */
.testimonial-ring-outer {
    width: 100%;
    height: 100%;
    border-top-color: var(--testimonial-cyan);
    border-bottom-color: var(--testimonial-purple);
    animation: t-orbit-depth 5s linear infinite; 
}

/* MIDDLE RING */
.testimonial-ring-middle {
    width: 70%;
    height: 70%;
    border-left-color: #fff;
    border-right-color: var(--testimonial-cyan);
    animation: t-orbit-depth-reverse 4s linear infinite;
}

/* INNER RING */
.testimonial-ring-inner {
    width: 40%;
    height: 40%;
    border: 2px dashed var(--testimonial-cyan);
    animation: t-spin-flat 2s linear infinite;
}

/* THE CORE */
.testimonial-gyro-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 45px;             /* Increased size to make logo visible */
    height: 45px;
    background: transparent; /* Removes the solid blue circle */
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px var(--testimonial-cyan); 
    animation: t-pulse-core 2s ease-in-out infinite;
    z-index: 10;
}

/* 2. Style the Logo Image */
.gyro-logo {
    width: 85%;              /* Fits slightly inside the glow area */
    height: 85%;
    object-fit: contain;     /* Keeps logo proportions correct */
    animation: logo-flicker 4s linear infinite; /* Add this line */
    /* Adds a glowing effect to the logo itself */
    filter: drop-shadow(0 0 5px var(--testimonial-cyan));
}

.testimonial-gyro-core::after {
    content: "";
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--testimonial-cyan);
    box-shadow: 0 0 10px var(--testimonial-cyan);
    opacity: 0;
    z-index: 11;
    pointer-events: none;
    animation: core-scan 3s ease-in-out infinite;
}

/* Animation for the holographic flicker */
@keyframes logo-flicker {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 5px var(--testimonial-cyan)) brightness(1); }
    33% { opacity: 0.8; filter: drop-shadow(0 0 2px var(--testimonial-cyan)) brightness(0.9); }
    35% { opacity: 0.9; filter: drop-shadow(0 0 8px var(--testimonial-cyan)) brightness(1.2); }
    37% { opacity: 0.7; filter: drop-shadow(0 0 1px var(--testimonial-cyan)) brightness(0.8); }
    40% { opacity: 1; filter: drop-shadow(0 0 5px var(--testimonial-cyan)) brightness(1); }
}

/* Animation for the scanning laser line */
@keyframes core-scan {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 1; }
    50% { top: 110%; opacity: 1; }
    90% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

/* --- GYRO ANIMATIONS --- */
@keyframes t-orbit-depth {
    0% { transform: translate(-50%, -50%) rotateZ(0deg) rotateX(60deg) translateZ(-50px); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) rotateZ(180deg) rotateX(60deg) translateZ(100px); opacity: 1; border-width: 5px; }
    100% { transform: translate(-50%, -50%) rotateZ(360deg) rotateX(60deg) translateZ(-50px); opacity: 0.5; }
}
@keyframes t-orbit-depth-reverse {
    0% { transform: translate(-50%, -50%) rotateZ(0deg) rotateY(60deg) translateZ(-50px); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) rotateZ(-180deg) rotateY(60deg) translateZ(100px); opacity: 1; border-width: 5px; }
    100% { transform: translate(-50%, -50%) rotateZ(-360deg) rotateY(60deg) translateZ(-50px); opacity: 0.5; }
}
@keyframes t-spin-flat {
    0% { transform: translate(-50%, -50%) rotateZ(0deg); }
    100% { transform: translate(-50%, -50%) rotateZ(360deg); }
}
@keyframes t-pulse-core {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; box-shadow: 0 0 70px var(--testimonial-cyan); }
}


/* --- PORTAL CONTAINER (UPSCALED) --- */
.testimonial-portal-container {
    width: 600px;  
    height: 580px; 
    position: relative;
    perspective: 1000px; 
    z-index: 10;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 0 60px rgba(0,0,0,0.9);
    overflow: hidden; /* Ensures doors don't float outside the frame weirdly */
}

.testimonial-portal-frame {
    position: absolute;
    top: -8px; left: -8px; right: -8px; bottom: -8px; 
    border: 4px solid #333;
    border-radius: 14px;
    z-index: 0;
    background: #111;
}

/* --- KEYPAD --- */
.testimonial-keypad {
    position: absolute;
    top: 50%;
    right: -60px; 
    width: 50px; 
    height: 120px;
    background: #222;
    border: 1px solid #444;
    border-radius: 6px;
    z-index: 30;
    transform: translateY(-50%);
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.testimonial-key-screen {
    width: 100%;
    height: 20px;
    background: #000;
    color: red;
    font-size: 10px; 
    text-align: center;
    line-height: 20px;
    font-family: monospace;
    margin-bottom: 8px;
    border: 1px solid #333;
}
.testimonial-key-screen.granted { color: var(--testimonial-green); text-shadow: 0 0 5px var(--testimonial-green); }
.testimonial-keys { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; }
.key { width: 10px; height: 10px; background: #555; border-radius: 2px; }
.key.active { background: var(--testimonial-green); box-shadow: 0 0 5px var(--testimonial-green); }

/* --- DOORS --- */
.testimonial-door {
  position: absolute;
  top: 0; width: 50%; height: 100%;
  background: #1a1a1a;
  z-index: 20;
  
  /* Reduced from 0.3s to 0.15s */
  transition: transform 0.15s cubic-bezier(0.5, 0, 0.2, 1); 
  
  overflow: hidden;
  border: 1px solid #333;
}

.testimonial-door-left { left: 0; border-right: 2px solid #555; box-shadow: 5px 0 15px rgba(0,0,0,0.7); }
.testimonial-door-right { right: 0; border-left: 2px solid #555; box-shadow: -5px 0 15px rgba(0,0,0,0.7); }

.testimonial-door-plate {
    width: 100%; height: 100%;
    background-image: 
        linear-gradient(90deg, transparent 50%, rgba(0,0,0,0.2) 50%),
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 12px 100%, 100% 24px;
    position: relative;
}

/* HAZARD STRIPES */
.testimonial-hazard-stripe {
    position: absolute;
    bottom: 25px; left: 0; width: 100%; height: 25px;
    background: repeating-linear-gradient(
        45deg,
        #000,
        #000 15px,
        var(--testimonial-orange) 15px,
        var(--testimonial-orange) 30px
    );
    opacity: 0.9;
}

/* DOOR HANDLES */
.testimonial-handle {
    position: absolute;
    top: 50%;
    width: 12px; height: 80px;
    background: #333;
    border: 1px solid #666;
    transform: translateY(-50%);
}
.testimonial-door-left .testimonial-handle { right: 15px; border-radius: 6px 0 0 6px; border-right: none; }
.testimonial-door-right .testimonial-handle { left: 15px; border-radius: 0 6px 6px 0; border-left: none; }

/* --- OPEN STATE (FIXED TO PREVENT CUT-OFF) --- */
.testimonial-portal-container.open .testimonial-door-left { 
    transform: translateX(-85%); /* Stops before edge */
}
.testimonial-portal-container.open .testimonial-door-right { 
    transform: translateX(85%); /* Stops before edge */
}


/* --- SMOKE EFFECT --- */
.testimonial-smoke-vent {
    position: absolute;
    top: 50%;
    width: 60px; height: 100px;
    transform: translateY(-50%);
    z-index: 25; 
    pointer-events: none;
}
.left-vent { left: -30px; }
.right-vent { right: -30px; }

.testimonial-smoke-particle {
    position: absolute;
    width: 20px; height: 20px;
    background: rgba(200, 200, 200, 0.4);
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0;
}
@keyframes smoke-puff-left {
    0% { transform: translateX(0) scale(0.5); opacity: 0.6; }
    100% { transform: translateX(-50px) scale(2); opacity: 0; }
}
@keyframes smoke-puff-right {
    0% { transform: translateX(0) scale(0.5); opacity: 0.6; }
    100% { transform: translateX(50px) scale(2); opacity: 0; }
}


/* --- 3D CARD (Inside - Larger) --- */
.testimonial-card-3d-wrapper {
  position: absolute;
  top: 8%; 
  left: 8%; 
  right: 8%; 
  bottom: 8%;
  z-index: 5;
  opacity: 0;
  transform: translateZ(-200px) scale(0.5);

  /* Speed increased: changed from 0.3s to 0.15s */
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275); 

  background: rgba(15, 20, 25, 0.95);
  border: 2px solid var(--testimonial-cyan);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 0 40px rgba(69, 243, 255, 0.25);
  display: flex; 
  flex-direction: column; 
  justify-content: center;
}
.testimonial-portal-container.eject .testimonial-card-3d-wrapper { opacity: 1; transform: translateZ(60px) scale(1.05); }

/* Card Content */
.testimonial-avatar-small { width: 70px; height: 70px; border-radius: 50%; border: 3px solid var(--testimonial-cyan); margin-right: 20px; }
.testimonial-quote { font-size: 1.1rem; color: #ccc; font-style: italic; margin-top: 15px; line-height: 1.6; }
.testimonial-role { color: var(--testimonial-cyan); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 5px; display: block; }

/* ============================================================
   TESTIMONIALS: FINAL ZERO-SCROLL & CROP FIX
   Supports: All Mobile & Tablet Screens (375px - 1199px)
   ============================================================ */
@media (max-width: 1199px) {
    .testimonial-section {
        height: 100vh !important; /* Locks section to screen height */
        min-height: 100vh !important;
        padding: 10px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important; 
        overflow: hidden !important;
    }

    /* 1. Header: Pulled to top to save space */
    .testimonial-content-wrapper {
        text-align: center !important; 
        margin-bottom: 5px !important;
        padding-top: 0 !important;
        width: 100% !important;
        z-index: 20;
    }

    .testimonial-heading {
        font-size: clamp(1.4rem, 4vh, 1.8rem) !important;
    }

    .testimonial-decor-line {
        margin: 5px auto !important;
        width: 50px !important;
    }

    /* 2. Gyroscope: Large size as requested, pulled up */
    .testimonial-gyro-container {
        width: 195px !important;   
        height: 170px !important;  
        transform: scale(0.9) !important; 
        margin: 10px auto 0 !important; 
        position: relative;
        z-index: 10;
    }

    /* 3. Portal (Doors): Shifted up and sized for zero-scroll */
    .testimonial-portal-container {
        width: 92vw !important;
        max-width: 480px;
        height: 330px !important; 
        margin: 0 auto !important;  
        margin-top: -40px !important; /* Pulls portal up closer to gyro */
    }

    /* 4. The Card: FIXED CROP by increasing left/right margins */
    .testimonial-card-3d-wrapper {
        padding: 15px !important; 
        left: 10% !important;  /* Increased to push text away from left edge */
        right: 10% !important; /* Increased for symmetry */
        top: 6% !important;
        bottom: 6% !important;
    }

    .testimonial-avatar-small {
        width: 45px !important; 
        height: 45px !important;
    }

    .testimonial-quote {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
        margin-top: 5px !important;
    }

    .testimonial-role {
        font-size: 0.7rem !important;
    }

    /* 5. DOORS: FIXED CROP by opening 100% to clear the view */
    .testimonial-portal-container.open .testimonial-door-left { 
        transform: translateX(-100%) !important; 
    }
    .testimonial-portal-container.open .testimonial-door-right { 
        transform: translateX(100%) !important; 
    }

    /* 6. Hide Keypad for mobile */
    .testimonial-keypad {
        display: none !important; 
    }
}