/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Force mobile scaling in iframe/sandbox environments */
@media screen and (max-width: 768px) {
    html {
        zoom: 1 !important;
        -webkit-text-size-adjust: none !important;
        -ms-text-size-adjust: none !important;
        text-size-adjust: none !important;
    }
    
    body {
        zoom: 1 !important;
        transform: scale(1) !important;
        transform-origin: 0 0 !important;
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* Force mobile layout for small screens regardless of viewport detection */
@media screen and (max-width: 480px), screen and (max-device-width: 480px) {
    body {
        padding: 10px !important;
        font-size: 16px !important;
    }
    
    .container {
        margin: 0 !important;
        border-radius: 20px !important;
        max-width: 100% !important;
        width: 100% !important;
        min-height: auto !important;
    }
    
    .profile-image {
        height: 40vh !important;
        min-height: 140px !important;
    }
    
    .company {
        font-size: 18px !important;
        margin: 20px 0 12px 0 !important;
        padding: 0 15px !important;
    }
    
    .bio {
        font-size: 14px !important;
        padding: 0 20px !important;
        margin-bottom: 20px !important;
    }
    
    .links-section {
        padding: 0 15px !important;
        gap: 12px !important;
    }
    
    .link-card {
        padding: 16px 18px !important;
        border-radius: 12px !important;
        font-size: 15px !important;
    }
    
    .link-card i {
        font-size: 18px !important;
        margin-right: 12px !important;
        width: 20px !important;
    }
    
    .link-card span {
        font-size: 15px !important;
    }
}

/* IFRAME ENHANCEMENT - Scale up the entire iframe content */
@media screen and (max-width: 480px) {
    /* Scale up the iframe itself - much more aggressive */
    iframe {
        transform: scale(5) !important;
        transform-origin: top left !important;
        width: 20% !important;
        height: 20% !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        z-index: 9999 !important;
    }
    
    /* Target any element inside iframe with extreme specificity */
    iframe * {
        font-size: 200px !important;
        line-height: 1.2 !important;
    }
    
    iframe p {
        font-size: 200px !important;
        margin: 20px 0 !important;
        padding: 20px !important;
    }
    
    iframe span {
        font-size: 220px !important;
        display: inline-block !important;
        padding: 10px !important;
    }
    
    iframe i {
        font-size: 240px !important;
        margin-right: 30px !important;
    }
    
    iframe a {
        padding: 50px 60px !important;
        margin: 20px 0 !important;
        border-radius: 30px !important;
        font-size: 220px !important;
        display: block !important;
        text-decoration: none !important;
    }
    
    /* Force all text to be huge */
    iframe body,
    iframe html {
        font-size: 200px !important;
        zoom: 5 !important;
        -webkit-text-size-adjust: none !important;
    }
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Force mobile viewport detection */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #87ceeb; /* Fallback color */
    background: -webkit-linear-gradient(135deg, #87ceeb 0%, #98d8e8 50%, #b0e0e6 100%);
    background: -moz-linear-gradient(135deg, #87ceeb 0%, #98d8e8 50%, #b0e0e6 100%);
    background: -o-linear-gradient(135deg, #87ceeb 0%, #98d8e8 50%, #b0e0e6 100%);
    background: linear-gradient(135deg, #87ceeb 0%, #98d8e8 50%, #b0e0e6 100%);
    background-attachment: fixed; /* Ensure gradient covers full viewport */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

body::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.container {
    background: #ffffff; /* Pure white to match logo background */
    border-radius: 25px;
    padding: 0;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease-out;
    min-height: 600px; /* Ensure enough height for all content */
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #ff6b35, #ffd700, #ff6b35);
    border-radius: 25px 25px 0 0;
    z-index: 1;
}

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

/* Profile Image Section */
.profile-image {
    width: 100%;
    height: 35vh;
    min-height: 200px;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.profile-image canvas {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.profile-image img {
    display: none;
}

.profile-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(1px);
}

.profile-info {
    padding: 0 30px;
    text-align: center;
}

.company {
    font-size: 20px;
    font-weight: 600;
    color: #ff6b35;
    margin: 20px 0 12px 0;
    text-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
    text-align: center;
    width: 100%;
}

.bio {
    font-size: 15px;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 25px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
    text-align: center;
}

.links-section {
    padding: 0 25px 25px 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
    border-radius: 15px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    /* Allow interaction on mobile */
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
    -webkit-touch-callout: default;
    touch-action: manipulation;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.link-card:hover::before {
    opacity: 1;
}

.link-card i {
    font-size: 20px;
    margin-right: 15px;
    width: 24px;
    text-align: center;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.link-card span {
    font-size: 16px;
    position: relative;
    z-index: 1;
}

/* Specific link card colors - LIGHT BACKGROUNDS */
.phone {
    border-left: 5px solid #25d366;
    background: linear-gradient(135deg, #f0f9f0 0%, #e8f5e8 100%);
    -webkit-tap-highlight-color: #25d366;
    cursor: pointer;
}

.phone i {
    color: #25d366;
}

.email {
    border-left: 5px solid #ea4335;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
    -webkit-tap-highlight-color: #ea4335;
    cursor: pointer;
}

.email i {
    color: #ea4335;
}

.address {
    border-left: 5px solid #9c27b0;
    background: linear-gradient(135deg, #f8f0ff 0%, #f0e6ff 100%);
}

.address i {
    color: #9c27b0;
}

.email {
    border-left: 5px solid #ea4335;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
}

.email i {
    color: #ea4335;
}

.website {
    border-left: 5px solid #ff6b35;
    background: linear-gradient(135deg, #fff8f0 0%, #ffe6d6 100%);
}

.website i {
    color: #ff6b35;
}

.instagram {
    border-left: 5px solid #e4405f;
    background: linear-gradient(135deg, #fff5f8 0%, #ffe6f0 100%);
}

.instagram i {
    color: #e4405f;
}

.facebook {
    border-left: 5px solid #1877f2;
    background: linear-gradient(135deg, #f0f5ff 0%, #e6f0ff 100%);
}

.facebook i {
    color: #1877f2;
}

.footer {
    margin-top: 20px;
    padding: 20px 25px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
}

.footer p {
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
}

/* Responsive Design - FIXED MOBILE ISSUES */
@media (max-width: 480px) {
    body {
        padding: 10px;
        min-height: 100vh;
        background: -webkit-linear-gradient(135deg, #87ceeb 0%, #98d8e8 50%, #b0e0e6 100%);
        background: -moz-linear-gradient(135deg, #87ceeb 0%, #98d8e8 50%, #b0e0e6 100%);
        background: -o-linear-gradient(135deg, #87ceeb 0%, #98d8e8 50%, #b0e0e6 100%);
        background: linear-gradient(135deg, #87ceeb 0%, #98d8e8 50%, #b0e0e6 100%);
        background-attachment: fixed;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        /* Remove animations for better performance */
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Remove floating animation on mobile */
    body::before {
        display: none;
    }
    
    .container {
        margin: 0;
        border-radius: 20px;
        max-width: 100%;
        width: 100%;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        background: #ffffff; /* Pure white to match logo background */
        border: 3px solid rgba(255, 255, 255, 0.3);
        /* Remove animation for better performance */
        animation: none;
        transform: none;
        min-height: auto; /* Remove fixed height on mobile */
    }
    
    .container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: linear-gradient(90deg, #ff6b35, #ffd700, #ff6b35);
        border-radius: 20px 20px 0 0;
        z-index: 1;
    }
    
    .profile-image {
        height: 40vh; /* Increased from 35vh */
        min-height: 140px; /* Increased from 120px */
        background: #ffffff; /* Pure white background */
    }
    
    .profile-image canvas {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        transform: scale(1.2); /* Make it 20% bigger */
    }
    
    .profile-image img {
        display: none; /* Hide the img element, use canvas instead */
    }
    
    .company {
        font-size: 18px;
        margin: 20px 0 12px 0;
        padding: 0 15px;
        color: #ff6b35;
        text-align: center;
    }
    
    .bio {
        font-size: 14px;
        line-height: 1.5;
        padding: 0 20px;
        margin-bottom: 20px;
        max-width: 100%;
        color: #64748b;
        text-align: center;
    }
    
    .links-section {
        padding: 0 15px;
        gap: 12px;
    }
    
    .link-card {
        padding: 16px 18px;
        border-radius: 12px;
        /* Reduce hover effects on mobile for better performance */
        transition: transform 0.2s ease;
    }
    
    .link-card:hover {
        transform: translateY(-1px);
    }
    
    .link-card i {
        font-size: 18px;
        margin-right: 12px;
        width: 20px;
    }
    
    .link-card span {
        font-size: 15px;
    }
    
    .footer {
        margin-top: 15px;
        padding: 15px 20px;
    }
    
    .footer p {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    body {
        padding: 5px;
    }
    
    .container {
        border-radius: 15px;
    }
    
    .container::before {
        border-radius: 15px 15px 0 0;
    }
    
    .profile-image {
        height: 30vh;
        min-height: 100px;
        background: #ffffff; /* Pure white background */
    }
    
    .profile-image canvas {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    
    .profile-image img {
        display: none; /* Hide the img element, use canvas instead */
    }
    
    .company {
        font-size: 16px;
        margin: 15px 0 10px 0;
    }
    
    .bio {
        font-size: 13px;
        padding: 0 15px;
        margin-bottom: 15px;
    }
    
    .links-section {
        padding: 0 12px;
        gap: 10px;
    }
    
    .link-card {
        padding: 14px 16px;
        border-radius: 10px;
    }
    
    .link-card i {
        font-size: 16px;
        margin-right: 10px;
        width: 18px;
    }
    
    .link-card span {
        font-size: 14px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 5px;
    }
    
    .container {
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .profile-image {
        height: 25vh;
        min-height: 80px;
    }
    
    .company {
        margin: 15px 0 8px 0;
    }
    
    .bio {
        margin-bottom: 15px;
    }
    
    .links-section {
        gap: 8px;
    }
    
    .link-card {
        padding: 12px 16px;
    }
}
