/* Base styles for the body, setting font, background, and default text color */
/* program by A. Jalili */


html {
    scroll-behavior: smooth; /* For smooth scrolling to sections */
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9; /* Retained original background color */
    position: relative; /* Needed for positioning the stars container (though fixed overrides this for stars) */
    overflow-x: hidden; /* Prevent horizontal scrollbar from stars */
}

/* Blinking Stars Container */
.blinking-stars-container {
    position: fixed; /* Changed to fixed to keep stars in viewport and visible */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Covers the entire viewport */
    pointer-events: none; /* Allows clicks to pass through */
    overflow: hidden; /* Ensures stars don't overflow outside */
    z-index: 2; /* Still z-index 2 so they appear over the header image */
}

.star {
    position: absolute;
    width: 8px; /* Increased star size from 5px to 8px */
    height: 8px; /* Increased star size from 5px to 8px */
    background-color: orange; /* Orange color for stars */
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    opacity: 0; /* Start hidden */
    animation: twinkle 2s infinite alternate; /* Twinkle animation */
}

@keyframes twinkle {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.0); }
    100% { opacity: 0; transform: scale(0.5); }
}

/* Language Switcher Styling */
.language-switcher-container {
    position: absolute; /* Position relative to the nearest positioned ancestor (body/html) */
    top: 15px; /* Adjust as needed */
    right: 15px; /* Adjust as needed */
    z-index: 1050; /* Ensure it's above other elements like navbar and modals */
}

.language-switcher-container .btn {
    background-color: #ff942f; /* Changed to match footer/navbar orange color */
    border: none;
    color: white;
}

/* Ensure the dropdown menu is initially hidden when not open */
.language-switcher-container .dropdown-menu {
    background-color: #ff942f; /* Changed to match button background */
    border: none;
    border-radius: 0.25rem; /* Slightly rounded corners */
    display: none; /* Hide by default */
}

/* Show the dropdown menu when 'show' class is present */
.language-switcher-container .dropdown-menu.show {
    display: block; /* Show when 'show' class is toggled by JS */
}

.language-switcher-container .dropdown-item {
    color: white !important;
    padding: .5rem 1rem;
}

.language-switcher-container .dropdown-item:hover,
.language-switcher-container .dropdown-item:focus {
    background-color: #e07b22; /* Slightly darker on hover/focus */
    color: white !important;
}


/* --- Header Animation --- */
header {
    background-image: url('img/1600x600.jpg'); /* Replace with a relevant image */
    background-size: cover;
    background-position: center;
    color: #ff9a33;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Apply fadeIn animation to header */
    animation: fadeIn 2s ease-in-out forwards;
    position: relative; /* Needed for the overlay if you add one later */
    z-index: 3; /* Increased to 3 to be above stars (2) */
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

header h1 {
    font-size: 60px; /* Original font size */
    margin: 0;
}

header p {
    font-size: 24px; /* Original font size */
    margin: 10px 0;
}

nav {
    background-color: #ff942f; /* Same as the desired footer color */
    z-index: 1030; /* Ensure navbar is above stars and header content */
    position: relative; /* Needed for z-index to work */
}

nav a {
    color: white !important; /* Added !important to ensure override Bootstrap */
    text-decoration: none;
    margin: 0 20px;
    font-size: 18px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #f0f0f0 !important;
}


section {
    padding: 60px 20px;
    text-align: center;
    position: relative; /* Needed for z-index to work */
    z-index: 3; /* Increased to 3 to be above stars (2) */
}

/* --- Feature Box Animations --- */
.feature {
    background-color: white;
    margin: 20px; /* Original margin */
    padding: 30px; /* Original padding */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    
    /* Initial state for slideUp animation */
    opacity: 0;
    transform: translateY(100px);
    animation-fill-mode: forwards; /* Ensures element stays visible after animation */
    
    /* Transition for hover effect */
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    position: relative; /* To ensure features are above stars */
    z-index: 1; /* This z-index is relative to its parent 'section', which now has z-index 3.
                    So, feature's effective z-index will be higher than stars. */
}

/* Slide Up Animation Keyframes */
@keyframes slideUp {
    0% { transform: translateY(100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Sequential animation for feature boxes based on your NEW order */
.col-md-4:nth-child(1) .feature { animation: slideUp 1s ease-out 0.2s forwards; } /* Feedback Collection */
.col-md-4:nth-child(2) .feature { animation: slideUp 1s ease-out 0.4s forwards; } /* Automated Responses */
.col-md-4:nth-child(3) .feature { animation: slideUp 1s ease-out 0.6s forwards; } /* Loyalty Programs */
.col-md-4:nth-child(4) .feature { animation: slideUp 1s ease-out 0.8s forwards; } /* Personalized Recommendations */
.col-md-4:nth-child(5) .feature { animation: slideUp 1s ease-out 1.0s forwards; } /* Order Tracking */
.col-md-4:nth-child(6) .feature { animation: slideUp 1s ease-out 1.2s forwards; } /* Appointment Scheduling */


/* Hover Effect for Feature Boxes */
.feature:hover {
    transform: translateY(-10px); /* Lifts the box up */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Slightly stronger shadow on hover */
}


.feature img {
    width: 80px; /* Original image size */
    margin-bottom: 20px;
}

/* --- Footer Styling --- */
#footer-section footer {
    background-color: #ff942f; /* Matching Navbar color */
    color: white;
    padding: 20px;
    /* Removed text-align: center; */
    position: relative; /* Needed for z-index to work */
    z-index: 3; /* Increased to 3 to be above stars (2) */
}

#footer-section footer .container {
    display: flex; /* Use flexbox for alignment */
    justify-content: space-between; /* Pushes content to ends */
    align-items: center; /* Vertically center content */
    flex-wrap: wrap; /* Allow content to wrap on smaller screens */
}

#footer-section footer p {
    margin: 0; /* Remove default paragraph margins */
    line-height: 1; /* Ensure single line display */
    white-space: nowrap; /* Prevent wrapping on desktop */
}

#footer-section footer .footer-phone {
    color: white; /* Ensure phone number link is white */
    text-decoration: none; /* Remove underline */
}

