/* Business Card Display Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    min-height: 100vh;
    padding: 1rem;
}

.card-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Card Section */
.card-section {
    background: #fff;
    border-radius: 16px;
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); */
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    padding: 2rem;
    text-align: center;
    /* color: #fff; */
    display: flex;
    justify-content: center;
    align-items: center;
    gap:20px
}

.company-logo {
    max-width: 120px;
    max-height: 120px;
    /* margin: 0 auto 1rem; */
    display: block;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-body {
    padding: 1rem;
}

/* Profile and Greeting Section */
.profile-greeting-section {
    display: flex;
    gap: 2rem;
    /* margin-bottom: 2rem; */
    align-items: center;
    justify-content: center;
}

.profile-photo-container {
    flex-shrink: 0;
}

.profile-photo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); */
}

.greeting-content {
    flex: 1;
    min-width: 0;
}

.person-info {
    text-align: center;
    margin-bottom: 2rem;
}

.person-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.person-position {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.person-qualification {
    font-size: 0.95rem;
    color: #888;
    margin-top: 0.5rem;
}

/* Greetings Section */
.greetings-section {
    margin-bottom: 2rem;
}

.greeting-pagination-container {
    position: relative;
    min-height: 200px;
}

.greeting-item {
    background: #fff;
    padding: 0;
    margin-bottom: 1.5rem;
}

.greeting-item:last-child {
    margin-bottom: 0;
}

.greeting-page-item {
    margin-bottom: 2rem;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.greeting-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.greeting-text {
    color: #555;
    line-height: 1.8;
    margin: 0;
    font-size: 0.95rem;
}

.greeting-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.75rem;
}

.greeting-item p {
    color: #555;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Greeting Pagination Controls */
.greeting-pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.greeting-pagination-btn {
    background: #0066cc;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
    justify-content: center;
}

.greeting-pagination-btn:hover:not(:disabled) {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

.greeting-pagination-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
}

.greeting-pagination-btn:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.greeting-pagination-btn span {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
}

.greeting-pagination-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.greeting-page-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0066cc;
    min-width: 1.5rem;
    text-align: center;
}

.greeting-page-separator {
    color: #999;
    font-weight: 400;
}

.greeting-total-pages {
    color: #666;
    font-weight: 400;
}

/* Communication Section */
.communication-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.communication-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Communication Grid Layout */
.communication-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap:10px;
}

