/* ==========================================================================
   Design System & Global Variables (Matching guddukumar.in Website Theme)
   ========================================================================== */
:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Manrope', sans-serif;

    /* Theme Colors from Website */
    --bg-global: #faf7f1;       /* Warm beige background */
    --card-bg: #ffffff;         /* Clean white card background */
    --card-border: rgba(49, 66, 84, 0.08);
    --card-border-glow: rgba(0, 150, 107, 0.2);

    /* Text Colors */
    --text-primary: #05203d;     /* Deep dark blue */
    --text-secondary: #314254;   /* Slate blue */
    --text-muted: #64748b;

    /* Theme Accents & Gradients */
    --accent: #00966b;          /* Emerald green */
    --accent-dark: #007d58;
    --accent-gradient: linear-gradient(135deg, #00966b 0%, #00c28a 100%);
    --cover-gradient: linear-gradient(135deg, #05203d 0%, #00966b 100%); /* Deep blue to Emerald green */

    /* Social Brand Colors */
    --whatsapp-color: #25D366;  /* Original WhatsApp Green */
    --youtube-color: #FF0000;
    --youtube-gradient: linear-gradient(135deg, #FF0000 0%, #B80000 100%);
    --fb-color: #1877F2;
    --fb-gradient: linear-gradient(135deg, #1877F2 0%, #0c59b8 100%);
    --ig-gradient: linear-gradient(135deg, #F58529 0%, #DD2A7B 50%, #8134AF 100%);

    /* Shadows & Blurs */
    --shadow-card: 0 15px 35px rgba(49, 66, 84, 0.08), 0 5px 15px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 4px 12px rgba(0, 150, 107, 0.15);
    --backdrop-blur: blur(20px);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Animation Speeds */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-global);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    padding: 40px 20px;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(49, 66, 84, 0.03);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 150, 107, 0.2);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 150, 107, 0.4);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* Background Soft Blur Shapes (Upgraded for Light Theme) */
.bg-shape {
    position: fixed;
    border-radius: var(--radius-full);
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.25;
}

.bg-shape-1 {
    width: 350px;
    height: 350px;
    background: #00966b;
    top: -50px;
    left: -50px;
}

.bg-shape-2 {
    width: 400px;
    height: 400px;
    background: #ee6451; /* Coral accent from website */
    bottom: -100px;
    right: -100px;
}

/* ==========================================================================
   Layout Wrapper
   ========================================================================== */
.card-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* ==========================================================================
   Main Visiting Card
   ========================================================================== */
.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.profile-card:hover {
    box-shadow: 0 20px 45px rgba(49, 66, 84, 0.12);
}

/* Cover Image Banner (Deep Blue to Emerald Green) */
.card-cover {
    height: 140px;
    position: relative;
    overflow: hidden;
}

.cover-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cover-gradient);
}

/* Profile Picture container and Status Badge */
.profile-pic-container {
    position: relative;
    width: 130px;
    height: 130px;
    margin: -75px auto 0 auto;
    z-index: 2;
}

.profile-pic-border {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    padding: 4px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(49, 66, 84, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
    background-color: #f2f4f5;
}

.status-indicator {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background-color: #22c55e;
    border: 3px solid #ffffff;
    border-radius: var(--radius-full);
    z-index: 3;
}

.status-indicator::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    border: 3px solid #22c55e;
    opacity: 0.8;
    animation: statusPulse 1.8s infinite ease-in-out;
}

@keyframes statusPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.7); opacity: 0; }
}

/* Profile Details & Tags */
.profile-header-info {
    text-align: center;
    padding: 16px 24px 20px 24px;
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.profile-tagline {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 12px;
    background: rgba(0, 150, 107, 0.08);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(0, 150, 107, 0.15);
}

.profile-bio {
    font-size: 0.925rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 380px;
    margin: 0 auto;
}

/* ==========================================================================
   Quick Actions Grid (White circles, morphing on hover)
   ========================================================================== */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 24px 24px 24px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    transition: transform var(--transition-fast);
}

.quick-action-btn span {
    font-size: 0.775rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.icon-circle {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background: #ffffff;
    border: 1px solid rgba(49, 66, 84, 0.12);
    box-shadow: 0 4px 10px rgba(49, 66, 84, 0.04);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Default Icon Colors */
#btnCall .icon-circle { color: var(--accent); }
#btnWhatsApp .icon-circle { color: var(--whatsapp-color); }
#btnEmail .icon-circle { color: #ee6451; } /* Website orange color */
#btnWebsite .icon-circle { color: var(--text-primary); }

/* Quick Actions Interactive States */
.quick-action-btn:hover {
    transform: translateY(-3px);
}

.quick-action-btn:hover span {
    color: var(--text-primary);
}

/* Call Hover */
#btnCall:hover .icon-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 150, 107, 0.25);
}

/* WhatsApp Hover (Original brand green) */
#btnWhatsApp:hover .icon-circle {
    background: var(--whatsapp-color);
    border-color: var(--whatsapp-color);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.25);
}

/* Email Hover (Website orange) */
#btnEmail:hover .icon-circle {
    background: #ee6451;
    border-color: #ee6451;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(238, 100, 81, 0.25);
}

/* Website Hover */
#btnWebsite:hover .icon-circle {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(5, 32, 61, 0.25);
}

.quick-action-btn:active {
    transform: translateY(-1px);
}

/* ==========================================================================
   Primary CTAs (Save, Share, QR Buttons)
   ========================================================================== */
