/*
 * SmEiley Landing Page Styles
 * Visual Identity based on Logo: Yellow, Red, Blue, Green on a Dark Background
 * RTL (Right-to-Left) Layout for Arabic
 */

:root {
    --color-yellow: #FFD700; /* Bright Yellow */
    --color-red: #DC143C;    /* Strong Red */
    --color-blue: #191970;   /* Dark Professional Blue */
    --color-green: #006400;  /* Dark Green */
    --color-background: #0A0A0A; /* Very Dark Black */
    --color-text: #F0F0F0;   /* Light Text */
    --color-secondary-text: #B0B0B0; /* Secondary Text */
    --color-card-bg: #1A1A1A; /* Slightly lighter background for cards */
    --color-border: #333;
    --font-primary: 'Cairo', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    direction: rtl; /* Set base direction to RTL */
    text-align: right; /* Align text to the right */
    overflow-x: hidden;
}

/* Background Pattern (Technical Circles/Lines) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(to left, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
                      linear-gradient(to top, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px, 40px 40px;
    z-index: -1;
    opacity: 0.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--color-yellow);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--color-red);
}

h1, h2, h3 {
    font-weight: 900;
    margin-bottom: 15px;
}

p {
    color: var(--color-secondary-text);
    margin-bottom: 20px;
}

section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--color-yellow);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    background-color: var(--color-yellow);
    color: var(--color-background);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    background-color: #FFC700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6); /* Enhanced glow effect */
}

.btn-secondary {
    background: none;
    color: var(--color-yellow);
    border-color: var(--color-yellow);
}

.btn-secondary:hover {
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--color-red);
    border-color: var(--color-red);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Header and Navigation */
.main-header {
    background-color: rgba(10, 10, 10, 0.9);
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px; /* Adjust size as needed */
    width: auto;
}

.main-nav .nav-link {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    padding: 10px 15px;
    transition: color 0.3s;
}

