/* ============================================================
   BUS SUDAN — COMPANY/TRIPS PAGE
   Database-driven page matched to the approved reference layout
   ============================================================ */

:root{
  --trip-navy:#0b2d59;
  --trip-navy-2:#123a6d;
  --trip-red:#d61f34;
  --trip-text:#14253d;
  --trip-muted:#6d7786;
  --trip-line:#e7ebf0;
  --trip-bg:#f7f9fc;
  --trip-white:#fff;
  --trip-shadow:0 12px 35px rgba(13,45,83,.08);
}

.company-page{
  background:var(--trip-bg);
  color:var(--trip-text);
  font-family:"Cairo",sans-serif;
  line-height:1.7;
}

.company-page button,
.company-page input{
  font:inherit;
}

.company-page button{
  border:0;
  cursor:pointer;
}

/* Match the reference page width on laptop/desktop */
.company-page .company-page-container{
  width:min(1660px,calc(100% - 56px));
  margin-inline:auto;
}

/* Header: use the approved homepage logo/header, with the red active line
   seen in the company-page reference. */
.company-page .site-header{
  border-bottom:1px solid #eef1f4;
}

.company-page .reference-nav a::after{
  background:var(--trip-red);
}

.company-page .reference-login-button{
  background:var(--trip-navy);
}

/* Breadcrumbs */
.breadcrumbs{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px 2px;
  color:#506075;
  font-size:13px;
}

.breadcrumbs a:first-child{
  color:var(--trip-navy);
  font-weight:700;
}

/* Company hero */
.company-hero{
  display:grid;
  grid-template-columns:42% 58%;
  grid-template-areas:"image copy";
  min-height:304px;
  overflow:hidden;
  border-radius:20px 20px 0 0;
  background:var(--trip-white);
  box-shadow:var(--trip-shadow);
}

.hero-copy{
  grid-area:copy;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:22px;
  padding:35px 40px;
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.93) 0%,
      #fff 27%,
      #fff 100%
    );
}

.hero-image{
  grid-area:image;
  position:relative;
  min-width:0;
  overflow:hidden;
  background:#eef3f7;
}

.hero-image::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,.05) 70%,
      rgba(255,255,255,.26) 100%
    );
}

.hero-image img{
  width:100%;
  height:100%;
  min-height:304px;
  display:block;
  object-fit:cover;
  object-position:center;
}

.company-logo{
  width:115px;
  height:126px;
  flex:0 0 115px;
  display:block;
  object-fit:contain;
}

.company-logo-fallback{
  display:grid;
  place-items:center;
  border-radius:20px;
  background:#eef4fb;
  color:var(--trip-navy);
  font-size:34px;
  font-weight:900;
}

.hero-company-text{
  min-width:0;
}

.hero-copy h1{
  display:flex;
  align-items:center;
  gap:13px;
  margin:0 0 10px;
  color:var(--trip-navy);
  font-size:36px;
  font-weight:800;
  line-height:1.3;
}

.hero-copy h1 > span{
  width:5px;
  height:31px;
  flex:0 0 5px;
  border-radius:4px;
  background:var(--trip-red);
}

.hero-copy h1 b{
  font:inherit;
}

.hero-copy p{
  max-width:650px;
  color:#657080;
  font-size:16px;
  line-height:1.9;
}

/* Amenities */
.amenities{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  padding:18px 34px;
  margin-bottom:24px;
  border-top:1px solid #f0f2f5;
  border-radius:0 0 20px 20px;
  background:var(--trip-white);
  box-shadow:var(--trip-shadow);
}

.amenity{
  text-align:center;
  border-left:1px solid #edf0f4;
}

.amenity:last-child{
  border-left:0;
}

.amenity span{
  display:block;
  font-size:25px;
  line-height:1.4;
}

.amenity b{
  color:#263b55;
  font-size:13px;
}

/* Main content: trips on the left, sidebar on the right */
.content-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  grid-template-areas:"trips side";
  gap:18px;
  align-items:start;
}

.sidebar{
  grid-area:side;
  display:grid;
  gap:18px;
}

.info-card,
.rating-card,
.trips-panel{
  background:var(--trip-white);
  border:1px solid #edf0f4;
  border-radius:17px;
  box-shadow:0 8px 24px rgba(12,49,89,.05);
}

.info-card{
  padding:24px;
}

