/*======================================
Theme Name: Rännakupraktik Nele Tasane
Theme URI: https://divicake.com/
Description: Rännakupraktik Nele Tasane ametlik koduleht
Version: 1.0
Author: Urho Rättel
Author URI: https://www.facebook.com/urho.rattel
Template: Divi
======================================*/


/* You can add your own CSS styles here. Use !important to overwrite styles if needed. */

/* ============================================================
   CLAMP FORMULA REFERENCE
   Kahte vahemikku kasutatakse:
     Range A: 320px → 1440px  (sm → lg)
     Range B: 1440px → 2560px (lg → xl)

   Valem ühele vahemikule:
     clamp(MIN, PREFERRED, MAX)
     PREFERRED = MIN + (MAX - MIN) * (100vw - 320px) / (1440 - 320)
               = calc(MINpx + (MAX - MIN) * ((100vw - 320px) / 1120))

   Kahe vahemiku jaoks kasutame CSS media query-ga:
     @media (max-width: 1440px) → Range A clamp
     @media (min-width: 1440px) → Range B clamp
   ============================================================ */


/* ============================================================
   1. FONT FACE DECLARATIONS
   ============================================================ */

@font-face {
  font-family: 'Satoshi-Variable';
  src: url('/wp-content/themes/fonts/Satoshi-Variable.woff2') format('woff2');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sentient-Variable';
  src: url('/wp-content/themes/fonts/Sentient-Variable.woff2') format('woff2');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}


/* ============================================================
   2. CSS CUSTOM PROPERTIES — FLUID TYPE SCALE
   ============================================================ */

:root {
  /* --- H1 --- */
  --fs-h1-a: clamp(2.25rem, calc(2.25rem + 28 * ((100vw - 20rem) / 70)), 4rem);
  --fs-h1-b: clamp(4rem, calc(4rem + 8 * ((100vw - 90rem) / 70)), 4.5rem);

  /* --- H2 --- */
  --fs-h2-a: clamp(0.625rem, calc(0.625rem + 4 * ((100vw - 20rem) / 70)), 0.875rem);
  --fs-h2-b: clamp(0.875rem, calc(0.875rem + 2 * ((100vw - 90rem) / 70)), 1rem);

  /* --- H3 --- */
  --fs-h3-a: clamp(1.5rem, calc(1.5rem + 12 * ((100vw - 20rem) / 70)), 2.25rem);
  --fs-h3-b: clamp(2.25rem, calc(2.25rem + 4 * ((100vw - 90rem) / 70)), 2.5rem);

  /* --- H4 --- */
  --fs-h4-a: clamp(1.375rem, calc(1.375rem + 4 * ((100vw - 20rem) / 70)), 1.625rem);
  --fs-h4-b: clamp(1.625rem, calc(1.625rem + 2 * ((100vw - 90rem) / 70)), 1.75rem);

  /* --- Display --- */
  --fs-display-a: clamp(3rem, calc(3rem + 44 * ((100vw - 20rem) / 70)), 5.75rem);
  --fs-display-b: clamp(5.75rem, calc(5.75rem + 12 * ((100vw - 90rem) / 70)), 6.5rem);

  /* --- Nav / H2 sama skaala --- */
  --fs-nav-a: var(--fs-h2-a);
  --fs-nav-b: var(--fs-h2-b);

  /* --- Body medium --- */
  --fs-body-md-a: clamp(0.75rem, calc(0.75rem + 0.3125 * ((100vw - 20rem) / 70)), 1.0625rem);
  --fs-body-md-b: clamp(1.0625rem, calc(1.0625rem + 0.3125 * ((100vw - 90rem) / 70)), 1.375rem);

  /* --- Body small --- */
  --fs-body-sm-a: clamp(0.625rem, calc(0.625rem + 4 * ((100vw - 20rem) / 70)), 1rem);
  --fs-body-sm-b: clamp(0.875rem, calc(0.875rem + 2 * ((100vw - 90rem) / 70)), 1rem);

  /* --- Link label lg --- */
  --fs-link-lg-a: clamp(1.5rem, calc(1.5rem + 12 * ((100vw - 20rem) / 70)), 2.25rem);
  --fs-link-lg-b: clamp(2.25rem, calc(2.25rem + 4 * ((100vw - 90rem) / 70)), 2.5rem);

  /* --- Link label sm --- */
  --fs-link-sm-a: clamp(0.75rem, calc(0.75rem + 4 * ((100vw - 20rem) / 70)), 1rem);
  --fs-link-sm-b: clamp(1rem, calc(1rem + 2 * ((100vw - 90rem) / 70)), 1.125rem);

  /* --- Button label --- */
  --fs-btn-a: clamp(0.875rem, calc(0.875rem + 2 * ((100vw - 20rem) / 70)), 1rem);
  --fs-btn-b: clamp(1rem, calc(1rem + 2 * ((100vw - 90rem) / 70)), 1.125rem);

  /* --- Font families --- */
  --font-satoshi: 'Satoshi-Variable', system-ui, sans-serif;
  --font-sentient: 'Sentient-Variable', Georgia, serif;

  /* --- Line heights --- */
  --lh-100: 1;
  --lh-110: 1.1;
  --lh-120: 1.2;
  --lh-160: 1.6;

  /* --- Letter spacing --- */
  --ls-tight: -0.04em;
  --ls-none:   0em;
}


