/**
 * Double Button Fix
 * Fixes the issue where p.header-title with background creates a double button appearance
 */

/* Remove background from p.header-title when it contains a link */
p.header-title[style*="background"] > a,
p.header-title[style*="background"] > a.header-title {
    /* The link itself becomes the button - full width of container */
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Remove padding and background from parent p when it has a styled link inside */
p.header-title[style*="background"]:has(a[style*="padding"]) {
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Alternative approach if :has() is not supported */
p.header-title[style*="background:#f60"],
p.header-title[style*="background: #f60"],
p.header-title[style*="background:#ff6600"],
p.header-title[style*="background: #ff6600"],
p.header-title[style*="background:rgb(255, 102, 0)"],
p.header-title[style*="background: rgb(255, 102, 0)"] {
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 !important;
}

/* Ensure the inner link is properly styled as the single button */
p.header-title > a[style*="padding"],
p.header-title > a.header-title[style*="padding"] {
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
    background-color: #0066b3 !important; /* Blue button */
    background: #0066b3 !important;
    border-radius: 3px !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

/* Hover state for the inner link */
p.header-title > a[style*="padding"]:hover,
p.header-title > a.header-title[style*="padding"]:hover {
    background-color: #004d8a !important; /* Darker blue on hover */
    background: #004d8a !important;
    color: #ffffff !important;
}

/* Specific fix for "Zum Projekt" buttons */
p.header-title a[href*="meinzuhause"],
p.header-title a[target="_blank"] {
    background-color: #0066b3 !important;
    background: #0066b3 !important;
}

p.header-title a[href*="meinzuhause"]:hover,
p.header-title a[target="_blank"]:hover {
    background-color: #004d8a !important;
    background: #004d8a !important;
}

/* Clean up any double borders or shadows */
p.header-title[style*="background"] {
    border: none !important;
    box-shadow: none !important;
}

/* Ensure text centering is preserved */
p.header-title[style*="text-align: center"] {
    text-align: center !important;
}

p.header-title[style*="text-align: center"] > a {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
}