/* ====== ROOT & BASE STYLES ====== */
:root {
  --primary: #234356;
  --accent: #f9d02c;
  --dark: #101826;
  --light: #f8f9fa;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --white: #ffffff;
  --black: #212529;
  --font-main: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 0.625rem 1.5625rem rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --radius: 0.75rem;
}

/* RESET */
* {
  margin: 0;
  padding: 0.2%;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--white);
  overflow-x: hidden;
}

/* HEADINGS */

h1,
h2 {
  color: var(--accent);
}

h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--dark);
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

section {
  padding: 4rem 1rem;
}

.container {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-title {
  text-align: center;
}

:target {
  scroll-margin-top: 7.5rem;
  /* adjust to your navbar height */
}


/* ===== BUTTONS ===== */
.btn,
.sendBtn {
  display: inline-block;
  background: linear-gradient(45deg, var(--gray), var(--accent));
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.4s ease;
  border: none;
  cursor: pointer;
  text-align: center;
  background-size: 200% 200%;
}

.btn:hover {
  background-position: right center;
  transform: translateY(-0.1875rem) scale(1.05);
  box-shadow: var(--shadow-lg);
}

.btn.ghost {
  background-color: transparent;
  color: var(white);
  border: 0.125rem solid var(--primary);
}

.btn.ghost:hover {
  background-color: var(--primary);
  color: var(--white);
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: auto;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== NAVIGATION ===== */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

#logo {
  height: 5rem;
  transition: var(--transition);
}

#logo:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 0.3125rem;
}

.nav-toggle span {
  display: block;
  width: 1.5625rem;
  height: 0.1875rem;
  background-color: var(--primary);
  border-radius: 0.125rem;
}

.cta {
  background-color: var(--accent);
  padding: 0.5rem;
  border-radius: 20%;
}

.cta:hover {
  background-color: var(--dark);
}

/* Sub-navigation bar for Services */
.sub-nav {
  background: var(--primary);
  border-bottom: 0.125rem solid var(--accent);
  padding: 0.5rem 1rem;
}

.sub-nav ul {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.sub-nav a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: background 0.3s, color 0.3s;
}

.sub-nav a:hover,
.sub-nav a.active {
  background: var(--accent);
  color: var(--dark);
}

.test-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

/* ===== HERO SECTION ===== */
.hero {
  text-align: center;
  color: var(--white);
  background: linear-gradient(135deg, #234356 0%, #2f3361 100%);
  padding: 3rem 3rem;
  position: relative;
  overflow: hidden;
  animation: gradientShift 15s ease infinite alternate;
}

.page-hero {
  text-align: center;
  color: var(--white);
  background: linear-gradient(135deg, #234356 0%, #2f3361 100%);
  padding: 3rem 1rem;
  position: relative;
  overflow: hidden;
  animation: gradientShift 15s ease infinite alternate;
}

.page-hero h1,
.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.3);
}

.page-hero .lead,
.hero .lead {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
}

.cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.hero-wave {
  position: absolute;
  top: -1rem;
  left: -56.25rem;
  width: 200%;
  height: 6.25rem;
  fill: var(--white);
  animation: waveMove 3s ease-in-out infinite;
}

@keyframes waveMove {
  0% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(5.625rem);
  }

  100% {
    transform: translateX(0);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  height: 30rem;
}
.hero-grid img{
  width: 20rem ;
  padding-top: 2rem;
}
.hero-card{
  padding-top: 10rem;
}
/* ===== RIBBON ACCOLADES SECTION ===== */

.accolades {
  padding: 0.1rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.accolades::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(249, 208, 44, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(35, 67, 86, 0.1) 0%, transparent 20%);
  pointer-events: none;
}

.banner-container {
  max-width: 75rem;
  margin: 4rem auto 2rem;
  position: relative;
  z-index: 2;
  padding: 0 1rem;
}


.banner-flags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.banner-flag {
  position: relative;
  padding: 1rem;
  width: 15.625rem;
  opacity: 0;
  transform: translateY(2.5rem) rotate(5deg);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.1));
}

.banner-flag.reveal.active {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.banner-flag:nth-child(1).reveal.active {
  transition-delay: 0.2s;
}

.banner-flag:nth-child(2).reveal.active {
  transition-delay: 0.4s;
}

.banner-flag:nth-child(3).reveal.active {
  transition-delay: 0.6s;
}

.banner-flag:nth-child(4).reveal.active {
  transition-delay: 0.8s;
}

.flag-content {
  background: var(--white);
  padding: 1rem 1.5rem 1.5rem;
  border-radius: 0.5rem 0.5rem 0 0;
  position: relative;
  z-index: 2;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0 90%);
  transition: all 0.4s ease;
}

