@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/*
font-family: "Roboto", sans-serif;
font-family: "DM Sans", sans-serif;
*/
 
/* root styling */

:root{
    --light:#f8f9fa;
    --secondary:#adb5bd;
    --dark:#343a40;
    --primary-color:#f15bb5;
    --secondary-color:#2ec4b6;
    --border:#e9ecef;



}
body{font-family: "Open Sans", sans-serif;
    padding: 0;
    margin: 0;
}

a{
    text-decoration: none;
}

*>*{
    box-sizing: border-box;
}

/* global styling */ 
.text-light{
    color:var(--light)
}

.text-secondary{
    color:var(--secondary)
}

.text-dark{
    color:var(--dark)
}

.text-primary-color{
    color:var(--primary-color)
}

.text-secondary-color{
    color:var(--secondary-color)
}

.text-border{
    color:var(--border)
}

.bg-light{
    background-color: var(--light)
}

.container{
    max-width:  1400px;
    padding:0 15px;
    margin: auto;
}


.img-fluid{
    width: 100%;
    height: auto;
    display: block;
}

.text-title{
    font-family:Verdana, Geneva, Tahoma, sans-serif;
    font-weight:bold;
}

.display-1{
    font-size: 22px;
}

.display-2{
    font-size: 18px;
}

.display-3{
    font-size: 20px;
}


.text-center{
    text-align: left;
}

.text-right{
    text-align: center;
}

.secondary-title{
    font-family: 'Roboto', sans-serif;
}


/* section styling */

/*-----Navigation Menu-----*/
.navbar{
    position:relative;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px;
}

.nav-brand{
font-family: "DM Sans", sans-serif;
font-weight: bold;
align-self: center;
font-size: 32px;
}

.collapse{
    align-self: center;
}

.nav-link{
    font-size: 18px;
    margin: 12px;
    color: var(--dark);
    font-family: "Roboto", sans-serif;

    }

    .search-box{
        display: inline;
        border-right: 1px solid var(--secondary);
        padding-right: 12px;
        margin-right: 10px;

    }


    .nav-link:hover{
        color:#adb5bd


    }

    .toggle-button{
        font-size:21px;
        background-color: transparent;
        border: none;
        position: absolute;
        right: 10px;
        top:80%;
        margin: 8px 10px;
        display: none;
        padding:8px;
        z-index:9999;
        display: none;
    }

    .toggle-button:focus{
        outline: none;

    }
    

/*-----.Navigation Menu-----*/

/*---- Main Section -----*/

#site-main{
    margin-top: 8em;
}

#posts{
    margin-bottom: 5em;
}


.grid{
    margin: 0 auto;
}

.grid .grid-item{
    width: calc(23.33% - 20px);
    margin-bottom: 3em;
}


/*---- .Main Section -----*/

/* Media Query */

@media(max-width:992px){
    .navbar{
        flex-direction:column;
    }

}

@media(max-width:574px){
    .toggle-button{
        display: initial;
    }

    .collapse{
        max-height: 0;
        overflow: hidden; 
        transition: all 1s ease-in;
        
    }


    .collapse .nav-link{
        display: block;
        text-align: center;
    }

    .search-box{
        border-right:none;
    }

    .collapse-toggle{
        max-height: 500px;
    }
}/* Make the cards sit in a neat row */
#posts .grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 in one row */
  gap: 20px;
  justify-items: center; /* centers items inside columns */
}

/* Masonry widths no longer needed */
.grid .grid-item{
  width: 100%;
  margin-bottom: 0;
}

/* Same-size image box */
.overflow-img{
  width: 100%;
  height: 220px;          /* choose the height you want */
  overflow: hidden;
  border-radius: 10px;
}

/* Make every image fill the box equally */
.img-fluid{
  width: 100%;
  height: 100%;
  object-fit: cover;      /* keeps same size, crops nicely */
  display: block;
}

/* Center text under images */
.text-center{ text-align: center; }  /* your current one is left */



/* --- Section anchors: smooth jump without breaking fonts --- */
html { scroll-behavior: smooth; }

