/* 
Theme Name: Hello Elementor Corto Child
Theme URI: https://corto.ee/
Description: Child theme for Corto.ee
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

/******** BODY ********/

html, body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > div[data-elementor-type="header"],
body > header {
  flex-shrink: 0;
}

body > div[data-elementor-type="single-page"],
body > main,
body > #content,
body > .site-main {
  flex: 1 0 auto;
}

body > div[data-elementor-type="footer"],
body > footer {
  margin-top: auto;
  flex-shrink: 0;
}

.elementor-widget-theme-post-content hr {
  padding: 10px 0;
  margin-top: 26px;
  border-top: 1px solid rgba(28, 74, 46, 0.12);
}

/************ Locations **************/

button[data-country="LV"] {
    display: none !important;
}

/************ HEADER **************/

/* MENU main */

.elementor-nav-menu .menu-item-has-children > a {
  cursor: pointer;
  pointer-events: auto;
}

/* MENU mobile */

.main-nav-mobile .elementor-nav-menu--dropdown .elementor-nav-menu > li:first-child {
    padding-top: 10px;
}

/* Hide Elementor default burger / close icons */
.elementor-menu-toggle__icon--open,
.elementor-menu-toggle__icon--close {
  display: none !important;
}

/* Toggle button box */
.elementor-menu-toggle {
  position: relative;
  width: 32px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Create 3 lines */
.elementor-menu-toggle::before,
.elementor-menu-toggle::after,
.elementor-menu-toggle span.menu-line {
  content: "";
  position: absolute;
  width: 20px;
  height: 2px;
  background-color: var(--e-global-color-text);
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}

/* Top line */
.elementor-menu-toggle::before {
  top: 5px;
}

/* Middle line */
.elementor-menu-toggle span.menu-line {
  top: 11px;
}

/* Bottom line */
.elementor-menu-toggle::after {
  top: 17px;
}

/* Active state -> turn into X */
.elementor-menu-toggle.elementor-active::before {
  top: 11px;
  transform: rotate(45deg);
  background-color: var( --e-global-color-f1c0eb9 ) !important;
}

.elementor-menu-toggle.elementor-active span.menu-line {
  opacity: 0;
}

.elementor-menu-toggle.elementor-active::after {
  top: 11px;
  transform: rotate(-45deg);
  background-color: var( --e-global-color-f1c0eb9 ) !important;
}

/* MENU mobile SUB ITEMS */

.elementor-nav-menu--dropdown .elementor-item.has-submenu .sub-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  margin-left: 8px;
}

.elementor-nav-menu--dropdown .elementor-item.has-submenu .sub-arrow svg {
  display: block;
  transition: transform 0.25s ease;
  transform-origin: center center;
}

.elementor-nav-menu--dropdown .elementor-item.has-submenu[aria-expanded="true"] .sub-arrow svg {
  transform: rotate(180deg);
}

.elementor-nav-menu .current-menu-ancestor > a,
.elementor-nav-menu .current-menu-parent > a,
.main-nav-mobile .sub-menu li.current-menu-item > a,
.main-nav-mobile .sub-menu li.current_page_item > a {
  /*color: var(--e-global-color-accent) !important;*/
  text-decoration: underline;
  font-weight: var( --e-global-typography-f3361c3-font-weight ) !important;
}

.elementor-nav-menu .current-menu-ancestor a .sub-arrow {
	fill: var(--e-global-color-accent);
}

/* LANG Switcher */

.corto-language-switcher {
    display: flex;
    align-items: center;
}

.corto-language-switcher .cpel-switcher__list {
    display: flex;
    align-items: center;
    gap: 0;
}

.corto-language-switcher .cpel-switcher__lang {
    display: flex;
    align-items: center;
}

.corto-language-switcher .cpel-switcher__lang + .cpel-switcher__lang::before {
    content: "/";
    display: inline-block;
    margin: 0 7px 0 0;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1;
    color: var( --e-global-color-7cc867e );
}

.footer-lang-switcher .cpel-switcher__lang + .cpel-switcher__lang::before {
  color: var( --e-global-color-c1e724c ) !important;
}