.primary-ctas {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 24px 24px 24px;
}

.cta-btn {
    width: 100%;
    height: 52px;
    border-radius: var(--radius-md);
    font-size: 0.975rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.btn-icon {
    flex-shrink: 0;
}

/* Save Contact (Dark Blue Primary Action) */
.btn-save {
    background: var(--text-primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(5, 32, 61, 0.15);
}

.btn-save:hover {
    transform: translateY(-2px);
    background: var(--accent);
    box-shadow: 0 8px 24px rgba(0, 150, 107, 0.25);
}

.btn-save:active {
    transform: translateY(0);
}

/* Secondary Actions Row */
.cta-row-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid rgba(49, 66, 84, 0.15);
    color: var(--text-primary);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: #f8fafc;
    border-color: rgba(49, 66, 84, 0.25);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* ==========================================================================
   Detailed Contact List Section
   ========================================================================== */
.card-details-section {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform var(--transition-fast);
}

.detail-item:hover {
    transform: translateX(4px);
}

.detail-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(0, 150, 107, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent);
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-label {
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.detail-value:hover {
    color: var(--accent);
}

/* ==========================================================================
   Services & Expertise Section
   ========================================================================== */
.services-section {
    padding: 24px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 18px;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.service-card {
    display: flex;
    gap: 16px;
    background: #fdfdfd;
    border: 1px solid rgba(49, 66, 84, 0.05);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.service-card:hover {
    background: #ffffff;
    border-color: rgba(0, 150, 107, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(49, 66, 84, 0.03);
}

.service-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(0, 150, 107, 0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent);
}

.service-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-info h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.service-info p {
    font-size: 0.825rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* ==========================================================================
   Social Row Section
   ========================================================================== */
.socials-section {
    padding: 24px;
    text-align: center;
}

.socials-row {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-icon-btn {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: #ffffff;
    border: 1px solid rgba(49, 66, 84, 0.12);
    box-shadow: 0 4px 10px rgba(49, 66, 84, 0.02);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.social-icon-btn:hover {
    transform: scale(1.1) translateY(-2px);
    color: var(--text-primary);
}

.social-icon-btn:active {
    transform: scale(1) translateY(0);
}

/* YouTube Brand Hover */
.yt-btn:hover {
    background: var(--youtube-gradient);
    border-color: var(--youtube-color);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.2);
}

/* Facebook Brand Hover */
.fb-btn:hover {
    background: var(--fb-gradient);
    border-color: var(--fb-color);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.2);
}

/* Instagram Brand Hover */
.ig-btn:hover {
    background: var(--ig-gradient);
    border-color: #DD2A7B;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(221, 42, 123, 0.2);
}

/* ==========================================================================
   Structural Dividers
   ========================================================================== */
.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(49, 66, 84, 0.08) 15%, rgba(49, 66, 84, 0.08) 85%, transparent);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.card-footer {
    padding: 24px;
    text-align: center;
    background: rgba(49, 66, 84, 0.02);
}

.card-footer p {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.card-footer a {
    color: var(--text-secondary);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.card-footer a:hover {
    color: var(--accent);
}

/* ==========================================================================
   Modal Dialog Styling (Light Theme optimized)
   ========================================================================== */
dialog {
    border: none;
    border-radius: var(--radius-lg);
    background: #ffffff;
    color: var(--text-primary);
    max-width: 90%;
    width: 360px;
    padding: 0;
    box-shadow: 0 25px 60px rgba(49, 66, 84, 0.15);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    z-index: 9999;
}

dialog[open] {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Dialog Backdrop styling with blur */
dialog::backdrop {
    background-color: rgba(5, 32, 61, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

dialog[open]::backdrop {
    opacity: 1;
}

.dialog-content {
    padding: 32px 24px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(49, 66, 84, 0.06);
    border-radius: var(--radius-lg);
}

.dialog-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: #f8fafc;
    border: 1px solid rgba(49, 66, 84, 0.1);
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.dialog-close-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    transform: rotate(90deg);
}

#dialogTitle {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.dialog-sub {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.qr-code-frame {
    width: 200px;
    height: 200px;
    margin: 0 auto 24px auto;
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: 0 4px 20px rgba(49, 66, 84, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(49, 66, 84, 0.05);
}

.qr-code-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dialog-actions {
    display: flex;
    justify-content: center;
}

.dialog-btn {
    width: 100%;
    height: 46px;
    border-radius: var(--radius-md);
    background: rgba(0, 150, 107, 0.06);
    border: 1px solid rgba(0, 150, 107, 0.15);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 700;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.dialog-btn:hover {
    background: rgba(0, 150, 107, 0.12);
    transform: translateY(-1px);
}

/* ==========================================================================
   Toast Notification Styling (Light Theme optimized)
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
    z-index: 99999;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    pointer-events: none;
}

.toast-container.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-card {
    background: #05203d;
    border: 1px solid rgba(0, 150, 107, 0.3);
    padding: 12px 20px;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 25px rgba(5, 32, 61, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    color: var(--accent);
    font-weight: 800;
    font-size: 1rem;
}

.toast-message {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 480px) {
    body {
        padding: 0;
        background-color: #ffffff; /* Fills full white card background on mobile */
    }

    .card-wrapper {
        max-width: 100%;
    }

    .profile-card {
        border-radius: 0;
        min-height: 100vh;
        border: none;
        box-shadow: none;
    }
    
    .bg-shape {
        display: none;
    }
}
