.glass-border { border: 1px solid rgba(255, 255, 255, 0.4); }
.architectural-line { background: linear-gradient(90deg, transparent, #233b61 50%, transparent); height: 0.5px; width: 100%; opacity: 0.3; }

#cursor-dot {
    width: 6px;
    height: 6px;
    background: #233b61;
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
}
#cursor-ring {
    width: 32px;
    height: 32px;
    border: 1.5px solid rgba(35, 59, 97, 0.4);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), height 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s, border-color 0.3s, opacity 0.3s;
}

body.cursor-hover #cursor-ring {
    width: 64px;
    height: 64px;
    background-color: rgba(251, 176, 48, 0.1);
    border-color: rgba(251, 176, 48, 0.6);
}

body.cursor-on-dark #cursor-ring {
    border-color: rgba(255, 255, 255, 0.5);
}
body.cursor-on-dark.cursor-hover #cursor-ring {
    background-color: rgba(251, 176, 48, 0.15);
    border-color: rgba(251, 176, 48, 0.6);
}

#cursor-glow {
    pointer-events: none;
    position: fixed;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 82, 122, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s ease;
    opacity: 0;
}

.backdrop-blur-20px { backdrop-filter: blur(20px); }

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 1000ms cubic-bezier(0.25, 0.1, 0.25, 1), transform 1000ms cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: opacity, transform;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.magnetic { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.parallax-target { transition: transform 0.1s linear; }

@keyframes navFloat {
    0%, 100% { transform: translate(-50%, 0px); }
    50% { transform: translate(-50%, -5px); }
}
.floating-nav { animation: navFloat 4s ease-in-out infinite; }

.btn-shimmer {
    position: relative;
    overflow: hidden;
}
.btn-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
    opacity: 0;
}
.btn-shimmer:hover::after {
    left: 100%;
    opacity: 1;
}

.project-img-container img { transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1); }
.project-img-container:hover img { transform: scale(1.08); }

.method-tab { position: relative; transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.method-tab::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 4px;
    background: #fbb030;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.method-tab.active::after { width: 100%; }

@keyframes fade-in-scale {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}
.animate-fade-scale { animation: fade-in-scale 0.8s forwards cubic-bezier(0.22, 1, 0.36, 1); }

.project-card-overlay {
    transition: opacity 0.8s ease, background 0.8s ease;
}

.filter-transition {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), scale 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-item {
    transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 28, 45, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%);
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    background: white;
    z-index: 101;
    display: none;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
}
.modal-active .modal-backdrop { display: block; opacity: 1; }
.modal-active .modal-content { display: block; opacity: 1; transform: translate(-50%, -50%); }

@media (hover: hover) and (pointer: fine) {
    body { cursor: none; }
    a, button, select, input, textarea, .cursor-pointer { cursor: none; }
}

.method-accordion-body {
    transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1), max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

/* 3D Carousel */
.carousel-viewport {
    position: relative;
    overflow: visible;
}

.carousel-card {
    position: absolute;
    width: 280px;
    height: 400px;
    left: 50%;
    top: 50%;
    margin-left: -140px;
    margin-top: -200px;
    border-radius: 24px;
    overflow: hidden;
    clip-path: inset(0 round 24px);
    -webkit-clip-path: inset(0 round 24px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
}

.carousel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-card:hover img {
    transform: scale(1.05);
}

.carousel-card-glass {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.92) 0%, rgba(10, 22, 40, 0.6) 50%, transparent 100%);
}

.carousel-card-glass h4 {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), text-shadow 0.5s ease;
}

.carousel-card-glass p {
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), text-shadow 0.5s ease;
}

.carousel-card-active .carousel-card-glass h4 {
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.carousel-card-active .carousel-card-glass p {
    text-shadow: 0 1px 8px rgba(0,0,0,0.7);
    color: rgba(255,255,255,0.9);
}

.carousel-arrow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(35, 59, 97, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(35, 59, 97, 0.15);
    color: #233b61;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-arrow-btn:hover {
    background: rgba(35, 59, 97, 0.15);
    border-color: rgba(35, 59, 97, 0.3);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(35, 59, 97, 0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-dot.active {
    width: 28px;
    background: #fbb030;
}

.carousel-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
}

.carousel-card-solo {
    width: 520px !important;
    height: 440px !important;
    margin-left: -260px !important;
    margin-top: -220px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1024px) {
    .carousel-card {
        width: 240px;
        height: 340px;
        margin-left: -120px;
        margin-top: -170px;
    }
    .carousel-card-solo {
        width: 420px !important;
        height: 360px !important;
        margin-left: -210px !important;
        margin-top: -180px !important;
    }
}

@media (max-width: 768px) {
    #cursor-dot, #cursor-ring, #cursor-glow { display: none !important; }
    body { cursor: auto !important; }
    /* Mobile: tarjeta central mas chica para dejar espacio a los proyectos
       vecinos que asoman a los costados (como en Proyectos). El transform y la
       opacity los pone el JS (buildCardTransform / applyCardStyle); el centrado
       se resuelve con left/top 50% + translate(-50%,-50%) dentro del transform. */
    .carousel-card {
        width: min(58vw, 300px) !important;
        height: auto !important;
        aspect-ratio: 4 / 5;
        top: 50%;
        left: 50%;
        margin: 0 !important;
    }
    .carousel-card-solo {
        width: 320px !important;
        height: 300px !important;
        margin-left: -160px !important;
        margin-top: -150px !important;
    }
    .modal-content {
        width: 96% !important;
        max-height: 95vh !important;
        border-radius: 24px !important;
    }
    .carousel-arrow-btn {
        width: 40px;
        height: 40px;
    }
    .carousel-viewport {
        height: calc(min(58vw, 300px) * 1.25 + 24px) !important;
    }
    #garibaldi-showcase .showcase-side {
        display: none;
    }
    #garibaldi-showcase > div:first-child {
        gap: 10px !important;
        padding: 0 12px !important;
    }
}
