/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for Theme Support */
:root {
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --card-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --hover-bg: #f8f9fa;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --profile-bg-start: #4a90e2;
    --profile-bg-end: #357abd;
    --accent-color: #4a90e2;
    --counter-bg: rgba(255, 255, 255, 0.95);
    --whatsapp-color: #25D366;
}

[data-theme="dark"] {
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #16213e;
    --card-bg: #2d3748;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --border-color: #4a5568;
    --hover-bg: #4a5568;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --profile-bg-start: #2b6cb0;
    --profile-bg-end: #2c5282;
    --accent-color: #63b3ed;
    --counter-bg: rgba(45, 55, 72, 0.95);
    --whatsapp-color: #25D366;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Contact Card Styles */
.contact-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 20px 40px var(--shadow-light);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    min-width: 280px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px var(--shadow-medium);
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(180deg);
}

.theme-toggle.dark .sun-icon {
    opacity: 0;
    transform: rotate(180deg);
}

.theme-toggle.dark .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Profile Section */
.profile-section {
    background: linear-gradient(135deg, var(--profile-bg-start), var(--profile-bg-end));
    color: white;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    transition: background 0.3s ease;
}

.profile-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.profile-image {
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
}

.profile-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-image img:hover {
    transform: scale(1.05);
}

.profile-info {
    position: relative;
    z-index: 1;
}

.name {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.title {
    font-size: 1rem;
    margin-bottom: 3px;
    opacity: 0.9;
    font-weight: 500;
}

.company {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 400;
    margin-bottom: 8px;
}

.services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 8px 0;
    justify-content: center;
}

.service-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    cursor: default;
}

.service-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.tagline {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 500;
    font-style: italic;
    text-align: center;
    margin-top: 8px;
}

.description {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 400;
    line-height: 1.4;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Contact Details */
.contact-details {
    padding: 25px 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.contact-item:hover {
    background-color: var(--hover-bg);
}

.contact-item:last-child {
    margin-bottom: 0;
}

.icon {
    font-size: 1.5rem;
    margin-right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hover-bg), var(--border-color));
    border-radius: 10px;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.info a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.info a:hover {
    color: var(--profile-bg-end);
    text-decoration: underline;
}

.info span:not(.label) {
    color: var(--text-primary);
    font-weight: 500;
}

/* Social Links */
.social-links {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Payment Section */
.payment-section {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--hover-bg);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.payment-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 15px;
    max-width: 100%;
    justify-items: center;
}

.payment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow-light);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    max-width: 130px;
    min-height: 90px;
    justify-content: center;
}

.payment-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-medium);
}

.payment-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 1.5rem;
    color: white;
}

