body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}
#root {
  width: 100%;
  margin: 0;
  padding: 0;
}


/* ---------------------- */
/* FOOTER CONTAINER       */
/* ---------------------- */
.footer {
  width: 100%;
  max-width: 1400px;         /* FIX: prevents over-wide footer */
  margin: 0 auto;            /* FIX: centers footer on desktop */

  padding: 70px 40px 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);   /* EXACTLY 4 columns */
  grid-auto-rows: auto;                    /* consistent heights */
  align-items: start;                      /* prevent vertical drifting */
  gap: 60px;

  justify-items: center;
  align-items: start;

  position: relative;
  overflow: hidden;
  background: rgba(15, 35, 70, 0.75);
  border-top: 1px solid rgba(255,255,255,0.15);
}

body.light .footer {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0,0,0,0.12);
  color: #0A2B5A !important; /* DARK BLUE FOR LIGHT MODE */

  /* soft ambient light-blue glow (no box) */
  box-shadow:
    0 10px 30px rgba(18,140,204,0.08),
    0 0 70px rgba(18,140,204,0.08),
    inset 0 1px 0 rgba(255,255,255,0.6);
  transition: box-shadow .35s ease, background .25s ease;
  position: relative;
  z-index: 2;
}

/* tweak the glow "blobs" for light mode so they read as ambient blue light */
body.light .footer::before {
  /* softer, cooler blue */
  background: rgba(18,140,204,0.18);
  filter: blur(140px);
  top: -40px;
  left: -40px;
  width: 300px;
  height: 300px;
}

body.light .footer::after {
  background: rgba(18,140,204,0.06);
  filter: blur(140px);
  bottom: -40px;
  right: -40px;
  width: 320px;
  height: 320px;
}

/* ---------------------- */
/* BRANDING COLUMN        */
/* ---------------------- */
.footer-brand {
  position: relative;
  z-index: 3;
}

/* remove any old after-element glow */
.footer-brand::after {
  all: unset;
}

/* LIGHT MODE — bright sky-blue, very wide, smooth */
body.light .footer-brand::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 20px;                                 /* sits close under logo */
  transform: translateX(-50%);

  width: 520px;                               /* 2× wider glow */
  height: 260px;                              /* 2× taller glow */

  background: radial-gradient(
    circle at center,
    rgba(40,160,255,0.55) 0%,                 /* bright inner light */
    rgba(40,160,255,0.32) 40%,                /* soft mid glow */
    rgba(40,160,255,0.10) 70%,                /* outer glow */
    transparent 100%
  );

  filter: blur(65px);                          /* intense soft blur */
  opacity: 1;                                  /* full glow */
  pointer-events: none;
  z-index: 1;                                  /* behind logo */
}

/* DARK MODE — deeper, powerful blue glow */
body:not(.light) .footer-brand::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);

  width: 520px;
  height: 260px;

  background: radial-gradient(
    circle at center,
    rgba(0,85,200,0.50) 0%,                    /* vivid blue core */
    rgba(0,85,200,0.28) 40%,
    rgba(0,85,200,0.12) 70%,
    transparent 100%
  );

  filter: blur(70px);                          /* darker + smoother */
  opacity: 0.95;
  pointer-events: none;
  z-index: 1;
}

.footer-logo {
  height: 145px; /* bigger logo */
  margin-bottom: 5px !important;
  transition: .3s ease;
  filter:
    drop-shadow(0 22px 48px rgba(0, 80, 160, 0.55))
    drop-shadow(0 12px 32px rgba(0, 80, 160, 0.35));
}

body.light .footer-logo {
  /* remove any box/background and use layered blue glow around the SVG only */
  background: transparent;
  box-shadow: none;
  position: relative;
  z-index: 4; /* keep SVG above the under-glow */
  filter:
    /* darker, stronger offset underneath to ground the logo */
    drop-shadow(0 28px 40px rgba(18,140,204,0.36))
    drop-shadow(0 14px 32px rgba(18,140,204,0.22))
    drop-shadow(0 6px 18px rgba(18,140,204,0.14));
  -webkit-filter:
    drop-shadow(0 28px 40px rgba(18,140,204,0.36))
    drop-shadow(0 14px 32px rgba(18,140,204,0.22))
    drop-shadow(0 6px 18px rgba(18,140,204,0.14));
  transition: .3s ease;
}