.info-card h3,
.rating-card h3{
  margin-bottom:14px;
  color:var(--trip-navy);
  font-size:17px;
}

.info-card p{
  margin-bottom:15px;
  color:#667386;
  font-size:13px;
  line-height:1.9;
}

.info-card ul{
  list-style:none;
  display:grid;
  gap:12px;
}

.info-card li{
  display:flex;
  align-items:flex-start;
  gap:9px;
  color:#4e5e72;
  font-size:13px;
}

.rating-card{
  padding:34px 24px;
  text-align:center;
}

.rating-value{
  display:flex;
  justify-content:center;
  align-items:flex-end;
  gap:6px;
}

.rating-value strong{
  color:var(--trip-navy);
  font-size:42px;
  line-height:1;
}

.rating-value span{
  color:#8a94a2;
  font-size:12px;
}

.stars{
  margin:14px 0 10px;
  color:#f2b51d;
  font-size:23px;
  letter-spacing:3px;
}

.rating-card small{
  color:#7b8795;
}

/* Trips panel */
.trips-panel{
  grid-area:trips;
  min-width:0;
  padding:17px 17px 14px;
  overflow:hidden;
}

.panel-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 4px 15px;
}

.panel-head h2{
  margin:0;
  color:var(--trip-navy);
  font-size:23px;
  font-weight:800;
}

.head-line{
  width:42px;
  height:3px;
  margin-top:31px;
  margin-right:-54px;
  border-radius:4px;
  background:var(--trip-red);
}

.trips-scroll{
  width:100%;
  overflow-x:auto;
  padding-bottom:4px;
}

/* Search/date controls */
.trip-tools{
  display:grid;
  grid-template-columns:
    minmax(220px,1.35fr)
    minmax(175px,.9fr)
    48px
    minmax(205px,1fr)
    48px
    minmax(145px,.75fr);
  gap:10px;
  align-items:end;
  min-width:960px;
  margin-bottom:12px;
}

.search-box,
.date-picker-box{
  position:relative;
}

.search-box label,
.date-picker-box label{
  display:block;
  margin-bottom:6px;
  color:var(--trip-navy);
  font-size:12px;
  font-weight:700;
}

.search-box input,
.date-picker-box input{
  width:100%;
  height:46px;
  padding:0 14px;
  outline:none;
  border:1px solid #e3e8ef;
  border-radius:9px;
  background:var(--trip-white);
  color:var(--trip-text);
}

.search-box input:focus,
.date-picker-box input:focus{
  border-color:var(--trip-navy-2);
  box-shadow:0 0 0 3px rgba(18,58,109,.1);
}

.suggestions{
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  left:0;
  z-index:999;
  display:none;
  max-height:230px;
  overflow-y:auto;
  border:1px solid #dfe5ec;
  border-radius:10px;
  background:var(--trip-white);
  box-shadow:0 12px 30px rgba(11,45,89,.14);
}

.suggestions.show{
  display:block;
}

.suggestion-item{
  width:100%;
  padding:11px 14px;
  border-bottom:1px solid #f0f2f5;
  background:transparent;
  color:var(--trip-text);
  text-align:right;
}

.suggestion-item:last-child{
  border-bottom:0;
}

.suggestion-item:hover{
  background:#f2f6fb;
  color:var(--trip-navy);
}

.date-btn,
.date-display,
.edit-search{
  height:46px;
  border:1px solid #e3e8ef;
  border-radius:9px;
  background:var(--trip-white);
  color:#435269;
  font-weight:700;
}

.date-btn{
  width:48px;
  font-size:25px;
}

.date-btn:disabled{
  opacity:.38;
  cursor:not-allowed;
}

.date-display{
  width:100%;
  padding:0 15px;
  white-space:nowrap;
}

.edit-search{
  width:100%;
  padding:0 10px;
  transition:.2s ease;
}

.edit-search:hover{
  border-color:var(--trip-red);
  color:var(--trip-red);
}

/* Trips table */
.trips-table{
  display:grid;
  gap:10px;
}

.trip-row{
  display:grid;
  grid-template-columns:
    minmax(135px,1.25fr)
    minmax(135px,1.25fr)
    minmax(120px,1fr)
    minmax(105px,1fr)
    minmax(100px,.9fr)
    150px;
  align-items:center;
  min-width:900px;
}

