/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #fff;
    background: #1d1c0a;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Star Background for Main Content */
.star-background {
    position: fixed;
    top: 100px;
    left: 0;
    width: 100%;
    height: calc(100vh - 100px);
    z-index: -1;
    background: transparent;
    pointer-events: none;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 20, 34, 0.7), rgba(25, 30, 44, 0.9));
    z-index: -2;
    animation: gentleFlow 15s infinite linear;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header.sticky {
    background: rgba(10, 15, 29, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    width: 120px;
    height: 60px;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.nav a:hover {
    color: #FFC107;
}

.dropdown {
    position: relative;
}

.dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    color: #fff;
    padding: 0;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.dropdown .dropdown-toggle:hover {
    color: #FFC107;
}

/* Improved User Greeting Styles */
.user-greeting {
    color: #FFC107 !important;
    margin-left: 1rem;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(255, 193, 7, 0.2));
    border-radius: 25px;
    border: 1px solid rgba(255, 193, 7, 0.3);
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.2);
    transition: all 0.3s ease;
    display: inline-flex !important; /* تأكد من أنها مرئية */
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    visibility: visible !important;
    opacity: 1 !important;
}

.user-greeting::before {
    content: "👋";
    font-size: 1.1rem;
}

.user-greeting:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.3), rgba(255, 193, 7, 0.3));
}

/* للتأكد من ظهورها في الوضع المحمول */
@media (max-width: 992px) {
    .user-greeting {
        display: none; /* يمكن إخفاؤها في المحمول إذا لزم الأمر */
    }
}