/* Mobile dropdown structure */
.main-nav-mobile .elementor-nav-menu--dropdown > ul.elementor-nav-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    position: relative;
}

/* Regular menu items remain full width */
.main-nav-mobile .elementor-nav-menu--dropdown > ul > li:not(.lang-item) {
    flex: 0 0 100% !important;
    width: 100% !important;
}

/* Language items appear beside each other */
.main-nav-mobile .elementor-nav-menu--dropdown > ul > li.lang-item {
    display: flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    align-items: center;
    padding-top: 18px;
    margin-top: 11px;
}

/* First language begins the language row */
.main-nav-mobile .elementor-nav-menu--dropdown > ul > li.lang-item-first {
    margin-left: 23px !important;
    position: relative;
}

/* Divider above languages */
.main-nav-mobile .elementor-nav-menu--dropdown > ul > li.lang-item-first::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: calc(100vw - 48px);
    border-top: 1px solid #dfe3df;
}

/* Language links */
.main-nav-mobile .elementor-nav-menu--dropdown .lang-item > a.elementor-item {
    display: inline-flex !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 0 28px !important;
    margin: 0 !important;
    background: transparent !important;
    color: #716d66 !important;
}

/* Slash */
.main-nav-mobile .elementor-nav-menu--dropdown .lang-item-en::before {
    content: "/";
    display: inline-flex;
    align-items: center;
    margin: 0 10px 31px;
    color: #716d66;
}

/* Current language */
.main-nav-mobile .elementor-nav-menu--dropdown .lang-item.current-lang > a {
    color: #194f35 !important;
}







/************ FOOTER **************/






/************ FRONTPAGE **************/

/* HERO SLIDER */

.home-hero-slider .swiper-pagination-bullet-active {
	width: 24px !important;
	transition: all 0.3s ease;
}

.home-hero-slider .swiper-pagination-bullet {
	border-radius: 3.40282e38px !important;
}

.home-hero-slider .elementor-background-overlay {
  background: linear-gradient(
      to right,
      rgba(10, 28, 16, 0.62),  /* left — dark, 62% opacity */
      rgba(10, 28, 16, 0.18),  /* middle — very faint, 18% opacity */
      transparent              /* right — fully clear */
  ) !important;
}



/* Desktop */
.home-hero-slider .swiper-slide-inner {
  width: 1337px;
}

/* Tablet */
@media (max-width: 1024px) {
  .home-hero-slider .swiper-slide-inner {
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .home-hero-slider .swiper-slide-inner {
    width: 100%;
  }
}



/* ========================================
   Corto News archive
======================================== */

.corto-news-grid .elementor-loop-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Each Elementor loop instance must stretch */
.corto-news-grid .e-loop-item {
    height: 100%;
}

/* Card */
.corto-news-grid .corto-news-card {
    height: 100%;
    background: #fff;
    border: 0 !important;
    border-radius: 18px;
    overflow: hidden;
}

/*
 * Elementor adds an inner wrapper because the card is e-con-boxed.
 * Stack image + content vertically.
 */
.corto-news-grid .corto-news-card > .e-con-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image container */
.corto-news-grid .corto-news-card .br-news-thumb {
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
}

/* Card image */
.corto-news-grid .corto-news-card .br-news-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Content */
.corto-news-grid .corto-news-card .br-news-content {
    flex: 1;
    padding: 22px 24px 24px;
}

/* Push Read more towards bottom when cards have different text lengths */
.corto-news-grid .br-news-content {
    display: flex;
    flex-direction: column;
}

.corto-news-grid .br-news-content .elementor-widget-button {
    margin-top: auto;
}

/* Tablet */
@media (max-width: 1024px) {
    .corto-news-grid .elementor-loop-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 767px) {
    .corto-news-grid .elementor-loop-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .corto-news-grid .corto-news-card {
        border-radius: 14px;
    }

    .corto-news-grid .corto-news-card .br-news-content {
        padding: 20px;
    }
}

/* ========================================
   BR Locator
======================================== */

.br-locator__email {
    color: var( --e-global-color-accent ) !important;
}