.flag-icon {
  font-size: 3rem;
  margin: 0.5rem 0 1rem;
  display: block;
  transform: scale(0);
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.banner-flag.reveal.active .flag-icon {
  transform: scale(1);
}

.banner-flag h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  transform: translateY(0.625rem);
  opacity: 0;
  transition: all 0.6s ease 0.2s;
}

.banner-flag.reveal.active h3 {
  transform: translateY(0);
  opacity: 1;
}

.banner-flag p {
  color: var(--gray);
  margin-bottom: 0;
  font-style: italic;
  font-size: 0.9rem;
  transform: translateY(0.625rem);
  opacity: 0;
  transition: all 0.6s ease 0.3s;
}

.banner-flag.reveal.active p {
  transform: translateY(0);
  opacity: 1;
}

/* Hover effects */
.banner-flag:hover {
  transform: translateY(-0.625rem) rotate(-2deg);
  filter: drop-shadow(0 0.9375rem 1.25rem rgba(0, 0, 0, 0.15));
}

.banner-flag:hover .flag-content {
  background: linear-gradient(to bottom, var(--white) 0%, #f8f9fa 100%);
}

.banner-flag:hover .flag-tail {
  border-top-color: #f8f9fa;
}

.banner-flag:hover .flag-year {
  animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
  from {
    top: 0.5rem;
  }

  to {
    top: 0.1rem;
  }
}

/* Confetti animation */
.banner-flag:hover::before {
  content: "✦";
  position: absolute;
  color: var(--accent);
  font-size: 1.2rem;
  top: -1.25rem;
  left: 20%;
  animation: confetti 1s ease forwards;
  z-index: 4;
}

.banner-flag:hover::after {
  content: "❋";
  position: absolute;
  color: var(--white);
  font-size: 1.5rem;
  top: -1.5625rem;
  right: 20%;
  animation: confetti 1s ease 0.2s forwards;
  z-index: 4;
}

@keyframes confetti {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0);
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-1.875rem) rotate(180deg);
  }
}

/* Responsive adjustments */
@media (max-width: 1100px) {
  .banner-flags {
    gap: 1.5rem;
  }

  .banner-flag {
    width: 13.75rem;
  }
}

