/*
Theme Name: metalo-plastyka
Theme URI: 
Author: 
Author URI: 
Description: 
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 5.7
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: twentytwentyfive
Text Domain: metalo-plastyka
Tags: 
*/



/* Styl dla ekranów o szerokości poniżej 700px */
@media (max-width: 600px) {   }



a { transition: 0.3s; }

a.wp-block-button__link:hover { background-color: var(--wp--preset--color--accent-1);}

/* Sprawia, że pole w formularzu wygląda jak zwykły tekst */
input[name="model-ogrodzenia"] {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    outline: none !important;
    color: inherit !important;
    font-weight: bold;
    display: inline-block;
    width: auto;
}



.wp-site-blocks {
    background-color: #fff;
	max-width: 1920px;
	margin: 0 auto;
}

ul.menu-glowne li{ padding: 10px; }
ul.menu-glowne li ul li{ padding: 0; font-size: 0.875rem;}
ul.menu-glowne li.current-menu-item { background-color: #ff0033!important; border-radius: 10px;}

.menu-stopka ul { width: 100%;}
.menu-stopka li { width:100%; padding: 5px; border-bottom: 1px solid var(--wp--preset--color--accent-5);}
.menu-stopka li a { padding: 5px ; width: 100%; }
.menu-stopka li a:hover { background-color: var(--wp--preset--color--accent-5);}
.menu-stopka li.current-menu-item a { color: var(--wp--preset--color--accent-2)!important;}



/* Ukrywa strzałki i rozwijane listy w menu z klasą footer-no-child */
.footer-no-child .wp-block-navigation-item__content + svg, 
.footer-no-child .wp-block-navigation__submenu-container {
    display: none !important;
}

/* Usuwa interakcję najechania dla elementów podrzędnych */
.footer-no-child .has-child:hover > .wp-block-navigation__submenu-container {
    display: none !important;
}


/* ucinane submenu */

.wp-block-cover,
.wp-block-cover__inner-container,
.wp-block-group,
.wp-block-template-part {
    overflow: visible !important;
}

.wp-block-navigation-submenu {
    position: relative;
}

.wp-block-navigation__submenu-container {
    z-index: 9999 !important;
}


/* Wymuszenie szerokości opartej na zawartości (najskuteczniejsze) */
.wp-block-navigation .wp-block-navigation-item.has-child .wp-block-navigation-submenu__container {
    width: max-content !important; 
    min-width: 250px !important; /* Możesz zwiększyć tę wartość */
}

/* Zablokowanie zawijania tekstu wewnątrz linków menu */
.wp-block-navigation .wp-block-navigation-submenu__container .wp-block-navigation-item__content {
    white-space: nowrap !important;
    display: block !important;
}

/* Opcjonalnie: upewnienie się, że strzałka rozwijania nie spycha tekstu */
.wp-block-navigation-item__label {
    display: inline-block !important;
}




/* style dla galerii zdjęć w produktach */
.wp-block-gallery figure {
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.wp-block-gallery img {
    transition:
        transform .5s ease,
        filter .4s ease;
    display: block;
    width: 100%;
}

/* overlay */
.wp-block-gallery figure::before {
    content: "+";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.8);
    font-size: 94px;
    font-weight: lighter;
    color: white;
    opacity: 0;
    z-index: 2;
    transition:
        opacity .35s ease,
        transform .35s ease;
    pointer-events: none;
}

/* dark layer */
.wp-block-gallery figure::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background .35s ease;
    z-index: 1;
    pointer-events: none;
}

/* hover */
.wp-block-gallery figure:hover img {
   
    filter: brightness(.72);
}

.wp-block-gallery figure:hover::after {
    background: rgba(0,0,0,.18);
}

.wp-block-gallery figure:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}


/* box w ogrodzeniach */

h2.h2cover a {  padding: 20px 0; width: 100%;}
h2.h2cover a:hover {  color: red; text-decoration: none;}







/*  kod zmienia zachowanie obrazków w ofercie tak aby nie były przeskalowywane powyżej wielkości ekranu 690px   */

/*
@media (min-width: 690px) {

    .wp-block-gallery.has-nested-images {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
    }

    .wp-block-gallery.has-nested-images .wp-block-image {
        flex-grow: 0 !important;
        flex-basis: 278px !important;
        max-width: 278px !important;
    }

    .wp-block-gallery.has-nested-images .wp-block-image img {
        width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
    }
}
*/


/* menu w ofertach right sidebar */