.trip-header{
  padding:9px 12px;
  border-radius:8px;
  background:var(--trip-navy);
  color:var(--trip-white);
  font-size:12px;
  font-weight:700;
  text-align:center;
}

#tripCards{
  display:grid;
  gap:10px;
}

.trip-row.trip-data-row{
  min-height:126px;
  padding:13px 12px;
  border:1px solid #edf0f4;
  border-radius:11px;
  background:var(--trip-white);
  box-shadow:0 4px 12px rgba(21,49,82,.04);
  transition:.2s ease;
}

.trip-row.trip-data-row:hover{
  transform:translateY(-2px);
  box-shadow:0 9px 20px rgba(21,49,82,.08);
}

.trip-row > div{
  min-width:0;
  padding:0 12px;
  border-left:1px solid #edf0f4;
  text-align:center;
}

.trip-row > div:last-child{
  border-left:0;
}

.trip-row strong,
.trip-row small{
  display:block;
  text-align:center;
}

.trip-row strong{
  color:#172a45;
  font-size:14px;
}

.trip-row small{
  margin-top:4px;
  color:#7c8796;
  font-size:11px;
}

.price strong,
.price small{
  color:#c91f34;
}

.seats strong{
  color:#17814d;
  font-size:18px;
}

.seats.low strong{
  color:#d6870f;
}

.seats.danger strong{
  color:#d61f34;
}

.book-cell{
  display:grid;
  gap:4px;
  width:100%;
}