#footer-section footer .footer-phone:hover {
    text-decoration: underline; /* Add underline on hover */
}


@media (max-width: 768px) {
    header h1 {
        font-size: 40px;
    }

    header p {
        font-size: 20px;
    }

    /* Adjust language switcher for smaller screens */
    .language-switcher-container {
        top: 10px;
        right: 10px;
        font-size: 0.9em;
    }

    /* Adjust footer for smaller screens */
    #footer-section footer .container {
        flex-direction: column; /* Stack items vertically */
        text-align: center; /* Center text */
    }

    #footer-section footer p {
        white-space: normal; /* Allow text to wrap on smaller screens */
        margin-bottom: 5px; /* Add some space between stacked lines */
    }
}

/* --- Modal Specific Styles --- */
/* Ensure default text alignment for modal content for LTR website */
.modal-header, .modal-body, .modal-footer {
    text-align: left; /* Standard LTR alignment */
    direction: ltr; /* Ensure LTR direction for modal specific content */
    position: relative; /* Ensure it forms a new stacking context */
    z-index: 10; /* A high z-index for modals, ensuring they are always on top */
}

/* Rounded borders for modals */
.modal-content {
    border-radius: 15px; /* Apply rounded corners to modal content */
    position: relative; /* Ensure it forms a new stacking context */
    z-index: 10; /* High z-index for modal content itself */
}

/* --- About Us Modal Content Styling (Reused for Contact Us) --- */
/* Ensure elements start hidden for fade-in effect */
#aboutUsContentContainer .about-item,
#contactUsContentContainer .contact-item { /* Added contact-item */
    opacity: 0; /* Important: Start hidden for fade-in */
    transition: opacity 0.5s ease-in-out; /* Smooth fade-in */
    position: relative; /* To ensure modal content items are above stars (if modals had lower z-index) */
    z-index: 1; /* Relative to modal-body, which has z-index inherited from modal-content */
}

#aboutUsContentContainer .about-item,
#contactUsContentContainer .contact-item { /* Added contact-item */
    display: flex;
    align-items: flex-start; /* Align items to the top (icon and text) */
    margin-bottom: 15px;
    gap: 10px; /* Space between icon and text */
}

#aboutUsContentContainer i,
#contactUsContentContainer i { /* Added contact-item */
    color: #ff942f; /* Match primary color for icons */
    margin-top: 5px; /* Slight adjustment to align with text */
    flex-shrink: 0; /* Prevent icon from shrinking */
}

#aboutUsContentContainer p.about-text,
#contactUsContentContainer p.contact-text { /* Added contact-text */
    margin-bottom: 0; /* Remove default bottom margin for paragraphs in the flex container */
    flex-grow: 1; /* Allow text to take up remaining space */
    border-right: .15em solid orange; /* Cursor effect for typing text */
    animation: blink-caret .75s step-end infinite; /* Blinking cursor */
}

/* Hide cursor when typing is complete for a specific paragraph */
#aboutUsContentContainer p.about-text.typing-complete,
#contactUsContentContainer p.contact-text.typing-complete { /* Added contact-text */
    border-right: none;
    animation: none;
}

/* --- Typing Animation (only for the cursor) --- */
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: orange; }
}