/*
Theme Name:   Inspiro RIT
Theme URI:    https://rotal-rit.com
Description:  Child theme of Inspiro for Rotal Innovative Technologies (RIT). Replaces the former Elementor build with core blocks.
Author:       Rotal Innovative Technologies
Template:     inspiro
Version:      1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain:  inspiro-rit
License:      GPL-2.0-or-later
*/

/* Brand tokens (mirrors theme.json so classic templates can use them too) */
:root {
	--rit-blue: #003399;
	--rit-blue-dark: #00267a;
	--rit-navy: #0b1f4d;
	--rit-ink: #1d2433;
	--rit-muted: #5b6475;
	--rit-light: #f4f6fb;
	--rit-line: #dfe4ee;
	--rit-radius: 10px;
}

/* ---------- Global typography ---------- */
body { color: var(--rit-ink); }
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4 { font-family: "Roboto Condensed", "Roboto", sans-serif; color: var(--rit-navy); letter-spacing: .01em; }
.entry-content a:not(.wp-block-button__link) { color: var(--rit-blue); }

/* ---------- Header ---------- */
.site-header .custom-logo-link img { max-height: 64px; width: auto; }
.navbar { transition: background-color .2s ease; }

/* ---------- Page content sections ---------- */
.entry-content > .rit-intro { margin-top: 3rem; margin-bottom: 1rem; text-align: center; }
.entry-content > .rit-intro h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); text-transform: none; }
.entry-content > .rit-section { margin-block: 2.25rem; }
.entry-content > .rit-section h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.entry-content > .rit-section p { line-height: 1.7; }
.entry-content .rit-row { gap: 3rem; align-items: center; margin-block: 3rem; }

/* Accent separator (replaces Elementor "divider") */
.wp-block-separator.is-style-rit-accent {
	width: 72px; max-width: 72px; border: 0; border-top: 3px solid var(--rit-blue);
	margin: 1rem auto 1.5rem; opacity: 1;
}

/* Eyebrow text */
.rit-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .85rem; color: var(--rit-blue); font-weight: 600; }

