/* Reset and Basic Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto; /* Allow scrolling for shorter screens */
    display: flex;
    flex-direction: column;
    background-color: transparent;
    background-image: url('Images/Boishak-1.png');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #fff;
}

/* Header/Logo Styles */
.logo-container {
    min-height: 60px;
    padding: 10px 20px;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-shrink: 0;
}

.logo-link {
    height: 100%;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.logo {
    height: 40px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Main Content Styles */
.content-wrapper {
    flex: 1 0 auto; /* Allow it to grow but not shrink below content size */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px; /* Increased padding for better spacing */
}

.cards-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start; /* Align cards to top */
    width: 100%;
    max-width: 1200px;
    /* height: 424px; */
}

/* Card Styling */
.card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: fit-content; /* Ensure card takes only necessary height */
}

.card h2 {
    font-size: 1.2rem;
    text-align: center;
    color: #2c3e50;
    margin: 0;
}


.input-card {
    height: 478.13px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.download-btn-icon {
    width: 35px;
    height: 35px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.download-btn-icon:hover {
    background-color: #219150;
    transform: scale(1.1);
}

.download-btn-icon:active {
    transform: scale(0.95);
}

/* Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.form-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

/* Custom File Upload Styling */
.custom-file-upload {
    position: relative;
    width: 100%;
    height: 100px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.custom-file-upload:hover {
    border-color: #FC680F;
    background: #fff5ef;
}

.custom-file-upload.dragover {
    border-color: #27ae60;
    background: #eafaf1;
    transform: scale(1.02);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #777;
    pointer-events: none;
    transition: color 0.3s ease;
}

.custom-file-upload:hover .upload-content {
    color: #FC680F;
}

.upload-content i {
    font-size: 2rem;
}

.upload-content span {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    padding: 0 10px;
}

.submit-btn {
    margin-top: 10px;
    padding: 12px;
    background-color: #FC680F;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background-color: #e55a00;
    transform: scale(1.02);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Poster Preview Card Specifics */
.poster-container {
    position: relative;
    width: 100%;
    max-width: 250px;
    /* margin: 0 auto; */
    margin: -26px auto -15px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    background: #fff;
}

.poster-frame {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* .user-photo-container {
    position: absolute;
    top: 60%;
    left: 72%;
    transform: translate(-50%, -50%);
    width: 49%;
    aspect-ratio: 1/1;
    overflow: hidden;
    z-index: 1;
} */

.user-photo-container {
    position: absolute;
    top: 62%;
    left: 72%;
    transform: translate(-50%, -50%);
    width: 51%;
    aspect-ratio: 1/1;
    overflow: hidden;
    z-index: 1;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.user-photo-container.reposition-mode {
    cursor: grab;
    touch-action: none;
}

.user-photo-container.reposition-mode.dragging {
    cursor: grabbing;
}

.user-photo {
    /* Slight overscan prevents thin white seams from sub-pixel rendering */
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    margin: -3px;
    display: block;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.user-text-container {
    position: absolute;
    bottom: 9%;
    left: 48%;
    transform: translateX(-50%);
    width: 90%;
    z-index: 3;
    text-align: right;
}

.frame-name {
    font-size: 8px;
    color: #000;
    margin: 0;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    /* text-shadow: 2px 2px 4px rgba(0,0,0,0.8); */
    line-height: 1.2;
}

.frame-designation {
    font-size: 7px;
    color: #000;
    margin: 2px 0;
    font-weight: 600;
    /* text-transform: uppercase; */
    /* text-shadow: 1px 1px 3px rgba(0,0,0,0.8); */
}

.company-name {
    font-size: 7px;
    color: #000;
    margin: 0;
    font-weight: 600;
    font-style: italic;
      font-family: "Alkatra", system-ui;
    /* text-shadow: 1px 1px 2px rgba(0,0,0,0.8); */
}

.download-btn {
    /* margin-top: 20px; */
    padding: 3px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
}

.download-btn:hover {
    background-color: #219150;
    transform: scale(1.02);
}

.download-btn:active {
    transform: scale(0.98);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        overflow-y: auto; /* Allow scrolling on mobile */
    }
    .cards-container {
        flex-direction: column;
        align-items: center;
    }
    
    .card {
        width: 100%;
        max-width: 350px;
    }
}

/* Footer Styles */
.main-footer {
    min-height: 100px;
    background-color: transparent;
    padding: 15px;
    width: 100%;
    /* box-shadow: 0 -2px 10px rgba(0,0,0,0.1); */
    flex-shrink: 0;
    z-index: 10;
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column; /* Logo and icons in column */
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    height: 35px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.2));
}

.social-icons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.social-icon {
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #fff;
    color: #333;
    transform: translateY(-5px);
}

.facebook:hover { color: #1877F2; }
.instagram:hover { color: #E4405F; }
.youtube:hover { color: #FF0000; }
.linkedin:hover { color: #0A66C2; }
