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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    color: #ffd700;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background-color: #f8f9fa;
    color: #1e3c72;
    border: 1px solid #1e3c72;
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.lang-btn:hover {
    background-color: #e9ecef;
}

.lang-btn.active {
    background-color: #1e3c72;
    color: white;
}

/* Main Content */
main {
    margin-top: 80px;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(30, 60, 114, 0.8), rgba(42, 82, 152, 0.8)), url('../images/steel-hero.jpg');
    background-size: cover;
    background-position: center;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    max-width: 600px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-content {
    max-width: 650px;
    padding: 1.8rem 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

/* Section Styles */
.section {
    padding: 4rem 0;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e3c72;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
}

/* About Section */
.about {
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-image {
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Divisions Section */
.divisions {
    background: #f8f9fa;
}

.division-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.division-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.division-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.division-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.division-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1e3c72;
}

.division-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Contact Section */
.contact {
    background: white;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.contact-item h4 {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Footer */
footer {
    background: #1e3c72;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.service-item h4 {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Projects Gallery */
.projects-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.project-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.project-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

.project-info h4 {
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .division-cards {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* Page-specific styles */
.page-hero {
    background: linear-gradient(rgba(30, 60, 114, 0.9), rgba(42, 82, 152, 0.9));
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.page-hero h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.breadcrumb {
    background: #e9ecef;
    padding: 1rem 0;
}

.breadcrumb-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.breadcrumb-nav a {
    color: #1e3c72;
    text-decoration: none;
    margin-right: 0.5rem;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* RTL for Arabic */
body.ar {
    direction: rtl;
    text-align: right;
}

body.ar .nav-links {
    direction: rtl;
}

body.ar .nav-links a {
    margin-left: 2rem;
    margin-right: 0;
}

body.ar .section-title::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

body.ar .about-content {
    grid-template-columns: 1fr 1fr;
}

body.ar .about-text {
    text-align: right;
}

body.ar .about-image {
    text-align: left;
}

body.ar .division-icon {
    margin: 0 auto 1.5rem;
}

body.ar .contact-item {
    text-align: right;
}

body.ar .breadcrumb-nav a {
    margin-right: 0;
    margin-left: 0.5rem;
}

body.ar .breadcrumb-nav span {
    margin-right: 0.5rem;
    margin-left: 0;
}


body.en {
    direction: ltr;
    text-align: left;
}


/* Make hero title one line on mobile */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.2rem;   /* صغّر الخط ليناسب سطر واحد */
        white-space: nowrap; /* يمنع الانتقال لسطر جديد */
    }
}


@media (max-width: 480px) {
    .hero p {
        font-size: 0.9rem;   /* صغّر الخط */
        line-height: 1.3;    /* يخلي شكله مرتب */
    }
}

/* FETS AI Chat Bubble Styles */
#fets-ai-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

#fets-ai-toggle {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#fets-ai-window {
    display: none;
    flex-direction: column;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 320px;
    max-height: 500px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    overflow: hidden;
    z-index: 10000;
}

.fets-ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    padding: 0.75rem;
}

.fets-ai-title {
    font-weight: bold;
}

.fets-ai-header button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.fets-ai-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8f9fa;
}

.fets-ai-msg {
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.fets-ai-msg.user {
    text-align: right;
}

.fets-ai-msg.assistant {
    text-align: left;
}

.fets-ai-input-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-top: 1px solid #ddd;
    background: #fff;
}

.fets-ai-input-area textarea {
    flex: 1;
    resize: none;
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.fets-ai-input-area button {
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.fets-ai-footer {
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.75rem;
    border-top: 1px solid #ddd;
    background: #fff;
}

.fets-ai-footer a {
    color: #1e3c72;
    text-decoration: underline;
}


.announcement-bar {
    background: #ffd700;
    color: #1e3c72;
    text-align: center;
    padding: 10px 0;
    font-weight: bold;
    font-size: 1.1rem;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* Announcement Bar */
.announcement-bar {
    background: #2596be; /* اللون المطلوب */
    color: white;
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
    font-weight: bold;
    font-size: 1.1rem;
    border-bottom: 2px solid rgba(255,255,255,0.4);
}

/* Marquee Loop */
.announcement-marquee {
    display: flex;
    width: 100%;
}

.announcement-marquee span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
}

/* الحركة الدائرية */
@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

/* RTL Support */
body.ar .announcement-marquee span {
    animation: marquee-rtl 15s linear infinite;
}

@keyframes marquee-rtl {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

#fets-ai-toggle svg {
    width: 28px;
    height: 28px;
}


.lang-switcher-pro {
    display: flex;
    gap: 6px;
}

.lang-switcher-pro button {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #1e3c72;
    background: white;
    color: #1e3c72;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.lang-switcher-pro button:hover {
    background: #e8ebf4;
}

.lang-switcher-pro button.active {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
}

/* Fix header spacing */
.nav-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
}

/* Fix announcement spacing */
.announcement-bar {
    margin-top: 0;
    padding-top: 6px;
    padding-bottom: 6px;
}

/* Remove the white line issue */
header {
    background: #1e3c72;
    border-bottom: none;
}

/* Fix hero sticking under header */
.hero {
    margin-top: 0;
    padding-top: 40px;
}

.lang-switcher-pro {
    display: flex;
    gap: 6px;
    align-items: center;
}

.lang-switcher-pro button {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #1e3c72;
    background: white;
    color: #1e3c72;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.lang-switcher-pro button:hover {
    background: #e8ebf4;
}

.lang-switcher-pro button.active {
    background: #1e3c72;
    color: white;
}


/* === PRO LANGUAGE SWITCHER === */
.lang-switcher-pro {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-btn-pro {
    padding: 6px 18px;
    border-radius: 8px;
    border: 1.5px solid #1e3c72;
    background: white;
    font-size: 14px;
    font-weight: 600;
    color: #1e3c72;
    text-decoration: none;
    transition: 0.25s ease;
}

.lang-btn-pro:hover {
    background: #f0f4ff;
    color: #1a2b5e;
    border-color: #163567;
}

.lang-btn-pro.active {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
    box-shadow: 0 0 12px rgba(30, 60, 114, 0.35);
}

/* CHAT WINDOW HIDDEN */
.fets-ai-window {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.3s ease;
}

/* CHAT WINDOW VISIBLE */
.fets-ai-window.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* SIMPLE MESSAGE STYLE */
.msg {
    margin-bottom: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    max-width: 80%;
}

.user-msg {
    background: #1e3c72;
    color: white;
    align-self: flex-end;
}

.ai-msg {
    background: #e9eef8;
    color: #1e3c72;
}

/* ========== RTL / LTR GLOBAL FIX ========== */

/* Default styling for English */
body.ltr {
    direction: ltr;
    text-align: left;
}

/* Arabic pages */
body.rtl {
    direction: rtl;
    text-align: right;
}

/* Make all sections flip automatically */
body.rtl .about-content,
body.rtl .division-cards,
body.rtl .services-grid,
body.rtl nav ul {
    flex-direction: row-reverse;
}

/* Text inside items aligns properly */
body.rtl p,
body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5 {
    text-align: right;
}

/* English pages stay normal */
body.ltr p,
body.ltr h1,
body.ltr h2,
body.ltr h3,
body.ltr h4,
body.ltr h5 {
    text-align: left;
}

/* Ensure buttons flip sides in RTL */
body.rtl .btn {
    text-align: right;
}
