/*
Theme Name:   Asc Growing Together
Theme URI:    https://growing-together.es
Description:  The theme of growing-together.es: public website and members area, in Spanish and English. A child theme of Twenty Twenty-Five (it needs that theme installed). Made and managed by TecBiz.eu.
Author:       TecBiz.eu
Author URI:   https://tecbiz.eu
Template:     twentytwentyfive
Version:      0.6.8
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.3
Text Domain:  gt-child
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
*/

/*
Asc Growing Together theme — made and managed by TecBiz.eu (https://tecbiz.eu).
Copyright (C) 2026 TecBiz.eu

Based on Twenty Twenty-Five by the WordPress team (GPL v2 or later), which must be installed.
This program is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 2 of the
License, or (at your option) any later version. It is distributed WITHOUT ANY WARRANTY.
Font: Libre Franklin, SIL Open Font License 1.1 (assets/fonts/OFL.txt).
Logo and photographs in assets/images belong to Growing Together and are not covered by the GPL.
Full details: readme.txt in this folder.
*/

/* Language switcher: inline, no bullets */
/* Menu bar: switcher inline at right */
/* Language switcher sits right after the last menu item, like another item */
nav .wp-block-group.alignwide:has(.gt-lang) { justify-content: center !important; column-gap: 1.5rem; align-items: center; }
nav .wp-block-navigation__container { justify-content: center; }
/* No gap between header, menu bar and page content */
.wp-site-blocks > main, .wp-site-blocks > header + * { margin-block-start: 0; }
.wp-site-blocks > header { margin-block-end: 0; }
.wp-block-cover .wp-block-site-title a { text-decoration: none; }

/* ---- Match original Twenty Seventeen proportions ---- */
/* Featured image: natural size (like original), centred, directly under the menu bar.
   !important so it wins over any height/width set in the Site Editor. */
.wp-block-post-featured-image { display: flex; justify-content: center; margin: 0 !important; }
.wp-block-post-featured-image img { width: auto !important; height: auto !important; max-width: 100%; aspect-ratio: auto !important; object-fit: contain !important; }
/* Inner-page header photo: ~180px high like the original */
body:not(.home) .wp-site-blocks > header .wp-block-cover { min-height: 180px !important; padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
/* Tight spacing: featured image → title → text */
.wp-block-post-featured-image + .wp-block-group { margin-top: 0 !important; padding-top: 1.5rem !important; }
main .wp-block-post-title { font-size: 2rem; margin-bottom: 0.75rem; }
main .wp-block-post-title + .wp-block-post-content { margin-top: 0 !important; }
.wp-block-post-content > p:empty:first-child { display: none; }

/* Header photo: logo + title + tagline centred */
.wp-block-cover .wp-block-group.alignwide:has(.wp-block-site-title) { justify-content: center !important; width: 100%; max-width: none; }
.wp-block-cover .wp-block-site-title, .wp-block-cover .wp-block-site-tagline { text-align: left; }
.gt-fallback-logo img { width: 90px; height: auto; display: block; }
.wp-block-cover:has(.wp-block-site-title) .wp-block-cover__inner-container { width: 100% !important; }
/* Header: bigger logo and title */
.wp-block-cover .wp-block-site-logo img, .gt-fallback-logo img { width: 120px !important; height: auto !important; }
.wp-block-cover .wp-block-site-title { font-size: 2rem !important; }
.home .wp-block-cover .wp-block-site-title { font-size: 2.75rem !important; }
.wp-block-cover .wp-block-site-tagline { font-size: 1.125rem !important; }

/* Text everywhere = menu size (0.875rem); page titles stay larger */
body, p, li, td, th, label, input, select, textarea, button, .wp-block-button__link,
.wp-block-post-content, .wp-block-paragraph, .wp-block-list, figcaption { font-size: 0.875rem; }
main h2, .wp-block-post-content h2 { font-size: 1.125rem; }
main h3, .wp-block-post-content h3 { font-size: 1rem; }
main .wp-block-post-title { font-size: 1.75rem; }
.wp-block-cover .wp-block-site-tagline { font-size: 1rem !important; }

/* Compact buttons (site-wide and member forms) */
.wp-element-button, .wp-block-button__link, button[type=submit] { font-size: 0.875rem; padding: 0.45rem 1.1rem; border-radius: 4px; line-height: 1.4; }

/* Language dropdown (0.6.3): current flag, click → all flags */
.gt-lang { position: relative; display: inline-block; }
.gt-lang summary { padding: .2rem 0; list-style: none; cursor: pointer; display: flex; align-items: center; gap: .25rem; }
.gt-lang summary::-webkit-details-marker { display: none; }
.gt-lang img { width: 24px; height: auto; display: block; border: 1px solid #ddd; }
.gt-lang-caret { font-size: .7rem; color: #555; }
.gt-lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 100; list-style: none; margin: 0; padding: .35rem; background: #fff; border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.12); display: flex; flex-direction: column; gap: .35rem; }
.gt-lang-menu li { margin: 0; }
.gt-lang-menu a { display: block; padding: .2rem; border-radius: 3px; }
.gt-lang-menu a:hover, .gt-lang-menu a:focus { background: #f0f0f0; }
.gt-lang-menu li.current a { outline: 2px solid var(--wp--preset--color--accent-1, #333); outline-offset: 1px; }

/* Members web-app pages (template "Members area"), 0.6.5: banner 20% lower, 60% less white space above the menu and page title. */
body.page-template-page-members header .wp-block-cover {
	min-height: 20vh !important;
	padding-top: calc(var(--wp--preset--spacing--50) * 0.8) !important;
	padding-bottom: calc(var(--wp--preset--spacing--50) * 0.8) !important;
}
body.page-template-page-members main.wp-block-group {
	padding-top: calc(var(--wp--preset--spacing--60) * 0.4) !important;
}
body.page-template-page-members main .wp-block-columns { margin-top: 0; }
body.page-template-page-members main .wp-block-post-title { margin-top: 0; margin-bottom: calc(var(--wp--preset--spacing--40) * 0.6); }
