/*
Theme Name: Altenheimefinden GP Child
Theme URI: https://altenheimefinden.de/
Description: Child theme de GeneratePress para la migración 1:1 de Altenheimefinden HTML a WordPress.
Author: Altenheimefinden
Template: generatepress
Version: 1.5.0
Text Domain: altenheimefinden-gp-child
*/

:root{--af-content-width:1100px}
body.af-imported-page{overflow-x:hidden}
body.af-imported-page #page.grid-container,
body.af-imported-page .site.grid-container,
body.af-imported-page .site-content.grid-container{max-width:var(--af-content-width)!important;width:calc(100% - 24px)!important;margin-left:auto!important;margin-right:auto!important}
body.af-imported-page #primary,body.af-imported-page .content-area{width:100%!important;float:none!important}
body.af-imported-page .site-main{margin:0!important}
body.af-imported-page .inside-article{padding:0!important;background:transparent!important}
body.af-imported-page .entry-content{margin:0!important}
body.af-imported-page .entry-header{display:none!important}
body.af-imported-page .widget-area{display:none!important}
.af-imported-content{width:100%;max-width:1100px;margin:0 auto;overflow:clip}
.af-imported-content .wrap,.af-imported-content .master-wrap{width:min(1100px,calc(100% - 32px))!important;max-width:1100px!important;margin-left:auto!important;margin-right:auto!important}
.af-imported-content .master-hero{max-width:1100px!important}
.af-imported-content img{max-width:100%;height:auto}
@media(max-width:768px){
 body.af-imported-page #page.grid-container,body.af-imported-page .site.grid-container,body.af-imported-page .site-content.grid-container{width:100%!important;max-width:100%!important}
 .af-imported-content{max-width:100%}
 .af-imported-content .wrap,.af-imported-content .master-wrap{width:min(100% - 20px,1100px)!important}
}


