:root {
--primary-color: #016171;
--primary-dark: #014954;
--primary-light: #018291;
--text-color: lightblue;
--light-text: #fff;
--light-bg: #f8f9fa;
--shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}

body {
    background-color: var(--primary-light);
    color: var(--text-color);
    overflow-x: hidden;
    direction: ltr;
}

/* Language-specific direction */
body[dir="rtl"] {
    direction: rtl;
}

body[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}


/* Loading Page Styles */
#loading-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-page.loaded {
    opacity: 0;
    visibility: hidden;
}

.logo-container {
    margin-bottom: 2rem;
    text-align: center;
}
        
.logo {
    font-size: 2.5rem;
    color: white;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.logo-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.2rem;
    font-weight: 300;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    font-size: 1.1rem;
    margin-top: 1rem;
}


.custom-nav {
    /*background: rgba(0,0,0,0.7);*/
    backdrop-filter: blur(6px);
}

.lang-select {
    background: transparent;
    color: #021f23;
    border: 1px solid #777;
}

.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.hero-content {
    position: relative;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
}

.custom-btn{
    padding: 1rem 2.5rem;
    background-color: white;
    color: var(--primary-color);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.custom-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* General section styles */
.section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;       /* size of watermark */
    height: 300px;
    background: url('assets/icons/just-icon-trans.png') no-repeat center center;
    background-size: contain;
    opacity: 0.05;      /* VERY dull watermark */
    transform: translate(-50%, -50%);
    pointer-events: none; /* doesn’t block clicks */
    z-index: 0;          /* behind content */
    animation: slow-rotate 60s linear infinite; /* slow rotation */
}

/* Rotation animation */
@keyframes slow-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.section {
    position: relative;
    padding: 15px 20px;
    background: var(--primary-light);
    overflow: hidden;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.7s ease-in-out;
    display: none; /* hidden initially */
    margin-top: 70px;
    border-top: 1px solid var(--primary-dark);
}

.section.show {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--light-bg);
}

.section h4 {
    font-size: 1.2rem;
    color: var(--light-bg);
}

.section p, .section ul {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    text-align: start;
    margin-bottom: 15px;
}

.section ul {
    list-style-type: none;
    padding-left: 0;
    max-width: 500px;
    margin: 0px;
}

.section ul li {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.section ul.diamond-points li::before {
    content: "";
    width: 10px;
    height: 10px;
    border: 2px solid var(--light-bg);
    transform: rotate(45deg);
    flex-shrink: 0;
}

.section ul li img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    padding: 6px;

    border: 2px solid var(--primary-light);
    background: #fff;
    border-radius: 6px;

    transform: rotate(45deg);
}

/* Diamond border without rotating image */
.section ul li img::before {
    content: "";
    position: absolute;
    inset: -6px;
    border: 2px solid var(--primary-light);
    transform: rotate(45deg);
    z-index: -1;
}

.section .custom-btn {
    display: inline-block;
    margin-top: 20px;
}

/* Tabs styling */
.tabs {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.tab {
    display: none;
    flex-direction: column;
    align-items: start;
    min-height: 60vh;
    padding: 20px;
    transition: all 0.5s ease;
}

/* Inner container can also align dynamically */
.tab .container {
    max-width: 800px;
    color: var(--text-color);
    text-align: start; /* adapts to body direction */
}

.tab.active {
    display: flex;
}

/* Progress bar container */
.tab-progress {
    width: 100%;
    height: 5px;
    background-color: #ccc;
    margin-top: 20px;
    border-radius: 5px;
    overflow: hidden;
}

/* Gradient animated progress bar using CSS variables */
.tab-progress .progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-dark);
    background-size: 400% 100%;
    border-radius: 5px;
}