@media (max-width: 992px) {
  .banner-flags {
    gap: 1rem;
  }

  .banner-flag {
    width: 12.5rem;
  }

  .flag-content {
    padding: 1.8rem 1.2rem 1.2rem;
  }

  .flag-icon {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .banner-flags {
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
  }

  .banner-flag {
    width: 17.5rem;
  }

  .banner-string {
    display: none;
  }
}

@media (max-width: 576px) {
  .accolades {
    padding: 3rem 1rem;
  }

  .banner-flag {
    width: 100%;
    max-width: 17.5rem;
  }

  .flag-content {
    padding: 1.5rem 1rem 1rem;
  }

  .flag-icon {
    font-size: 2.2rem;
    margin: 0.3rem 0 0.8rem;
  }

  .banner-flag h3 {
    font-size: 1.1rem;
  }

  .banner-flag p {
    font-size: 0.85rem;
  }
}

/* ===== CONTENT SECTIONS ===== */
.content {
  display: grid;
  gap: 2rem;
}

.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.bullets {
  margin: 1rem 0 1.5rem 1.2rem;
  list-style: disc;
}

.bullets li {
  margin-bottom: 0.5rem;
}

/* ===== CARDS SECTION ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: 2rem;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #f9f9fb, #f1f3f8);
  position: relative;
  z-index: 1;
}

.card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 0.625rem 1.5625rem rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.card,
.card a {
  pointer-events: auto;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(66, 71, 126, 0.08), rgba(249, 208, 44, 0.08));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-0.625rem);
  box-shadow: 0 0.9375rem 1.875rem rgba(0, 0, 0, 0.15);
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brand, #234356);
  margin-bottom: 1rem;
}

.card p {
  color: #5a6a7a;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.card .btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 3.125rem;
  background: var(--accent, #f9d02c);
  color: #234356;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.card .btn:hover {
  background: #234356;
  color: #fff;
  transform: scale(1.05);
}

.card>* {
  z-index: 1;
  position: relative;
}

.why-hearing {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

/* ===== SERVICES ===== */
.services-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.service {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-top: 0.25rem solid;
  border-image: linear-gradient(45deg, var(--accent), var(--primary)) 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service:hover {
  transform: translateY(-0.5rem) scale(1.02);
  box-shadow: var(--shadow-lg);
}


/* ===== ACCORDIAN ===== */
.accordion {
  max-width: 50rem;
  margin: 2rem auto;
}

.accordion-item {
  border-bottom: 0.0625rem solid #ddd;
  overflow: hidden;
}

.accordion-btn {
  width: 100%;
  text-align: left;
  padding: 1rem;
  font-weight: 600;
  background: var(--light-gray);
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.3s;
}

.accordion-btn:hover {
  background: var(--accent);
  color: var(--white);
}

.accordion-btn .toggle-icon {
  float: right;
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-btn .toggle-icon {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 1rem;
  background: var(--white);
}

.accordion-item.active .accordion-content {
  max-height: 31.25rem;
  /* Adjust for content height */
  padding: 1rem;
}
.damage-cause img{
  height: 25rem
}
/* ===== CAROUSEL ===== */
.carousel {
  position: relative;
  max-width: 50rem;
  margin: 0 auto;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.slide {
  flex: 0 0 100%;
  padding: 2rem;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  opacity: 0.5;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.slide.active {
  transform: scale(1);
  opacity: 1;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-40%);
  background: var(--primary);
  color: var(--white);
  border: none;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.carousel-btn:hover {
  background: var(--accent);
  color: var(--primary);
}

.prev {
  left: 0.5rem;
}

.next {
  right: 0.5rem;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.carousel-dots button {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: none;
  background: var(--gray);
  margin: 0 5px;
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dots button[aria-selected="true"] {
  background: var(--primary);
  transform: scale(1.2);
}

.carousel-track>* {
  flex: 0 0 100%;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-card,
.form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

input,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 0.0625rem solid var(--light-gray);
  border-radius: var(--radius);
  font-family: inherit;
  transition: var(--transition);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 0.1875rem rgba(249, 208, 44, 0.3);
}

.error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.form-note {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  text-align: center;
}

.form-note[data-status="success"] {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
}

.form-note[data-status="error"] {
  background-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}
.media.hearing-damage{
  height: 60rem;
}
.hearing-damage{
  margin-bottom: -10rem;
}
/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, #234356 0%, #2f3361 100%);
  color: var(--white);
  padding: 3rem 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
  gap: 2rem;
  max-width: 62.5rem;
  margin: 0 auto;
}

.footer h3,
.footer h4,
.footer p {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer h3 span {
  color: var(--accent);
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer a:hover {
  color: var(--accent);
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.legal {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}
.map{
  width: 30rem;
  height: 30rem;
}

.media .Janah{
  height: 40rem;
}
.media .about-janah{
  height : 30rem;
}
.about-content{
  height: 50rem;
}

.about-content .about-janah{
  height : 30rem;
}
footer img{
  height : 5rem;
}
/* ===== RESPONSIVE ===== */
@media(max-width:992px) {

  .two-col,
  .split,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }
}

@media(max-width:768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    background-color: var(--white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: -0.3125rem 0 0.9375rem rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    z-index: 999;
  }

  .nav-menu[aria-expanded="true"] {
    right: 0;
  }

  .nav-toggle {
    display: flex;
    z-index: 1000;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .lead {
    font-size: 1.1rem;
  }

  .cta-row {
    flex-direction: column;
    align-items: center;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}

@media(max-width:576px) {
  .nav {
    padding: 1rem;
  }

  .hero {
    padding: 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  section {
    padding: 3rem 1rem;
  }

  .content {
    padding: 2rem 1rem;
  }

  .services-list {
    grid-template-columns: 1fr;
  }
  .two-col, .split{
    grid-template-columns: 1fr;
  }
  .hero-grid{
    padding-top: 1rem;
    font-size: small;
  }
  .hero-card{
  padding-top: 0.5rem;
}
.hero-grid img{
  width: 12rem ;
  padding-top: 7rem;
}
.test-types {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
}
.media.hearing-damage {
  height: 70rem;
  
}
.contact-card{
  overflow: hidden;
}
.map{
  width: 20rem;
}
.media .Janah {
  height: 25rem;
}
.media .about-janah{
  height: 15rem;
  margin-top: 10rem;
  margin-bottom: 10rem;
}
.about-content .about-janah{
  height : 14rem;
  width: 12rem;
}
.about-content{
  height: 65rem;
  display: grid;
  grid-template-columns: repeat(2,1fr);
}
.why-hearing {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
}

footer img{
  height : 5rem;
}

.second{
  margin-top: 12rem ;
}
}