.book-btn{
  width:100%;
  min-width:115px;
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background:linear-gradient(180deg,#e82b42,#c8172b);
  color:var(--trip-white);
  box-shadow:0 7px 14px rgba(214,31,52,.22);
  font-size:17px;
  font-weight:800;
  white-space:nowrap;
  transition:.2s ease;
}

.book-btn:hover{
  filter:brightness(.96);
  transform:translateY(-1px);
}

.book-btn.disabled{
  background:#aab2bd;
  box-shadow:none;
  pointer-events:none;
}

.details-btn{
  width:100%;
  padding-top:2px;
  background:transparent;
  color:#263f5c;
  font-size:11px;
  font-weight:700;
  text-align:center;
}

.details-btn:hover{
  color:var(--trip-red);
}

.no-trips-message{
  min-width:900px;
  padding:28px 20px;
  border:1px dashed #efb9c0;
  border-radius:10px;
  background:#fff7f8;
  color:var(--trip-red);
  font-weight:700;
  text-align:center;
}

/* Trust strip */
.trust-strip{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  margin:24px 0 42px;
  overflow:hidden;
  border:1px solid #edf0f4;
  border-radius:16px;
  background:var(--trip-white);
  box-shadow:0 8px 24px rgba(12,49,89,.04);
}

.trust-strip > div{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  min-height:92px;
  padding:15px;
  border-left:1px solid #edf0f4;
}

.trust-strip > div:last-child{
  border-left:0;
}

.trust-strip > div > span{
  font-size:25px;
}

.trust-strip p{
  display:grid;
  gap:2px;
}

.trust-strip strong{
  color:#263b55;
  font-size:13px;
}

.trust-strip small{
  color:#7b8795;
  font-size:10px;
}

/* Footer */
.company-footer{
  background:var(--trip-navy);
  color:#fff;
}

.footer-inner{
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
}

/* Toast */
.toast{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:2000;
  max-width:360px;
  padding:12px 18px;
  border-radius:10px;
  background:var(--trip-navy);
  color:#fff;
  box-shadow:0 14px 32px rgba(0,0,0,.18);
  opacity:0;
  pointer-events:none;
  transform:translateY(15px);
  transition:.2s ease;
}

.toast.show{
  opacity:1;
  transform:translateY(0);
}

/* English direction adjustments */
html[dir="ltr"] .hero-copy h1 > span{
  order:-1;
}

html[dir="ltr"] .suggestion-item{
  text-align:left;
}

html[dir="ltr"] .trip-row > div{
  border-left:0;
  border-right:1px solid #edf0f4;
}

html[dir="ltr"] .trip-row > div:last-child{
  border-right:0;
}

/* Responsive */
@media(max-width:1200px){
  .company-page .company-page-container{
    width:min(100% - 34px,1660px);
  }

  .content-grid{
    grid-template-columns:minmax(0,1fr) 285px;
  }

  .hero-copy{
    padding:30px;
  }

  .hero-copy h1{
    font-size:31px;
  }
}

@media(max-width:980px){
  .company-hero{
    grid-template-columns:1fr;
    grid-template-areas:
      "image"
      "copy";
  }

  .hero-image{
    height:280px;
  }

  .hero-image img{
    min-height:280px;
  }

  .hero-copy{
    justify-content:flex-start;
  }

  .content-grid{
    grid-template-columns:1fr;
    grid-template-areas:
      "side"
      "trips";
  }

  .sidebar{
    grid-template-columns:1fr 1fr;
  }

  .trust-strip{
    grid-template-columns:repeat(2,1fr);
  }

  .trust-strip > div:nth-child(2){
    border-left:0;
  }
}

@media(max-width:680px){
  .company-page .company-page-container{
    width:min(100% - 20px,1660px);
  }

  .breadcrumbs{
    font-size:11px;
    overflow-x:auto;
    white-space:nowrap;
  }

  .hero-image{
    height:225px;
  }

  .hero-image img{
    min-height:225px;
  }

  .hero-copy{
    gap:15px;
    padding:24px 18px;
  }

  .company-logo{
    width:82px;
    height:92px;
    flex-basis:82px;
  }

  .hero-copy h1{
    font-size:24px;
  }

  .hero-copy p{
    font-size:13px;
  }

  .amenities{
    grid-template-columns:repeat(3,1fr);
    gap:16px;
    padding:15px;
  }

  .amenity{
    border-left:0;
  }

  .sidebar{
    grid-template-columns:1fr;
  }

  .trips-panel{
    padding:14px 10px;
  }

  .panel-head h2{
    font-size:20px;
  }

  .trip-tools{
    min-width:760px;
    grid-template-columns:
      220px 175px 45px 190px 45px 145px;
  }

  .trust-strip{
    grid-template-columns:1fr;
  }

  .trust-strip > div{
    justify-content:flex-start;
    padding-right:20px;
    border-left:0;
    border-bottom:1px solid #edf0f4;
  }

  .trust-strip > div:last-child{
    border-bottom:0;
  }

  .toast{
    right:15px;
    left:15px;
    bottom:15px;
    max-width:none;
    text-align:center;
  }
}

/* ============================================================
   REMOVE HORIZONTAL SCROLL — LAPTOP
   ============================================================ */

.content-grid{
  grid-template-columns:minmax(0,1fr) 300px;
  gap:14px;
}

.trips-panel{
  min-width:0;
  padding:14px;
}

/* Search + date row */
.trip-tools{
  min-width:0;
  grid-template-columns:
    minmax(160px,1.25fr)
    minmax(135px,.8fr)
    38px
    minmax(160px,.9fr)
    38px
    minmax(115px,.65fr);
  gap:7px;
}

.search-box input,
.date-picker-box input,
.date-btn,
.date-display,
.edit-search{
  height:41px;
  font-size:11px;
}

.date-btn{
  width:38px;
}

/* الرحلات */
.trips-scroll{
  overflow-x:hidden;
}

.trip-row{
  min-width:0;
  width:100%;

  grid-template-columns:
    minmax(105px,1.15fr)
    minmax(105px,1.15fr)
    minmax(95px,.9fr)
    minmax(85px,.8fr)
    minmax(80px,.75fr)
    112px;
}

.trip-header{
  padding:8px 6px;
  font-size:11px;
}

.trip-row.trip-data-row{
  min-height:112px;
  padding:10px 6px;
}

.trip-row > div{
  padding:0 7px;
}

.trip-row strong{
  font-size:13px;
}

.trip-row small{
  font-size:9px;
}

.seats strong{
  font-size:16px;
}

.book-btn{
  min-width:0;
  width:100%;
  min-height:50px;
  font-size:15px;
}

.details-btn{
  font-size:10px;
}

/* sidebar أصغر شوية */
.info-card{
  padding:20px;
}

.rating-card{
  padding:28px 20px;
}

.rating-value strong{
  font-size:38px;
}

@media(max-width:1200px){
  .content-grid{
    grid-template-columns:minmax(0,1fr) 260px;
  }

  .trip-row{
    grid-template-columns:
      minmax(95px,1.1fr)
      minmax(95px,1.1fr)
      minmax(90px,.85fr)
      minmax(80px,.75fr)
      minmax(72px,.7fr)
      105px;
  }
}