.dropdown-menu {
    display: none;
    position: absolute;
    background: rgba(10, 15, 29, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    z-index: 1001;
    top: 100%;
    right: 0;
    padding: 0.5rem 0;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0s ease 0.3s;
}

.dropdown:hover .dropdown-menu {
    display: block;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.dropdown-menu li {
    list-style: none;
    padding: 0.5rem 1rem;
}

.dropdown-menu a {
    color: #fff;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    color: #03A9F4;
}

.controls {
    display: flex;
    gap: 0.8rem;
}

.btn-control {
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #9C27B0;
    border-radius: 25px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.btn-control:hover {
    background: #9C27B0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.4);
}

.btn-control i {
    margin-left: 0.5rem;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    height: 100%;
    background: rgba(10, 15, 29, 0.98);
    backdrop-filter: blur(15px);
    z-index: 1002;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav {
    margin-top: 3rem;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li {
    margin-bottom: 1rem;
}

.mobile-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s ease;
}

.mobile-nav a:hover {
    color: #FFC107;
}

.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    font-family: 'Cairo', sans-serif;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.mobile-dropdown-menu {
    padding-right: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-dropdown-menu.active {
    max-height: 300px;
}

.mobile-dropdown-menu li {
    margin-bottom: 0.5rem;
}

.mobile-dropdown-menu a {
    font-size: 0.95rem;
    padding: 0.5rem 0;
    border-bottom: none;
}

.mobile-controls {
    margin-top: 2rem;
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.mobile-controls .btn-control {
    justify-content: center;
    text-align: center;
}

/* Main Content */
.main-content {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    background: transparent;
    flex: 1;
    padding-top: 80px;
}

/* FabLab Sections Section */
.fablab-sections-section {
    padding: 4rem 0;
    max-width: 1300px;
    margin: 0 auto;
    z-index: 1;
}

.sections-container {
    padding: 2rem;
    background: rgba(15, 20, 35, 0.9);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    margin: 0 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2.5rem;
    color: #9C27B0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    text-shadow: 0 0 12px rgba(156, 39, 176, 0.5);
    margin-bottom: 1rem;
}

.section-line {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #9C27B0, #03A9F4);
    margin: 0 auto 1.5rem;
    border-radius: 4px;
}

.intro-text {
    font-size: 1.1rem;
    color: #e8ecef;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* Tabs Styling */
.sections-tabs {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tabs-nav {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.tab-button {
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #9C27B0;
    border-radius: 25px;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.4s ease;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    flex: 1 1 auto;
    min-width: 130px;
    max-width: 200px;
    text-align: center;
    line-height: 1.3;
    height: auto;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-button:hover, .tab-button.active {
    background: #9C27B0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.5);
}

.tabs-content {
    width: 100%;
}

.tab-pane {
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

.tab-pane.active {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-image {
    flex: 1;
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.tab-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease;
}

.tab-image img:hover {
    transform: scale(1.03);
}

.tab-description {
    flex: 1;
    max-width: 100%;
}

.tab-description h2 {
    font-size: 1.8rem;
    color: #03A9F4;
    margin-bottom: 1rem;
    text-align: center;
}

.tab-description p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    text-align: right;
}

.features-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.features-list li {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-align: right;
}

.features-list i {
    color: #FFC107;
    font-size: 1.2rem;
    min-width: 20px;
}

.btn-primary {
    padding: 0.8rem 1.5rem;
    background: #03A9F4;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    transition: all 0.4s ease;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.btn-primary:hover {
    background: #FFC107;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.5);
}

/* Footer - Updated Design */
.footer {
    background: linear-gradient(135deg, rgba(10, 15, 29, 0.9), rgba(25, 30, 44, 0.7));
    color: #fff;
    padding: 2rem 0 0 0;
    position: relative;
    width: 100%;
    margin-top: auto;
    box-shadow: inset 0 -2px 10px rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(156, 39, 176, 0.2);
    z-index: 10;
    text-align: right;
    direction: rtl;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.footer-section {
    padding: 1rem;
    text-align: right;
    direction: rtl;
}

.footer-section h3 {
    font-size: 1.2rem;
    color: #9C27B0;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: #9C27B0;
}

/* Logo and Social Media Section */
.logo-social-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    text-align: right;
}

.footer-logo img {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
    width: 130px;
    height: auto;
}

.footer-logo:hover img {
    filter: brightness(0.8) invert(0.9);
}

/* Social Media Buttons */
.example-2 {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.8rem;
    margin: 0;
    padding: 0;
}

.example-2 .icon-content {
    margin: 0 3px;
    position: relative;
}

.example-2 .icon-content .tooltip {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    padding: 5px 8px;
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    font-size: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.example-2 .icon-content:hover .tooltip {
    opacity: 1;
    visibility: visible;
    top: -40px;
}

.example-2 .icon-content a {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 20%;
    color: #4d4d4d;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
}

.example-2 .icon-content a:hover {
    box-shadow: 3px 2px 45px 0px rgb(0 0 0 / 50%);
}

.example-2 .icon-content a i,
.example-2 .icon-content a .x-icon {
    position: relative;
    z-index: 1;
    font-size: 1.3rem;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.example-2 .icon-content a:hover {
    color: white;
}

.example-2 .icon-content a .filled {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: #000;
    transition: all 0.3s ease-in-out;
}

.example-2 .icon-content a:hover .filled {
    height: 100%;
}

.example-2 .icon-content a[data-social="x"] .filled,
.example-2 .icon-content a[data-social="x"] ~ .tooltip {
    background-color: #000000;
}

.example-2 .icon-content a[data-social="x"]:hover .filled {
    background-color: #000000;
}

.example-2 .icon-content a[data-social="x"]:hover .x-icon {
    color: #ffffff;
}

.example-2 .icon-content a[data-social="x"]:hover {
    background-color: #000000;
}

.example-2 .icon-content a[data-social="x"] {
    background-color: #ffffff;
}

.example-2 .icon-content a[data-social="x"] .x-icon {
    color: #000000;
    transition: color 0.3s ease-in-out;
}

.example-2 .icon-content a[data-social="x"]:hover ~ .tooltip {
    background-color: #000000;
    color: #ffffff;
}

.example-2 .icon-content a[data-social="instagram"] .filled,
.example-2 .icon-content a[data-social="instagram"] ~ .tooltip {
    background-color: #E4405F;
}

.example-2 .icon-content a[data-social="youtube"] .filled,
.example-2 .icon-content a[data-social="youtube"] ~ .tooltip {
    background-color: #CD201F;
}

.example-2 .icon-content a[data-social="snapchat"] .filled,
.example-2 .icon-content a[data-social="snapchat"] ~ .tooltip {
    background-color: #FFFC00;
}

/* Programmers Section */
.programmers-section {
    margin-top: 1rem;
    text-align: right;
}

.programmers-section h4 {
    font-size: 1.1rem;
    color: #9C27B0;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.programmers-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #9C27B0, transparent);
}

.programmers-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.programmer-link {
    color: #FFC107;
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    padding: 0.7rem 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.programmer-link:hover {
    color: #03A9F4;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.programmer-link i {
    color: #FFC107 !important;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.programmer-link:hover i {
    color: #03A9F4 !important;
}

/* Map Section */
.map-section iframe {
    width: 100%;
    height: 180px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Contact Information Section */
.contact-info p {
    font-size: 0.95rem;
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-start;
    text-align: right;
}

.contact-info i {
    color: #9C27B0;
}

/* Working Hours Section */
.working-hours {
    margin-top: 1rem;
}

.working-hours .section-heading {
    color: #9C27B0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-top: 2px solid #9C27B0;
    padding-top: 0.5rem;
    display: inline-block;
}

.working-hours p {
    color: #e8ecef;
    margin-bottom: 0.7rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-start;
    text-align: right;
}

.working-hours i {
    color: #03A9F4 !important;
    width: 18px;
}

/* Contact Form Section */
.contact-form-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    width: 100%;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #9C27B0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FFC107;
    background: rgba(255, 255, 255, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.submit-btn {
    padding: 0.7rem;
    background: #9C27B0;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    width: 100%;
}

.submit-btn:hover {
    background: #FFC107;
    transform: translateY(-2px);
}

/* Copyright Section */
.footer-copyright {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    font-size: 0.85rem;
    color: #ccc;
    text-align: center;
    direction: rtl;
}

/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 70px;
    right: 15px;
    width: 320px;
    max-height: 450px;
    background: rgba(10, 15, 29, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    z-index: 2000;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.chatbot-container.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    padding: 0.8rem;
    border-radius: 15px 15px 0 0;
    color: #fff;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
}

.chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chatbot-close:hover {
    transform: scale(1.2);
}

.chatbot-messages {
    flex: 1;
    padding: 0.8rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 250px;
}

.chatbot-message {
    max-width: 85%;
    padding: 0.7rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Cairo', sans-serif;
    line-height: 1.4;
}

.chatbot-message.bot {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    align-self: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-message.user {
    background: #9C27B0;
    color: #fff;
    align-self: flex-end;
    border: 1px solid rgba(156, 39, 176, 0.5);
}

.chatbot-input {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-input input {
    flex: 1;
    padding: 0.7rem;
    border: 1px solid #9C27B0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.chatbot-input input:focus {
    outline: none;
    border-color: #FFC107;
    background: rgba(255, 255, 255, 0.15);
}

.chatbot-input input::placeholder {
    color: #ccc;
}

.chatbot-input button {
    padding: 0.7rem 1rem;
    background: #9C27B0;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
}

.chatbot-input button:hover {
    background: #FFC107;
    transform: translateY(-2px);
}

.chatbot-toggle {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.4);
    z-index: 2000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-toggle:hover {
    background: linear-gradient(135deg, #FFC107, #FFA000);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
}

/* Scrollbar styling for chatbot messages */
.chatbot-messages::-webkit-scrollbar {
    width: 5px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #9C27B0;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #7B1FA2;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentleFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ============================================= */
/* RESPONSIVE DESIGN - MOBILE FIRST APPROACH */
/* ============================================= */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .sections-container {
        padding: 3rem;
    }
    
    .section-header h1 {
        font-size: 3rem;
    }
    
    .intro-text {
        font-size: 1.2rem;
    }
}

/* Tablets and small desktops (768px to 1199px) */
@media (max-width: 1199px) {
    .nav {
        display: none;
    }
    
    .controls {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .sections-container {
        padding: 2rem 1.5rem;
    }
    
    .section-header h1 {
        font-size: 2.2rem;
    }
    
    .tab-button {
        font-size: 0.85rem;
        padding: 0.7rem 1rem;
        min-width: 120px;
    }
}

/* Mobile devices (768px and down) */
@media (max-width: 768px) {
    .header {
        padding: 0.8rem 4%;
    }
    
    .logo {
        width: 100px;
        height: 50px;
    }
    
    .main-content {
        padding-top: 70px;
    }
    
    .fablab-sections-section {
        padding: 2rem 0;
    }
    
    .sections-container {
        padding: 1.5rem 1rem;
        margin: 0 0.5rem;
        border-radius: 15px;
    }
    
    .section-header h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .section-line {
        width: 80px;
        height: 3px;
    }
    
    .intro-text {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .tabs-nav {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .tab-button {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
        min-width: 110px;
        border-radius: 20px;
    }
    
    .tab-pane.active {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .tab-description h2 {
        font-size: 1.5rem;
    }
    
    .tab-description p {
        font-size: 0.95rem;
        text-align: center;
    }
    
    .features-list li {
        font-size: 0.95rem;
        text-align: center;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem 1rem 1rem;
    }
    
    .footer-section {
        padding: 0.8rem;
        text-align: center;
    }
    
    .logo-social-section {
        align-items: center;
    }
    
    .example-2 {
        justify-content: center;
    }
    
    .footer-section h3::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .contact-info p {
        justify-content: center;
    }
    
    .programmers-list {
        align-items: center;
    }
    
    .chatbot-container {
        width: 90%;
        right: 5%;
        bottom: 60px;
        max-height: 400px;
    }
    
    .chatbot-header {
        font-size: 0.85rem;
        padding: 0.7rem;
    }
    
    .chatbot-messages {
        padding: 0.7rem;
        max-height: 220px;
    }
    
    .chatbot-message {
        font-size: 0.85rem;
        padding: 0.6rem;
    }
    
    .chatbot-input {
        padding: 0.7rem;
    }
    
    .chatbot-input input {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .chatbot-input button {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: 12px;
        right: 12px;
    }
    
    .mobile-menu {
        width: 85%;
        padding: 1.5rem 1rem;
    }
}

/* Small mobile devices (480px and down) */
@media (max-width: 480px) {
    .header {
        padding: 0.6rem 3%;
    }
    
    .logo {
        width: 90px;
        height: 45px;
    }
    
    .section-header h1 {
        font-size: 1.6rem;
    }
    
    .intro-text {
        font-size: 0.95rem;
    }
    
    .sections-container {
        padding: 1rem 0.8rem;
        margin: 0 0.3rem;
    }
    
    .tabs-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-button {
        width: 100%;
        max-width: 250px;
    }
    
    .tab-description h2 {
        font-size: 1.3rem;
    }
    
    .tab-description p {
        font-size: 0.9rem;
    }
    
    .features-list li {
        font-size: 0.9rem;
    }
    
    .footer-content {
        padding: 0 0.8rem 0.8rem 0.8rem;
    }
    
    .footer-section {
        padding: 0.6rem;
    }
    
    .footer-logo img {
        width: 110px;
    }
    
    .example-2 .icon-content a {
        width: 40px;
        height: 40px;
    }
    
    .example-2 .icon-content a i {
        font-size: 1.1rem;
    }
    
    .programmer-link {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    .contact-info p {
        font-size: 0.9rem;
    }
    
    .chatbot-container {
        width: 95%;
        right: 2.5%;
        bottom: 55px;
        max-height: 350px;
    }
    
    .chatbot-header {
        font-size: 0.8rem;
    }
    
    .chatbot-messages {
        max-height: 200px;
    }
    
    .chatbot-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Very small mobile devices (360px and down) */
@media (max-width: 360px) {
    .section-header h1 {
        font-size: 1.4rem;
    }
    
    .intro-text {
        font-size: 0.9rem;
    }
    
    .tab-button {
        font-size: 0.75rem;
        padding: 0.5rem 0.7rem;
    }
    
    .tab-description h2 {
        font-size: 1.2rem;
    }
    
    .footer-logo img {
        width: 100px;
    }
    
    .example-2 .icon-content a {
        width: 35px;
        height: 35px;
    }
    
    .example-2 .icon-content a i {
        font-size: 1rem;
    }
}

/* Touch improvements for mobile */
@media (max-width: 768px) {
    .btn-control, .mobile-dropdown-toggle, .chatbot-input button, .tab-button {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    .nav a, .mobile-nav a {
        padding: 12px 0;
    }
    
    .programmer-link {
        padding: 12px 16px;
    }
    
    .form-group input, .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.p-3 { padding: 3rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* RTL and LTR Support */
[dir="rtl"] .nav ul {
    margin-right: 0;
}

[dir="ltr"] .nav ul {
    margin-left: 0;
}

[dir="ltr"] .footer-section {
    text-align: left;
}

[dir="ltr"] .contact-info p {
    justify-content: flex-start;
}

[dir="ltr"] .programmer-link {
    justify-content: flex-start;
}

/* Responsive adjustments for LTR */
@media (max-width: 768px) {
    [dir="ltr"] .nav ul {
        text-align: left;
    }
}