/**
Theme Name: CET Astra Child
Author: Holy Cow Online Marketing
Author URI: https://www.HolyCowOnlineMarketing.com/
Description: A child theme for the Astra theme customized for the Center for EcoTechnology.
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cet-astra-child
Template: astra
*/

/* CET Global Style Variables */
:root {
	/* Named Colors */
	--cet-color-green: var(--ast-global-color-0);
	
	/* Functional Colors */
	--cet-color-link: var(--cet-color-green);
	--cet-color-link-hover: color-mix(in srgb, var(--cet-color-link) 80%, white);
}

/* BEGIN: Gravity Forms Styles */

/* Submit Button */
body .gform_wrapper .gform_footer input[type=submit] {
	background-color: var(--cet-color-link) !important;
}
body .gform_wrapper .gform_footer input[type=submit]:hover {
	background-color: var(--cet-color-link-hover) !important;
}

/* END: Gravity Forms Styles */

/* BEGIN: The Events Calendar Styles */
/* Use our CET colors for The Events Calendar */
:root {
	--tec-color-icon-focus: var(--cet-color-link);
    --tec-color-event-icon-hover: var(--cet-color-link);
    --tec-color-accent-primary: var(--cet-color-link);;
    --tec-color-accent-primary-hover: var(--cet-color-link-hover);;
}
/* On the Events page, display Past Events 1 up (not 4 up). Override the default TEC CSS for this. */
@media (min-width: 768px) {
	.ast-width-md-4 {
		width: 100%;
	}
}
/* END: The Events Calendar Styles */

/* [CET-383] 'On the News > Media page: Limit the height of "External Media" block and make it scrollable' */
.cet-external-media-group {
	max-height: 50vh; /* Max height of 50% of the viewport height. */
}

/* fix the size in buttons of the info boxes block*/
.wp-block-button .wp-block-button__link {
    width: auto;
}

/* Blog / archivos / búsqueda: ratio uniforme + recorte elegante */
.blog .wp-post-image,
.archive .wp-post-image,
.search .wp-post-image,
.wp-block-post-featured-image img,               /* Query Loop (Gutenberg) */
.uagb-post__image img, .uagb-post__image a img,  /* Spectra / UAGB */
.ast-blog-featured-section .post-thumb-img-content img { /* Astra clásico */
  width: 100%;
  aspect-ratio: 16 / 9;   /* cambia a 4/3 o 3/2 si lo prefieres */
  height: auto;
  object-fit: cover;       /* rellena sin deformar */
  object-position: center;
  display: block;
}

/* Si tu layout usa contenedor de imagen (Astra u otros) */
.ast-blog-featured-section .post-thumb-img-content {
  display: block;
  overflow: hidden;        /* oculta el recorte sobrante */
  border-radius: .25rem;   /* opcional, estética */
}

/* Opcional: en móviles, un ratio un poco más alto suele verse mejor */
@media (max-width: 768px) {
  .blog .wp-post-image,
  .archive .wp-post-image,
  .search .wp-post-image,
  .wp-block-post-featured-image img,
  .uagb-post__image img,
  .ast-blog-featured-section .post-thumb-img-content img {
    aspect-ratio: 4 / 3;
  }
}

