@font-face {
    font-family: "IRANSansXLocal";
    src:
        local("IRANSansX"),
        local("IRANSansX Regular");
    font-weight: 100 900;
    font-style: normal;
}

/* Home-style cinematic overlay/depth effect */
.hero {
    box-shadow: inset 0 -36px 70px rgba(5, 19, 40, 0.42);
}

.hero::before {
    content: none;
}

.hero::after {
    content: none;
}

.services-section,
.footer {
    position: relative;
    overflow: hidden;
}

.services-section::before,
.footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 31, 66, 0.52), rgba(7, 24, 52, 0.36));
    pointer-events: none;
}

.services-section > *,
.footer > * {
    position: relative;
    z-index: 1;
}

@font-face {
    font-family: "PeydaWebRegular";
    src: url('/static/fonts/woff2/PeydaWeb-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "PeydaWebMedium";
    src: url('/static/fonts/woff2/PeydaWeb-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "PeydaWebSemiBold";
    src: url('/static/fonts/woff2/PeydaWeb-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "PeydaWebBold";
    src: url('/static/fonts/woff2/PeydaWeb-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: "PeydaWebExtraBold";
    src: url('/static/fonts/woff2/PeydaWeb-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: "PeydaWebThin";
    src: url('/static/fonts/woff2/PeydaWeb-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;

    /* Transparent navbar */
    background-color: transparent !important;
    backdrop-filter: none;
    box-shadow: none;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(24, 42, 74, 0.40) !important;
    backdrop-filter: blur(8px) saturate(1.08);
    -webkit-backdrop-filter: blur(8px) saturate(1.08);
    box-shadow: 0 6px 18px rgba(7, 19, 41, 0.26);
    border-bottom: 1px solid rgba(222, 235, 255, 0.34);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    flex-direction: row-reverse;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    position: relative;
    direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 5px; /* space between icon and text */
    font-size: 2rem;
    font-family: 'PeydaWebRegular', 'IRANSansXLocal', sans-serif;
    font-weight: 400;
    color: var(--nav-text);
    text-decoration: none;
}

.navbar .logo img.logo-icon {
    width: auto;       /* maintain aspect ratio */
    height: 10rem;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.46)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.30));
}

/* Desktop nav links (default) */
.nav-links {
    display: none;
    order: 1;   /* move to right */
    list-style: none;
    gap: 25px;
}

/* Desktop nav links */
@media (min-width: 769px) {
    .nav-links {
        display: flex;
        list-style: none;
        gap: 25px;
        align-items: center;
    }
}

.mode-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    margin-inline-start: 15px;
}

.nav-links li a {
    color: var(--nav-text);
    font-family: 'PeydaWebRegular', 'IRANSansXLocal', sans-serif;
    font-weight: 400;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.nav-icon {
    color: #ffffff !important;
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1;
}

/* Hamburger (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--nav-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}


body, html {
    background-color: var(--page-bg);
    background-image: linear-gradient(rgba(20, 41, 86, 0.08), rgba(20, 41, 86, 0.08));
    overflow-x: hidden;
    color: var(--page-text);
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
    width: 100%;
    scroll-behavior: smooth;
}

/* Hero section */
.hero {
    position: relative;
    min-height: 100vh;
    background-image:
        linear-gradient(rgba(3,18,55,0.8), rgba(3,18,55,0.8)),
        url('img/woundlab.webp');
    filter: saturate(65%) contrast(80%);
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 70px;
    align-items: center;
    text-align: center;
    color: #f2fbfd;
    padding: 80px 20px 30px;
    overflow: hidden;
}

.hero .overlay {
    display: none;
}

.hero .content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-copy {
    background-color: transparent;
    color: #eaf7fa;
    padding: 0;
    border-radius: 0;
    max-width: 780px;
    margin-top: 95px;
    margin-bottom: 50px;
    backdrop-filter: none;
    box-shadow: none;
    transition: color 0.3s;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #9fe8e3;
    margin-bottom: 14px;
}

.hero-copy h1 {
    font-size: clamp(2.25rem, 5vw, 2.95rem);
    margin-top: 0; 
    margin-bottom: 26px;
    line-height: 1.18;
    font-weight: 860;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.hero-copy p {
    max-width: 56ch;
    margin: 0 auto;
    font-size: clamp(1.2rem, 1.5vw, 1.35rem);
    line-height: 1.8;
}

.hero-location {
    display: inline-block;
    margin-top: 2px;
    color: #ffffff;
    font-weight: 800;
}


.button {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 999px;
    border: 1px solid rgba(122, 226, 221, 0.7);
    background-color: rgba(122, 226, 221, 0.18);
    color: #e6f9fb;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.25s ease;
}

.button-primary {
    padding: 13px 26px;
    background-color: #36bfc3;
    border-color: #36bfc3;
    color: #06333f;
    box-shadow: 0 12px 24px rgba(20, 161, 166, 0.35);
}

.button-primary:hover {
    background-color: #58d2d5;
    border-color: #58d2d5;
    box-shadow: 0 14px 30px rgba(20, 161, 166, 0.38);
    transform: translateY(-2px);
}

.button-secondary {
    background-color: #35d1cb;
    border-color: #35d1cb;
    color: #ffffff;
    font-family: 'PeydaWebMedium', 'IRANSansXLocal', sans-serif;
    font-weight: 500;
    border-radius: 8px;
    padding: 9px 16px;
}

.button-secondary:hover {
    background-color: #5de1dc;
    border-color: #5de1dc;
    transform: translateY(-2px);
}

.coming-soon-pill {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    background-color: rgba(53, 209, 203, 0.22);
    border: 1px solid rgba(53, 209, 203, 0.35);
    color: rgba(224, 255, 252, 0.9);
    font-weight: 600;
}

.locations-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 56px;
    width: 90%;
}

.hero .location-card {
    background-color: rgba(255, 255, 255, 0.11);
    backdrop-filter: none;
    color: #e8f7fa;
    padding: 22px 28px;
    border-radius: 8px;
    width: min(430px, 94vw);
    min-height: 170px;
    text-align: center;
    box-shadow: 0 12px 24px rgba(1, 15, 22, 0.28);
    border: 1px solid transparent;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.hero .location-card:hover {
    transform: translateY(-5px);
}

.hero .location-card h3 {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.35rem;
    margin-bottom: 10px;
    position: relative;
}

.clinic-pin {
    position: absolute;
    inset-inline-start: 8px;
    top: 50%;
    margin: 0;
    color: #ffffff !important;
    font-size: 1.55em;
    transform: translateY(-50%) rotate(90deg);
    -webkit-text-fill-color: #ffffff;
    pointer-events: none;
}

.hero .location-card p {
    color: rgba(236, 245, 252, 0.78);
    font-weight: 500;
    font-size: 1.08rem;
}

/* About Page */

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 50px;
}

.page-top-hero {
    margin-top: 0;
    padding-top: 78px;
    min-height: 230px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-top-hero-about {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    min-height: 640px;
    align-items: center;
    background-size: 100% auto;
    background-position: center 32%;
    background-image:
        linear-gradient(180deg, rgba(10, 29, 63, 0.78), rgba(10, 29, 63, 0.68)),
        url('img/woundlab-team.webp');
}

.page-top-hero-about .page-top-hero-inner {
    width: min(1280px, 96%);
    padding: 20px;
}

.page-top-hero-blogs {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    min-height: 340px;
    align-items: center;
    background-image:
        linear-gradient(180deg, rgba(10, 29, 63, 0.8), rgba(10, 29, 63, 0.7)),
        url('img/woundlab-services.jpg');
}

.page-top-hero-blogs .page-top-hero-inner {
    width: min(1280px, 96%);
    padding: 20px;
}

.page-top-hero-inner {
    width: min(1100px, 92%);
    padding: 34px 20px 28px;
}

.page-top-hero h1 {
    margin: 0;
    color: #edf5ff;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
}

.about-us {
    font-size: 1.25rem; /* base text size for About Us page */
    line-height: 1.7;   /* improves readability */
}

.about-us .intro-text p,
.about-us .intro-text ul li {
    font-size: 1.2rem; /* slightly bigger paragraphs and list items */
    line-height: 1.6;
}

.about-us .team-member .member-info p {
    font-size: 0.95rem;
    line-height: 1.45;
}

.about-us .team-member .member-info ul li {
    font-size: 0.84rem;
    line-height: 1.45;
}

.about-us .intro-text h2,
.about-us .team-section h2 {
    font-size: 2rem; /* bigger headings */
    margin-bottom: 20px;
}

/* Intro section: image left, text right on desktop */
.intro-section {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 64px;
    margin-top: -620px;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.intro-image-wrap {
    position: relative;
    width: 100%;
    max-width: 325px;
    margin-top: -32px;
    margin-inline-start: auto;
    margin-inline-end: 0;
    padding: 10px;
    border-radius: 18px;
    background: rgba(7, 24, 46, 0.42);
    box-shadow:
        0 10px 24px rgba(66, 142, 201, 0.42),
        0 20px 42px rgba(56, 128, 186, 0.34),
        0 0 28px rgba(123, 199, 250, 0.24);
    backdrop-filter: blur(2px);
}

.about-intro-title {
    flex-basis: 100%;
    width: 100%;
    position: static;
    margin: 0 0 12px;
    color: #edf5ff;
    font-size: clamp(1.3rem, 2.8vw, 2rem);
    direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
    unicode-bidi: plaintext;
    text-align: right;
    text-shadow: none;
}

.intro-section .intro-image {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    object-fit: cover;
    border: none;
    box-shadow:
        0 8px 18px rgba(3, 13, 27, 0.35);
}

.intro-section .intro-text {
    flex: 1;
    min-width: 250px;
    margin-top: -70px;
}

.intro-section .intro-text,
.intro-section .intro-text h2,
.intro-section .intro-text p,
.intro-section .intro-text li {
    color: #ffffff !important;
}

.intro-section .intro-text h2 {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.intro-section .intro-text p,
.intro-section .intro-text ul li {
    font-size: 1rem;
    line-height: 1.55;
}

/* Team section */
.team-section {
    margin-top: 106px;
}

.team-section h2 {
    margin-bottom: 30px;
    text-align: start;
}

.team-members-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.team-member {
    display: flex;
    flex-direction: row-reverse;
    gap: 18px;
    margin-bottom: 0;
    align-items: flex-start;
    background-color: transparent;
    color: var(--card-text);
    border: none;
    box-shadow: none;
    border-radius: 0;
    backdrop-filter: none;
    padding: 0;
    transition: none;
}

.team-member:hover {
    transform: none;
    box-shadow: none;
}

.team-member .team-photo {
    width: 240px;
    height: 240px;
    border-radius: 15px;
    object-fit: cover;
    object-position: center 20%;
}

.team-member picture {
    position: relative;
    display: block;
    flex: 0 0 240px;
}

.team-member .team-name-badge {
    position: absolute;
    inset-inline-start: 10px;
    inset-inline-end: 10px;
    bottom: 10px;
    background-color: rgba(43, 179, 156, 0.92);
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
    text-align: center;
}

.team-member .member-info {
    flex: 1;
    min-width: 0;
}

.team-members-grid .team-member:nth-child(n+2) .member-info {
    margin-top: 84px;
}

.team-member .member-info p {
    font-weight: 700; /* bold */
    font-size: 0.55rem;
    margin-bottom: 10px;
}

.team-member .member-info ul li {
    font-weight: 400; /* normal weight for list items */
    font-size: 0.54rem;
    line-height: 1.5;
}

.team-member .member-info ul {
    direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
    text-align: start;
    padding-inline-start: 20px;
    list-style-position: inside; /* keeps bullets inside the text area */
}

.team-member .member-info ul li {
    margin-bottom: 5px; /* optional: spacing between items */
}

.clinic-logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.clinic-logo-section.show {
    opacity: 1;
    transform: translateY(0);
}

.clinic-logo {
    width: 300px;
    height: auto;
}

.scroll-logo-section {
    position: relative;
    width: 100%;
    height: auto;
    margin-top: 16px;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* so it doesn't block scrolling */
    z-index: 20;
    background: transparent;
}

.scroll-logo {
    width: min(620px, 88vw);
    height: auto;
    margin-bottom: 0;
    opacity: 1;        /* always visible */
    transform: none;
    transition: none;
    z-index: 30; /* NEW */
}

@keyframes logoEnter {
    to {
        opacity: 1;
        transform: translateY(0) scale(0.3);
    }
}

.scroll-icon {
  position: relative;
  width: 100px; /* example */
  height: 100px;
}

.icon-shape {
  width: 100%;
  height: 100%;
  background: #f00;
  border-radius: 50%;
  transition: transform 0.3s ease-out;
}

.icon-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px; /* stays constant */
  pointer-events: none;
}

.icon-section {
  padding: 40px 0; /* lower this value */
}

/* Services Section */
.services-section {
    padding: 55px 20px 90px;
    background-image:
        linear-gradient(rgba(8, 29, 64, 0.72), rgba(8, 29, 64, 0.72)),
        url('img/woundlab-services.jpg');
    background-size: cover;
    background-position: center top;
    background-blend-mode: multiply;
    background-repeat: no-repeat;
    color: #eaf3ff;
    text-align: center;
    direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
}

.services-cards .service-card {
    background-color: var(--services-card-bg);
    color: var(--services-text);
}

.services-section h2 {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    margin-bottom: 12px;
    color: #35d1cb !important;
}

.services-intro {
    max-width: 64ch;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    line-height: 1.85;
    color: #ffffff !important;
}

/* Cards */
.services-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
}

.service-card {
    background-color: rgba(103, 241, 236, 0.46) !important;
    color: var(--card-text);
    padding: 24px 28px;
    border-radius: 8px;
    box-shadow: 0 10px 26px var(--card-shadow-soft);
    width: min(360px, 94vw);
    border: 1px solid rgba(140, 250, 245, 0.68);
    transition: transform 0.3s, background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px); /* keep hover effect */
}

.service-card h3 {
    font-family: 'PeydaWebRegular', 'IRANSansXLocal', sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #35d1cb !important;
}

.service-card p {
    font-family: 'PeydaWebRegular', 'IRANSansXLocal', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5;
    color: #ffffff !important;
}

/* Service section texts */
.services-section,
.services-section h2,
.services-section h3,
.services-section p,
.services-section li {
    color: var(--services-text);   /* automatically switches with dark/light mode */
}

.services-cards .service-card,
.services-cards .service-card h3,
.services-cards .service-card p {
    color: var(--services-card-text, var(--services-text)); /* fallback to section text if needed */
}

/* Footer */
.footer {
    background-color: #102349 !important;
    background-image:
        linear-gradient(rgba(16, 35, 73, 0.58), rgba(16, 35, 73, 0.58)),
        url('img/woundlab-footer.jpg');
    background-size: cover;
    background-position: 42% 30%;
    background-blend-mode: normal;
    background-repeat: no-repeat;
    backdrop-filter: none;       /* optional but recommended */
    color: var(--footer-text) !important;
    padding: 10px 10px;
    border-top: 0;
    direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
    text-align: start;
}

.services-section::before,
.footer::before {
    content: none;
}

#services.services-section {
    background-image:
        linear-gradient(rgba(5, 20, 60, 0.75), rgba(5, 20, 60, 0.75)),
        url('img/woundlab-services.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-blend-mode: multiply;
}

.footer a {
    color: var(--footer-link) !important;
}

.footer-container {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 20px 10px;
}

@media (min-width: 769px) {
    .footer-container {
        justify-content: flex-start;
    }
}

.footer-post {
    width: min(100%, 560px);
    border-radius: 24px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(23, 64, 94, 0.58), rgba(15, 48, 75, 0.62));
    border: 1px solid rgba(124, 196, 230, 0.18);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(1px);
}

.footer-map-link {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(146, 211, 238, 0.2);
}

.footer-map-image {
    display: block;
    width: 100%;
    height: 190px;
    max-height: 34vw;
    min-height: 140px;
    object-fit: cover;
    object-position: center 18%;
}

.footer-post-body {
    padding: 16px 8px 8px;
}

.footer-post-title {
    margin: 0 0 14px;
    color: #eaf6ff;
    font-size: 1.1rem;
}

.footer-post-line {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 0.96rem;
    line-height: 1.7;
}

.footer-post-line .nav-icon,
.footer-post-line i,
.footer-post-line svg,
.footer-post-line [aria-hidden="true"] {
    color: #ffffff !important;
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

.footer-line-icon {
    display: inline-block;
    width: 1.1em;
    margin-inline-end: 6px;
    color: #ffffff !important;
    font-weight: 700;
    text-align: center;
}

.footer-post-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-post-links span {
    opacity: 0.7;
}

.footer-post .instagram-link {
    color: #95daff !important;
    text-decoration: none;
    font-weight: 700;
}

.footer-post .instagram-link:hover {
    color: #c1ebff !important;
}

.footer-post .github-link {
    color: #95daff !important;
    text-decoration: none;
    font-weight: 700;
}

.footer-post .github-link:hover {
    color: #c1ebff !important;
}

.footer-bottom {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(201, 233, 251, 0.22) !important;
    text-align: center;
    color: #d6edff;
    font-size: 0.84rem;
}

.footer-section {
    display: none;
}

.github-link {
    color: var(--footer-link) !important;
}

.footer a.github-link {
    color: var(--footer-link) !important;
}

.footer-container {
    margin: 0 auto;
}

.footer-section {
    flex: 1 1 200px;
    direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
    text-align: start;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 10px;
    font-weight: 700;
}

.footer-section p {
    margin: 5px 0;
    font-size: 0.95rem;
}

.footer-section .instagram-link {
    display: block;       /* makes each link take full width */
    margin-bottom: 5px;   /* optional spacing between links */
}
.instagram-link {
    color: var(--footer-link);
    font-weight: 600;
    text-decoration: none;
}

.instagram-link:hover {
    color: var(--footer-link-hover);
}

.instagram-link,
.github-link {
    direction: ltr;
    unicode-bidi: bidi-override;
    display: inline-block;
}

.footer-bottom {
    margin-top: 14px;
}

/* Blogs page theme */
body.blogs-page,
.blogs-page {
    background-color: #102349;
    color: #eaf3ff;
}

/* Blog cards/intros still use dynamic colors */
.blog-intro, .blog-card {
    background-color: var(--card-bg);
    color: var(--card-text);
}

/* All capsules/cards */
.service-card, 
.blog-card, 
.blog-intro {
    border: 1px solid rgba(255,255,255,0.1); /* very soft white border */
    background-color: var(--card-bg);
    color: var(--card-text);
    box-shadow: 0 10px 26px var(--card-shadow-soft);
    backdrop-filter: blur(6px);
    border-radius: var(--card-radius);
    transition: transform 0.3s, background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.services-cards .service-card {
    border-radius: 8px;
}

/* Blog introduction boxes */
.service-card:hover, 
.blog-card:hover, 
.blog-intro:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 34px var(--card-shadow-hover);
}

/* Optional: hover effect for consistency with other cards */
.blog-intro:hover {
    transform: translateY(-5px);
    transition: transform 0.3s, background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.blogs-section {
    padding: 34px 20px 50px;
    background: #ffffff;
}

.blog-article {
    padding: 120px 20px 50px;
    max-width: 850px;
    margin: 0 auto;
}

.blog-article.burn-article {
    padding-bottom: 0;
}

.blogs-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: #e8f1ff;
}

.blogs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    justify-items: center; /* center the cards in their grid cell */
    margin-top: 30px;
}

/* Blog card */
.blog-card {
    direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
    text-align: start;
    width: 380px;
    display: flex;
    flex-direction: column;
    border-radius: var(--card-radius);
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 26px var(--card-shadow-soft);
    transition: all 0.3s ease;
}

.blog-image {
    width: 100%;
    height: 200px; /* adjust as needed */
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* image fully covers card area */
    display: block;
}

.blog-content {
    padding: 15px;
    color: var(--card-text);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-content h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.blog-content p {
    font-size: 1.15rem;
    line-height: 1.9;
    margin-bottom: 20px;
    direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
}

.blog-content li {
    font-size: 1.1rem !important;
    line-height: 1.9;
    direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
    text-align: start;
    padding-inline-start: 5px;
    margin-inline-start: 0;
}

.blog-content ul {
    padding-inline-start: 5px;
    margin-inline-start: 0;
    direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
    list-style-position: inside;
}

.blog-content strong {
    font-weight: 700;
}

.blog-content a {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 500;
}

.blog-content a:hover {
    text-decoration: underline;
}

.blog-content .blog-read-more-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-top: auto;
    background-color: #2d72d9;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #2d72d9;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.blog-content .blog-read-more-btn:hover {
    background-color: #4b89e7;
    border-color: #4b89e7;
    text-decoration: none;
    transform: translateY(-1px);
}

.blog-card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* ensures the image fills the card */
    border-radius: var(--card-radius) var(--card-radius) 0 0;
    display: block;
}

.blog-card:hover img {
    transform: scale(1.05);
}

.blog-content h2 {
    border-top: 1px solid var(--line-color);
    padding-top: 10px;
    margin-top: 30px;
    margin-bottom: 18px;
    transition: border-color 0.3s;
}

:root {
    /* Light mode: dark blue + teal medical palette */
    --bg-color: #f3f6fb;
    --text-color: #16253f;
    --page-bg: #d7dfef;
    --page-text: #16253f;
    --nav-bg: rgba(20, 41, 86, 0.3);
    --nav-bg-scrolled: rgba(20, 41, 86, 0.9);
    --nav-text: #edf2fc;
    --services-bg: #c9d4ea;
    --services-text: #162a4a;
    --services-card-text: #162a4a;
    --services-card-bg: rgba(225, 233, 249, 0.75);
    --footer-bg: #142447;
    --footer-text: #eef3fb;
    --footer-link: #8db2f1;
    --footer-link-hover: #b8d0fa;
    --card-bg: rgba(234, 240, 252, 0.86);
    --card-shadow: rgba(20, 41, 86, 0.18);
    --card-shadow-soft: rgba(20, 41, 86, 0.13);
    --card-shadow-hover: rgba(20, 41, 86, 0.25);
    --card-radius: 20px;
    --card-text: #162a4a;
    --accent: #2f5ea8;
    --accent-strong: #234785;
    --backdrop-blur: blur(10px);
    --line-color: rgba(20, 41, 86, 0.22);
}

.footer {
    background-color: #102349;
    background-image:
        linear-gradient(rgba(16, 35, 73, 0.86), rgba(16, 35, 73, 0.86)),
        url('img/woundlab-footer.jpg');
    background-size: cover;
    background-position: 12% 25%;
    background-repeat: no-repeat;
    color: var(--footer-text);
    backdrop-filter: none;       /* remove transparency */
}

/* Apply the font globally */
html,
body {
    font-family: 'IRANSansXLocal', sans-serif !important;
    direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
    text-align: start;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* Heading typography close to reference style */
h1, h2, h3, h4, h5, h6 {
    font-family: 'IRANSansXLocal', sans-serif !important;
    font-feature-settings: "ss01" 1;
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin-top: 0;
}

h1 {
    font-family: 'PeydaWebExtraBold', 'IRANSansXLocal', sans-serif !important;
    font-weight: 800;
}

p {
    font-family: 'PeydaWebMedium', 'IRANSansXLocal', sans-serif !important;
}

ul,
li {
    font-family: 'PeydaWebRegular', 'IRANSansXLocal', sans-serif !important;
}

ul li strong {
    font-family: 'PeydaWebMedium', 'IRANSansXLocal', sans-serif !important;
    font-weight: 500;
}

h2 {
    font-family: 'PeydaWebBold', 'IRANSansXLocal', sans-serif !important;
    font-weight: 700;
}

h3 {
    font-family: 'PeydaWebSemiBold', 'IRANSansXLocal', sans-serif !important;
    font-weight: 600;
}

h4 {
    font-weight: 700;
}

#contact-footer {
    padding-top: 50px; /* adjust based on navbar height */
}

/* ========= MOBILE MENU FIX (ONLY THIS PART WAS CHANGED) ========= */
@media (max-width: 768px) {
    .services-section {
        margin-bottom: 0;
        border-bottom: 0;
    }

    .footer {
        border-top: 0 !important;
        margin-top: 0;
    }

    .page-top-hero {
        margin-top: 0;
        padding-top: 74px;
        min-height: 170px;
    }

    .page-top-hero-inner {
        padding: 24px 14px 20px;
    }

    .hero {
        min-height: auto;
        background-size: auto 100%;
        background-position: center top;
        padding-bottom: 12px;
    }

    .scroll-logo-section {
        margin-top: 8px;
    }

    .navbar .container {
        flex-direction: row-reverse;
    }

    /* Show hamburger */
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }

    /* Hide nav links by default on mobile */
    .nav-links {
        display: none; /* hide by default */
        flex-direction: column;
        direction: inherit; /* dynamically handles LTR/RTL from html dir attribute */
        text-align: start;
        position: absolute;
        top: 78px;
        background-color: rgba(10, 35, 74, 0.96);
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        border: 1px solid rgba(140, 186, 255, 0.35);
        width: 20%;
        min-width: 100px;
        inset-inline-start: 20px;
        gap: 10px;
        z-index: 999;
        transition: background-color 0.3s, box-shadow 0.3s;
        overflow: hidden; /* prevents extra spacing */
        transform: translateX(-10px);
    }

    /* Links inside dropdown */
    .nav-links li a {
        color: #ffffff;
        font-family: 'PeydaWebRegular', 'IRANSansXLocal', sans-serif;
        font-weight: 400;
        padding: 0px 5px;
        display: flex;
        align-items: center;
        gap: 8px;
        border-radius: 5px;
        transition: background-color 0.2s;
        font-size: 0.95rem; /* slightly smaller text */
    }

    .nav-links li a:hover {
        background-color: rgba(255,255,255,0.14);
    }

    .nav-links.active li a .nav-icon,
    .nav-links.active li a i,
    .nav-links.active li a svg {
        color: #ffffff !important;
        fill: #ffffff !important;
        stroke: #ffffff !important;
    }

    .nav-links.active li a:hover .nav-icon,
    .nav-links.active li a:hover i,
    .nav-links.active li a:hover svg {
        color: #ffffff !important;
        fill: #ffffff !important;
        stroke: #ffffff !important;
    }

    /* When clicked: show menu */
    .nav-links.active {
        display: flex;
    }

    .navbar .logo {
        margin-inline-start: 0;
        order: 0;
        transform: translateX(-10px);
    }

    .mode-toggle {
        position: absolute;
        inset-inline-start: 70px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.2rem;
        z-index: 1000;
    }

    /* About page responsive */

    .about-us {
        font-size: 1.1rem;
    }

    .about-us .intro-text p,
    .about-us .intro-text ul li {
        font-size: 1rem;
    }

    .about-us .team-member .member-info p {
        font-size: 0.9rem;
    }

    .about-us .team-member .member-info ul li {
        font-size: 0.8rem;
    }

    .about-us .intro-text h2,
    .about-us .team-section h2 {
        font-size: 1.5rem;
    }
    .intro-section {
        flex-direction: column;
        align-items: center;
        gap: 32px;
        margin-top: -130px;
    }

    .about-intro-title {
        margin-bottom: 10px;
        font-size: 1.3rem;
    }

    .intro-section .intro-image {
        max-width: 270px;
    }

    .intro-image-wrap {
        max-width: 270px;
        margin-top: -20px;
        margin-inline-start: 0;
        margin-inline-end: 0;
    }

    .intro-section .intro-text h2 {
        font-size: 1.35rem;
    }

    .intro-section .intro-text p,
    .intro-section .intro-text ul li {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    .intro-section .intro-text,
    .team-member .member-info {
        width: 100%;
    }

    .team-members-grid .team-member:nth-child(n+2) .member-info {
        margin-top: 0;
    }

    .team-members-grid {
        grid-template-columns: 1fr;
    }

    .intro-section .intro-text {
        margin-top: -34px;
    }

    .team-section {
        margin-top: 36px;
    }
    .team-member {
        flex-direction: column;
        align-items: stretch;
        text-align: start;
    }

    .hero .hero-copy {
        padding: 0;
    }

    .hero-copy {
        margin-top: 70px;
    }

    .hero .hero-copy h1 {
        font-size: 1.35rem;
        line-height: 1.35;
        margin-bottom: 14px;
    }

    .hero .hero-copy p {
        font-size: 1rem;
        line-height: 1.75;
        max-width: 28ch;
    }
    .clinic-logo {
        width: 160px;
    }

    .clinic-logo-section {
    margin-top: 40px;
    margin-bottom: 30px;
    }

    .clinic-logo {
    animation: floatLogo 4s ease-in-out infinite;
    }

    @keyframes floatLogo {
        0% { transform: translateY(0px); }
        50% { transform: translateY(-8px); }
        100% { transform: translateY(0px); }
    }

    .services-cards {
        flex-direction: column;
        align-items: center;
    }

    .service-card {
        background-color: var(--card-bg);
        color: var(--card-text);
        padding: 16px 14px;
        border-radius: 8px;
        box-shadow: 0 10px 26px var(--card-shadow-soft);
        width: min(300px, 88vw);
        transition: all 0.3s;
    }
    .service-card:hover {
        transform: translateY(-5px);
    }
    
    .blogs-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 12px;
    }

    .blog-card {
        width: min(360px, 94vw);
    }

    .footer-container {
        padding: 16px 8px;
    }

    .footer-post {
        width: 100%;
        border-radius: 18px;
        padding: 14px;
        background: linear-gradient(180deg, rgba(23, 64, 94, 0.5), rgba(15, 48, 75, 0.55));
    }

    .footer-map-image {
        height: 140px;
        min-height: 0;
        max-height: none;
    }

    .footer-post-body {
        padding: 12px 4px 6px;
    }

    .footer-post-title {
        font-size: 1rem;
    }

    .footer-post-line {
        font-size: 0.9rem;
    }

    .footer-line-icon {
        color: #ffffff !important;
        width: 1em;
        margin-inline-end: 5px;
        font-size: 0.95em;
    }
    .footer a[href^="tel"] {
        color: #fff !important;    /* force white */
        text-decoration: none;      /* optional: remove underline */
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .hero {
        background-size: auto 100%;
        background-position: center top;
    }

    .hero .hero-copy h1 {
        font-size: 1.28rem;
        line-height: 1.35;
    }

    .hero .hero-copy p {
        font-size: 0.98rem;
        line-height: 1.7;
        max-width: 26ch;
    }

    .blogs-grid {
        gap: 10px;
    }

    .blog-card {
        width: min(340px, 96vw);
    }

    .footer {
        padding: 8px 6px;
    }

    .footer-container {
        padding: 10px 4px;
    }

    .footer-post {
        border-radius: 14px;
        padding: 10px;
    }

    .footer-map-link {
        border-radius: 10px;
    }

    .footer-map-image {
        height: 112px;
    }

    .footer-post-body {
        padding: 10px 2px 4px;
    }

    .footer-post-title {
        font-size: 0.9rem;
        margin-bottom: 8px;
        line-height: 1.45;
    }

    .footer-post-line {
        font-size: 0.8rem;
        line-height: 1.55;
        margin-bottom: 6px;
        overflow-wrap: anywhere;
    }

    .footer-line-icon {
        color: #ffffff !important;
        width: 0.95em;
        margin-inline-end: 4px;
        font-size: 0.9em;
    }

    .footer-post-links {
        gap: 6px;
        row-gap: 2px;
    }

    .footer-bottom {
        margin-top: 8px;
        padding-top: 8px;
        font-size: 0.72rem;
        line-height: 1.5;
    }
}
