/* Image Hotspot Elementor Widget Styles */

.ihe-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
}

.ihe-image-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.ihe-image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.ihe-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    display: inline-block;
    opacity: 0;
    animation: iheHotspotFadeIn 0.6s ease-out forwards;
    border-radius: 50%;
    background-color: #2d5a27; /* Verde escuro padrão */
}

.ihe-hotspot:nth-child(1) { animation-delay: 0.1s; }
.ihe-hotspot:nth-child(2) { animation-delay: 0.2s; }
.ihe-hotspot:nth-child(3) { animation-delay: 0.3s; }
.ihe-hotspot:nth-child(4) { animation-delay: 0.4s; }
.ihe-hotspot:nth-child(5) { animation-delay: 0.5s; }
.ihe-hotspot:nth-child(6) { animation-delay: 0.6s; }
.ihe-hotspot:nth-child(7) { animation-delay: 0.7s; }
.ihe-hotspot:nth-child(8) { animation-delay: 0.8s; }

@keyframes iheHotspotFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.ihe-hotspot:hover {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 1);
}

/* Active hotspot (for sidebar mode) */
.ihe-hotspot-active {
    background-color: #4a7c42 !important;
    border-color: #fff !important;
    transform: translate(-50%, -50%) scale(1.3) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3) !important;
    z-index: 15 !important;
}

.ihe-hotspot-active::before {
    opacity: 1 !important;
}

.ihe-hotspot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ihe-hotspot:hover::before {
    opacity: 1;
}

/* Tooltip Styles - Mostra o nome no hover */
.ihe-hotspot:hover::after {
    content: attr(title);
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    border-radius: 6px;
    pointer-events: none;
    z-index: 999;
    background-color: #333;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 500;
    animation: iheTooltipFadeIn 0.3s ease forwards;
}

@keyframes iheTooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Card Styles */
.ihe-card-template {
    display: none !important;
}

.ihe-card {
    position: absolute;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    min-width: 250px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.ihe-card.ihe-card-visible {
    opacity: 1;
    transform: translateY(0);
}

.ihe-card-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    position: relative;
}

.ihe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ihe-card-content {
    padding: 16px;
}

.ihe-card-text {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ihe-cta-button {
    display: inline-block;
    background-color: #2d5a27;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ihe-cta-button:hover {
    background-color: #1e3e1a;
    color: #ffffff;
    text-decoration: none;
}

.ihe-card-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.ihe-card-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Card positioning */
.ihe-card.ihe-card-top {
    top: -10px;
    transform: translateY(-100%);
}

.ihe-card.ihe-card-bottom {
    top: 100%;
    margin-top: 10px;
}

.ihe-card.ihe-card-left {
    right: 100%;
    margin-right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.ihe-card.ihe-card-right {
    left: 100%;
    margin-left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.ihe-card.ihe-card-visible.ihe-card-top {
    transform: translateY(-100%);
}

.ihe-card.ihe-card-visible.ihe-card-bottom {
    transform: translateY(0);
}

.ihe-card.ihe-card-visible.ihe-card-left {
    transform: translateY(-50%);
}

.ihe-card.ihe-card-visible.ihe-card-right {
    transform: translateY(-50%);
}

/* Sidebar Content Styles */
.ihe-sidebar-title {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ihe-sidebar-content {
    margin: 0 0 20px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ihe-sidebar-content p {
    margin: 0 0 16px 0;
}

.ihe-sidebar-content p:last-child {
    margin-bottom: 0;
}

.ihe-sidebar-button-wrapper {
    margin-top: 24px;
}

.ihe-sidebar-button {
    display: inline-block;
    background-color: #2d5a27;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    text-transform: none;
    letter-spacing: 0.5px;
}

.ihe-sidebar-button:hover {
    background-color: #1e3e1a;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.3);
}

.ihe-sidebar-button:focus {
    outline: 3px solid rgba(45, 90, 39, 0.3);
    outline-offset: 2px;
}

/* Language indicator */
.ihe-hotspot[data-lang="en"]::after {
    font-style: italic;
}

.ihe-hotspot[data-lang="es"]::after {
    font-family: 'Times New Roman', serif;
}

/* Focus states for accessibility */
.ihe-hotspot:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

.ihe-hotspot:focus::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ihe-hotspot {
        min-width: 24px;
        min-height: 24px;
        border-width: 1px;
    }
    
    .ihe-hotspot:hover::after {
        font-size: 12px;
        padding: 6px 10px;
        max-width: 200px;
        white-space: normal;
        word-wrap: break-word;
        text-align: center;
    }

    .ihe-card {
        max-width: 280px;
        min-width: 220px;
    }

    .ihe-card-content {
        padding: 12px;
    }

    .ihe-card-text {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .ihe-cta-button {
        padding: 8px 16px;
        font-size: 13px;
    }

    .ihe-sidebar-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .ihe-sidebar-content {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .ihe-sidebar-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ihe-hotspot {
        min-width: 20px;
        min-height: 20px;
    }
    
    .ihe-hotspot:hover::after {
        position: fixed;
        top: 20px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: calc(100vw - 40px);
        z-index: 99999;
        font-size: 11px;
        padding: 6px 10px;
    }

    .ihe-card {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        max-width: calc(100vw - 40px);
        min-width: auto;
        width: calc(100vw - 40px);
        z-index: 99999;
    }

    .ihe-card.ihe-card-visible {
        transform: translate(-50%, -50%) !important;
    }

    .ihe-card-image {
        height: 120px;
    }

    .ihe-sidebar-title {
        font-size: 18px;
    }

    .ihe-sidebar-content {
        font-size: 13px;
    }

    .ihe-sidebar-button {
        padding: 8px 16px;
        font-size: 12px;
        border-radius: 20px;
    }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .ihe-hotspot {
        animation: ihePulse 2s infinite;
    }
    
    @keyframes ihePulse {
        0%, 100% {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
        }
        50% {
            transform: translate(-50%, -50%) scale(1.1);
            opacity: 0.8;
        }
    }
    
    .ihe-hotspot.ihe-touched::after {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        animation: iheTooltipFadeIn 0.3s ease forwards;
    }

    .ihe-hotspot-active {
        animation: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .ihe-hotspot {
        border-width: 3px;
        border-color: #000;
    }
    
    .ihe-hotspot:hover::after {
        border: 2px solid #000;
        background-color: #fff !important;
        color: #000 !important;
    }

    .ihe-card {
        border: 2px solid #000;
    }

    .ihe-sidebar-button {
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ihe-hotspot,
    .ihe-hotspot::before,
    .ihe-hotspot:hover::after,
    .ihe-card {
        transition: none;
        animation: none;
    }
    
    .ihe-hotspot {
        opacity: 1;
    }

    .ihe-sidebar-button:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ihe-card {
        background-color: #2a2a2a;
        border-color: #444;
        color: #fff;
    }

    .ihe-card-text {
        color: #ddd;
    }

    .ihe-sidebar-title {
        color: #fff;
    }

    .ihe-sidebar-content {
        color: #ccc;
    }
} 