/* Communication Card */
.comm-card {
    background: #fff;
    padding-inline: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* SNS Logo */
.comm-logo {
    width: 100%;
    max-width: 300px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comm-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.comm-details-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

/* Details Button */
.comm-details-button {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s 
ease;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
}

.comm-details-button:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Old styles - keep for backward compatibility */
.communication-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.comm-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.comm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.comm-icon {
    font-size: 1.2rem;
}

/* Tech Tools Section */
.tech-tools-section {
    background: #fff;
    /* border-radius: 16px; */
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); */
    padding: 2rem;
    margin-bottom: 2rem;
}

.tech-tools-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-description {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.tech-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Banner Card Styles */
.tech-tool-banner-card {
    background: #fff;
    overflow: hidden;
}

/* Banner Header with Background Image */
.tool-banner-header {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Banner Content */
.tool-banner-content {
    padding: 1.5rem;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    height: 15rem;
}

.tool-description {
    color: #333;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Details Button */
.tool-details-button {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
}

.tool-details-button:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Old styles - keep for backward compatibility */
.tech-tool-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tech-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.tech-tool-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Edit Link */
/* Info Layout - Responsive Two-Column (PC) / Single-Column (Mobile) */
.info-responsive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 2rem;
}

/* Make it single column on mobile */
@media (max-width: 768px) {
    .info-responsive-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Legacy support for old two-column layout */
.info-layout {
    display: flex;
    /* display: grid;
    grid-template-columns: 1fr 1fr; */
    gap: 3rem;
    margin-bottom: 2rem;
}

.info-left,
.info-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* gap: 0.75rem; */
}

.info-section {
    text-align: center;
    background: #fff;
    padding: 0;
    width: 100%;
    /* border-bottom: 1px solid #e9ecef; */
    /* padding-bottom: 0.75rem; */
}

.info-section:last-child {
    border-bottom: none;
}

.info-section h3 {
    font-size: 0.85rem;
    color: #a3a3a3;
    margin-bottom: 0 rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-section p {
    color: #000000;
    line-height: 1.6;
    margin: 0;
    font-size: 1.25rem;
    font-weight: bold;
    overflow-wrap: break-word;
}

.info-section a {
    color: #000000;
    text-decoration: none;
}

.info-section a:hover {
    text-decoration: underline;
}

/* Person Name Section */
.person-name-section .person-name-large {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.person-name-section .name-romaji {
    font-size: 0.9rem;
    font-weight: 400;
    color: #666;
    display: block;
    margin-top: 0.25rem;
}

.person-name-section .person-position {
    font-size: 1rem;
    color: #555;
    margin-top: 0.25rem;
}

.company-info {
    font-weight: 600;
}

/* QR Code Section */
.qr-code-section {
    margin-top: 2rem;
    padding: 2rem;
    /* background: #f8f9fa; */
    border-radius: 12px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;    
    gap: 2rem;
}

.qr-code-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

.qr-code-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5rem;
}

.qr-code-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.qr-code-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-code-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.edit-link {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.edit-link a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: opacity 0.3s ease;
}

.edit-link a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Responsive adjustments for Mobile (SP) */
@media (max-width: 768px) {
    body {
        padding: 0;
        font-size: 14px;
    }

    .card-container {
        max-width: 100%;
        margin: 0;
    }

    .card-section {
        margin-bottom: 0;
        border-radius: 0;
    }

    /* Header - Mobile */
    .card-header {
        padding: 1rem;
        /* flex-direction: column; */
        gap: 10px;
    }

    .company-logo {
        max-width: 100px;
        max-height: 100px;
    }

    .company-name {
        font-size: 1.1rem;
        text-align: center;
    }

    hr {
        margin: 0;
    }

    /* Card Body - Mobile */
    .card-body {
        padding: 1rem;
    }

    /* Profile and Greeting Section - Stack on mobile */
    .profile-greeting-section {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        margin-bottom: 1.5rem;
    }

    .profile-photo-container {
        text-align: center;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }

    .greeting-content {
        width: 100%;
    }

    .greeting-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .greeting-text {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    /* Info Layout - Single column on mobile */
    .info-layout {
        flex-direction: column;
        gap: 1rem;
    }

    .info-left,
    .info-right {
        width: 100% !important;
        gap: 0.75rem;
    }

    .info-section {
        padding-bottom: 0.5rem;
    }

    .info-section h3 {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .info-section p {
        font-size: 1rem;
        line-height: 1.4;
        float: none !important;
        overflow-wrap: anywhere;
    }

    .person-name-section .person-name-large {
        font-size: 1.1rem;
    }

    .person-name-section .name-romaji {
        font-size: 0.8rem;
    }

    /* QR Code Section - Mobile */
    .qr-code-section {
        padding: 1rem;
        margin-top: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .qr-code-section h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .qr-code-container {
        flex-direction: column;
        gap: 1rem;
    }

    .qr-code-image {
        max-width: 200px;
    }

    .qr-code-description {
        font-size: 0.85rem;
    }

    .qr-code-content {
        flex-direction: column;
        gap: 1rem;
    }

    /* Communication Section - Mobile */
    .communication-section {
        padding: 1.5rem 0;
        margin-top: 1rem;
        margin-bottom: 1.5rem;
    }

    .communication-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }

    .communication-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .comm-card {
        background: #fff;
        border: 1px solid #e9ecef;
        border-radius: 12px;
        padding: 1.5rem 1rem;
        gap: 1.25rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
    }

    .comm-card:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .comm-logo {
        height: 100px;
        max-width: 100%;
        padding: 0.5rem;
    }

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

    .comm-details-button {
        width: 100%;
        max-width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        font-weight: 600;
        border-radius: 8px;
        text-align: center;
        display: block;
        box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
    }

    .comm-details-button:active {
        transform: translateY(1px);
        box-shadow: 0 1px 2px rgba(220, 53, 69, 0.3);
    }

    /* Tech Tools Section - Mobile */
    .tech-tools-section {
        padding: 1rem;
    }

    .tech-tools-section h2 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }

    .section-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .tech-tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tech-tool-banner-card {
        margin-bottom: 0.5rem;
    }

    .tool-banner-header {
        height: 120px;
        background-size: cover;
    }

    .tool-banner-content {
        padding: 1rem;
        height: auto;
    }

    .tool-description {
        font-size: 0.8rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .tool-details-button {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        width: 50%;
    }

    /* Edit Link - Mobile */
    .edit-link {
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 0;
    }

    .edit-link a {
        font-size: 0.85rem;
    }

    /* Old card styles - Backward compatibility */
    .tech-tool-card {
        padding: 1rem;
    }

    .tool-icon {
        font-size: 2rem;
    }

    .communication-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .comm-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .person-name {
        font-size: 1.3rem;
    }

    /* Free Input Section - Mobile */
    .free-input-content {
        font-size: 0.85rem;
    }

    .free-input-content img {
        max-width: 100%;
        height: auto !important;
    }

    .free-input-link a {
        word-break: break-all;
        font-size: 1rem;
    }

    .comm-logo img {
        width: 80% !important;
    }

    .free-input-image {
        font-size: 1rem !important;
    }
}

/* Free Input Section - Enhanced UI/UX */
.free-input-section {
    text-align: center !important;
    grid-column: 1 / -1; /* Span full width across the grid */
}

.free-input-content {
    margin-top: 1rem;
    overflow-wrap: anywhere;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    padding-inline: 1rem !important;
    max-width: 100%;
}

.free-input-pair {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.free-input-pair:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: #dee2e6;
}

.free-input-text-wrapper {
    margin-bottom: 0.5rem;
    flex: 1;
}

.free-input-text-wrapper:last-child {
    margin-bottom: 0;
}

.free-input-text {
    color: #333;
    line-height: 1.5;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.free-input-image-wrapper {
    margin: 0.5rem 0 0 0;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.free-input-image-wrapper:first-child {
    margin-top: 0;
}

.free-input-image-wrapper:last-child {
    margin-bottom: 0;
}

.free-input-image-link {
    display: block;
    transition: opacity 0.3s ease;
}

.free-input-image-link:hover {
    opacity: 0.9;
}

.free-input-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    object-fit: cover;
}

.free-input-link-wrapper {
    margin: 0.5rem 0 0 0;
}

.free-input-link-wrapper:first-child {
    margin-top: 0;
}

.free-input-link-wrapper:last-child {
    margin-bottom: 0;
}

.free-input-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.8rem;
    word-break: break-all;
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: #f0f7ff;
    border-radius: 3px;
    border: 1px solid #cce5ff;
    transition: all 0.3s ease;
}

.free-input-link:hover {
    background: #e6f2ff;
    border-color: #99ccff;
    color: #0052a3;
    text-decoration: none;
}

/* Mobile Responsive for Free Input */
@media (max-width: 768px) {
    .free-input-content {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .free-input-pair {
        padding: 0.6rem;
        border-radius: 4px;
    }

    .free-input-text {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .free-input-image-wrapper {
        margin: 0.4rem 0 0 0;
        border-radius: 3px;
    }

    .free-input-link {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    /* Communication Section - Very Small Screens */
    .communication-section {
        padding: 1rem 0;
    }

    .communication-section h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        padding: 0 0.75rem;
    }

    .communication-grid {
        gap: 1rem;
        padding: 0 0.75rem;
    }

    .comm-card {
        padding: 1.25rem 0.875rem;
        gap: 1rem;
    }

    .comm-logo {
        height: 90px;
    }

    .comm-details-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}