/* 1) Replace oversized light-mode logo ellipse with tighter double glow */
body.light .footer-brand::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(35px);

  width: 300px;          /* double glow but controlled */
  height: 110px;

  border-radius: 50%;
  background: rgba(18,140,204,0.40);
  filter: blur(40px);
  opacity: 0.9;

  z-index: 1;
  pointer-events: none;
}

/* 2) Add matching (darker) glow for dark mode */
body:not(.light) .footer-brand::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(35px);

  width: 300px;
  height: 110px;

  border-radius: 50%;
  background: rgba(0,60,140,0.35);   /* darker blue glow */
  filter: blur(40px);
  opacity: 0.8;

  z-index: 1;
  pointer-events: none;
}

/* darker elliptical glow under logo (light mode only) */
body.light .footer-brand::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(35px);
  width: 300px;          /* double glow but controlled */
  height: 110px;
  border-radius: 50%;
  background: rgba(18,140,204,0.40); /* darker core */
  filter: blur(40px);  /* smooth bigger glow */
  opacity: 0.9;
  z-index: 2; /* sits under logo but above most footer background */
  pointer-events: none;
}

.tagline {
  font-size: 25px;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.1;
}

.phone {
  display: inline-block;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 18px;
  text-decoration: none;
  color: inherit;
}

.phone:hover {
  opacity: 0.7;
}

/* ---------------------- */
/* TITLES                 */
/* ---------------------- */
.footer-col h3 {
  font-family: "Sarpanch", sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: center;
}

/* ---------------------- */
/* LINKS                  */
/* ---------------------- */
.footer-col a {
  display: block;
  margin: 6px 0;
  font-size: 18px;
  text-decoration: none;
  text-align: center;
  color: inherit;
  transition: 0.25s;
}

.footer-col a:hover {
  opacity: 0.7;
}

/* ---------------------- */
/* SOCIAL ICONS           */
/* ---------------------- */
.social-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.social-icon {
  font-size: 36px;
  padding: 0;
  margin: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: none !important;
  box-shadow: none !important;

  line-height: 1;            /* FIX: vertical center */
  height: auto;              /* FIX: allow icon to define size */

  color: inherit;
  transition: 0.25s ease;
}

.social-icon:hover {
  transform: translateY(-4px);
  opacity: 0.75;
}

/* ensure light-mode also has no background/shadow for icons */
body.light .social-icon {
  background: transparent !important;
  box-shadow: none !important;
  color: #0A2B5A !important;
}

/* ANPC badges: stack badge 1 + 2 vertically on desktop; keep others inline */
.anpc-row {
  display: grid;                 /* FIX: predictable placement */
  grid-template-columns: auto auto;   /* 2 columns */
  gap: 20px;
  justify-content: center;
  align-items: center;
}

/* Stack badge 1 + 2 vertically */
.anpc-row img:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}
.anpc-row img:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

/* Remaining badges inline horizontally */
.anpc-row img:nth-child(n+3) {
  grid-column: 2;
  grid-row: 1;                 /* same row → inline */
}

.anpc-row img {
  height: 55px;
  max-width: 260px;
  object-fit: contain;
}

/* mobile override for ANPC badges */
@media (max-width: 900px) {
  .anpc-row {
    display: flex;
    flex-direction: column;   /* FIX: perfect stacking */
    gap: 18px;
  }
}

/* mobile centering updates */
@media (max-width: 900px) {
  .footer {
    grid-template-columns: 1fr;   /* FIX: perfect single column */
    width: 100%;
    padding: 70px 20px 40px;
    justify-items: center;
    align-items: center;
  }

  .footer-col,
  .footer-brand {
    max-width: 380px;             /* FIX: keeps everything centered */
    margin: 0 auto;
  }
}

