/*
 Theme Name:   GeneratePress Child - JG Montaż
 Theme URI:    https://jgmontaz.pl
 Description:  Motyw potomny GeneratePress dla JG Montaż – okna, drzwi, bramy garażowe
 Author:       JG Montaż Dev
 Author URI:   https://jgmontaz.pl
 Template:     generatepress
 Version:      1.0.1
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  generatepress-child
*/

/* =============================================================
   CSS CUSTOM PROPERTIES
============================================================= */
:root {
    --primary:      #1B2A4A;
    --secondary:    #2C3E50;
    --accent:       #D4A843;
    --accent-dark:  #B8912F;
    --bg-light:     #F5F6FA;
    --bg-white:     #FFFFFF;
    --text-dark:    #222222;
    --text-mid:     #555555;
    --text-light:   #FFFFFF;
    --shadow-sm:    0 2px 10px rgba(0, 0, 0, .08);
    --shadow-md:    0 8px 30px rgba(0, 0, 0, .12);
    --shadow-lg:    0 16px 50px rgba(0, 0, 0, .18);
    --radius:       12px;
    --transition:   .3s ease;
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =============================================================
   FULL-WIDTH / EDGE-TO-EDGE FIX
============================================================= */
body.jgm-fullwidth .site-content,
body.jgm-fullwidth .content-area,
body.jgm-fullwidth .entry-content,
body.jgm-fullwidth .site-main,
body.jgm-fullwidth .inside-article,
body.jgm-fullwidth .container,
body.jgm-fullwidth .grid-container,
body.jgm-fullwidth .inside-page-header {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.jgm-fullwidth article.post,
body.jgm-fullwidth article.page {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

body.jgm-fullwidth header.site-header,
body.jgm-fullwidth .site-header,
body.jgm-fullwidth nav.main-navigation,
body.jgm-fullwidth .main-navigation,
body.jgm-fullwidth footer.site-footer,
body.jgm-fullwidth .site-footer,
body.jgm-fullwidth .site-info,
body.jgm-fullwidth .footer-bar,
body.jgm-fullwidth .page-header,
body.jgm-fullwidth .entry-header {
    display: none !important;
}

body.jgm-fullwidth .site-content .content-area {
    width: 100% !important;
    float: none !important;
}

body.jgm-fullwidth aside#right-sidebar,
body.jgm-fullwidth aside#left-sidebar {
    display: none !important;
}

body.jgm-fullwidth,
body.jgm-fullwidth .site {
    overflow-x: hidden;
}

/* Odsuń treść od fixed headera na stronach LP */
body.jgm-fullwidth .site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* =============================================================
   RESET / TYPOGRAFIA
============================================================= */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
}

body.jgm-fullwidth img {
    display: block;
    max-width: 100%;
    height: auto;
}

body.jgm-fullwidth a {
    text-decoration: none;
}

body.jgm-fullwidth ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* =============================================================
   KLASY POMOCNICZE
============================================================= */
.jgm-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.jgm-section-tag {
    display: inline-block;
    background: rgba(212, 168, 67, .15);
    color: var(--accent-dark);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .35rem .9rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.jgm-section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
    margin-bottom: 1rem;
}

.jgm-section-subtitle {
    font-size: 1rem;
    color: var(--text-mid);
    max-width: 600px;
    margin-bottom: 3rem;
}

.jgm-section-header {
    margin-bottom: 3rem;
}

/* =============================================================
   PRZYCISKI
============================================================= */
.jgm-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 2rem;
    border-radius: 50px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    font-family: var(--font-primary);
    text-decoration: none;
}

.jgm-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.jgm-btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(212, 168, 67, .4);
}

.jgm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(212, 168, 67, .55);
    color: var(--primary);
}

.jgm-btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, .7);
}

.jgm-btn-outline:hover {
    background: rgba(255, 255, 255, .15);
    border-color: #fff;
    transform: translateY(-2px);
    color: #fff;
}

.jgm-btn-dark {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 20px rgba(27, 42, 74, .35);
}

.jgm-btn-dark:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(27, 42, 74, .45);
    color: #fff;
}

/* =============================================================
   HEADER
============================================================= */
.jgm-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    padding: 1.1rem 0;
    background: rgba(27, 42, 74, .85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: box-shadow var(--transition), background var(--transition);
}

.jgm-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
    background: rgba(27, 42, 74, .97);
}

.jgm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- LOGO --- */
.jgm-logo {
    display: flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
}

.jgm-logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -.5px;
    flex-shrink: 0;
}

.jgm-logo-img {
    max-height: 42px;
    width: auto;
}

.jgm-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.jgm-logo-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .5px;
}

