/* ==========================================================================
   NFC CARD BUILDER - PREMIUM SAAS FRONTEND STYLES (Phase 5)
   ========================================================================== */

/* Base Reset & Variables Setup */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.nfc-body {
    margin: 0;
    padding: 0;
    font-family: var(--nfc-font), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, sans-serif;
    background-color: var(--nfc-bg-base);
    color: #333;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.nfc-card-container {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    background-color: transparent;
    overflow-x: hidden;
    padding-bottom: 30px;
}

/* --------------------------------------------------------------------------
   THEMING (Light / Dark)
   -------------------------------------------------------------------------- */
.nfc-body.theme-light {
    --text-primary: #1A1D20;
    --text-secondary: #6A7280;
    --card-bg: #ffffff;
    --card-border: #F3F4F6;
    --shadow-soft: 0px 8px 24px rgba(0, 0, 0, 0.04);
    --input-bg: #F9FAFB;
    --header-bg-fallback: linear-gradient(135deg, #f0f4fd 0%, #e2e8f0 100%);
    --bottom-nav-bg: rgba(255, 255, 255, 0.95);
}

.nfc-body.theme-dark {
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --card-bg: #1A1D24;
    --card-border: #2D313A;
    --shadow-soft: 0px 8px 24px rgba(0, 0, 0, 0.2);
    --input-bg: #111318;
    --header-bg-fallback: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    --bottom-nav-bg: rgba(26, 29, 36, 0.95);
}

/* Apply Themed Colors */
body.nfc-body {
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   HEADER & PROFILE
   -------------------------------------------------------------------------- */
.nfc-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.nfc-header-bg {
    width: 100%;
    height: 240px;
    background-image: var(--nfc-bg-image);
    background-color: var(--card-bg);
    background-size: cover;
    background-position: center;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
}

.nfc-profile-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -70px;
    position: relative;
    z-index: 5;
    padding: 0 20px;
}

.nfc-profile-photo-container {
    position: relative;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: var(--card-bg);
    padding: 5px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 20px;
}

.nfc-profile-photo-container img, .nfc-photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--input-bg);
}

.nfc-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--text-secondary);
}

.nfc-nfc-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--card-bg);
    color: var(--nfc-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nfc-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    text-align: center;
}

.nfc-name .first-name {
    color: var(--text-primary);
}

.nfc-name .last-name {
    color: var(--nfc-primary);
}

.nfc-title-company {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 25px;
}
.nfc-title-company strong {
    color: var(--text-primary);
    font-weight: 500;
}
.nfc-title-company span {
    color: var(--nfc-primary);
}

/* --------------------------------------------------------------------------
   SOCIAL ICONS
   -------------------------------------------------------------------------- */
.nfc-social-icons-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.nfc-social-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--card-border);
}
.nfc-social-icon:hover {
    transform: scale(1.05);
    background: var(--nfc-primary);
    color: #fff;
}

/* --------------------------------------------------------------------------
   MAIN ACTION BUTTONS
   -------------------------------------------------------------------------- */
.nfc-action-buttons {
    padding: 0 24px;
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nfc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nfc-btn-primary {
    background: var(--nfc-primary);
    color: #fff;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--nfc-primary) 30%, transparent);
}

.nfc-btn-outline {
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}
.nfc-btn-outline:hover {
    background: var(--card-bg);
    border-color: var(--nfc-primary);
    color: var(--nfc-primary);
}

/* --------------------------------------------------------------------------
   SECTIONS (Cards)
   -------------------------------------------------------------------------- */
.nfc-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    margin: 0 24px 20px 24px;
    box-shadow: var(--shadow-soft);
}

.nfc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}
.nfc-section-header i {
    color: var(--nfc-primary);
    margin-right: 8px;
}

.nfc-link-small {
    font-size: 13px;
    color: var(--nfc-primary);
    text-decoration: none;
    font-weight: 500;
}

/* About */
.nfc-bio-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Services */
.nfc-services-grid {
    display: flex;
    gap: 12px;
}
.nfc-service-card {
    flex: 1;
    background: var(--input-bg);
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-border);
}
.nfc-service-card i {
    font-size: 24px;
    color: var(--nfc-primary);
    margin-bottom: 12px;
    margin-right: 0;
}
.nfc-service-card span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Portfolio */
.nfc-portfolio-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 5px;
}
.nfc-portfolio-gallery::-webkit-scrollbar {
    height: 4px;
}
.nfc-portfolio-gallery::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}
.nfc-portfolio-item {
    min-width: 140px;
    height: 90px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: var(--input-bg);
}

/* Location */
.nfc-location-card {
    display: flex;
    flex-direction: column;
    background: var(--input-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    position: relative;
    z-index: 1; /* Fix overflow hidden for maps */
}
.nfc-location-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.nfc-location-info strong {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.nfc-location-info span {
    font-size: 12px;
    color: var(--text-secondary);
}
.nfc-location-map {
    width: 100%;
    height: 220px;
    background: #e5e5e5;
}

/* --------------------------------------------------------------------------
   BOTTOM NAVIGATION
   -------------------------------------------------------------------------- */
.nfc-bottom-nav {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 432px;
    height: 75px;
    background: var(--bottom-nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-radius: 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 9999;
    border: 1px solid var(--card-border);
}
.theme-dark .nfc-bottom-nav {
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
}

.nfc-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    gap: 6px;
    transition: color 0.2s ease;
}
.nfc-nav-item:hover {
    color: var(--nfc-primary);
}
.nfc-nav-item i {
    font-size: 20px;
}

/* Center Highlight Button */
.nfc-nav-center {
    position: relative;
    top: -25px;
    color: #fff !important;
}
.nfc-center-circle {
    width: 68px;
    height: 68px;
    background: var(--nfc-primary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 12px 24px color-mix(in srgb, var(--nfc-primary) 40%, transparent);
    border: 6px solid var(--card-bg);
    transition: transform 0.2s ease;
}
.nfc-center-circle:hover {
    transform: scale(1.05);
}
.nfc-center-circle i {
    font-size: 22px;
    margin-bottom: 2px;
}
.nfc-center-circle span {
    font-size: 10px;
}