/* ============================================================
   3. BASE RESET & BOX MODEL
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-satoshi) !important;
  font-size: var(--fs-body-md-a) !important;
  line-height: var(--lh-160) !important;
  letter-spacing: var(--ls-none) !important;
  font-weight: 400;
}


/* ============================================================
   4. TÜPOGRAAFIA — Range A (max-width: 1440px)
   ============================================================ */

h1,
.h1,
.et_pb_text h1 {
  font-family: var(--font-sentient) !important;
  font-size: var(--fs-h1-a) !important;
  line-height: var(--lh-100) !important;
  letter-spacing: var(--ls-tight) !important;
  font-weight: 300 !important;
}

h2,
.h2,
.et_pb_text h2 {
  font-family: var(--font-satoshi) !important;
  font-size: var(--fs-h2-a) !important;
  line-height: var(--lh-110) !important;
  letter-spacing: var(--ls-none) !important;
  font-weight: 500;
}

h3,
.h3,
.et_pb_text h3 {
  font-family: var(--font-sentient) !important;
  font-size: var(--fs-h3-a) !important;
  line-height: var(--lh-120) !important;
  letter-spacing: var(--ls-tight) !important;
  font-weight: 300 !important;
}

h4,
.h4,
.et_pb_text h4 {
  font-family: var(--font-sentient) !important;
  font-size: var(--fs-h4-a) !important;
  line-height: var(--lh-120) !important;
  letter-spacing: var(--ls-none) !important;
  font-weight: 400;
}

.display,
.et_pb_text .display {
  font-family: var(--font-sentient) !important;
  font-size: var(--fs-display-a) !important;
  line-height: var(--lh-110) !important;
  letter-spacing: var(--ls-tight) !important;
  font-weight: 400;
}

p,
.body-medium,
.et_pb_text p {
  font-family: var(--font-satoshi) !important;
  font-size: var(--fs-body-md-a) !important;
  line-height: var(--lh-160) !important;
  letter-spacing: var(--ls-none) !important;
  font-weight: 400;
}

.body_sm,
.body_sm p,
.body_sm .et_pb_text_inner,
.body_sm .et_pb_text_inner p,
.body_sm li,
.body_sm span,
.body_sm div {
  font-family: var(--font-satoshi) !important;
  font-size: var(--fs-body-sm-a) !important;
  line-height: var(--lh-160) !important;
  letter-spacing: var(--ls-none) !important;
  font-weight: 700;
}

.link-label-lg,
.links-sm {
  font-family: var(--font-satoshi) !important;
  font-size: var(--fs-link-lg-a) !important;
  line-height: var(--lh-100) !important;
  letter-spacing: var(--ls-none) !important;
  font-weight: 500;
}

