/*
Theme Name: techy-chula-vista
Theme URI: https://techychulavista.com/
Template: generatepress
Text Domain: techy-chula-vista
Description: A lightweight editorial child theme built on GeneratePress for technology, business, marketing and Chula Vista coverage.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
WPVibe: yes
*/
html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; height: auto; }

/* Reliable responsive fallbacks for WordPress-generated image attributes. */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
.site-shell { width: min(calc(100% - 2rem), 1180px); margin-inline: auto; }

/* Header and brand */
body > header > .site-shell { display: flex; align-items: center; justify-content: space-between; min-height: 80px; gap: 1.25rem; }
body > header a[aria-label="Techy Chula Vista home"] { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; max-width: 230px; height: 64px; overflow: hidden; }
body > header a[aria-label="Techy Chula Vista home"] img { display: block; width: auto !important; max-width: 230px !important; height: 60px !important; max-height: 60px !important; object-fit: contain; object-position: left center; }
body > header nav { min-width: 0; }

/* Article masthead, media and content */
.single-post article > header > div { width: min(calc(100% - 2rem), 896px); margin-inline: auto; }
.single-post article > header h1 { overflow-wrap: anywhere; }
.single-post article > figure { display: block; width: min(calc(100% - 2rem), 1024px); margin: 0 auto; padding: 2.5rem 0; }
.single-post article > figure > img.wp-post-image { display: block; width: 100% !important; max-width: 100% !important; height: auto !important; aspect-ratio: 3 / 2; object-fit: cover; object-position: center; border-radius: 1rem; }
.single-post article > div.max-w-3xl { width: min(calc(100% - 2rem), 768px); margin-inline: auto; }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose img, .prose video, .prose iframe { display: block; max-width: 100%; height: auto; }
.prose figure { max-width: 100%; margin-inline: 0; }
.prose .wp-block-table { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; min-width: 640px; border-collapse: collapse; }
.prose th, .prose td { padding: .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid #D7E0E5; }

/* Cards, grids and embedded media across templates */
.post-card { min-width: 0; }
.post-card img { display: block; width: 100% !important; height: auto !important; aspect-ratio: 16 / 10; object-fit: cover; }
main, section, article, .grid, .flex { min-width: 0; }
iframe { max-width: 100%; }

@media (max-width: 1279px) {
 body > header .site-shell > nav { display: none !important; }
 body > header button[aria-controls="mobile-menu"] { display: inline-flex !important; align-items: center; justify-content: center; }
}

@media (max-width: 767px) {
 .site-shell { width: min(calc(100% - 1.25rem), 1180px); }
 body > header > .site-shell { min-height: 68px; gap: .75rem; }
 body > header a[aria-label="Techy Chula Vista home"] { max-width: min(72vw, 210px); height: 54px; }
 body > header a[aria-label="Techy Chula Vista home"] img { max-width: min(72vw, 210px) !important; height: 50px !important; max-height: 50px !important; }
 body > header .site-shell > div > a { display: none !important; }
 .single-post article > header > div { width: min(calc(100% - 1.25rem), 896px); padding-top: 2.5rem; padding-bottom: 2.5rem; }
 .single-post article > header h1 { font-size: clamp(2rem, 10vw, 3rem); line-height: 1.08; }
 .single-post article > header p { font-size: 1.05rem; }
 .single-post article > figure { width: min(calc(100% - 1.25rem), 1024px); padding: 1.25rem 0; }
 .single-post article > figure > img.wp-post-image { border-radius: .75rem; }
 .single-post article > div.max-w-3xl { width: min(calc(100% - 1.25rem), 768px); padding-top: 2rem; padding-bottom: 2.5rem; }
 .prose { font-size: 1.02rem; line-height: 1.72; }
 .prose h2 { font-size: 1.65rem; }
 .prose h3 { font-size: 1.3rem; }
 .prose table { min-width: 560px; font-size: .93rem; }
 .post-card { width: 100%; }
}

@media (max-width: 380px) {
 body > header a[aria-label="Techy Chula Vista home"] { max-width: 190px; }
 body > header a[aria-label="Techy Chula Vista home"] img { max-width: 190px !important; }
 .single-post article > header h1 { font-size: 1.9rem; }
}