@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');

@font-face {
    font-family: 'KTA Name Font';
    src: url('font/nama.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'KTA NIH Font';
    src: url('font/nih.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

:root {
    --dark-green: #004d2e;
}

body {
    background-color: #f0f0f0;
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

.controls {
    margin-top: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    width: 350px;
}

.controls input {
    margin: 5px 0;
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
}

.btn-download {
    background-color: var(--dark-green);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-download:hover {
    background-color: #003a22;
}

/* Card Container */
.kta-card {
   
    width: 320px;
    height: 519px; 
    /* Use the provided image as background */
    background-image: url('img/depan_polos.png'); 
    /* background-image: url('img/6A.png');  */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.kta-card-2 {
   width: 320px;
    height: 519px; 
    /* Use the provided image as background */
    background-image: url('img/depan_tosca.png'); 
    /* background-image: url('img/6A.png');  */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

/* Elements positioned over the image */

/* Photo Area */



.photo-container {
    position: absolute;
    top: 128px;
    left: 35px;
    width: 145px;
    height: 210px;
    border: 2px solid white;
    border-radius: 12px;
    overflow: hidden;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* .photo-img class removed as we use background-image now */

/* QR Code Area */
.qr-container {
    position: absolute;
    bottom: 25px; /* Moved up slightly */
    left: 35px;
    width: 135px;  /* Slightly smaller to match proportion */
    height: 135px;
    background: white;
    padding: 5px; /* White border effect */
    border-radius: 8px;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrcode img {
    width: 100%;
    height: 100%;
}

/* Name and ID Info */
.info-container {
    /* No longer a container for positioning, using absolute on text directly for precision */
    display: contents; 
}

.member-name {
    font-family: 'KTA Name Font', 'Diodrum Cyrillic Semibold', sans-serif;
    font-weight: bold; 
    font-size: 22px; /* Adjust size matches reference */
    color: var(--dark-green);
    margin: 0;
    text-transform: uppercase;
    
    /* FIX: Use transform instead of writing-mode */
    transform: rotate(-90deg);
    transform-origin: left bottom; /* Pin the START (left) of the text to the pivot */
    
    /* Absolute Positioning */
    position: absolute;
    bottom: 45px; /* Match QR Code bottom approx (slight padding) */
    left: 230px; /* Calculated: 320px (Card) - 90px (Right Margin) */
    right: auto; /* Unset right */
    height: auto;  
    white-space: nowrap;
    z-index: 3;
    /* Reset these to avoid conflicts */
    writing-mode: horizontal-tb;
    text-orientation: initial;
}

.member-id {
    font-family: 'KTA NIH Font', 'OCR-A BT', monospace; 
    font-weight: bold;
    font-size: 20px; /* Slightly smaller than name usually */
    color: var(--dark-green);
    letter-spacing: 1.5px;
    
    /* FIX: Use transform instead of writing-mode */
    transform: rotate(-90deg);
    transform-origin: left bottom; /* Pin the START (left) of the text to the pivot */

    /* Absolute Positioning */
    position: absolute;
    bottom: 45px; /* Match QR Code bottom approx */
    left: 255px; /* Calculated: 320px (Card) - 65px (Right Margin) */
    right: auto; /* Unset right */
    height: auto;
    white-space: nowrap;
    z-index: 3;
    /* Reset these to avoid conflicts */
    writing-mode: horizontal-tb;
    text-orientation: initial;
}

/* Hide manual shapes since we have background image */
.top-shape, .sidebar, .sidebar-text, .logo-container, .website-link {
    display: none;
}