.main-nav .nav-link:hover {
    color: var(--color-yellow);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 100px 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-section .badge {
    display: inline-block;
    background-color: var(--color-yellow);
    color: var(--color-background);
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 30px;
    line-height: 1.2;
}

.gradient-text {
    /* Yellow -> Red -> Yellow Gradient */
    background: linear-gradient(to left, var(--color-yellow), var(--color-red), var(--color-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.hero-description {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.2rem;
    color: var(--color-secondary-text);
}

.hero-actions a {
    margin: 0 10px;
}

/* Services Section & Features Section (Cards) */
.services-grid, .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card, .feature-item {
    background-color: var(--color-card-bg);
    padding: 30px;
    padding-top: 80px; /* Add padding to accommodate the icon */
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card:hover, .feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-card h3, .feature-item h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.icon-placeholder {
    position: absolute;
    top: 0;
    left: 0; /* Position in top-left for RTL */
    width: 60px;
    height: 60px;
    border-radius: 0 12px 0 12px; /* Rounded corner on top-right of the card */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    z-index: 1;
}

.icon-placeholder i {
    color: var(--color-background); /* Default icon color to be overridden */
}

/* Card Color Customization */
.color-yellow { box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.2); }
.color-red { box-shadow: 0 0 0 1px rgba(220, 20, 60, 0.2); }
.color-blue { box-shadow: 0 0 0 1px rgba(25, 25, 112, 0.2); }
.color-green { box-shadow: 0 0 0 1px rgba(0, 100, 0, 0.2); }

/* Line under Service Title */
.service-card .card-line {
    display: none; /* Remove the line under the title */
}

.service-card.color-yellow:hover { box-shadow: 0 0 15px var(--color-yellow); }
.service-card.color-yellow .icon-placeholder { background-color: var(--color-yellow); }
.service-card.color-yellow .icon-placeholder i { color: var(--color-background); }

.service-card.color-red:hover { box-shadow: 0 0 15px var(--color-red); }
.service-card.color-red .icon-placeholder { background-color: var(--color-red); }
.service-card.color-red .icon-placeholder i { color: var(--color-text); }

.service-card.color-blue:hover { box-shadow: 0 0 15px var(--color-blue); }
.service-card.color-blue .icon-placeholder { background-color: var(--color-blue); }
.service-card.color-blue .icon-placeholder i { color: var(--color-text); }

.service-card.color-green:hover { box-shadow: 0 0 15px var(--color-green); }
.service-card.color-green .icon-placeholder { background-color: var(--color-green); }
.service-card.color-green .icon-placeholder i { color: var(--color-text); }

/* Feature Item Icon Styling */
.feature-item.color-blue .icon-placeholder { background-color: var(--color-blue); }
.feature-item.color-blue .icon-placeholder i { color: var(--color-text); }

.feature-item.color-yellow .icon-placeholder { background-color: var(--color-yellow); }
.feature-item.color-yellow .icon-placeholder i { color: var(--color-background); }

.feature-item.color-red .icon-placeholder { background-color: var(--color-red); }
.feature-item.color-red .icon-placeholder i { color: var(--color-text); }

.feature-item.color-green .icon-placeholder { background-color: var(--color-green); }
.feature-item.color-green .icon-placeholder i { color: var(--color-text); }

/* Call to Action Section */
.cta-section {
    text-align: center;
    padding: 60px 0;
    background-color: var(--color-card-bg);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Footer */
.main-footer {
    padding: 60px 0 20px;
    background-color: var(--color-background);
}

.main-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

.footer-brand {
    flex-basis: 100%;
    max-width: 300px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 15px;
}

.footer-brand p {
    font-size: 0.9rem;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    flex-grow: 1;
}

.footer-column h4 {
    font-size: 1.1rem;
    color: var(--color-yellow);
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: var(--color-secondary-text);
    font-size: 0.95rem;
}

.footer-column ul li a:hover {
    color: var(--color-yellow);
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--color-secondary-text);
}

/* Bottom Bar Gradient */
#bottom-bar {
    height: 8px;
    width: 100%;
    background: linear-gradient(to left, var(--color-yellow), var(--color-red), var(--color-yellow));
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .footer-brand {
        flex-basis: 100%;
        text-align: center;
        max-width: 100%;
    }
    
    .footer-brand p {
        max-width: 80%;
        margin: 0 auto 20px;
    }
    
    .main-footer .container {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        text-align: center;
    }
    
    .footer-column {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-actions a {
        margin: 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid, .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links-grid {
        grid-template-columns: 1fr;
    }
}

/* Countdown Timer Styling */
.countdown-timer {
    margin: 40px auto;
    padding: 20px;
    border-radius: 12px;
    background-color: rgba(26, 26, 26, 0.7); /* Slightly transparent card background */
    max-width: 800px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.countdown-title {
    font-size: 1.8rem;
    color: var(--color-yellow);
    margin-bottom: 30px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.timer-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.timer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 25px;
    border-radius: 8px;
    min-width: 120px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}

.timer-item:hover {
    transform: translateY(-5px);
}

.timer-value {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 5px;
}

.timer-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-secondary-text);
}

/* Color coordination for timer items */
.timer-item.color-red {
    background-color: var(--color-red);
}
.timer-item.color-red .timer-value {
    color: var(--color-text);
}

.timer-item.color-blue {
    background-color: var(--color-blue);
}
.timer-item.color-blue .timer-value {
    color: var(--color-text);
}

.timer-item.color-green {
    background-color: var(--color-green);
}
.timer-item.color-green .timer-value {
    color: var(--color-text);
}

.timer-item.color-yellow {
    background-color: var(--color-yellow);
}
.timer-item.color-yellow .timer-value {
    color: var(--color-background); /* Dark text on yellow background */
}

/* Responsive adjustments for countdown */
@media (max-width: 576px) {
    .timer-grid {
        flex-wrap: wrap;
        gap: 10px;
    }
    .timer-item {
        min-width: 100px;
        padding: 10px 15px;
    }
    .timer-value {
        font-size: 2.5rem;
    }
    .countdown-title {
        font-size: 1.5rem;
    }
}
