/*
Template:       ranna
Theme Name:     Ranna Child Theme
Theme URI:      http://radiustheme.com/demo/wordpress/themes/ranna
Author:         RadiusTheme
Author URI:     http://radiustheme.com
Description:    Ranna is a clean and Modern WordPress Theme.  It is best suited for News, Blog, Tech Review, Fashion Magazine, Game Magazine 
Version:        1.0
Text Domain:    ranna
Tags: left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, translation-ready
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
/* ================================
   BLOQUEIO GLOBAL DE OVERFLOW
=============================== */
html, body{
  overflow-x: hidden;
  margin: 0 !important;
  padding: 0 !important;
}

/* ==========================================================
   IMAGENS DE POSTS / LISTAGENS E OVERVIEW (fora de widgets)
========================================================== */
:is(.wp-post-image, .post-thumbnail img, .entry-thumbnail img, .posts .thumbnail img, .gt-overview-box img){
  width: 100% !important;
  max-width: 750px;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}

/* =========================================
   MOBILE (≤768px) - posts/overview em 3:2
========================================= */
@media (max-width: 768px){
  :is(.wp-post-image, .post-thumbnail img, .entry-thumbnail img, .posts .thumbnail img, .gt-overview-box img){
    aspect-ratio: 3 / 2;
  }

  .single-recipe h1{ font-size: 26px !important; }
  .single-recipe .gt-content-body{
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* ===============================
   iOS MOBILE PATCH — Elementor Sticky Header
   Mantém o header ativo durante pull-to-refresh no iPhone
   (escopo: header do Elementor)
=============================== */

/* iOS Safari only */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px){
    /* Ajuste geral do container sticky ativo */
    .elementor-location-header .elementor-sticky.elementor-sticky--active{
      opacity: 1 !important;
      visibility: visible !important;

      /* Evita efeitos de esconder/transladar */
      transform: none !important;
      -webkit-transform: none !important;

      /* Força posição e camada estáveis */
      position: fixed !important;
      top: max(env(safe-area-inset-top), 0px) !important;
      left: 0 !important; right: 0 !important;
      width: 100% !important;
      z-index: 9999 !important;

      /* Ajuda de composição no iOS */
      will-change: transform;
      backface-visibility: hidden;
    }

    /* Garante que o SPACER não colapse (o Elementor usa ele para evitar "jump") */
    .elementor-location-header .elementor-sticky__spacer{
      visibility: visible !important;         /* o Elementor às vezes deixa hidden */
      height: var(--cm-sticky-h, 60px) !important;  /* ajuste se seu header for mais alto */
      min-height: var(--cm-sticky-h, 60px) !important;
    }

    /* Em alguns setups o Elementor aplica efeitos no sticky container */
    .elementor-location-header .elementor-sticky--effects{
      opacity: 1 !important;
      transform: none !important;
      -webkit-transform: none !important;
    }

    /* Evita “jitter” de largura medido pelo script em mudanças de viewport no iOS */
    .elementor-location-header .elementor-sticky.elementor-sticky--active[style*="width"]{
      width: 100% !important;
    }
  }
}
