/* ===============================================
   Nashco Global - Modern, Responsive Website
   =============================================== */

/* Root Variables */
:root {
    /* Colors */
    --primary-color: #1a5490;
    --secondary-color: #f39c12;
    --accent-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --white: #ffffff;
    --black: #000000;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #ddd;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1a5490 0%, #2980b9 100%);
    --gradient-secondary: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(26, 84, 144, 0.9) 0%, rgba(41, 128, 185, 0.85) 100%);
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 120px 0;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-arabic: 'Cairo', sans-serif;
    
    /* Transitions */
    --transition-smooth: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition-smooth);
}

/* RTL Support */
[dir="rtl"] {
    font-family: var(--font-arabic);
}

[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Language Toggle */
.language-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

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

.lang-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.lang-btn i {
    font-size: 18px;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    max-height: 70px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-fallback {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
    display: none;
}

/* Show fallback only if image fails */
.logo-img:not([src]) + .logo-text .logo-fallback,
.logo-img[src=""] + .logo-text .logo-fallback {
    display: block;
}

.logo .tagline {
    font-size: 12px;
    color: var(--text-light);
    margin-top: -5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-smooth);
}

[dir="rtl"] .nav-menu a::after {
    left: auto;
    right: 0;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px;
    padding: 100px 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.hero .container {
    position: relative;
    z-index: 3;
}

.hero-content {
    text-align: center;
    color: var(--white);
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 35px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 50px;
    opacity: 0.95;
    line-height: 1.9;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 50px;
}

/* Animations */
.animate-slide-up {
    opacity: 0;
    transform: translateY(50px);
    animation: slideUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    color: var(--white);
    font-size: 24px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-secondary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Section Styles */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.title-underline {
    width: 100px;
    height: 5px;
    background: var(--gradient-secondary);
    margin: 0 auto 25px;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* About Section */
.about {
    position: relative;
    background: var(--light-color);
    overflow: hidden;
}

.about-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 1;
}

.about .container {
    position: relative;
    z-index: 2;
}

.about-text {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.lead {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 25px;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.9;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.stat-item {
    text-align: center;
    padding: 40px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.stat-label {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Services Section */
.services {
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    padding: 40px 30px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 35px;
    color: var(--white);
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
    transform: rotateY(360deg);
}

.service-card h3 {
    font-size: 1.6rem;
    color: var(--dark-color);
    margin-bottom: 18px;
    font-weight: 600;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
}

/* Vision Section */
.vision {
    background: var(--gradient-primary);
    color: var(--white);
}

.vision-content {
    max-width: 900px;
    margin: 0 auto;
}

.vision-text {
    text-align: center;
    margin-bottom: 50px;
}

.vision-text h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.vision-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    opacity: 0.95;
}

.vision-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.feature-item h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature-item p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Contact Section */
.contact {
    background: var(--light-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.info-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

[dir="rtl"] .info-item:hover {
    transform: translateX(-10px);
}

.info-item i {
    font-size: 24px;
    color: var(--primary-color);
    margin-top: 5px;
}

.info-item h4 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.info-item p {
    color: var(--text-light);
}

/* Contact Form */
.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition-smooth);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    background: var(--white);
    padding: 0 5px;
    color: var(--primary-color);
}

[dir="rtl"] .form-group input:focus + label,
[dir="rtl"] .form-group input:not(:placeholder-shown) + label,
[dir="rtl"] .form-group textarea:focus + label,
[dir="rtl"] .form-group textarea:not(:placeholder-shown) + label {
    left: auto;
    right: 10px;
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: var(--text-light);
    transition: var(--transition-smooth);
    pointer-events: none;
}

[dir="rtl"] .form-group label {
    left: auto;
    right: 15px;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn {
    width: 100%;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section p {
    opacity: 0.9;
    line-height: 1.8;
    margin-bottom: 20px;
}

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

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

.footer-section ul li a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition-smooth);
}

.footer-section ul li a:hover {
    opacity: 1;
    padding-left: 5px;
}

[dir="rtl"] .footer-section ul li a:hover {
    padding-left: 0;
    padding-right: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    z-index: 999;
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Logo */
    .logo-img {
        max-height: 55px;
    }
    
    .logo-text {
        font-size: 0.9rem;
    }
    
    /* Navigation */
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 50px 20px;
        gap: 20px;
        box-shadow: var(--shadow-md);
        transition: var(--transition-smooth);
    }
    
    [dir="rtl"] .nav-menu {
        left: auto;
        right: -100%;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    [dir="rtl"] .nav-menu.active {
        left: auto;
        right: 0;
    }
    
    /* Hero */
    .hero {
        min-height: 80vh;
        padding: 80px 0;
    }
    
    .hero-content {
        padding: 40px 20px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Sections */
    section {
        padding: 80px 0;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .vision-features {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: fadeIn 0.5s ease-in;
}

/* Accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

a:focus,
button:focus {
    outline: 2px solid var(--secondary-color);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0d3a66;
        --text-color: #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .language-toggle,
    .back-to-top,
    .whatsapp-float,
    .scroll-indicator {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* ===============================================
   WhatsApp Floating Button
   =============================================== */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition-smooth);
    text-decoration: none;
}

[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 30px;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
    filter: brightness(0) invert(1);
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    animation: pulse-whatsapp 2s infinite;
    z-index: -1;
}

@keyframes pulse-whatsapp {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Mobile responsiveness for WhatsApp button */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    [dir="rtl"] .whatsapp-float {
        right: auto;
        left: 20px;
    }
    
    .whatsapp-icon {
        width: 30px;
        height: 30px;
    }
}

/* Bounce animation for scroll indicator */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

/* Hero image responsive styles */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem !important;
    }
    .hero p {
        font-size: 1.2rem !important;
    }
    .hero img {
        max-width: 400px !important;
    }
    .page-header h1 {
        font-size: 2.5rem !important;
    }
    .page-header p {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem !important;
    }
    .hero p {
        font-size: 1rem !important;
    }
    .hero img {
        max-width: 300px !important;
    }
    .hero .btn {
        padding: 15px 35px !important;
        font-size: 1rem !important;
    }
    .page-header h1 {
        font-size: 2rem !important;
    }
    .page-header p {
        font-size: 1rem !important;
    }
}