/* If you later make header fixed, this prevents section titles from hiding under it */
#home, #roro, #container, #cartrade, #contacts { scroll-margin-top: 90px; }

/* Simple spacing for new sections */
.section-block { padding: 60px 0; }


/* --- Extra: spacing for separate pages --- */
.page-section{padding:70px 0;}
@media (max-width:768px){.page-section{padding:50px 0;}}



/* Responsive grid for 4 cards */
@media (max-width: 1024px){
  #posts .grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  #posts .grid{ grid-template-columns: 1fr; }
}



/* =========================
   News section (Home)
   ========================= */
#news{
  padding: 10px 0 60px;
}
.section-title{
  margin: 12px 0 18px;
}
.news-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.news-card{
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 16px 16px 18px;
}
.news-meta{
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  margin-bottom: 6px;
}
.news-title{
  font-family: "DM Sans", sans-serif;
  font-size: 18px;
  margin: 0 0 8px;
}
.news-link{
  display: inline-block;
  margin-top: 10px;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
}
.news-link:hover{
  color: var(--secondary);
}

/* Responsive */
@media (max-width: 1024px){
  .news-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  .news-grid{ grid-template-columns: 1fr; }
}

/* =========================
   Footer
   ========================= */
.site-footer{
  padding: 26px 0 14px;
  border-top: 1px solid var(--border);
}
.footer-grid{
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 22px;
  align-items: start;
}
.footer-title{
  font-family: "DM Sans", sans-serif;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 10px;
}
.footer-text{
  margin: 0;
}
.footer-links{
  display: flex;
  flex-direction: column;
}
.footer-link{
  margin: 6px 0;
  padding: 0;
}
.footer-social .nav-link{
  margin: 0 10px 0 0;
  font-size: 20px;
}
.footer-bottom{
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-family: "Roboto", sans-serif;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 992px){
  .footer-grid{ grid-template-columns: 1fr; }
}


/* =========================
   RoRo page (ship schedule)
   ========================= */
.info-frame{
  border: 2px solid #000;
  padding: 18px 18px;
  background: #fff;
  margin: 30px auto 10px auto;
}

.ship-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 20px auto 60px auto;
}

.ship-card{
  border: 2px solid #000;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}

.ship-img{
  width: 100%;
  height: 230px;
  overflow: hidden;
  background: #f3f3f3;
}

.ship-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ship-caption{
  padding: 10px 8px;
  font-weight: 700;
}

@media (max-width: 768px){
  .ship-grid{ grid-template-columns: 1fr; }
  .ship-img{ height: 210px; }
}



/* ===== Fix RoRo page top gap only ===== */
.page-roro #site-main{
  margin-top: 4em;   /* was 8em globally */
}

.page-roro .page-section{
  padding-top: 20px;   /* was 70px */
  padding-bottom: 60px;
}

.page-roro h1,
.page-roro h2{
  margin-top: 0;
  margin-bottom: 8px;
}


.section-title{
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin: 17px 0 16px;
  letter-spacing: 0.3px;
}


/* ship title */

.section-title::after{
  content: "";
  display: block;
  width: 120px;
  height: 2px;
  background: #000;
  margin:10px auto 0;
  opacity: 0.6;
}


/* ==========================================================
   CarTrade page (ONLY) — keeps other pages untouched
   cartrade.html uses: <body class="page-cartrade">
   ========================================================== */

.page-cartrade #site-main{
  /* don’t fight your existing header height */
  margin-top: 8em;
}

.page-cartrade .ct-frame{
  border: 3px solid #000;
  border-radius: 8px;
  padding: 18px 22px;
  background: #fff;
  max-width: 1200px;
  margin: 0 auto 28px auto;
}

.page-cartrade .ct-frame p{
  margin: 6px 0;
  line-height: 1.35;
}

.page-cartrade .ct-frame strong{
  display: inline-block;
  margin-top: 6px;
}

