/* Reset & Basics */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Fluid 3D Card Styling --- */
.card-scene {
    perspective: 1500px;
    touch-action: manipulation; /* Remove delay do tap em mobile */
}

/* 3D Entrance Animation */
@keyframes card-enter-3d {
    0% {
        opacity: 0;
        transform: translateY(100vh) rotateX(45deg) scale(0.5);
    }
    60% {
        opacity: 1;
        transform: translateY(-20px) rotateX(-5deg) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0) scale(1);
    }
}

.card-entrance {
    animation: card-enter-3d 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.card-object {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    /* Alterado para animar apenas o transform para performance */
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1); 
    transform-origin: center center;
    /* Dica para o navegador usar a GPU */
    will-change: transform; 
}

.is-interacting {
    transition: transform 0.1s linear; 
}

.card-object.is-flipped {
    transform: rotateY(180deg);
}

.card-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden; /* Safari Fix */
    -webkit-font-smoothing: subpixel-antialiased;
    transform: translateZ(0px); 
    transform-style: preserve-3d;
}

.card-back {
    transform: rotateY(180deg) translateZ(0px);
}

.backface-hidden {
    backface-visibility: hidden;
}

/* --- Portrait 3D Styling (About Me) --- */
.portrait-scene {
    perspective: 1200px;
}

.portrait-object {
    transform-style: preserve-3d;
    will-change: transform;
}

/* Floating Icon Animation */
@keyframes float-icon {
    0%, 100% {
        transform: translateZ(30px) translateY(0px);
    }
    50% {
        transform: translateZ(30px) translateY(-10px);
    }
}

.floating-icon-badge {
    animation: float-icon 3s ease-in-out infinite;
    will-change: transform;
    transform-style: preserve-3d;
}

/* 3D Depth Utilities */
.transform-style-3d { transform-style: preserve-3d; }
.translate-z-10 { transform: translateZ(10px); }
.translate-z-20 { transform: translateZ(20px); }
.translate-z-30 { transform: translateZ(30px); }
.translate-z-40 { transform: translateZ(40px); }

/* --- Marquee Logic (Seamless Infinite Loop) --- */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    width: max-content; 
}

/* Generic Left Scroll */
.marquee-content {
    animation: scroll-left 40s linear infinite; /* Slow default */
    animation-play-state: running !important;
}

/* For Gallery - Left and Right variants */
.marquee-left {
    animation: scroll-left 30s linear infinite;
    animation-play-state: running !important;
}

.marquee-right {
    animation: scroll-right 30s linear infinite;
    animation-play-state: running !important;
}

/* REMOVED PAUSE ON HOVER to meet requirement "mexendo sem parar" */
/* .marquee-content:hover {
    animation-play-state: paused !important; 
} */

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

@keyframes scroll-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Images */
.gallery-img {
    height: 10rem; 
    width: auto;
    border-radius: 0.5rem; 
    filter: grayscale(100%);
    border: 1px solid rgba(255,255,255,0.1);
    object-fit: cover;
    user-select: none;
    pointer-events: none; 
}
@media (min-width: 768px) {
    .gallery-img {
        height: 16rem; 
    }
}

/* --- PILL TAGS for Farms Section --- */
.pill-tag {
    display: inline-flex;
    align-items: center;
    background-color: #1a1d24;
    color: #e0e0e0;
    padding: 0.5rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-family: 'Lato', sans-serif;
}

.pill-tag:hover {
    background-color: #c5a059;
    color: #0f1115;
    border-color: #c5a059;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(197, 160, 89, 0.3);
}

.pill-tag i {
    transition: color 0.3s;
}

.pill-tag:hover i {
    color: #0f1115;
}


/* --- Map Interactivity --- */
.map-point {
    position: absolute;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    pointer-events: none; 
    z-index: 10;
}

/* Tooltip Default (Top) */
.map-point::after {
    content: attr(data-country);
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #c5a059;
    color: #0f1115;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    font-family: 'Lato', sans-serif;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 20;
}

/* Tooltip Arrow Default (Top) */
.map-point::before {
    content: '';
    position: absolute;
    bottom: 120%;
    left: 50%;
    margin-left: -4px;
    border-width: 4px;
    border-style: solid;
    border-color: #c5a059 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 19;
}

/* --- Bottom Tooltip Variant --- */
.map-point.tooltip-bottom::after {
    bottom: auto;
    top: 150%;
    transform: translateX(-50%) translateY(-10px);
}

.map-point.tooltip-bottom::before {
    bottom: auto;
    top: 120%;
    border-color: transparent transparent #c5a059 transparent;
    transform: translateX(-50%) translateY(-10px);
}

.map-point.tooltip-bottom.is-active::after,
.map-point.tooltip-bottom.is-active::before {
    transform: translateX(-50%) translateY(0);
}
/* ----------------------------- */

/* Active State controlled by JS */
.map-point.is-active::after,
.map-point.is-active::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.point-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.8);
    transition: all 0.3s;
}

.point-pulse {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.5;
    animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.map-point.is-active .point-dot {
    background-color: #fff;
    transform: translate(-50%, -50%) scale(1.8);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

@keyframes pulse-ring {
    0% { transform: scale(0.33); opacity: 0.8; }
    80%, 100% { transform: scale(3); opacity: 0; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fade-in-up 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0f1115;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c5a059;
}

/* Reveal Image Initial State (Handled mostly by GSAP but good for fallback) */
.mask-reveal-image {
    will-change: clip-path, transform;
}

/* Feature Markers (New) */
.feature-marker {
    z-index: 30;
    pointer-events: none; /* Let clicks pass through to image if needed */
}