.link-label-sm {
  font-family: var(--font-satoshi) !important;
  font-size: var(--fs-link-sm-a) !important;
  line-height: var(--lh-100) !important;
  letter-spacing: var(--ls-none) !important;
  font-weight: 500;
}

.button-label,
.et_pb_button,
button,
input[type="submit"],
input[type="button"] {
  font-family: var(--font-sentient) !important;
  font-size: var(--fs-btn-a) !important;
  line-height: var(--lh-100) !important;
  letter-spacing: var(--ls-none) !important;
  font-weight: 500;
}


/* ============================================================
   5. TÜPOGRAAFIA — Range B (min-width: 1440px)
   ============================================================ */

@media (min-width: 1440px) {

  body {
    font-size: var(--fs-body-md-b) !important;
  }

  h1, .h1, .et_pb_text h1 {
    font-size: var(--fs-h1-b) !important;
  }

  h2, .h2, .et_pb_text h2 {
    font-size: var(--fs-h2-b) !important;
  }

  h3, .h3, .et_pb_text h3 {
    font-size: var(--fs-h3-b) !important;
  }

  h4, .h4, .et_pb_text h4 {
    font-size: var(--fs-h4-b) !important;
  }

  .display, .et_pb_text .display {
    font-size: var(--fs-display-b) !important;
  }

  p, .body-medium, .et_pb_text p {
    font-size: var(--fs-body-md-b) !important;
  }

  .body_sm,
  .body_sm p,
  .body_sm .et_pb_text_inner,
  .body_sm .et_pb_text_inner p,
  .body_sm li,
  .body_sm span,
  .body_sm div {
    font-size: var(--fs-body-sm-b) !important;
  }

  .link-label-lg, .links-sm {
    font-size: var(--fs-link-lg-b) !important;
  }

  .link-label-sm {
    font-size: var(--fs-link-sm-b) !important;
  }

  .button-label,
  .et_pb_button,
  button,
  input[type="submit"],
  input[type="button"] {
    font-size: var(--fs-btn-b) !important;
  }

  /* --- Nav Range B --- */
  .et_pb_menu__menu .et-menu.nav > li > a,
  #menu-first > li > a,
  .et_mobile_menu li a {
    font-size: var(--fs-nav-b) !important;
  }
}


/* ============================================================
   6. FONT-WEIGHT UTILITY CLASSES
   ============================================================ */

.fw_300,
.fw_300 p,
.fw_300 span,
.fw_300 a,
.fw_300 li,
.fw_300 .et_pb_text_inner,
.fw_300 .et_pb_text_inner p,
.fw_300 .et_pb_text_inner span,
.fw_300 .et_pb_text_inner a,
.fw_300 .et_pb_text_inner li {
  font-weight: 300 !important;
}

.fw_400,
.fw_400 p,
.fw_400 span,
.fw_400 a,
.fw_400 li,
.fw_400 .et_pb_text_inner,
.fw_400 .et_pb_text_inner p,
.fw_400 .et_pb_text_inner span,
.fw_400 .et_pb_text_inner a,
.fw_400 .et_pb_text_inner li {
  font-weight: 400 !important;
}

.fw_600,
.fw_600 p,
.fw_600 span,
.fw_600 a,
.fw_600 li,
.fw_600 .et_pb_text_inner,
.fw_600 .et_pb_text_inner p,
.fw_600 .et_pb_text_inner span,
.fw_600 .et_pb_text_inner a,
.fw_600 .et_pb_text_inner li {
  font-weight: 600 !important;
}

.fw_700,
.fw_700 p,
.fw_700 span,
.fw_700 a,
.fw_700 li,
.fw_700 .et_pb_text_inner,
.fw_700 .et_pb_text_inner p,
.fw_700 .et_pb_text_inner span,
.fw_700 .et_pb_text_inner a,
.fw_700 .et_pb_text_inner li {
  font-weight: 700 !important;
}