/* Navigation buttons */
.tab-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.tab-nav button {
    background: transparent;
    border:2px solid var(--light-bg);
    color: var(--light-text);
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-nav button:hover {
    background: var(--primary-color);
    color: white;
}

.border{
    border:1px #EEE solid;
}

.team-diamond {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* space between rows */
    width: 100%;
}

.team-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Make each team-member smaller on small screens */
@media (max-width: 768px) {
    .team-row .team-member {
        flex: 0 1 45%;  /* 2 per row approx */
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .team-row .team-member {
        flex: 0 1 80%;  /* 1 per row */
    }
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.team-member .diamond {
    width: 100px;
    height: 100px;
    position: relative;
    display: grid;
    place-items: center;
    border: 3px solid var(--light-bg);
    transform: rotate(-45deg); /* diamond shape */
    overflow: hidden;
    transition: 0.3s ease;
    background: linear-gradient(
        135deg,
        var(--primary-dark),
        var(--primary-light),
        var(--light-bg),
        var(--primary-light),
        var(--primary-dark),
        var(--primary-dark)
    );
    background-size: 300% 300%;
    animation: diamondGradient 4s linear infinite;
}

@keyframes diamondGradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.team-member .diamond img {
    width: 100%;               /* slightly larger to cover corners */
    height: 100%;
    object-fit: cover;         /* keep aspect ratio */
    transform: rotate(45deg); /* keep image upright */
    clip-path: polygon(
        50% 0%,    /* top point */
        100% 50%,  /* right point */
        50% 100%,  /* bottom point */
        0% 50%     /* left point */
    );
    position: relative;
    z-index: 1;
}

/* Optional blurred background */
.team-member .diamond::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("assets/icons/team1.jpg") center/cover no-repeat;
    filter: blur(8px) brightness(0.7);
    z-index: 0;
}

/* Hover effect: fill diamond border */
.team-member .diamond:hover {
    background-color: var(--primary-light);
}


.team-member .name {
    font-weight: 600;
    color: var(--light-text);
    margin-top: 25px;
}

/* ===========================
   Services Section - Desktop
=========================== */
.services-slider-wrapper {
    position: relative;
    width: 100%;
    padding: 20px 0;
}

.services-slider {
    display: flex;
    flex-wrap: wrap; /* wrap cards on larger screens */
    justify-content: center;
    gap: 40px;
}

.service-card {
    position: relative;
    display: inline-block;
    width: 250px;
    height: 250px; /* enough space for diamond + image + title */
    text-align: center;
    border: 1px #004148 solid;
    background: #014954;
}

.diamond-bg {
    display: block;
    width: 120px;
    height: 120px;
    background: var(--primary-dark); /* normal white background */
    border: 2px solid #ccc;
    margin: 0 auto;
    transform: rotate(-45deg);
    position: relative;
    z-index: 1; /* behind the image */
}

.service-img {
    width: 150px;
    height: 150px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2; /* on top of diamond */
}

.service-card h5 {
    position: relative;
    z-index: 3;
    margin-top: 100px; /* below diamond + image */
    font-size: 16px;
    font-weight: 500;
}

/* ===========================
   Slider Buttons (hidden on desktop)
=========================== */
.slider-btn {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px 17px;
    cursor: pointer;
    border-radius: 360px;
    margin: 4px;
}

.service-prev-btn { left: 0; }
.service-next-btn { right: 0; }

.contact-container h2{
    margin-top: 35px;
}

/* ===========================
   Mobile / XS Overrides
=========================== */
/* Mobile only: show only active card */
@media (max-width: 575.98px) {
    .section {
        padding: 5px;
        padding-top: 0px;
    }

    .service-card {
        display: none; /* hide all by default */
        width: 100%;
        margin: 0 auto;
        text-align: center;
    }

    .service-card.active {
        display: block; /* show only active */
    }

    .diamond-bg {
        display: none; /* hide diamond on mobile */
    }

    .service-img {
        position: absolute;
        width: 150px;
        height: 150px;
        margin: 0 auto 10px auto;
        /*transform: none;*/
    }

    .service-card h5 {
        margin-top: 0;
    }

    .slider-btn {
        display: block;
    }

    .service-card h5 {
        top: 86%;
    }

    .contact-container h2{
        margin-top: 20px;
    }

    .navbar-collapse {
        height: 100vh;
    }

    .team-member .diamond {
        width: 150px;
        height: 150px;
    }

    .team-member .name {
        margin-top: 35px;
    }
}

.image-back{
    border-radius: 15px;
    background-color: var(--primary-dark);
    overflow: hidden;
    text-align: center;
}

.image-back img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}


/* Animation class */
.animate-color-to-bottom {
    background: linear-gradient(
        to bottom,
        var(--primary-dark),
        var(--primary-dark)
    );
    background-size: 100% 150%;   /* important */
    background-position: 0% 0%;
    animation: gradientTopToBottom 2s ease-in-out infinite;
}

/* Keyframes */
@keyframes gradientTopToBottom {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}


.contact-content {
    max-width: 1200px;
    margin: auto;
}

.office-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 10px 0;
}

.office-card {
    background: var(--primary-dark);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.office-card iframe {
    width: 100%;
    height: 220px;
    border: none;
    border-radius: 12px;
    margin-top: 15px;
}

.contact-form {
    margin-top: 50px;
    background: var(--primary-dark);
    padding: 30px;
    border-radius: 18px;
}

.contact-form form {
    display: grid;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 15px;
}

.btn-active{
    background: var(--primary-light) !important;
    color: white;
}

.office-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 15px;
}

.office-info-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.office-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    font-size: 18px;
    flex-shrink: 0;
}

.office-text strong {
    display: block;
    font-size: 14px;
    color: #ddd;
}

.office-text span {
    font-size: 15px;
    color: #fff;
}

/* Floating Language Selector */
#lang-float {
    position: fixed;
    bottom: 90px; /* above WhatsApp */
    right: 20px;
    z-index: 5;
    font-family: sans-serif;
}

.lang-main {
    width: 55px;
    height: 55px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: background 0.2s;
}

.lang-main:hover {
    background: #018291;
}

/* Language menu */
.lang-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    display: none;
}

.lang-menu div {
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
    color:white;
}

.lang-menu div:hover {
    background: var(--primary-light);
}

/* Show menu */
#lang-float.active .lang-menu {
    display: block;
}
