:root {
  --primary-color: #0001c1;
  --secondary-color: #66a3ff;
  --light-bg: #f2f2f2;
  --dark-bg: #0000cc;
  --font-family: 'Arial', sans-serif;
  --transition-speed: 0.3s;
  --border-radius: 8px;
  --spacing: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

body {
  background: var(--light-bg);
  color: #111;
  line-height: 1.6;
}

a { text-decoration: none; color: var(--primary-color); }

.drawer {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 15px rgba(0, 0, 0, 0.2);
  padding: var(--spacing);
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
  transition: right var(--transition-speed) ease;
  z-index: 1000;
}

.drawer.open { right: 0; }
.drawer a { font-size: 18px; font-weight: 600; }
.drawer-close { font-size: 28px; cursor: pointer; align-self: flex-end; margin-bottom: 20px; }

.header {
  position: sticky;      /* makes it stick */
  top: 0;                /* stick to the top */
  z-index: 999;          /* ensure it stays above content */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 15%;
  background: #fff;      /* ensure background covers content behind */
  border-bottom: 2px solid #e6e6e6;
}

.logo {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary-color);
  letter-spacing: 1px;
}

.nav a { margin-left: 25px; font-weight: 600; font-size: 16px; }

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-btn div {
  width: 28px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: all var(--transition-speed) ease;
}

.hero {
  position: relative;
  min-height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: url('../images/towerbridge.jpg') center/cover no-repeat;
  text-align: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  z-index: 1; /* overlay sits BELOW text */
  }

.hero h1 {
  font-size: 48px;
  z-index: 2; /* ensures text stays ABOVE overlay */
  font-weight: 900;
  color: var(--primary-color);
  padding: 15px 30px;
  border-radius: var(--border-radius);
  max-width: 90%;
}

.text-block {
  padding: 60px 20%;
  font-size: 16px;
  color: #333;
}

.text-block p {
  padding-bottom: 15px;
}

.text-block ul{
  padding-bottom: 15px;
}

/*SERVICES*/

.services {
  position: relative;
  min-height: 400px;
  background: url('../images/towerbridge.jpg') center/cover no-repeat;
  text-align: center;
  padding: 60px 5%;
}

.services::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  z-index: 1; /* overlay sits BELOW text */
}

.services h2 {
  position: relative;
  font-size: 30px;
  color: var(--primary-color);
  margin-bottom: 35px;
  z-index: 2; /* ensures text stays ABOVE overlay */
}

