/* Main HTML Tarot Styles */
body {
    font-family: Georgia, serif;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    background-color: #fafafa;
}

/* Card Layout Structure */
.card-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.card-title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.card-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

.card-image-container {
    border: 3px solid #333;
    padding: 10px;
    background: white;
    height: 700px; /* Changed from min-height to height */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.card-image-container:hover {
    transform: scale(1.02);
}

.card-image {
    width: auto; /* Let width adjust automatically */
    height: 680px; /* Force specific height, accounting for padding */
    min-height: 680px; /* Also set minimum */
    object-fit: contain;
}

/* Modal styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.modal-close:hover {
    opacity: 0.7;
}

.card-details {
    padding: 20px;
}

.card-description {
    margin-bottom: 25px;
}

.card-description h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    text-decoration: underline;
}

.card-description p {
    white-space: pre-line;
}

.card-narrative {
    margin-bottom: 25px;
}

.card-narrative h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    text-decoration: underline;
}

.card-notes {
    border-top: 2px solid #333;
    padding-top: 15px;
}

.card-notes h3 {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.note-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #333;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.note-link {
    color: #333;
    text-decoration: none;
    margin-right: 15px;
}

.note-link:hover {
    text-decoration: underline;
}

/* Navigation styles */
.nav-container {
    text-align: center;
    margin: 30px 0;
}

.nav-button {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 10px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.nav-button:hover {
    background: #555;
}

/* Interactive elements */
.interactive-container {
    text-align: center;
    margin: 30px 0;
}

.draw-button {
    padding: 15px 30px;
    font-size: 1.2em;
    background: #4a4a4a;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px;
}

.draw-button:hover {
    background: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    .card-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card-title {
        font-size: 2em;
    }
    
    .card-image-container {
        height: 400px; /* Fixed height on mobile */
    }
    
    .modal-content {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}

/* Additional HTML-specific styles */
.main-nav {
    background: #333;
    padding: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.main-nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    padding: 5px 10px;
    border-radius: 3px;
}

.main-nav a:hover {
    background: #555;
}