.menu-right-oferta ul { width: 100%;}
.menu-right-oferta ul li  { width: 100%;}
.menu-right-oferta ul li a {  width: 100%; border-bottom: 1px solid  var(--wp--preset--color--accent-4); padding: 5px 10px;}
.menu-right-oferta ul li a:hover { color: #fff!important; background-color: var(--wp--preset--color--accent-4);  padding-left: 15px; }
.menu-right-oferta a.active-menu-item { background-color:  var(--wp--preset--color--accent-4); color:#fff!important;}


/* klasa */
.no-padding { padding: 0!important;}





/* instrukcja dla mniejszych ekranów */


@media (max-width: 600px) { 
    div.wp-block-media-text__content { margin-top: 2em; }
  }




  /* menu mobilne stylizacja */


  @media (max-width: 768px) {

    /* całe menu mobilne */

    /*
    .wp-block-navigation__responsive-container-content {
      
    } */

    /* elementy menu */
    .wp-block-navigation-item {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* linki */
    .wp-block-navigation-item__content {
        padding: 5px !important;

        line-height: 1.2;
    }

    /* odstępy między pozycjami */
    .wp-block-navigation__container {
        gap: 6px !important;
    }

    /* przycisk zamknięcia */
    .wp-block-navigation__responsive-container-close {
        top: 16px;
        right: 16px;
    }
}


/* mapki dla zmian języków */

/* usuwa kropki z listy */
.wp-block-polylang-language-switcher {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex; /* ustawia poziomo */
  gap: 10px;     /* odstęp między flagami */
  align-items: center;
}

/* usuwa kropki z LI (na wszelki wypadek) */
.wp-block-polylang-language-switcher li {
  list-style: none;
}

/* powiększa flagi 2x */
/*
.wp-block-polylang-language-switcher img {
  width: 32px !important;
  height: 22px !important;
  display: block;
}
  */



/* kod do .oferta-grid - w pętli mamy cover -> tytuł który jest linkiem do treści - kod wypełnia linkiem cały blok cover  */

.oferta-grid .hover-effect {
    position: relative;
    overflow: hidden;
}

/* kontener wewnętrzny */
.oferta-grid .hover-effect .wp-block-cover__inner-container {
    position: absolute;
    inset: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* tytuł */
.oferta-grid .hover-effect .wp-block-post-title {
    position: static;
    margin: 0;
    width: 100%;
    height: 100%;
}

/* link */
.oferta-grid .hover-effect .wp-block-post-title a {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.30);
    color: #fff;
    text-decoration: none;

    transition:
        background 0.3s ease,
        font-size 0.3s ease;
}

/* hover */
.oferta-grid .hover-effect .wp-block-post-title a:hover {
    background: rgba(0, 0, 0, 0.5);
   /* font-size: 20px; */ 
}

/* end -  kod do .oferta-grid */




/* formularz kontaktowy */


/* Kontener formularza */
.wpcf7 form {
    max-width: 720px;
    margin: 40px auto;
    padding: 10px 40px 0 40px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.08);
}

/* Odstępy */
.wpcf7 p {
    margin-bottom: 24px;
}

/* Label */
.wpcf7 label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

/* Inputy i textarea */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
    width: 100%;
    padding: 16px 18px;
    margin-top: 8px;
    border: 1px solid #dcdcdc;
    border-radius: 14px;
    background: #f8f9fb;
    font-size: 14px;
    color: #222;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

/* Focus */
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 textarea:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

/* Textarea */
.wpcf7 textarea {
    min-height: 180px;
    resize: vertical;
}

/* Placeholder */
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
    color: #999;
}

/* Button */
.wpcf7 input[type="submit"] {
    display: inline-block;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    background-color: var(--wp--preset--color--accent-2); 
    color: #fff;
    font-size: 16px;
    
    cursor: pointer;
    transition: all 0.25s ease;
}

/* Hover button */
.wpcf7 input[type="submit"]:hover {
   /* transform: translateY(-2px); */
   /* box-shadow: 0 10px 20px rgba(37,99,235,0.25); */
   background-color: var(--wp--preset--color--accent-1); 
}

/* Komunikaty */
.wpcf7-response-output {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
}

/* Walidacja */
.wpcf7-not-valid-tip {
    margin-top: 6px;
    font-size: 13px;
    color: var(--wp--preset--color--accent-2); 
}

/* Mobile */
@media (max-width: 768px) {
    .wpcf7 form {
        padding: 24px;
        border-radius: 18px;
    }

    .wpcf7 input[type="text"],
    .wpcf7 input[type="email"],
    .wpcf7 textarea {
        padding: 14px;
    }
}

/* Pole upload pliku */
.wpcf7 input[type="file"] {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

/* Hover */
.wpcf7 input[type="file"]:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

/* Focus */
.wpcf7 input[type="file"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

/* Styl przycisku wyboru pliku */
.wpcf7 input[type="file"]::file-selector-button {
    margin-right: 14px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease;
}

/* Hover przycisku */
.wpcf7 input[type="file"]::file-selector-button:hover {
    background: #1d4ed8;
}