.payment-icon.gpay {
    background: linear-gradient(135deg, #4285f4, #34a853);
}

.payment-icon.phonepe {
    background: linear-gradient(135deg, #5f259f, #7b68ee);
}

.payment-icon.paytm {
    background: linear-gradient(135deg, #00baf2, #0099cc);
}

.payment-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.payment-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.payment-number {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.social-btn {
    flex: 1;
    min-width: 80px;
    padding: 12px 16px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-btn:not(.primary) {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
}

.social-btn:not(.primary):hover {
    background-color: #e9ecef;
    color: #495057;
    transform: translateY(-2px);
}

.social-btn.primary {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    font-weight: 600;
}

.social-btn.primary:hover {
    background: linear-gradient(135deg, #357abd, #2a5d8f);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .contact-card {
        max-width: 100%;
        margin: 0;
    }
    
    .profile-section {
        padding: 25px 20px;
    }
    
    .name {
        font-size: 1.7rem;
    }
    
    .description {
        font-size: 0.85rem;
        padding: 10px 15px;
    }
    
    .contact-details {
        padding: 20px 18px;
    }
    
    .contact-item {
        margin-bottom: 18px;
        padding: 12px;
    }
    
    .icon {
        width: 45px;
        height: 45px;
        font-size: 1.4rem;
        margin-right: 12px;
    }
    
    .payment-section {
        padding: 18px;
    }
    
    .payment-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .payment-option {
        padding: 12px 8px;
    }
    
    .payment-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .social-links {
        padding: 18px;
        gap: 8px;
    }
    
    .social-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .contact-card {
        max-width: 100%;
        margin: 0;
        border-radius: 15px;
    }
    
    .profile-section {
        padding: 20px 15px;
    }
    
    .profile-image img {
        width: 90px;
        height: 90px;
    }
    
    .name {
        font-size: 1.5rem;
    }
    
    .title {
        font-size: 0.9rem;
    }
    
    .company {
        font-size: 0.8rem;
    }
    
    .services {
        gap: 4px;
        margin: 10px 0 6px 0;
    }
    
    .service-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
        border-radius: 12px;
    }
    
    .tagline {
        font-size: 0.75rem;
        margin-top: 6px;
    }
    
    .description {
        font-size: 0.75rem;
        padding: 8px 12px;
        line-height: 1.3;
    }
    
    .contact-details {
        padding: 15px 12px;
    }
    
    .contact-item {
        margin-bottom: 15px;
        padding: 10px 8px;
    }
    
    .icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
        margin-right: 10px;
    }
    
    .label {
        font-size: 0.7rem;
    }
    
    .info a, .info span:not(.label) {
        font-size: 0.85rem;
    }
    
    .payment-section {
        padding: 15px 12px;
    }
    
    .payment-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .payment-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .payment-option {
        padding: 10px 6px;
    }
    
    .payment-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin-bottom: 6px;
    }
    
    .payment-name {
        font-size: 0.75rem;
    }
    
    .payment-number {
        font-size: 0.7rem;
    }
    
    .social-links {
        padding: 15px 12px;
        flex-direction: column;
        gap: 8px;
    }
    
    .social-btn {
        min-width: auto;
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 8px;
    }
    
    .profile-section {
        padding: 18px 12px;
    }
    
    .profile-image img {
        width: 80px;
        height: 80px;
    }
    
    .name {
        font-size: 1.4rem;
    }
    
    .description {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
    
    .contact-details {
        padding: 12px 10px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 12px 8px;
        margin-bottom: 12px;
    }
    
    .icon {
        margin-right: 0;
        margin-bottom: 6px;
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .info {
        align-items: center;
    }
    
    .payment-section {
        padding: 12px 10px;
    }
    
    .payment-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .payment-option {
        flex-direction: row;
        justify-content: flex-start;
        padding: 10px 12px;
        text-align: left;
    }
    
    .payment-icon {
        margin-bottom: 0;
        margin-right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .payment-info {
        align-items: flex-start;
        text-align: left;
    }
    
    .social-links {
        padding: 12px 10px;
    }
    
    .social-btn {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
}

/* Landscape orientation for small devices */
@media (max-width: 768px) and (orientation: landscape) {
    .profile-section {
        padding: 20px;
    }
    
    .profile-image img {
        width: 80px;
        height: 80px;
    }
    
    .name {
        font-size: 1.5rem;
    }
    
    .description {
        font-size: 0.75rem;
    }
    
    .contact-details {
        padding: 15px;
    }
    
    .payment-section {
        padding: 15px;
    }
    
    .payment-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Animation for page load */
.contact-card {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Visitor Counter */
.custom-visitor-counter {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--counter-bg);
    backdrop-filter: blur(10px);
    padding: 12px 18px;
    border-radius: 25px;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    z-index: 1000;
    transition: all 0.3s ease;
    cursor: default;
}

.custom-visitor-counter:hover {
    background: var(--card-bg);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.counter-icon {
    font-size: 1rem;
}

#custom-visitor-count {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.counter-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--whatsapp-color);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.whatsapp-float a:hover {
    background: #22c55e;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
}

/* Responsive adjustments for both elements */
@media (max-width: 768px) {
    .custom-visitor-counter {
        bottom: 15px;
        left: 15px;
        padding: 10px 15px;
        font-size: 0.8rem;
    }
    
    #custom-visitor-count {
        font-size: 0.85rem;
    }
    
    .counter-text {
        font-size: 0.75rem;
    }
    
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-float a {
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 480px) {
    .custom-visitor-counter {
        bottom: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .counter-icon {
        font-size: 0.9rem;
    }
    
    #custom-visitor-count {
        font-size: 0.8rem;
    }
    
    .counter-text {
        font-size: 0.7rem;
    }
    
    .whatsapp-float {
        bottom: 10px;
        right: 10px;
    }
    
    .whatsapp-float a {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}