/* v1.2: hardening para GeneratePress y WP All Import */
body.af-imported-page .site-content{display:block!important;}
body.af-imported-page #primary{max-width:1100px!important;margin:0 auto!important;}
body.af-imported-page article.page{margin:0!important;padding:0!important;}
body.af-imported-page .inside-article{max-width:1100px!important;width:100%!important;margin:0 auto!important;}
body.af-imported-page .entry-content{max-width:1100px!important;width:100%!important;margin:0 auto!important;}
body.af-imported-page .af-imported-content{max-width:1100px!important;width:100%!important;margin:0 auto!important;}
@media (max-width:1124px){body.af-imported-page #primary,body.af-imported-page .inside-article,body.af-imported-page .entry-content,body.af-imported-page .af-imported-content{max-width:100%!important;}}


/* v1.3 - Footer Altenheimefinden */
.site-info{background:#0d2238!important;color:#dce7f1!important;padding:0!important;text-align:left!important}
.site-info .inside-site-info{max-width:none!important;padding:0!important;display:block!important}
.site-info .copyright-bar{width:100%!important;float:none!important;margin:0!important}
.af-wp-footer{background:#0d2238;color:#dce7f1;width:100%;font-size:15px;line-height:1.55}
.af-wp-footer-grid{width:min(1100px,calc(100% - 40px));margin:0 auto;display:grid;grid-template-columns:minmax(260px,1.55fr) repeat(3,minmax(150px,1fr));gap:48px;padding:58px 0 42px}
.af-wp-footer a{color:#dce7f1;text-decoration:none}
.af-wp-footer a:hover,.af-wp-footer a:focus{color:#fff;text-decoration:underline;text-underline-offset:3px}
.af-wp-footer-brand-link{display:inline-flex;align-items:center;min-height:44px;margin-bottom:16px}
.af-wp-footer-brand-link strong{font-size:23px;color:#fff;letter-spacing:-.02em}
.af-wp-footer-brand-link .custom-logo-link{display:inline-flex}
.af-wp-footer-brand-link img,.af-wp-footer-brand .custom-logo{max-width:210px!important;max-height:64px!important;width:auto!important;height:auto!important;object-fit:contain}
.af-wp-footer-brand p{max-width:390px;margin:0 0 20px;color:#b9c9d7}
.af-wp-footer-contact{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 15px;border:1px solid rgba(255,255,255,.26);border-radius:8px;font-weight:700}
.af-wp-footer-col{display:flex;flex-direction:column;align-items:flex-start;gap:9px}
.af-wp-footer-col h2{font-size:16px!important;line-height:1.3!important;color:#fff!important;margin:0 0 8px!important;font-weight:700!important}
.af-wp-footer-col a{font-size:14px}
.af-wp-footer-bottom{border-top:1px solid rgba(255,255,255,.13);width:min(1100px,calc(100% - 40px));margin:0 auto;padding:19px 0 23px;display:flex;align-items:center;justify-content:space-between;gap:24px;color:#9fb2c2;font-size:13px}
@media(max-width:900px){.af-wp-footer-grid{grid-template-columns:1.4fr 1fr;gap:34px}.af-wp-footer-brand{grid-column:1/-1}}
@media(max-width:600px){.af-wp-footer-grid{width:min(100% - 28px,1100px);grid-template-columns:1fr;gap:28px;padding:42px 0 30px}.af-wp-footer-brand{grid-column:auto}.af-wp-footer-bottom{width:min(100% - 28px,1100px);flex-direction:column;align-items:flex-start;gap:6px}.af-wp-footer-col a{min-height:38px;display:flex;align-items:center}}


/* v1.4 - Header + menu + logo + favicon */
/* Ocultar cabecera y navegación nativas de GeneratePress. */
.site-header,
#site-navigation,
.main-navigation{display:none!important}

.af-site-header{width:100%;background:#fff;border-bottom:1px solid #e8eef3;position:relative;z-index:999;box-shadow:0 2px 12px rgba(20,43,65,.04)}
.af-site-header-inner{width:min(1100px,calc(100% - 32px));min-height:82px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:22px}
.af-site-branding{display:flex;align-items:center;flex:0 0 auto}
.af-header-logo-link{display:inline-flex;align-items:center;text-decoration:none;line-height:0}
.af-header-logo{display:block;width:auto;max-width:255px;max-height:58px;height:auto;object-fit:contain}
.af-primary-nav{display:flex;align-items:center;justify-content:flex-end;gap:2px;min-width:0}
.af-primary-nav a{display:inline-flex;align-items:center;min-height:42px;padding:8px 8px;color:#24394e!important;text-decoration:none!important;font-size:13px;font-weight:600;white-space:nowrap;border-radius:7px;transition:background-color .18s ease,color .18s ease}
.af-primary-nav a:hover,.af-primary-nav a:focus{background:#f2f6f8;color:#0d2238!important}
.af-primary-nav .af-nav-cta{margin-left:6px;background:#0d2238;color:#fff!important;padding-left:12px;padding-right:12px}
.af-primary-nav .af-nav-cta:hover,.af-primary-nav .af-nav-cta:focus{background:#173b5d;color:#fff!important}
.af-menu-toggle{display:none;width:46px;height:46px;padding:10px;border:1px solid #dce5eb;border-radius:8px;background:#fff;cursor:pointer;align-items:center;justify-content:center;flex-direction:column;gap:5px}
.af-menu-toggle span{display:block;width:22px;height:2px;background:#0d2238;border-radius:2px;transition:transform .2s ease,opacity .2s ease}
.af-menu-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.af-menu-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.af-menu-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

@media(max-width:1080px){
 .af-header-logo{max-width:220px}
 .af-primary-nav a{font-size:12.5px;padding-left:6px;padding-right:6px}
}
@media(max-width:980px){
 .af-site-header-inner{min-height:72px;position:relative}
 .af-header-logo{max-width:220px;max-height:52px}
 .af-menu-toggle{display:flex;flex:0 0 46px}
 .af-primary-nav{display:none;position:absolute;left:0;right:0;top:calc(100% - 1px);background:#fff;border:1px solid #e5edf2;border-top:0;border-radius:0 0 12px 12px;box-shadow:0 14px 28px rgba(14,37,58,.12);padding:10px;flex-direction:column;align-items:stretch;gap:2px}
 .af-primary-nav.is-open{display:flex}
 .af-primary-nav a{width:100%;min-height:46px;justify-content:flex-start;font-size:14px;padding:10px 12px}
 .af-primary-nav .af-nav-cta{margin:6px 0 0;justify-content:center}
 body.af-menu-open{overflow:hidden}
}
@media(max-width:480px){
 .af-site-header-inner{width:calc(100% - 22px)}
 .af-header-logo{max-width:190px;max-height:48px}
}


/* v1.5 - Índices de directorio: ancho amplio y listados completos */
body.af-directory-index #page.grid-container,
body.af-directory-index .site.grid-container,
body.af-directory-index .site-content.grid-container,
body.af-directory-index #primary,
body.af-directory-index .inside-article,
body.af-directory-index .entry-content,
body.af-directory-index .af-imported-content {
    max-width: 1320px !important;
    width: min(1320px, calc(100% - 32px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
body.af-directory-index .af-imported-content .master-wrap,
body.af-directory-index .af-imported-content .wrap {
    width: 100% !important;
    max-width: 1320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* /staedte/: listado alfabético que en el HTML original venía en <style> inline */
body.af-page-staedte .alpha-city-grid {
    columns: 4;
    column-gap: 24px;
    margin-top: 28px;
}
body.af-page-staedte .alpha-city-grid a {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 0 0 8px;
    background: #fff;
    border: 1px solid #d7e5ef;
    border-radius: 9px;
    text-decoration: none !important;
    color: #17324a !important;
    break-inside: avoid;
    box-shadow: 0 2px 8px rgba(15,52,78,.03);
}
body.af-page-staedte .alpha-city-grid a:hover,
body.af-page-staedte .alpha-city-grid a:focus {
    border-color: #aac7da;
    background: #f8fbfd;
}
body.af-page-staedte .alpha-city-grid span {
    color: #6d8192;
    flex: 0 0 auto;
}

/* Eliminar comentarios e imagen destacada de las páginas importadas */
body.af-imported-page #comments,
body.af-imported-page .comments-area,
body.af-imported-page .comment-respond,
body.af-imported-page #respond,
body.af-imported-page .post-image,
body.af-imported-page .featured-image,
body.af-imported-page .page-header-image {
    display: none !important;
}

@media (max-width: 900px) {
    body.af-page-staedte .alpha-city-grid { columns: 2; }
    body.af-directory-index #page.grid-container,
    body.af-directory-index .site.grid-container,
    body.af-directory-index .site-content.grid-container,
    body.af-directory-index #primary,
    body.af-directory-index .inside-article,
    body.af-directory-index .entry-content,
    body.af-directory-index .af-imported-content { width: min(100% - 20px, 1320px) !important; }
}
@media (max-width: 540px) {
    body.af-page-staedte .alpha-city-grid { columns: 1; }
}