/* Stats (replaces Elementor counters) */
.rit-stats { background: var(--rit-navy); color: #fff; padding-block: 3rem; }
.rit-stat { text-align: center; }
.rit-stat__num { font-family: "Roboto Condensed", sans-serif; font-size: clamp(2.4rem, 5vw, 3.5rem); font-weight: 700; line-height: 1; margin: 0; color: #fff; }
.rit-stat__label { text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; margin: .5rem 0 0; color: #cfd8f0; }

/* Client logos */
.wp-block-gallery.rit-logos { align-items: center; gap: 2.5rem; }
.wp-block-gallery.rit-logos .wp-block-image img { filter: grayscale(1); opacity: .75; object-fit: contain !important; height: 90px !important; transition: filter .2s, opacity .2s; }
.wp-block-gallery.rit-logos .wp-block-image:hover img { filter: none; opacity: 1; }

/* Testimonial */
.wp-block-quote.rit-testimonial { border: 0; text-align: center; max-width: 760px; margin-inline: auto; font-size: 1.25rem; font-style: italic; }
.wp-block-quote.rit-testimonial cite { display: block; margin-top: 1rem; font-style: normal; font-weight: 600; color: var(--rit-blue); }

/* Industry cards (home + industries) */
.rit-cards .wp-block-image { margin: 0; overflow: hidden; border-radius: var(--rit-radius); }
.rit-cards .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .35s ease; }
.rit-cards .wp-block-image a:hover img { transform: scale(1.04); }
.rit-cards .wp-element-caption { font-weight: 600; color: var(--rit-navy); text-align: center; text-transform: uppercase; letter-spacing: .08em; }

/* Bands */
.rit-band-light { background: var(--rit-light); }
.rit-band-navy { background: var(--rit-navy); color: #fff; }
.rit-band-navy :where(h1,h2,h3,h4,p) { color: #fff; }

/* Buttons */
.wp-block-button__link { background: var(--rit-blue); border-radius: 999px; padding: .8em 2em; font-weight: 600; letter-spacing: .04em; }
.wp-block-button__link:hover { background: var(--rit-blue-dark); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; border: 2px solid currentColor; color: var(--rit-blue); }

/* Map embed */
.rit-map { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--rit-radius); overflow: hidden; }
.rit-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Coming soon */
.rit-coming-soon { text-align: center; padding-block: 4rem; }
.rit-coming-soon h2 { text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Site-wide contact section (before footer) ---------- */
.rit-contact { background: var(--rit-light); padding: 4.5rem 1.25rem; }
.rit-contact__inner { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }
.rit-contact h2 { font-family: "Roboto Condensed", sans-serif; color: var(--rit-navy); font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0 0 .25rem; }
.rit-contact__lead { color: var(--rit-muted); margin-bottom: 1.5rem; }
.rit-contact__details { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; gap: .6rem; }
.rit-contact__details li { display: flex; gap: .75rem; align-items: center; }
.rit-contact__details svg { width: 20px; height: 20px; fill: var(--rit-blue); flex: none; }
.rit-contact__details a { color: var(--rit-ink); text-decoration: none; }
.rit-contact__details a:hover { color: var(--rit-blue); }
.rit-contact__hours { font-size: .95rem; color: var(--rit-muted); }
.rit-contact__hours strong { color: var(--rit-navy); }
.rit-contact .wpcf7 { background: #fff; border-radius: var(--rit-radius); padding: 2rem; box-shadow: 0 10px 30px rgba(11, 31, 77, .08); }
.rit-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.rit-form-grid .rit-full { grid-column: 1 / -1; }
.rit-contact .wpcf7 label { display: block; font-size: .85rem; font-weight: 600; color: var(--rit-navy); }
.rit-contact .wpcf7 input:not([type=submit]), .rit-contact .wpcf7 textarea {
	width: 100%; margin-top: .35rem; padding: .7rem .85rem; border: 1px solid var(--rit-line); border-radius: 6px; font: inherit; background: #fff;
}
.rit-contact .wpcf7 textarea { min-height: 130px; }
.rit-contact .wpcf7 input:focus, .rit-contact .wpcf7 textarea:focus { outline: 2px solid var(--rit-blue); outline-offset: 1px; border-color: transparent; }
.rit-contact .wpcf7-submit { margin-top: 1rem; background: var(--rit-blue); color: #fff; border: 0; border-radius: 999px; padding: .85rem 2.4rem; font-weight: 600; cursor: pointer; }
.rit-contact .wpcf7-submit:hover { background: var(--rit-blue-dark); }

/* Footer */
.site-footer { background: var(--rit-navy); }
.site-footer .site-info { color: #cfd8f0; font-size: .9rem; }
.site-footer .site-info a { color: #fff; }

/* ---------- Converter (replaces MetricPlus plugin) ---------- */
.rit-converter { max-width: 640px; margin: 2rem auto; background: #fff; border: 1px solid var(--rit-line); border-radius: var(--rit-radius); padding: 2rem; box-shadow: 0 10px 30px rgba(11, 31, 77, .06); }
.rit-converter__tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.rit-converter__tabs button { border: 1px solid var(--rit-line); background: #fff; color: var(--rit-ink); border-radius: 999px; padding: .45rem 1.1rem; cursor: pointer; font: inherit; }
.rit-converter__tabs button[aria-selected=true] { background: var(--rit-blue); border-color: var(--rit-blue); color: #fff; }
.rit-converter__row { display: grid; grid-template-columns: 1fr auto 1fr; gap: .75rem; align-items: end; }
.rit-converter label { display: block; font-size: .8rem; font-weight: 600; color: var(--rit-muted); margin-bottom: .3rem; }
.rit-converter input, .rit-converter select { width: 100%; padding: .65rem .75rem; border: 1px solid var(--rit-line); border-radius: 6px; font: inherit; }
.rit-converter__swap { border: 0; background: var(--rit-light); border-radius: 50%; width: 42px; height: 42px; cursor: pointer; font-size: 1.1rem; }
.rit-converter output { display: block; margin-top: 1.25rem; font-size: 1.4rem; font-weight: 700; color: var(--rit-navy); text-align: center; }

@media (max-width: 782px) {
	.rit-contact__inner { grid-template-columns: 1fr; }
	.rit-form-grid { grid-template-columns: 1fr; }
	.rit-converter__row { grid-template-columns: 1fr; }
	.rit-converter__swap { justify-self: center; transform: rotate(90deg); }
	.entry-content .rit-row { gap: 1.5rem; }
}

/* ---------- Layout fixes (v1.0.1) ---------- */
/* Front page: the hero carries the title; hide the duplicate "Home" heading */
.home .entry-header { display: none; }
.site-branding-text .site-title { font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1.15; max-width: 1100px; margin-inline: auto; }
.site-branding-text .site-description { font-size: clamp(1rem, 1.4vw, 1.2rem); }

/* Side gutters for page content; wide/full blocks still break out */
.page .entry-content { padding-inline: clamp(16px, 4vw, 40px); }
.page .entry-content > .alignwide { max-width: 1280px; margin-inline: auto; }
.page .entry-content > .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding-inline: clamp(16px, 4vw, 40px); box-sizing: border-box; }
html, body { overflow-x: clip; }
.page .entry-content > .rit-row { max-width: 1140px; margin-inline: auto; }
.entry-content .rit-row p { font-size: 1.05rem; line-height: 1.75; }

/* Client logos: keep on one row, never stretch */
.wp-block-gallery.rit-logos { flex-wrap: wrap; justify-content: center; }
.wp-block-gallery.rit-logos > figure.wp-block-image { flex: 0 1 160px !important; width: 160px !important; }
.wp-block-gallery.rit-logos > figure.wp-block-image img { height: 80px !important; width: 100% !important; }

/* Contact form: fields fill their grid cell */
.rit-contact .wpcf7-form-control-wrap { display: block; }
.rit-contact .wpcf7 .wpcf7-form-control:not(.wpcf7-submit) { width: 100%; max-width: none; box-sizing: border-box; }

/* Card captions sit on the photo (matches photos that have the label burned in) */
.rit-cards .wp-block-image { position: relative; }
.rit-cards .wp-block-image .wp-element-caption {
	position: absolute; inset: auto 0 0 0; margin: 0; padding: 2.5rem 1rem 1rem; color: #fff; pointer-events: none;
	background: linear-gradient(transparent, rgba(11, 31, 77, .85)); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase;
}

/* Accordions (Technology page) */
.entry-content .wp-block-details { border: 1px solid var(--rit-line); border-radius: var(--rit-radius); padding: 0; margin-block: .75rem; background: #fff; }
.entry-content .wp-block-details summary { padding: 1rem 1.25rem; font-weight: 600; color: var(--rit-navy); cursor: pointer; font-size: 1.1rem; }
.entry-content .wp-block-details[open] summary { border-bottom: 1px solid var(--rit-line); }
.entry-content .wp-block-details > :not(summary) { padding-inline: 1.25rem; }
@media (max-width: 600px) {
	.wp-block-gallery.rit-logos { gap: 1.25rem; }
	.wp-block-gallery.rit-logos > figure.wp-block-image { flex: 0 1 40% !important; width: 40% !important; }
}