.service-icon {
  width: 50px;
  height: 50px;
  text-align: center;
  object-fit: contain;
  margin-bottom: 15px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.default-text {
  position: absolute;
  padding-top: 25px;
  top: 60%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: bold;
}

.hover-text {
  position: absolute;
  transform: translateY(-50%);            /* top of the card */
  left: 0;
  width: 100%;
  padding: 0 15px;
  opacity: 0;
  font-weight: 500;
  font-size: 12px;
}

.service-grid {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.service-box {
  z-index: 2;
  position: relative;
  padding: 30px 20px;
  max-width: 250px;
  min-height: 220px;
  min-width: 250px;
  border-radius: var(--border-radius);
  text-align: center;
  color: #fff;
  cursor: pointer;
  background-color: var(--dark-bg);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  
  /* REMOVE FLEX */
  display: block;   /* <-- change from flex to block */
}

.service-box img {
  width: 60px;       /* same width for all icons */
  height: 60px;      /* same height for all icons */
  margin-bottom: 15px;
  object-fit: contain; /* ensures scaling is consistent */
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.text-wrapper {
  position: relative;
  width: 100%;
  height: 100%;       
}

.text-wrapper span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 0.3s ease;
}

.service-box:hover img {
  opacity: 0;
  transform: scale(1);
}

.service-box img {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.default-text,
.hover-text {
  display: block;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.service-box:hover .default-text {
  opacity: 0;
}

.service-box:hover .hover-text {
  opacity: 1;
}

.service-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

@media (max-width: 900px) {
  .service-grid { flex-direction: column; align-items: center; gap: 25px; }
}

.service-box.dark { background: var(--dark-bg); }
.service-box.light { background: var(--secondary-color); }

/*CASE STUDY*/

.case-study {
  padding: 60px 20%;
  text-align: center;
}

.case-study h2 {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.case-study img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/*Why Us Freight Forwarding page*/

.why-us {
  padding: 60px 30%;
  text-align: center;
  background: var(--primary-color) ;
}

.why-us h2 {
  font-size: 28px;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.why-us p{
  color: white;
  padding-bottom: 15px;
}

/*BREXIT*/

.brexit {
  background: #99ccf9;
  padding: 60px 20%;
  border-radius: var(--border-radius);
  line-height: 1;
}

.brexit h2 {
  color: var(--primary-color);
  font-size: 34px;
  font-weight: 900;
}

.brexit h3 {
  color: var(--primary-color);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 10px;
}

.brexit p {
  color: var(--primary-color);
  font-size: 16px;
  margin-bottom: 10px;
}

.brexit button {
  background: var(--primary-color);
  color: #fff;
  padding: 14px 30px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.brexit button:hover {
  transform: translateY(-3px);
  background: #002299;
}

/*CONTACT*/

.contact {
  padding: 70px 5%;
  text-align: center;
}

.contact-flex {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.map {
  width: 380px;
  height: 260px;
  background: #ccc;
  border-radius: var(--border-radius);
}

.details {
  text-align: left;
  max-width: 320px;
  font-size: 18px;
}

.details h3 {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 7px;
}

.details h1 {
  font-weight: bold;
  font-size: 16px;
  color: black;
}

.details p {
  font-size: 16px;
  color: black;
}

.details a {
  font-size: 16px;
  color: black;
  font-weight: 300;
  text-decoration: underline;
}
/* CONTACT FORM */

.contact-form-wrapper {
  margin-top: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  padding: 35px;
  text-align: left;
}

.contact-form-wrapper h3 {
  text-align: center;
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 25px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: flex;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  border-radius: var(--border-radius);
  border: 1px solid #ccc;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0,1,193,0.1);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  align-self: center;
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 14px 35px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.contact-form button:hover {
  background: #002299;
  transform: translateY(-2px);
}

/* Mobile */
@media (max-width: 700px) {
  .form-row {
    flex-direction: column;
  }
}
/*FOOTER*/

.footer-pro {
  background: var(--secondary-color);
  color: #fff;
  padding: 60px 20% 30px;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 50px;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1 1 260px;
  min-width: 260px;
}

.footer-col h3 {
  font-size: 22px;
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary-color);
}

.footer-col p {
  font-size: 15px;
  color: #e0e0e0;
  margin-bottom: 8px;
  line-height: 1.6;
}

.footer-col a {
  color: #fff;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--primary-color);
}

/* QUICK LINKS */
.footer-links {
  list-style: none;
}

.footer-links li a {
  font-size: 15px;
  color: #e0e0e0;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links li a:hover {
  color: var(--primary-color);
  padding-left: 6px;
}

/* ACCREDITATIONS */
.accreditation-logos {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.accreditation-logos img {
  width: 70px;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 5px rgba(0,0,0,0.3));
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.accreditation-logos img:hover {
  transform: scale(1.08);
  opacity: 1;
}

.accreditation-text {
  margin-top: 12px;
  color: #d4d4d4;
  font-size: 14px;
}

/* BOTTOM FOOTER */
.footer-bottom {
  text-align: center;
  color: #d1d1d1;
  font-size: 14px;
  padding-top: 25px;
  margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.social-link img:hover{
  transform: scale(1.08);
  opacity: 1;
}

/* MOBILE IMPROVEMENTS */
@media (max-width: 750px) {
  .footer-wrap {
    flex-direction: column;
    text-align: center;
  }

  .accreditation-logos {
    justify-content: center;
  }
}

@media (max-width: 1200px) {
  .hero h1 { font-size: 40px; }
  .service-box { max-width: 280px; }
}

@media (max-width: 1150px) {
  .header {padding: 20px 5%;}
}

@media (max-width: 900px) {
  .nav { display: none; }
  .menu-btn { display: flex; }
  .hero h1 { font-size: 32px; padding: 10px 20px; }
  .service-grid { flex-direction: column; align-items: center; gap: 25px; }
  .contact-flex { flex-direction: column; align-items: center; gap: 25px; }
  .map { width: 90%; height: 220px; }
}

@media (max-width: 500px) {
  .hero h1 { font-size: 26px; }
  .brexit h2 { font-size: 28px; }
  .brexit button { width: 100%; padding: 12px; }
}