/*
Theme Name:     Pixwell child
Template:      	pixwell
Theme URI:      https://tf01.themeruby.com
Author:         Theme-Ruby
Author URI:     https://themeforest.net/user/theme-ruby/portfolio/
Description:    Make your modifications to Pixwell in this child theme.
Version:        1.0
Tags:           custom-background, custom-menu, editor-style, featured-images, theme-options, custom-colors, translation-ready
License:        Themeforest Licence
License URI:    https://themeforest.net/licenses/standard
*/

/* Your CSS code goes here
-------------------------------------- */
/* === CLS: Pixwell Bild-Placeholders (verhindert Nachrutschen) === */
.rb-iwrap,
.rb-iwrap img { display:block; }

/* häufige Pixwell-Sizes – jeweils mit originalem Seitenverhältnis */
img.size-pixwell_1110x750 { aspect-ratio: 1110 / 750; height:auto; }
img.size-pixwell_780x0    { aspect-ratio: 780 / 520;  height:auto; }   /* 780x? ~ 3:2 im Theme */
img.size-pixwell_740x500  { aspect-ratio: 740 / 500;  height:auto; }
img.size-pixwell_400x600  { aspect-ratio: 400 / 600;  height:auto; }   /* Portrait */
img.size-pixwell_400x450  { aspect-ratio: 400 / 450;  height:auto; }
img.size-pixwell_370x250,
img.size-pixwell_370x250-2x,
img.size-pixwell_370x250-3x { aspect-ratio: 370 / 250; height:auto; }

img.attachment-pixwell_1110x750 { aspect-ratio: 1110 / 750; height:auto; }
img.attachment-pixwell_740x500  { aspect-ratio: 740 / 500;  height:auto; }
img.attachment-pixwell_370x250-3x { aspect-ratio: 370 / 250; height:auto; }

/* Fallback: wenn keine der obigen Klassen greift, nutze das Box-Seitenverhältnis des Wrappers */
.rb-iwrap { overflow:hidden; }
.rb-iwrap > img { width:100%; height:auto; }

/* === CLS: Ad-Slots fixieren (AdRotate) ============================ */
/* Passe die Selektoren an deine Widgets/Shortcodes an, falls nötig */
.adslot, .adrotate_widget, .adrotate-inline, .ad-container { display:block; width:100%; }

/* Desktop Leaderboard (z. B. 970x250 oder 728x90) – verwende das, was du wirklich ausspielst */
@media (min-width: 1025px){
  .adslot--leaderboard { max-width:970px; margin:0 auto; }
  .adslot--leaderboard::before{
    content:""; display:block; width:100%;
    /* ► Wähle EIN Verhältnis: */
    /* 970x250: */ padding-top: calc(250 / 970 * 100%);   /* = 25.77% Höhe */
    /* 728x90:   padding-top: calc(90 / 728 * 100%);  */
  }
}

/* Sidebar Medium Rectangle 300x250 */
.adslot--mrec { max-width:300px; }
.adslot--mrec::before{
  content:""; display:block; width:100%;
  padding-top: calc(250 / 300 * 100%); /* 83.33% */
}

/* Half Page 300x600 */
.adslot--halfpage { max-width:300px; }
.adslot--halfpage::before{
  content:""; display:block; width:100%;
  padding-top: calc(600 / 300 * 100%); /* 200% */
}

/* Mobile Banner 320x100 */
@media (max-width: 480px){
  .adslot--mobile { max-width:320px; margin:0 auto; }
  .adslot--mobile::before{
    content:""; display:block; width:100%;
    padding-top: calc(100 / 320 * 100%); /* 31.25% */
  }
}

/* Anzeigen-iframe/Bild füllt den Platzhalter aus */
.adslot iframe, .adslot img,
.adrotate_widget iframe, .adrotate_widget img {
  position:absolute; inset:0; width:100%; height:100%;
}
.adslot, .adrotate_widget { position:relative; min-height:1px; }