/* ============================================================
   7. ACCESSIBILITY — reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ============================================================
   8. NAVIGATION – Desktop & Mobile
   Font: Satoshi-Variable | Divi 5 child theme
   ============================================================ */

/* --- Nav link base – Range A (desktop + mobile) --- */
.et_pb_menu__menu .et-menu.nav > li > a,
#menu-first > li > a,
.et_mobile_menu li a {
  font-family: var(--font-satoshi) !important;
  font-weight: 600 !important;
  font-size: var(--fs-nav-a) !important;
  color: #214235 !important;
  position: relative;
  display: inline-block;
  text-decoration: none;
}

/* --- Dot indicator (DESKTOP ONLY) --- */
.et_pb_menu__menu .et-menu.nav > li > a::after,
#menu-first > li > a::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: transparent;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  transition: background-color 0.2s ease;
}

/* --- Dot: hover (DESKTOP ONLY) --- */
.et_pb_menu__menu .et-menu.nav > li:hover > a::after,
#menu-first > li:hover > a::after {
  background-color: #8A4F61;
}

/* --- Dot: active / current page (DESKTOP ONLY) --- */
.et_pb_menu__menu .et-menu.nav > li.current-menu-item > a::after,
.et_pb_menu__menu .et-menu.nav > li.current_page_item > a::after,
#menu-first > li.current-menu-item > a::after,
#menu-first > li.current_page_item > a::after {
  background-color: #8A4F61;
}

/* --- Link color: hover --- */
.et_pb_menu__menu .et-menu.nav > li > a:hover,
#menu-first > li > a:hover,
.et_mobile_menu li a:hover {
  color: #2c2a28 !important;
}

/* --- Link color: active / current page --- */
.et_pb_menu__menu .et-menu.nav > li.current-menu-item > a,
.et_pb_menu__menu .et-menu.nav > li.current_page_item > a,
#menu-first > li.current-menu-item > a,
#menu-first > li.current_page_item > a,
.et_mobile_menu li.current-menu-item > a,
.et_mobile_menu li.current_page_item > a {
  color: #214235 !important;
}

/* ============================================================
   BUTTON 100% WIDTH ON TABLET & MOBILE
============================================================ */

@media (max-width: 980px) { /* Tablet + Mobile */
    /* 1. Divi Builderi nupud */
    .et_pb_button_module_wrapper {
        width: 100% !important;
        display: block !important;
    }
    
    .et_pb_button {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    
    /* 2. WooCommerce nupud (kui kasutad) */
    .woocommerce .button,
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button,
    .single_add_to_cart_button,
    .product .button {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
    }
    
    /* 3. Divi WooCommerce mooduli nupud */
    .et_pb_wc_add_to_cart form.cart .button {
        width: 100% !important;
        display: block !important;
    }
    
    /* 4. Divi Contact Form nupud */
    .et_pb_contact_submit {
        width: 100% !important;
        display: block !important;
    }
    
    /* 5. Kõik muud võimalikud nupud */
    button,
    .button,
    input[type="submit"],
    input[type="button"] {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
    }
}
/* ============================================================
   9. FOOTER NAV — Link Module (.et_pb_link)
   Dot paremal pool teksti, vertikaalselt tsentreeritud
   ============================================================ */

.et_pb_link[class*="tb_footer"] {
  text-decoration: none;
}

.et_pb_link[class*="tb_footer"] .et_pb_link_text {
  font-family: var(--font-satoshi) !important;
  font-weight: 600 !important;
  color: #214235 !important;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --- Dot indicator (paremal, vertikaalselt keskel) --- */
.et_pb_link[class*="tb_footer"] .et_pb_link_text::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: transparent;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

/* --- Dot: hover --- */
.et_pb_link[class*="tb_footer"]:hover .et_pb_link_text::after {
  background-color: #8A4F61;
}

/* --- Link color: hover --- */
.et_pb_link[class*="tb_footer"]:hover .et_pb_link_text {
  color: #8A4F61 !important;
}