/* FIX: remove unwanted glow blobs in dark mode */
body:not(.light) .footer::before,
body:not(.light) .footer::after {
  display: none !important;
}

/* Ensure all footer columns are full-width and centered */
.footer-col,
.footer-brand {
  width: 100%;
  max-width: 100%;
  text-align: center !important;
  display: flex;
  flex-direction: column;
  align-items: center !important;
  justify-content: center !important;
  height: 100%;               /* force equal height on desktop */
}

/* 3) Tighten desktop spacing and pull content upward (min-width: 901px) */
@media (min-width: 901px) {
  .footer {
    padding-top: 40px !important;    /* tighter top padding */
    padding-bottom: 40px !important; /* ensures elements stay above copyright */
    gap: 30px !important;            /* reduce large empty spaces */
    align-items: start !important;   /* pull content upward */
  }

  .footer-col,
  .footer-brand {
    gap: 12px !important;      /* compress vertical spacing */
  }

  .footer-col h3 {
    margin-bottom: 10px !important;
  }

  .footer-col a {
    margin: 4px 0 !important;
  }

  /* --------------------------------------------- */
  /* DESKTOP: place ANPC1 under logo, ANPC2 under contact */
  /* --------------------------------------------- */

  /* turn the footer into a 4-column grid with explicit areas */
  .footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-areas:
      "brand contact detalii links"
      "anpc1 anpc2 detalii links"
      "copy copy copy copy";
  }

  /* DESKTOP: push Contact column down slightly to visually align with Brand */
  @media (min-width: 901px) {
    /* Push the Contact column down so it's visually aligned */
    .footer-col.contact-col {
      padding-top: 22px !important;
    }
  }
  /* Assign grid areas */
  .footer-brand { grid-area: brand; }
  .footer-col:nth-of-type(2) { grid-area: contact; }       /* Contact */
  .footer-col:nth-of-type(3) { grid-area: detalii; }       /* Detalii companie */
  .footer-col:nth-of-type(4) { grid-area: links; }         /* Link-uri rapide */
  .footer-bottom { grid-area: copy; }

  /* remove the old ANPC row layout so individual images can be positioned */
  .anpc-row {
    display: contents !important;
  }

  /* ANPC1 → below logo */
  .anpc-row img:nth-child(1) {
    grid-area: anpc1;
    justify-self: center;
    margin-top: 10px;
    height: 55px;      /* keep previous sizing constraints */
    max-width: 260px;
    object-fit: contain;
  }

  /* ANPC2 → below contact */
  .anpc-row img:nth-child(2) {
    grid-area: anpc2;
    justify-self: center;
    margin-top: 10px;
    height: 55px;
    max-width: 260px;
    object-fit: contain;
  }
}

/* --------------------------------------------- */
/* MOBILE: revert to normal — stacked as before  */
/* --------------------------------------------- */
@media (max-width: 900px) {

  .footer {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .anpc-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .anpc-row img {
    grid-area: unset !important;
    justify-self: center;
  }
}

/* legacy .anpc-row (markup moved into columns). Ensure any prior desktop hacks don't interfere */
@media (min-width: 901px) {
  .anpc-row {
    display: none !important;
  }
}

/* ANPC badges now live as direct images in their respective columns */
.anpc-logo {
  margin-top: auto !important; /* pushes ANPC to bottom inside its column */
  margin-bottom: 0 !important;
  height: 55px;
  max-width: 240px;
  object-fit: contain;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* small mobile tweak — badges still stack naturally within each column */
@media (max-width: 900px) {
  .anpc-logo {
    margin-top: 16px;
  }
}

/* 4) Ensure footer-bottom stays below content */
.footer-bottom {
  margin-top: 20px !important;
  grid-column: 1 / -1;        /* force full width row */
  text-align: center;
}
