/* Main Styles */
:root {
    --primary-green: #2ecc71;
    --primary-blue: #3498db;
    --dark-blue: #2980b9;
    --dark-green: #27ae60;
}

body {
    font-family: 'Tajawal', sans-serif;
    scroll-behavior: smooth;
    overflow-x: hidden;
    background-color: #f9fafb;
}

/* Navigation Styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: normal;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    right: 0;
    background-color: var(--primary-green);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.external-link:hover::after,
.nav-link.external-link.active::after {
    width: 0;
}

.mobile-nav-link {
    font-size: 1.25rem;
    line-height: normal;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Card Styles */
.app-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-card:hover .feature-icon {
    transform: rotate(10deg) scale(1.15);
}

.feature-icon {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Animation Styles */
.scroll-indicator {
    position: fixed;
    top: 0;
    right: 0;
    height: 5px;
    background: var(--primary-green);
    z-index: 1000;
    transition: width 0.3s;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-from-left {
    transform: translateX(-50px);
}

.slide-in-from-right {
    transform: translateX(50px);
}

.slide-in-from-bottom {
    transform: translateY(50px);
}

.slide-in.visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

/* Logo Styles */
.logo-img {
    max-height: 70px;
    transition: transform 0.3s ease;
}

.hero-logo-img {
    max-height: 130px !important;
    margin-bottom: -0.5rem;
}

.logo-img:hover,
.hero-logo-img:hover {
    transform: scale(1.1);
}

/* Button Styles */
.btn-animated {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
    position: relative;
    transform: translateY(-50px) scale(0.95);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #777;
    cursor: pointer;
}

.modal-close-btn:hover {
    color: #333;
}

.form-toggle-link {
    color: var(--primary-blue);
    cursor: pointer;
    text-decoration: underline;
}

.form-toggle-link:hover {
    color: var(--dark-blue);
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.whatsapp-btn:hover {
    background-color: #1DAE51;
    transform: translateY(-2px);
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.user-info-widget {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    min-width: auto;
    justify-content: flex-start;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

@media (min-width: 768px) {
    .user-info-widget {
        padding: 0.5rem 1rem;
        min-width: 160px;
    }
}

.user-info-widget:hover {
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.3);
}

.user-info-widget .user-avatar {
    font-size: 1.5rem;
    margin-left: 0.5rem;
    color: #e0f2fe;
    line-height: 1;
}

@media (min-width: 768px) {
    .user-info-widget .user-avatar {
        font-size: 1.75rem;
        margin-left: 0.75rem;
    }
}

.user-info-widget .username {
    font-size: 1rem;
}

@media (min-width: 768px) {
    .user-info-widget .username {
        font-size: 1.125rem;
    }
}

.logout-button-container {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    border-radius: 0.375rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    transform-origin: top center;
    min-width: 120px;
    transform: translateX(-50%) translateY(5px) scale(0.98);
}

.user-info-widget.show-logout .logout-button-container {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.logout-btn {
    display: block;
    width: 100%;
    text-align: right;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    color: var(--dark-blue);
    background-color: transparent;
    border: none;
    cursor: pointer;
    border-radius: 0.25rem;
    font-weight: 500;
}

.logout-btn:hover {
    background-color: #e0f2fe;
    color: var(--primary-blue);
}

.logout-btn i {
    margin-left: 0.5rem;
}

.stat-value-247-existing span {
    display: inline-block;
}

.stat-value-247-existing .sep {
    opacity: 0;
}

.hero-slider-dots {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.hero-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    margin: 0 5px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.hero-slider-dot.active {
    background-color: white;
}

.hero-product-icon {
    transition: opacity 0.3s ease;
}

/* Utility Classes */
.ltr-text {
    direction: ltr;
    display: inline-block;
}

.hero-gradient {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .mobile-nav-link {
        font-size: 1.25rem;
        line-height: normal;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}
