/* General Layout Adjustments for Contact Page */
body {
    padding-top: 100px; /* Ensure content is below fixed header */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #1a1b26; /* Dark purple/blueish background, change if needed */
    /* Removed transition here if you don't want the body background to change */
}

main {
    flex-grow: 1; /* Allow main content to take available space */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

/* Hero Section for Contact Page */
.contact-hero {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 60px;
    max-width: 900px;
    opacity: 0; /* Handled by fade-in-down animation */
}

.contact-hero h1 {
    font-size: 3.2rem;
    color: white;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.contact-hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Main Circle Container --- */
.contact-wheel-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 80px;
}

.main-circle-container {
    position: relative;
    width: 600px; /* Diameter of the entire wheel/circle */
    height: 600px;
    border-radius: 50%;
    /* Glassmorphism base styling */
    background: rgba(255, 255, 255, 0.08); /* Initial transparent background */
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1), inset 0 0 20px rgba(255, 255, 255, 0.1);
    animation: fadeInScale 1s ease-out forwards; /* Initial fade-in and scale */
    overflow: hidden; /* Ensure content is clipped if it goes outside */

    /* Removed conic-gradient for pizza slices here. The color will be changed by JS */
    transition: background-color 0.4s ease-out, box-shadow 0.4s ease-out, border 0.4s ease-out; /* Smooth transition */
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Center text element (The "اختر" part) */
.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px; /* Size of the central circle */
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, #f0c27c 0%, #e0a34b 70%, #d88f33 100%); /* Gold/crust-like gradient (pizza crust) */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem;
    font-weight: bold;
    color: #8B4513; /* Dark brown for the text */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
    z-index: 10; /* Ensures it's above everything */
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.7), inset 0 0 18px rgba(255, 255, 255, 0.3);
    animation: pulseCenter 2s infinite alternate; /* Pulsing animation for center */
    pointer-events: none; /* Allows clicks to pass through to elements behind */
}

@keyframes pulseCenter {
    from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    to { transform: translate(-50%, -50%) scale(1.05); opacity: 0.9; }
}


/* Individual contact items (icons and text) */
.contact-item {
    --distance-from-center: 200px; /* Adjust this value to move icons further/closer from center */
    --item-size: 100px; /* Size of the clickable area for icon/text */

    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--item-size);
    height: var(--item-size);
    border-radius: 50%; /* Make the clickable area round for better feel */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: white; /* Default text color */
    
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--distance-from-center) * -1)) rotate(calc(var(--angle) * -1));
    /* Break down:
        1. translate(-50%, -50%): Centers the item container itself.
        2. rotate(var(--angle)): Rotates the item around the main circle's center.
        3. translateY(calc(var(--distance-from-center) * -1)): Moves the item outwards from the center.
        4. rotate(calc(var(--angle) * -1)): This counter-rotates the item's content (icon/text) to keep it straight.
    */
    
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), /* Springy effect for movement */
                color 0.4s ease-out,
                z-index 0s 0.2s; /* Delay z-index change until transform starts */
    z-index: 2; /* Ensure items are above the main circle's background */
}

.contact-item i {
    font-size: 55px;
    color: white; /* Default icon color */
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: font-size 0.4s ease-out, color 0.4s ease-out, text-shadow 0.4s ease-out;
}

.contact-item span {
    font-size: 1.1em;
    color: white; /* Default text color */
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    transition: font-size 0.4s ease-out, color 0.4s ease-out, text-shadow 0.4s ease-out;
}


/* Define app specific colors (these are used for data-main-circle-color in HTML) */
.whatsapp-color { --app-color: #25D366; }
.call-color     { --app-color: #007bff; }
.gmail-color    { --app-color: #EA4335; }
.discord-color  { --app-color: #5865F2; }
.snapchat-color { --app-color: #FFFC00; }
.instagram-color{ --app-color: #C13584; }
.tiktok-color   { --app-color: #000000; } /* TikTok black */


/* --- HOVER EFFECT (Desktop) --- */
.contact-item:hover {
    z-index: 15; /* Bring hovered item to front */
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--distance-from-center) * -0.5)) rotate(calc(var(--angle) * -1)) scale(1.1); 
    /* Move slightly closer to center and scale up */
}

.contact-item:hover i {
    font-size: 70px; /* Icon grows */
}

.contact-item:hover span {
    font-size: 1.4em; /* Text grows */
}

/* Specific icon/text color adjustments for certain apps */
.instagram-color i { /* Default Instagram icon color with gradient */
    background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback */
}
/* On hover, Instagram icon becomes white */
.instagram-color:hover i { 
    color: white; 
    -webkit-text-fill-color: white; 
}
.instagram-color:hover span { color: white; }

/* Snapchat icon and text become black on hover */
.snapchat-color:hover i,
.snapchat-color:hover span { color: black; text-shadow: none; } 

/* TikTok icon special glow on hover */
.tiktok-color:hover i {
    color: white;
    filter: drop-shadow(0 0 10px #22e6f4) drop-shadow(0 0 10px #fe2c55);
}


/* --- RESPONSIVE ADJUSTMENTS FOR MOBILE --- */
@media (max-width: 768px) {
    .contact-hero h1 {
        font-size: 2rem; /* Smaller heading on mobile */
    }
    .contact-hero p {
        font-size: 0.9rem; /* Smaller paragraph on mobile */
    }

    .main-circle-container {
        width: 320px; /* Smaller wheel diameter for typical mobile */
        height: 320px;
        /* Adjusted box-shadow for smaller size */
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1), inset 0 0 15px rgba(255, 255, 255, 0.1);
    }

    .wheel-center {
        width: 100px; /* Smaller center circle */
        height: 100px;
        font-size: 1.4rem; /* Smaller text in center */
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(255, 255, 255, 0.3);
    }

    .contact-item {
        --distance-from-center: 100px; /* Shorter distance from center for icons */
        --item-size: 70px; /* Smaller clickable area for icons */
    }

    .contact-item i {
        font-size: 38px; /* Smaller icon size */
    }

    .contact-item span {
        font-size: 0.8em; /* Smaller text size */
        margin-top: 5px; /* Adjust spacing */
    }

    /* Adjust hover effect for mobile (if hover is supported, mostly via touch) */
    .contact-item:hover {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--distance-from-center) * -0.4)) rotate(calc(var(--angle) * -1)) scale(1.05); /* Less dramatic scale/move */
    }

    .contact-item:hover i {
        font-size: 50px; /* Icon size on mobile when hovered */
    }
    .contact-item:hover span {
        font-size: 1em; /* Text size on mobile when hovered */
    }
}

/* Further reduce for very small screens (e.g., iPhone 5/SE, older Androids) */
@media (max-width: 480px) {
    .main-circle-container {
        width: 280px; /* Even smaller wheel */
        height: 280px;
    }

    .wheel-center {
        width: 90px;
        height: 90px;
        font-size: 1.2rem;
    }

    .contact-item {
        --distance-from-center: 90px;
        --item-size: 60px;
    }

    .contact-item i {
        font-size: 32px;
    }

    .contact-item span {
        font-size: 0.75em;
    }

    .contact-item:hover i {
        font-size: 45px;
    }
    .contact-item:hover span {
        font-size: 0.9em;
    }
}

/* RTL adjustments for Arabic */
body.arabic-active .contact-hero {
    direction: rtl;
}