:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f8fafc;
    --accent-color: #0891b2;
    /* Vibrant Cyan/Teal from image */
    --accent-green: #22c55e;
    /* Vibrant Green from image */
    --accent-gradient: linear-gradient(90deg, #0891b2, #22c55e);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(8, 145, 178, 0.1);
    --shadow: 0 10px 30px -5px rgba(8, 145, 178, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    overflow-x: hidden;
    position: relative;
    transition: background 0.5s ease;
}

/* Language Toggle Button */
.lang-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    padding: 10px 18px;
    background: white;
    border: 1px solid rgba(8, 145, 178, 0.1);
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    color: var(--accent-color);
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
}

.lang-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(8, 145, 178, 0.15);
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

/* LTR Specific Adjustments */
[dir="ltr"] .section-title {
    border-right: none;
    border-left: 5px solid var(--accent-color);
    padding-right: 0;
    padding-left: 0.85rem;
}

[dir="ltr"] .lang-toggle {
    left: auto;
    right: 20px;
}

[dir="ltr"] body::before {
    right: auto;
    left: -10%;
}

[dir="ltr"] .phone-sub {
    flex-direction: row-reverse;
}

[dir="ltr"] .phone-menu {
    transform-origin: bottom right;
}

[dir="ltr"] .floating-contact-container {
    left: auto;
    right: 25px;
    align-items: flex-end;
}

[dir="ltr"] .phone-menu {
    transform-origin: bottom right;
}



body::before {
    content: '';
    position: fixed;
    top: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.05), transparent 70%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
header {
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 50%;
    background: white;
    padding: 12px;
    box-shadow: 0 10px 25px -5px rgba(8, 145, 178, 0.15);
    border: 1px solid rgba(8, 145, 178, 0.1);
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.6;
    /* Improved spacing for multi-line */
    max-width: 400px;
}

/* Glass Card Style */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
}

/* Links List */
.links-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.section-title {
    grid-column: span 2;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    padding-right: 0.85rem;
    border-right: 5px solid var(--accent-color);
    color: var(--text-main);
}

.link-item {
    display: flex;
    flex-direction: row;
    /* Changed to row for better horizontal layout */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 1.5rem;
    background: white;
    border: 1px solid rgba(8, 145, 178, 0.1);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    position: relative;
    font-size: 1.1rem;
    /* Slightly larger text for full-width buttons */
    gap: 1rem;
    grid-column: span 2;
    /* Force one per row in the 2-column grid */
}

.link-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    transition: var(--transition);
}

.link-item:hover {
    background: #f0fdfa;
    border-color: var(--accent-green);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.08);
}

.link-item:hover i {
    transform: scale(1.1);
}

/* Social Media Specific Styles */
.social-fb {
    background: #1877F2;
    color: white !important;
    border-color: #1877F2;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.15);
}

.social-fb i {
    color: white !important;
}

.social-fb:hover {
    background: #1060c8;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 28px rgba(24, 119, 242, 0.3);
}

.social-ig {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: white !important;
    border-color: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    ;
    box-shadow: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-ig i {
    color: white !important;
}

.social-ig:hover {
    background: radial-gradient(circle at 40% 110%, #fdf497 0%, #fd5949 40%, #e1306c 70%, #833ab4 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 28px rgba(225, 48, 108, 0.4);
}

.social-tk {
    background: #000000;
    color: white !important;
    border-color: #000000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 5px 0px 0px #EE1D52, -5px 0px 0px #69C9D0;
}

.social-tk i {
    color: white !important;
}

.social-tk:hover {
    background: #111111;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4),
        3px 0px 0px #EE1D52, -3px 0px 0px #69C9D0;
}

.social-tk:hover i {
    text-shadow: 1.5px 0px #EE1D52, -1.5px 0px #69C9D0;
}

.store-link {
    height: 70px;
    width: 100%;
    /* Slightly adjusted height */
    padding: 0 !important;
    /* Remove padding to let image fill space */
    display: flex;
    align-items: center;
    justify-content: center !important;
    background: transparent !important;
    /* Let image define background */
    border: none !important;
    /* Clean look for full-bleed badges */
    grid-column: span 1;
    overflow: hidden;
    /* Ensure image doesn't bleed out of rounded corners */
    border-radius: 12px;
}

.store-icon {
    height: 100%;
    width: 100%;
    object-fit: cover;
    /* Fill the entire button area */
    transition: var(--transition);
}

.store-link:hover .store-icon {
    transform: scale(1.05);
}

.link-item:hover .store-icon {
    transform: scale(1.05);
}

.info-note {
    grid-column: span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem;
    background: rgba(8, 145, 178, 0.04);
    border-radius: 16px;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 0.25rem;
    border: 1px dashed rgba(8, 145, 178, 0.2);
    text-align: center;
}

/* Phone Section */
.phone-item {
    background: #f0fdfa;
    border-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.phone-item:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.phone-item i {
    color: #10b981;
}

.call-only-label {
    font-size: 0.7rem;
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
    margin-top: 0.25rem;
}

/* Floating WhatsApp (Disabled/Hidden) */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: none;
    /* User requested disabled/hidden */
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-bottom: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.powered-by {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.powered-by p {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.powered-logo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    background: white;
    padding: 0;
    box-shadow: 0 8px 20px rgba(8, 145, 178, 0.15);
    border: 3px solid white;
    transition: var(--transition);
}

.powered-logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 25px rgba(8, 145, 178, 0.25);
}

/* Mobile specific adjustments */
@media (max-width: 400px) {
    .logo-text {
        font-size: 2rem;
    }

    .button-group {
        grid-template-columns: 1fr;
    }
}

/* Save Contact Feature */
.contact-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-green));
    color: white !important;
    border: none;
    box-shadow: 0 10px 20px rgba(8, 145, 178, 0.2);
    margin-bottom: 0.5rem;
}

.contact-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(8, 145, 178, 0.3);
    background: white;
    color: var(--accent-color) !important;
    border: 1px solid var(--accent-color);
}

.ios-helper {
    display: none;
    /* Shown via JS on iOS Safari */
    grid-column: span 2;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 12px;
}

.ios-helper.show {
    display: block;
}

/* Toast Notification */
#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f172a;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    z-index: 9999;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Floating Contact System */
.floating-contact-container {
    position: fixed;
    bottom: 25px;
    left: 25px;
    right: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Ensure items align to the left (End of RTL axis) to match user preference for Bottom Left */
    gap: 15px;
    z-index: 10000;
}

.float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    position: relative;
    background: white;
}

.phone-trigger {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-green));
}

.phone-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    transform: scale(0);
    transform-origin: bottom left;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    pointer-events: none;
}

.phone-menu.show {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

.phone-sub {
    width: auto;
    min-width: 210px;
    height: 55px;
    border-radius: 35px;
    padding: 0 20px;
    background: white;
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 2px solid #0891b2;
    transition: var(--transition);
}

.phone-sub i {
    font-size: 20px;
    color: #0891b2;
}

.float-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

@media (max-width: 480px) {
    .floating-contact-container {
        bottom: 20px;
        left: 20px;
    }

    [dir="ltr"] .floating-contact-container {
        left: auto;
        right: 20px;
    }

    .float-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* ✅ Arabic (RTL): icon left + number right */
.phone-sub {
    flex-direction: row-reverse !important;
    justify-content: flex-start !important;
}

/* ✅ English (LTR): icon right + number left */
[dir="ltr"] .phone-sub {
    flex-direction: row-reverse !important;
    justify-content: flex-start !important;
}