
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0; /* Add some vertical padding */
    overflow-y: auto;
}

.container {
    max-width: 850px; /* Limit width for better readability */
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.pdf-container {
    width: 100%;
    position: relative;
    background-color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 30px;
    overflow: hidden; /* Prevent content from spilling out */
}

.pdf-page {
    width: 100%;
    height: auto;
}

.pdf-pages-container {
    width: 100%;
    background-color: white;
    padding: 10px;
}

.pdf-page-div {
    width: 100%;
    margin-bottom: 15px;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    overflow: hidden; /* Prevent any overflow */
}

canvas {
    max-width: 100%;
    height: auto !important; /* Force height to auto to maintain aspect ratio */
    display: block;
    border-radius: 2px;
}

.hotspot {
    position: absolute;
    background-color: rgba(0, 123, 255, 0.08);
    border: 2px dashed rgba(0, 123, 255, 0.0);
    border-radius: 4px;
    cursor: pointer;
    transition: none; /* Remove the transition effect */
    pointer-events: auto;
}

.hotspot:hover {
    background-color: rgba(0, 123, 255, 0.2);
    border: 2px dashed rgba(0, 123, 255, 0);

}

.hotspot:active {
    background-color: rgba(0, 123, 255, 0.25);
    border: 2px solid rgba(0, 123, 255, 0.6);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    width: 70%; /* Default size for desktop - 50% of screen width */
    max-height: 90vh; /* 80% of viewport height */
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    font-family: "Times New Roman", Times, serif;
    margin: 0 auto;
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #777;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333;
}

.modal-title {
    margin-bottom: 1rem;
    color: #0056b3;
    font-size: 1.5rem;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

#linkedin {
    background-color: transparent;
    border: transparent;
}

#linkedin:hover {
    background-color: rgba(0, 123, 255, 0.1); /* Optional: slight highlight on hover */
}

#email {
    background-color: transparent;
    border: none;
}

#email:hover {
    background-color: rgba(0, 123, 255, 0.1); /* Optional: slight highlight on hover */
}

#location {
    background-color: transparent;
    border: none;
}

#location:hover {
    background-color: rgba(0, 123, 255, 0.1); /* Optional: slight highlight on hover */
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-img:hover {
    transform: scale(1.05);
}

.tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
}

.hotspot:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.single-image-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    width: 100%;
}

.modal-img {
    max-width: 100%; /* Make image fill the container width */
    max-height: 60vh; /* Make image larger, up to 60% of viewport height */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.image-description {
    margin-top: 10px;
    color: #666;
    text-align: center;
    width: 90%;
    font-style: normal; /* Changed from italic to normal */
}

/* For responsiveness - adjust hotspot positions based on screen size */
@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
    }
    
    .modal-content {
        padding: 1.5rem;
        width: 85%;
    }

    .modal-img {
        max-height: 80vh; /* Slightly smaller max height on mobile */
    }

    .instruction-box {
        font-size: 12px; /* Smaller font on medium screens */
        padding: 6px 10px;
        top: 5px;
        right: 5px;
    }
}

/* Define control panel for editing mode */
.control-panel {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 900;
    display: none;
}

.control-panel.active {
    display: block;
}

.control-panel button {
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.control-panel button:hover {
    background-color: #003d82;
}

.control-panel input {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    width: 100%;
}

.control-panel select {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    width: 100%;
}

.hotspot-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    z-index: 10;
    font-family: "Times New Roman", Times, serif;
}

@media (max-width: 768px) and (orientation: portrait) {
    /* Additional styles for portrait mode on small screens */
    .container {
        padding: 0 10px;
    }
    
    .instruction-box {
        font-size: calc(9px + 0.4vw); /* Slightly smaller on medium screens */
    }
    /* Style for the orientation message */
    #orientationMessage {
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4); }
        70% { box-shadow: 0 0 0 10px rgba(0, 123, 255, 0); }
        100% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0); }
    }
}

.instruction-box {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 123, 255, 0.08);
    border: 2px dashed rgba(0, 123, 255, 0.0);
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    /* Replace the viewport-based calculation with em units */
    font-size: 1em; /* Base size that will be scaled in JavaScript */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 900;
    pointer-events: none;
    transition: none;
    font-family: "Times New Roman", Times, serif;
}

.instruction-box:hover {
    background-color: rgba(0, 123, 255, 0.2);
    border: 2px dashed rgba(0, 123, 255, 0);
}

@media (max-width: 480px) {
    .instruction-box {
        font-size: calc(8px + 0.3vw); /* Even smaller on small screens */
        padding: 4px 8px;
        top: 3px;
        right: 3px;
        width: auto; /* Allow it to shrink based on content */
        max-width: 40%; /* Limit maximum width on small screens */
    }
}

.download-button-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0 30px 0;
}

.download-button {
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-family: "Times New Roman", Times, serif;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.download-button:hover {
    background-color: #003d82;
}

.download-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.visit-button {
    display: inline-block;
    margin-left: 15px;
    padding: 10px 20px;
    background-color: transparent; /* Green color to differentiate from download button */
    color: rgb(0, 128, 255);
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-family: "Times New Roman", Times, serif;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.0);
    transition: background-color 0.3s, transform 0.2s;
}

.visit-button:hover {
    background-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.0);
}

/* For mobile responsiveness */
@media (max-width: 768px) {
    .download-button-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .visit-button {
        margin-left: 0;
        margin-top: 10px;
    }
}