/* TorBula | © 2025 — Estilos unificados (index.css) */

/* ================================================================
   TRANSICIONES GLOBALES
   ================================================================ */
*, ::after, ::before {
    box-sizing: border-box;
    scrollbar-width: none;
    touch-action: manipulation;
    transition: background 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

html, body { overflow-x: hidden; }

/* ================================================================
   BASE — Estilos comunes a todos los breakpoints
   ================================================================ */

/* Ocultar hasta que JS aplique animación */
.titulo, .login, .main-row, .about, .skills, .ordenador,
.projects, .contact, .project-container, .esquil,
.cont, .proye, .desl { opacity: 0; }

body {
    background-color: #212121;
    color: #fff;
    font-family: monospace, serif;
    letter-spacing: 0.05em;
}

body::after {
    content: "TorBula";
    display: block;
    font-size: 0px;
    height: 0;
    overflow: hidden;
}

h1 { cursor: default; }

/* --- block-cube --- */
.block-cube {
    position: relative;
    word-break: break-all;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}
.block-cube .bg-top {
    position: absolute;
    height: 10px;
    background: #909090;
    bottom: 100%;
    left: 5px;
    right: -5px;
    transform: skew(-45deg, 0);
    margin: 0;
}
.block-cube .bg-top .bg-inner { bottom: 0; }
.block-cube .bg {
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    background: #909090;
}
.block-cube .bg-right {
    position: absolute;
    background: #909090;
    top: -5px;
    z-index: 0;
    bottom: 5px;
    width: 10px;
    left: 100%;
    transform: skew(0, -45deg);
}
.block-cube .bg-right .bg-inner { left: 0; }
.block-cube .bg .bg-inner { transition: all 0.2s ease-in-out; }
.block-cube .bg-inner {
    background: #212121;
    position: absolute;
    left: 2px; top: 2px; right: 2px; bottom: 2px;
}
.block-cube .text { position: relative; z-index: 2; }
.block-cube.block-input input { position: relative; z-index: 2; }
.block-cube.block-input input:focus ~ .bg-right .bg-inner,
.block-cube.block-input input:focus ~ .bg-top .bg-inner,
.block-cube.block-input input:focus ~ .bg-inner .bg-inner {
    top: 100%;
    background: rgba(255, 255, 255, 0.5);
}
.block-cube.block-input .bg-top,
.block-cube.block-input .bg-right,
.block-cube.block-input .bg {
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.2s ease-in-out;
}
.block-cube.block-input .bg-right .bg-inner,
.block-cube.block-input .bg-top .bg-inner { transition: all 0.2s ease-in-out; }
.block-cube.block-input:focus .bg-top,
.block-cube.block-input:focus .bg-right,
.block-cube.block-input:focus .bg { background: rgba(255, 255, 255, 0.8); }
.block-cube.block-cube-hover:focus .bg .bg-inner { top: 100%; }
.block-cube.block-input .text {
    padding: 15px 20px;
    position: relative;
    z-index: 2;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
}

/* --- form --- */
.form {
    margin: 0 auto;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.form .control input {
    width: 100%;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: monospace, serif;
    letter-spacing: 0.05em;
}
.form .control input:hover,
.form .control input:focus { outline: none; border: 0; }
.form .btn {
    display: block;
    padding: 14px 16px;
    background: transparent;
    outline: none;
    border: 0;
    color: #fff;
    letter-spacing: 0.1em;
    font-weight: bold;
    font-family: monospace;
    cursor: pointer;
}
.form .btn .bg-top,
.form .btn .bg-right,
.form .btn .bg { transition: all 0.5s ease; }
.form .btn .text { transition: all 0.5s ease; }

/* --- layout --- */
.up { display: flex; }
.centrado {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 0 2%;
}
.titulo { padding: 0.8% 2%; cursor: default; }
.left  { padding: 1%; display: flex; flex-direction: column; justify-content: space-between; }
.right { padding: 1%; display: flex; flex-direction: column; justify-content: space-between; }
.login { width: auto; min-width: 260px; }
.about, .skills { margin-bottom: 25px; }
.about { cursor: default; }
.about, .projects { padding: 1%; }
.skills, .contact { padding: 2% 0% 4% 0%; }
.projects { text-align: left; }

/* --- skills --- */
.skills { display: flex; flex-direction: column; align-items: center; }
.skills ul { list-style: none; padding: 0; }
.skills h1 { margin-top: 0; }
.skills .text { width: 100%; display: flex; flex-direction: column; align-items: center; }
.skill-list { display: flex; flex-direction: column; gap: 16px; padding: 0; width: 95%; }
.skill-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    color: white;
    cursor: default;
    text-align: center;
}
.skill-item .text { transition: all 0.3s ease; }
.skill-item.email, .block-cube.email { height: auto; min-height: 40px; align-items: center; }

/* --- project gallery (base, carousel overrides below) --- */
.project-card { position: relative; flex-shrink: 0; }
.project-card .bg-inner { padding: 0; overflow: hidden; }
.project-image {
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}
.project-overlay {
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    width: 100%;
    text-align: center;
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    font-weight: bold;
}
.project-container { display: flex; flex-direction: column; align-items: center; gap: 25px; flex-shrink: 0; }
.project-button { display: flex; justify-content: center; }
.project-button a { text-decoration: none; color: inherit; cursor: pointer; }
.project-button .skill-item .text { font-size: 0.8rem; font-weight: bold; }

/* --- contact --- */
.contact .text { width: 100%; display: flex; flex-direction: column; align-items: center; }
.contact-list {
    width: 100%; height: auto;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}

/* --- misc --- */
.desl .text { transition: color 0.3s ease; width: 100%; }
.email { transition: color 0.3s ease; width: 100%; }
.email .text { text-decoration: none; }
.about .text p { overflow-wrap: break-word; word-break: normal; white-space: normal; }
.icon { filter: invert(1); transition: all 0.3s ease; width: 1.6rem; margin-right: 10px; }
.cont .text { display: flex; flex-direction: row; }
.test { transition: all 0.3s ease; }
a .test, a { text-decoration: none; }
.separador { width: 100%; }
.pad { padding: 8px 16px !important; }
.margin { margin-bottom: 16px !important; }
.padj1, .padj2 { padding: 0 !important; }
.juego1, .btn-idioma { display: flex; align-items: center; }
.none { display: none !important; }
.oculto { opacity: 0; visibility: hidden; }
.mac { padding: 8px 20px !important; }

/* --- tema claro/oscuro --- */
.btn-theme { border: none; cursor: pointer; background: transparent; }
.theme-icon {
    width: 40px; height: 40px; border-radius: 50%;
    filter: invert(1);
}
.game-icon, .language-icon {
    width: 40px; height: 40px;
    filter: invert(1);
}
body.white,
body.white .block-cube .bg-inner { background-color: #eee; }
body.white,
body.white .block-cube.block-input .text,
body.white .form .btn { color: #212121; }
body.white .block-cube.block-input .bg-top,
body.white .block-cube.block-input .bg-right,
body.white .block-cube.block-input .bg,
body.white .block-cube .bg-top,
body.white .block-cube .bg-right,
body.white .block-cube .bg { background: #212121; }
body.white .carousel-nav { border: 2px solid #212121; color: #212121; }
body.white .block-cube.block-input:focus .bg-top,
body.white .block-cube.block-input:focus .bg-right,
body.white .block-cube.block-input:focus .bg { background: #212121; }
body.white .block-cube.block-cube-hover:focus .bg .bg-inner { top: 100%; }
body.white .icon { filter: invert(0); }
body.white .theme-icon,
body.white .game-icon,
body.white .language-icon { filter: invert(0); } /* modo claro: imagen oscura sobre fondo claro */

/* --- animaciones --- */
@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: #fff; } }

.slide-in-top {
    opacity: 0; visibility: visible;
    transform: translateY(-180px);
    animation: slideInTop 1.6s forwards;
}
@keyframes slideInTop { to { opacity: 1; transform: translateY(0); } }

.slide-in-left {
    opacity: 0; visibility: visible;
    transform: translateX(-180px);
    animation: slideInLeft 1.6s forwards;
}
@keyframes slideInLeft { to { opacity: 1; transform: translateX(0); } }

.slide-in-right {
    opacity: 0; visibility: visible;
    transform: translateX(180px);
    animation: slideInRight 1.6s forwards;
}
@keyframes slideInRight { to { opacity: 1; transform: translateX(0); } }

.slide-in-bottom {
    opacity: 0; visibility: visible;
    transform: translateY(180px);
    animation: slideInBottom 1.6s forwards;
}
@keyframes slideInBottom { to { opacity: 1; transform: translateY(0); } }

body.no-scroll,
body.no-scroll .up,
body.no-scroll .todo,
body.no-scroll .all { overflow-x: hidden; overflow-y: hidden; }


/* ================================================================
    HOVER — Solo dispositivos con ratón (mouse/trackpad)
   ================================================================ */
@media (hover: hover) and (pointer: fine) {
    .block-cube.block-input:hover .bg-top,
    .block-cube.block-input:hover .bg-right,
    .block-cube.block-input:hover .bg { background: rgba(255, 255, 255, 0.8); }
    .block-cube.block-cube-hover:hover .bg .bg-inner { top: 100%; }

    .form .btn:hover .bg-top,
    .form .btn:hover .bg-right,
    .form .btn:hover .bg { background: #ffffffcc; }
    .form .btn:hover .text { color: #212121; }

    .skill-item:hover .text { color: #212121; }
    .project-card:hover .project-overlay { transform: translateY(0%); }
    .email:hover .text { color: #212121; }
    .cont:hover .test, .cont:hover .icon { color: #212121; filter: invert(0); }

    .block-cube.block-input:hover .theme-icon,
    .block-cube.block-input:hover .game-icon,
    .block-cube.block-input:hover .language-icon { filter: invert(0); }

    body.white .form .btn:hover .bg-top,
    body.white .form .btn:hover .bg-right,
    body.white .form .btn:hover .bg { background: #212121; }
    body.white .block-cube.block-input:hover .bg-top,
    body.white .block-cube.block-input:hover .bg-right,
    body.white .block-cube.block-input:hover .bg { background: #212121; }
    body.white .block-cube.block-cube-hover:hover .bg .bg-inner { top: 100%; }
    body.white .skill-item:hover .text { color: #eee; }
    body.white .cont:hover .test { color: #eee; }
    body.white .cont:hover .icon { color: #eee; filter: invert(1); }
    body.white .form .btn:hover .text { color: #eee; }
    body.white .block-cube.block-input:hover .theme-icon,
    body.white .block-cube.block-input:hover .game-icon,
    body.white .block-cube.block-input:hover .language-icon { filter: invert(1); }
}

@media (min-width: 1400px) and (hover: hover) and (pointer: fine) {
    .block-cube.block-input:hover .bg-top,
    .block-cube.block-input:hover .bg-right,
    .block-cube.block-input:hover .bg { background: #ffffffcc; }
}

@media (min-width: 1169px) and (max-height: 860px) and (hover: hover) and (pointer: fine) {
    .block-cube.block-input:hover .bg-top,
    .block-cube.block-input:hover .bg-right,
    .block-cube.block-input:hover .bg { background: #ffffffcc; }
}


/* ================================================================
    MÓVIL — max-width: 1169px
   ================================================================ */
@media (max-width: 1169px) {
    body { padding: 1%; }

    .main-row { display: flex; justify-content: center; width: 100%; }

    .all {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        gap: 30px;
    }
    .left, .right { width: 100%; }

    h1 { font-size: inherit; }

    .projects { text-align: center; }


    .form .control { margin: 0; width: 50%; max-width: 100%; height: 100px; display: flex; align-items: center; }
    .form .control input { font-size: 2rem; }
    .form .btn { width: 50%; height: 100px; font-size: 2rem; }

    .titulo h1 { font-size: 6rem; margin: 0; }
    .titulo p { margin-top: 0; margin-left: 12px; font-size: 3rem; }

    .about .text h1 { font-size: 3rem; margin-top: 0; text-align: center; }
    .about p { font-size: 1.2rem; }
    .about, .skills { margin-bottom: 50px; }

    .projects h1 { font-size: 3rem; margin-top: 0; margin-bottom: 40px; }

    .skills { flex-direction: row; margin-bottom: 50px; }
    .skills .text h1 { font-size: 3rem; margin-bottom: 24px; }
    .skill-list { flex-direction: row; flex-wrap: wrap; gap: 25px; margin-top: 20px; justify-content: center; }
    .skill-item { width: 185px; max-width: 300px; height: 85px; font-size: 1.8rem; }

    .email { font-size: 2rem; margin-top: 30px; }
    .block-cube.block-input .text {padding: 15px; font-size: inherit; }

    .project-gallery { min-height: 500px !important; margin-top: 20px; }
    .project-card { width: 600px; height: 400px; }
    .project-button { width: 600px; }
    .project-button .skill-item { max-width: none !important; width: 100%; height: 60px; margin: 0; }
    .project-button .skill-item .text { font-size: 1.8rem; }

    .contact h1 { font-size: 3rem; margin-top: 0; margin-bottom: 24px; }

    .up { flex-direction: column; }
    .up .titulo { order: 2; }
    .up .mainrow { order: 1; }

    .ordenador { display: none !important; }
    .movil { display: block; }

    .cont { width: 90%; margin: 16px 0; }
    .cont .text { flex-direction: row !important; }
    .test { font-size: 1.8rem !important; }
    .icon { width: unset; margin-right: unset; }
    .separador { display: flex; justify-content: center; }

    .sup-der { display: none; }
    .up-der { display: flex; gap: 24px; opacity: 0; }
    .titulo-up { display: flex; justify-content: space-between; align-items: center; }

    .btn-juego, .boton-idioma { font-size: 3rem; line-height: 0; width: 70px; height: 70px; padding: 0; background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
    .boton-idioma { padding: 0 !important; }
    .btn-theme { padding: 0; width: 70px; height: 70px; }
    .theme-icon { width: 60px; height: 60px; }
    .game-icon { width: 65px; height: 65px; }
    .language-icon { width: 70px; height: 70px; }
    .padj { padding: 4px !important; }

    .contact-list { flex-direction: column; }
    .none { display: none !important; }
}


/* ================================================================
   TABLET — min-width: 1170px and max-width: 1399px
   ================================================================ */
@media (min-width: 1170px) and (max-width: 1399px) {
    body { padding: 0.5% 0.5% 0 0.5%; }
    h1 { font-size: 23px; }

    .main-row { display: flex; justify-content: flex-end; width: 100%; }
    .all { display: flex; justify-content: space-around; }
    .left { width: 77%; }
    .right { width: 23%; }
    .block-cube { max-width: 100%; }

    .titulo { padding: 0.8% 2%; }
    .titulo h1 { font-size: 3rem; margin: 0; }
    .titulo p { margin: 0 0 0 12px; font-size: 1.6rem; white-space: nowrap; }

    .about h1 { font-size: 1.8rem; margin-top: 0; }
    .about p { font-size: 1.1rem; }

    .projects h1 { font-size: 1.8rem; margin-top: 0; margin-bottom: 25px; }

    .skills { flex-direction: column; margin-bottom: 25px; }
    .skills h1 { font-size: 1.8rem; }
    .skill-list { flex-direction: column; gap: 16px; width: 90%; }
    .skill-item { width: 100%; height: 30px; font-size: 0.9rem; }

    .email { font-size: 0.9rem; margin-top: 25px; }
    .block-cube.block-input .text { font-size: 0.9rem; }

    .form .control { margin: 0; width: 220px; max-width: 100%; height: 50px; display: flex; align-items: center; }
    .form .control input { font-size: 16px; }
    .form .btn { width: 220px; height: 50px; font-size: 16px; }

    .project-card { width: 330px; height: 220px; }
    .project-button { width: 330px; }
    .project-button .skill-item { width: 100%; height: 30px; margin: 0; }

    .contact h1 { font-size: 1.8rem; margin-top: 0; margin-bottom: 0; }

    .up { margin-bottom: 10px; }
    .movil { display: none !important; }
    .ordenador { display: block; }

    .cont { width: 90%; margin: 10px 0; }
    .test { font-size: 0.9rem !important; }
    .separador { text-align: center; }

    .up-der { display: none; }
    .sup-der { display: flex; align-items: center; gap: 16px; opacity: 0; margin-right: 1.5%; }
    .btn-juego, .boton-idioma { font-size: 1.2rem; line-height: 0.5; background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
    .padj { padding: 0 !important; }

    .none { display: none !important; }
    .contact-list { flex-direction: column; }
}


/* ================================================================
   ESCRITORIO — min-width: 1400px
   ================================================================ */
@media (min-width: 1400px) {
    body { padding: 0.5% 0.5% 0 0.5%; }
    h1 { font-size: 23px; }

    .main-row { display: flex; justify-content: flex-end; width: 100%; }
    .all { display: flex; justify-content: space-around; }
    .left { width: 80%; }
    .right { width: 19%; }
    .block-cube { max-width: 100%; }

    .titulo { padding: 0.5% 2%; }
    .titulo h1 { font-size: 3rem; margin: 0; }
    .titulo p { margin: 0 0 0 12px; font-size: 1.6rem; white-space: nowrap; }

    .about h1 { font-size: 2rem; margin-top: 0; }
    .about p { font-size: 1.2rem; }

    .projects h1 { font-size: 2rem; margin-top: 0; margin-bottom: 25px; }

    .skills { flex-direction: column; margin-bottom: 25px; }
    .skills h1 { font-size: 1.8rem; }
    .skill-list { flex-direction: column; gap: 16px; width: 90%; }
    .skill-item { width: 100%; height: 30px; font-size: 0.9rem; }

    .email { font-size: 0.9rem; margin-top: 25px; }
    .block-cube.block-input .text { font-size: 0.9rem; }

    .form .control { margin: 0; width: 220px; max-width: 100%; height: 51px; display: flex; align-items: center; padding: 2px; }
    .form .control input { font-size: 16px; }
    .form .btn { width: 220px; height: 50px; font-size: 16px; }

    .block-cube.block-input .bg-top,
    .block-cube.block-input .bg-right,
    .block-cube.block-input .bg { background: #909090; }
    .block-cube.block-input input:focus ~ .bg-right .bg-inner,
    .block-cube.block-input input:focus ~ .bg-top .bg-inner,
    .block-cube.block-input input:focus ~ .bg-inner .bg-inner { top: 100%; background: #909090; }
    .block-cube.block-input:focus .bg-top,
    .block-cube.block-input:focus .bg-right,
    .block-cube.block-input:focus .bg { background: #ffffffcc; }

    .project-card { width: 330px; height: 220px; }
    .project-button { width: 330px; }
    .project-button .skill-item { width: 100%; height: 30px; margin: 0; }

    .contact h1 { font-size: 2rem; margin-top: 0; margin-bottom: 0; }

    .movil { display: none !important; }
    .ordenador { display: block; }

    .cont { width: 90%; margin: 10px 0; }
    .test { font-size: 0.9rem !important; }
    .separador { text-align: center; }
    .pad { padding: 8px 16px !important; }

    .up-der { display: none; }
    .sup-der { display: flex; align-items: center; gap: 16px; opacity: 0; margin-right: 1.5%; }
    .btn-juego, .boton-idioma { background: none; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }

    .none { display: none !important; }
    .contact-list { flex-direction: column; }
}


/* ================================================================
   MAC / LAPTOP — min-width: 1169px and max-height: 860px
   Pantallas de baja altura (MacBooks, laptops)
   ================================================================ */
@media (min-width: 1169px) and (max-height: 860px) {
    .about h1 { font-size: 1.4rem; margin: 0 0 12px 0; }
    .about p { font-size: 1rem; }
    .projects h1 { font-size: 1.4rem; }
    .skills h1 { font-size: 1.4rem; margin: 8px 0 24px 0; }
    .contact h1 { font-size: 1.4rem; }

    .project-gallery { min-height: 250px !important; }

    .separador { display: none; }
    .cont { width: 20% !important; max-width: 40px; }
    .pad { padding: 8px !important; align-items: center !important; }
    .contact-list { flex-direction: row; justify-content: space-around; }

    .none { display: unset !important; }
    .none .text { padding: 8px !important; }

    .block-cube.block-input .bg-top,
    .block-cube.block-input .bg-right,
    .block-cube.block-input .bg { background: #909090; }
    .block-cube.block-input input:focus ~ .bg-right .bg-inner,
    .block-cube.block-input input:focus ~ .bg-top .bg-inner,
    .block-cube.block-input input:focus ~ .bg-inner .bg-inner { top: 100%; background: #909090; }
    .block-cube.block-input:focus .bg-top,
    .block-cube.block-input:focus .bg-right,
    .block-cube.block-input:focus .bg { background: #ffffffcc; }
}

@media (min-width: 1169px) and (max-height: 860px) and (max-width: 1400px) {
    .cont { width: 25% !important; }
}


/* ================================================================
   CAROUSEL
   ================================================================ */
.carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 80px;
    box-sizing: border-box;
}
.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
}
.carousel-track:active { cursor: grabbing; }

.carousel-item {
    position: absolute;
    left: 50%;
    transform-origin: center center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity, filter;
    width: 330px;
}
@media (max-width: 1099px) { .carousel-item { width: 100% !important; } }

.carousel-item.active {
    transform: translateX(-50%) scale(1);
    opacity: 1; filter: brightness(1);
    z-index: 10; pointer-events: auto;
}
.carousel-item.prev {
    transform: translateX(calc(-50% - 420px)) scale(0.85);
    opacity: 0.6; filter: brightness(0.5);
    z-index: 5; pointer-events: auto; visibility: visible;
}
.carousel-item.next {
    transform: translateX(calc(-50% + 420px)) scale(0.85);
    opacity: 0.6; filter: brightness(0.5);
    z-index: 5; pointer-events: auto; visibility: visible;
}
.carousel-item.side-prev {
    opacity: 0.4; filter: brightness(0.4);
    z-index: 3; pointer-events: auto; visibility: visible;
}
.carousel-item.side-prev[data-position="-2"] { transform: translateX(calc(-50% - 600px)) scale(0.75); }
.carousel-item.side-prev[data-position="-3"] { transform: translateX(calc(-50% - 920px)) scale(0.65); }
.carousel-item.side-next {
    opacity: 0.4; filter: brightness(0.4);
    z-index: 3; pointer-events: auto; visibility: visible;
}
.carousel-item.side-next[data-position="2"] { transform: translateX(calc(-50% + 600px)) scale(0.75); }
.carousel-item.side-next[data-position="3"] { transform: translateX(calc(-50% + 920px)) scale(0.65); }
.carousel-item.hidden {
    transform: translateX(-50%) scale(0.7);
    opacity: 0; filter: brightness(0.3);
    z-index: 1; pointer-events: none; visibility: hidden;
}
.carousel-item.initial-load {
    transform: translateX(-50%) translateY(100px) scale(0.7) !important;
    opacity: 0 !important;
}

.carousel-nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: white; font-size: 30px; font-weight: bold;
    cursor: pointer; z-index: 20;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    user-select: none;
    padding: 0 0 6px 0;
}
.carousel-nav:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-50%) scale(1.1);
}
.carousel-nav:active { transform: translateY(-50%) scale(0.95); }
.carousel-prev { left: 0; top: 20px; }
.carousel-next { right: 0; top: 20px; }

.project-gallery {
    min-height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    flex-wrap: nowrap !important;
    scroll-behavior: auto !important;
}
.project-gallery::-webkit-scrollbar { display: none !important; }

@media (max-width: 999px) {
    .carousel-container { padding: 40px 50px; }
    .carousel-item.prev { transform: translateX(calc(-30% - 280px)) scale(0.7); opacity: 0.5; visibility: visible; }
    .carousel-item.next { transform: translateX(calc(-70% + 280px)) scale(0.7); opacity: 0.5; visibility: visible; }
    .carousel-nav { width: 80px; height: 80px; font-size: 50px; }
    .carousel-prev { left: 5px; }
    .carousel-next { right: 5px; }
}
@media (min-width: 1000px) and (max-width: 1399px) {
    .carousel-container { padding: 40px 60px; }
    .carousel-item.prev { transform: translateX(calc(-30% - 320px)) scale(0.75); opacity: 0.55; visibility: visible; }
    .carousel-item.next { transform: translateX(calc(-70% + 320px)) scale(0.75); opacity: 0.55; visibility: visible; }
}
@media (min-width: 1300px) {
    .carousel-container { padding: 40px 80px; }
    .carousel-item.active { transform: translateX(-50%) scale(1); }
    .carousel-item.prev { transform: translateX(calc(-50% - 320px)) scale(0.85); opacity: 0.6; filter: brightness(0.5); visibility: visible; }
    .carousel-item.next { transform: translateX(calc(-50% + 320px)) scale(0.85); opacity: 0.6; filter: brightness(0.5); visibility: visible; }
    .carousel-nav { width: 46px; height: 46px; font-size: 32px; }
    .carousel-prev { left: 20px; }
    .carousel-next { right: 20px; }
}
@media (min-width: 1787px) {
    .carousel-item.prev { transform: translateX(calc(-50% - 300px)) scale(0.8); }
    .carousel-item.next { transform: translateX(calc(-50% + 300px)) scale(0.8); }
    .carousel-item.side-prev[data-position="-2"] { transform: translateX(calc(-50% - 530px)) scale(0.6); }
    .carousel-item.side-next[data-position="2"] { transform: translateX(calc(-50% + 530px)) scale(0.6); }
}
@media (min-width: 1900px) {
    .carousel-item.prev { transform: translateX(calc(-50% - 280px)) scale(0.8); }
    .carousel-item.next { transform: translateX(calc(-50% + 280px)) scale(0.8); }
    .carousel-item.side-prev[data-position="-2"] { transform: translateX(calc(-50% - 530px)) scale(0.7); }
    .carousel-item.side-next[data-position="2"] { transform: translateX(calc(-50% + 530px)) scale(0.7); }
}
@media (min-width: 2200px) {
    .carousel-item.prev { transform: translateX(calc(-50% - 330px)) scale(0.9); }
    .carousel-item.next { transform: translateX(calc(-50% + 330px)) scale(0.9); }
    .carousel-item.side-prev[data-position="-2"] { transform: translateX(calc(-50% - 625px)) scale(0.8); }
    .carousel-item.side-next[data-position="2"] { transform: translateX(calc(-50% + 625px)) scale(0.8); }
}
@media (min-width: 2447px) {
    .carousel-item.prev { transform: translateX(calc(-50% - 300px)) scale(0.8); }
    .carousel-item.next { transform: translateX(calc(-50% + 300px)) scale(0.8); }
    .carousel-item.side-prev[data-position="-2"] { transform: translateX(calc(-50% - 540px)) scale(0.65); }
    .carousel-item.side-next[data-position="2"] { transform: translateX(calc(-50% + 540px)) scale(0.65); }
    .carousel-item.side-prev[data-position="-3"] { transform: translateX(calc(-50% - 745px)) scale(0.55); }
    .carousel-item.side-next[data-position="3"] { transform: translateX(calc(-50% + 745px)) scale(0.55); }
}
@media (min-width: 2600px) {
    .carousel-item.prev { transform: translateX(calc(-50% - 320px)) scale(0.8); }
    .carousel-item.next { transform: translateX(calc(-50% + 320px)) scale(0.8); }
    .carousel-item.side-prev[data-position="-2"] { transform: translateX(calc(-50% - 580px)) scale(0.7); }
    .carousel-item.side-next[data-position="2"] { transform: translateX(calc(-50% + 580px)) scale(0.7); }
    .carousel-item.side-prev[data-position="-3"] { transform: translateX(calc(-50% - 805px)) scale(0.6); }
    .carousel-item.side-next[data-position="3"] { transform: translateX(calc(-50% + 805px)) scale(0.6); }
}
@media (min-width: 2800px) {
    .carousel-item.prev { transform: translateX(calc(-50% - 330px)) scale(0.9); }
    .carousel-item.next { transform: translateX(calc(-50% + 330px)) scale(0.9); }
    .carousel-item.side-prev[data-position="-2"] { transform: translateX(calc(-50% - 620px)) scale(0.8); }
    .carousel-item.side-next[data-position="2"] { transform: translateX(calc(-50% + 620px)) scale(0.8); }
    .carousel-item.side-prev[data-position="-3"] { transform: translateX(calc(-50% - 880px)) scale(0.7); }
    .carousel-item.side-next[data-position="3"] { transform: translateX(calc(-50% + 880px)) scale(0.7); }
}
@media (min-width: 3000px) {
    .carousel-item.prev { transform: translateX(calc(-50% - 330px)) scale(0.9); }
    .carousel-item.next { transform: translateX(calc(-50% + 330px)) scale(0.9); }
    .carousel-item.side-prev[data-position="-2"] { transform: translateX(calc(-50% - 620px)) scale(0.8); }
    .carousel-item.side-next[data-position="2"] { transform: translateX(calc(-50% + 620px)) scale(0.8); }
    .carousel-item.side-prev[data-position="-3"] { transform: translateX(calc(-50% - 880px)) scale(0.7); }
    .carousel-item.side-next[data-position="3"] { transform: translateX(calc(-50% + 880px)) scale(0.7); }
}