.page-cartrade .ct-grid{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.page-cartrade .ct-grid-4{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-cartrade .ct-grid-3{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* cards with image + bottom caption strip */
.page-cartrade .ct-card{
  border: 3px solid #000;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.page-cartrade .ct-img{
  flex: 1;
  min-height: 230px;
  background: #f2f4f7;
  overflow: hidden;
}

.page-cartrade .ct-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-cartrade .ct-caption{
  border-top: 3px solid #000;
  padding: 12px 10px;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* section title between blocks */
.page-cartrade .ct-section-title{
  max-width: 1200px;
  margin: 26px auto 18px auto;
  border: 3px solid #000;
  border-radius: 8px;
  padding: 16px 18px;
  background: #fff;
  text-align: center;
  font-weight: 800;
}

/* contact cards */
.page-cartrade .ct-contact{
  border: 3px solid #000;
  border-radius: 12px;
  background: #fff;
  padding: 18px 16px;
  text-align: center;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.page-cartrade .ct-contact i{
  font-size: 34px;
  opacity: 0.9;
}

.page-cartrade .ct-contact h3{
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.page-cartrade .ct-contact p{
  margin: 0;
  color: #555;
}

/* responsive: keep the “Excel layout” feeling */
@media (max-width: 1100px){
  .page-cartrade .ct-grid-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px){
  .page-cartrade .ct-grid-4{ grid-template-columns: 1fr; }
  .page-cartrade .ct-grid-3{ grid-template-columns: 1fr; }
}

/* Move CarTrade content UP (only this page) */
.page-cartrade #site-main{
  margin-top: 4em !important;  /* reduce if too low */
}

.page-cartrade .page-section{
  padding-top: 20px !important;  /* reduce top gap */
  padding-bottom: 40px !important;
}

/* Optional: tighten title spacing */
.page-cartrade .section-title{
  margin-top: 10px !important;
  margin-bottom: 14px !important;
}



/* ==========================================================
   RoRo Ship Popup (ONLY) — click ship to view photos
   Works only on pages with <body class="page-roro">
   ========================================================== */
.page-roro .ship-card.ship-open{
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.page-roro .ship-card.ship-open:hover{
  transform: translateY(-2px);
}
.page-roro .ship-card.ship-open:focus{
  outline: 3px solid rgba(0,0,0,0.25);
  outline-offset: 2px;
}

/* Modal */
.page-roro .ship-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}
.page-roro .ship-modal.is-open{ display: block; }

.page-roro .ship-modal__overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.page-roro .ship-modal__box{
  position: relative;
  width: min(980px, calc(100% - 24px));
  margin: 70px auto;
  background: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  overflow: hidden;
}

.page-roro .ship-modal__close{
  position: absolute;
  top: 10px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 2px solid #000;
  border-radius: 999px;
  background: #fff;
  font-size: 24px;
  line-height: 34px;
  cursor: pointer;
}

.page-roro .ship-modal__content{
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
  padding: 16px;
}

.page-roro .ship-modal__imgwrap{
  border: 2px solid #000;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f3f3;
  height: 420px;
}
.page-roro .ship-modal__imgwrap img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-roro .ship-modal__thumbs{
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.page-roro .ship-modal__thumbs button{
  border: 2px solid #000;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  height: 92px;
}
.page-roro .ship-modal__thumbs img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.page-roro .ship-modal__thumbs button.is-active{
  box-shadow: 0 0 0 3px rgba(0,0,0,0.18);
}

.page-roro .ship-modal__text h3{
  margin: 0 0 6px 0;
  font-weight: 800;
  font-size: 22px;
  font-family: "DM Sans", sans-serif;
}
.page-roro .ship-modal__sub{
  margin: 0 0 10px 0;
  opacity: 0.75;
  font-family: "Roboto", sans-serif;
}
.page-roro .ship-modal__details{
  margin: 0;
  line-height: 1.45;
  font-family: "Roboto", sans-serif;
}
.page-roro .ship-modal__hint{
  margin-top: 14px;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 820px){
  .page-roro .ship-modal__content{ grid-template-columns: 1fr; }
  .page-roro .ship-modal__imgwrap{ height: 260px; }
  .page-roro .ship-modal__box{ margin: 40px auto; }
  .page-roro .ship-modal__thumbs{ grid-template-columns: repeat(3, 1fr); }
}



/* ===== Move CONTACTS page content UP only ===== */
.page-contacts #site-main{
  margin-top: 4em !important;   /* reduce if too low */
}

.page-contacts .page-section{
  padding-top: 18px !important;   /* reduces the “empty air” above */
  padding-bottom: 40px !important;
}

/* tighten page title spacing if you have one */
.page-contacts .section-title{
  margin-top: 8px !important;
  margin-bottom: 14px !important;
}


/* ===== Premium micro-animations (safe) ===== */

/* Smooth overall feel */
html { scroll-behavior: smooth; }

/* Reveal animation */
[data-reveal]{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .45s ease, transform .45s ease;
  will-change: opacity, transform;
}
[data-reveal].is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* Premium card hover (only on devices with hover) */
@media (hover:hover){
  .ship-card, .staff-card, .grid-item, .service-card{
    transition: transform .18s ease, box-shadow .18s ease;
  }
  .ship-card:hover, .staff-card:hover, .grid-item:hover, .service-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,.10);
  }
  .ship-card img, .grid-item img, .service-card img{
    transition: transform .25s ease;
  }
  .ship-card:hover img, .grid-item:hover img, .service-card:hover img{
    transform: scale(1.03);
  }
}

/* Modal animation (if you use modal) */
.ship-modal__box{
  transform: scale(.98);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}
.ship-modal.is-open .ship-modal__box{
  transform: scale(1);
  opacity: 1;
}



/* ===== Footer (scoped so it won't break other pages) ===== */
.mw-footer{
  margin-top: 70px;
  padding: 56px 0 28px;
  background: #fbfbfb;
  border-top: 1px solid #eee;
  font-family: inherit;
}

.mw-footer__inner{
  width: min(1200px, 92%);
  margin: 0 auto;
}

.mw-footer__grid{
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 48px;
  padding: 0 4px;
}

.mw-footer__title{
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 14px;
  color: #222;
}

.mw-footer__text{
  margin: 0;
  line-height: 1.55;
  color: #6f6f6f;
  font-size: 15px;
}

.mw-footer__links{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.mw-footer__links a{
  text-decoration: none;
  color: #333;
  font-size: 15px;
}

.mw-footer__links a:hover{
  text-decoration: underline;
}

.mw-footer__mail{
  color: #333;
  text-decoration: none;
  font-weight: 600;
}

.mw-footer__mail:hover{
  text-decoration: underline;
}

.mw-footer__social{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.mw-footer__icon{
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  border-radius: 10px;
  text-decoration: none;
  color: #222;
  font-weight: 700;
  font-size: 12px;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}

.mw-footer__icon:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

.mw-footer__bottom{
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid #eee;
  color: #9a9a9a;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 900px){
  .mw-footer__grid{
    grid-template-columns: 1fr;
    gap: 22px;
  }
}


/* ===== HELP / ПОМОЩЬ ===== */
.mw-help{
  margin-top: 40px;
  padding: 40px 0;
}

.mw-help__inner{
  width: min(1200px, 92%);
  margin: 0 auto;
}

.mw-help__head{
  text-align: center;
  margin-bottom: 22px;
}

.mw-help__h{
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  color: #222;
}

.mw-help__line{
  width: 92px;
  height: 2px;
  background: #222;
  margin: 10px auto 0;
  opacity: .7;
}

.mw-help__grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 26px;
}

.mw-help__card{
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  transition: transform .15s ease, box-shadow .15s ease;
}

.mw-help__card:hover{
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0,0,0,.06);
}

.mw-help__tag{
  font-size: 13px;
  color: #8c8c8c;
  margin-bottom: 8px;
}

.mw-help__title{
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  color: #222;
}

.mw-help__text{
  margin: 0 0 18px;
  color: #9b9b9b;
  line-height: 1.5;
}

.mw-help__link{
  color: #222;
  font-weight: 700;
  text-decoration: none;
}

.mw-help__link:hover{
  text-decoration: underline;
}

@media (max-width: 900px){
  .mw-help__grid{ grid-template-columns: 1fr; }
}

  /* Brand (logo + text) */
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo{
  width: 76px;
  height: 34px;
  object-fit: contain;
  border-radius: 10px;
}

.brand-text{
  line-height: 1;
}