.jgm-logo-sub {
    font-size: .65rem;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* --- NAV DESKTOP --- */
.jgm-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.jgm-nav a {
    color: rgba(255, 255, 255, .85);
    font-size: .88rem;
    font-weight: 500;
    padding: .5rem .85rem;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.jgm-nav a:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, .08);
}

.jgm-nav a.jgm-nav-cta,
.jgm-nav .jgm-nav-cta {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--primary);
    font-weight: 600;
    padding: .55rem 1.2rem;
    border-radius: 50px;
    margin-left: .5rem;
}

.jgm-nav a.jgm-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 168, 67, .45);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--primary);
}

/* --- HAMBURGER --- */
.jgm-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: .4rem;
    border-radius: 8px;
    background: transparent;
    border: none;
    transition: var(--transition);
}

.jgm-hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}

.jgm-hamburger.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.jgm-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.jgm-hamburger.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* --- MOBILE NAV --- */
.jgm-mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(27, 42, 74, .97);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    padding: 1.5rem;
    flex-direction: column;
    gap: .5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
    z-index: 9998;
    animation: jgm-slideDown .3s ease;
}

.jgm-mobile-nav.open {
    display: flex;
}

.jgm-mobile-nav a {
    color: rgba(255, 255, 255, .85);
    font-size: 1rem;
    font-weight: 500;
    padding: .85rem 1rem;
    border-radius: 10px;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    text-decoration: none;
}

.jgm-mobile-nav a:last-child {
    border-bottom: none;
}

.jgm-mobile-nav a:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, .07);
}

/* =============================================================
   FOOTER
============================================================= */
.jgm-footer {
    background: var(--secondary);
    padding: 60px 0 0;
    color: rgba(255, 255, 255, .75);
}

.jgm-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.jgm-footer-brand .jgm-logo {
    margin-bottom: 1rem;
}

.jgm-footer-brand p {
    font-size: .87rem;
    line-height: 1.7;
    max-width: 280px;
    color: rgba(255, 255, 255, .65);
}

.jgm-footer-social {
    display: flex;
    gap: .75rem;
    margin-top: 1.5rem;
}

.jgm-footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, .1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: #fff;
    text-decoration: none;
}

.jgm-footer-social a:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-2px);
}

.jgm-footer-social a svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.jgm-footer-col h4 {
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 1.25rem 0;
}

.jgm-footer-col ul {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.jgm-footer-col ul li {
    margin: 0;
}

.jgm-footer-col ul li a {
    font-size: .87rem;
    color: rgba(255, 255, 255, .65);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
}

.jgm-footer-col ul li a::before {
    content: '›';
    color: var(--accent);
    font-weight: 700;
}

.jgm-footer-col ul li a:hover {
    color: var(--accent);
}

.jgm-footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    font-size: .87rem;
    color: rgba(255, 255, 255, .65);
    margin-bottom: .75rem;
}

.jgm-footer-contact-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-top: 3px;
    flex-shrink: 0;
}

.jgm-footer-contact-item a {
    color: rgba(255, 255, 255, .65);
    transition: var(--transition);
    text-decoration: none;
}

.jgm-footer-contact-item a:hover {
    color: var(--accent);
}

.jgm-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    font-size: .8rem;
    color: rgba(255, 255, 255, .4);
    flex-wrap: wrap;
    gap: .5rem;
}

.jgm-footer-bottom p {
    margin: 0;
}

.jgm-footer-bottom span {
    color: var(--accent);
}

/* =============================================================
   ANIMACJE
============================================================= */
@keyframes jgm-fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes jgm-slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes jgm-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(6px); }
}

/* =============================================================
   RESPONSIVE – HEADER / FOOTER
============================================================= */
@media (max-width: 900px) {
    .jgm-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .jgm-nav {
        display: none;
    }

    .jgm-hamburger {
        display: flex;
    }

    .jgm-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .jgm-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* =============================================================
   GLOBAL FIX – przeciwko nadpisywaniu przez GeneratePress
============================================================= */

/* TAGI – zawsze inline-block */
.jgm-section-tag {
    display: inline-block !important;
    width: auto !important;
    max-width: max-content !important;
}

/* PRZYCISKI – zawsze inline-flex, auto width */
a.jgm-btn,
button.jgm-btn,
.jgm-btn {
    display: inline-flex !important;
    width: auto !important;
    max-width: max-content !important;
    text-decoration: none !important;
    box-sizing: border-box;
}

/* Reset stylów linków w przyciskach */
a.jgm-btn,
a.jgm-btn:hover,
a.jgm-btn:focus,
a.jgm-btn:visited,
a.jgm-btn:active {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Sekcje – zabezpieczenie przed inheritem GP */
[class^="jgm-"] a {
    box-shadow: none;
}