/*
Theme Name:   Calcimag Child
Theme URI:    https://calcimag.in
Description:  Astra child theme for Calcimag Chemicals India Pvt Ltd. Built by Anfang.
Author:       Anfang
Template:     astra
Version:      1.5.3
Text Domain:  calcimag-child
*/

/* ---------- Self-hosted fonts (OFL) – no Google Fonts requests ---------- */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }

/* ---------- Brand tokens ---------- */
:root {
	--cmg-navy: #1C4973;
	--cmg-navy-dark: #0F2A44;
	--cmg-teal: #3CA9B3;
	--cmg-teal-light: #E6F4F5;
	--cmg-text: #3B4A57;
	--cmg-border: #D6E2E8;
	--cmg-bg-soft: #F2F7F9;
	--cmg-radius: 6px;
}

/* ---------- Sticky header (Astra Free has no sticky option) ---------- */
#masthead { position: sticky; top: 0; z-index: 999; background: #fff; transition: box-shadow .2s ease; }
body.admin-bar #masthead { top: 32px; }
@media (max-width: 782px) { body.admin-bar #masthead { top: 46px; } }
#masthead.cmg-scrolled { box-shadow: 0 4px 18px rgba(15, 42, 68, .10); }

/* ---------- Top contact strip (Astra above-header row) ---------- */
.ast-above-header-bar .ast-builder-html-element,
.ast-above-header-bar .ast-builder-html-element p { margin: 0; font-size: 13px; }
.cmg-topbar { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; color: #fff; }
.cmg-topbar a { color: #fff; text-decoration: none; }
.cmg-topbar a:hover { color: var(--cmg-teal-light); }
.cmg-topbar .cmg-ico { display: inline-flex; gap: 7px; align-items: center; }
.cmg-topbar [class*="cmg-i-"]::before { content: ""; display: inline-block; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.cmg-i-mail { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4.2-8 5-8-5V6l8 5 8-5z'/%3E%3C/svg%3E"); }
.cmg-i-phone { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.6a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E"); }
.cmg-i-wa { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm5.3 14.1c-.2.6-1.3 1.2-1.8 1.2-.5.1-1 .2-3.3-.7-2.8-1.1-4.6-4-4.7-4.2-.1-.2-1.1-1.5-1.1-2.9s.7-2 1-2.3c.2-.3.5-.3.7-.3h.5c.2 0 .4 0 .6.5l.8 2c.1.2.1.4 0 .5l-.3.5-.4.4c-.1.1-.3.3-.1.6.2.3.8 1.3 1.7 2.1 1.2 1 2.1 1.4 2.4 1.5.3.1.5.1.6-.1l.9-1c.2-.3.4-.2.6-.1l1.9.9c.3.1.5.2.5.3.1.2.1.7-.1 1.2z'/%3E%3C/svg%3E"); }
.cmg-i-in { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.4 2H3.6A1.6 1.6 0 0 0 2 3.6v16.8A1.6 1.6 0 0 0 3.6 22h16.8a1.6 1.6 0 0 0 1.6-1.6V3.6A1.6 1.6 0 0 0 20.4 2zM8 19H5V9.5h3zM6.5 8.2a1.7 1.7 0 1 1 0-3.5 1.7 1.7 0 0 1 0 3.5zM19 19h-3v-4.6c0-1.1 0-2.5-1.5-2.5S12.8 13 12.8 14.3V19h-3V9.5h2.9v1.3a3.2 3.2 0 0 1 2.9-1.6c3 0 3.6 2 3.6 4.6z'/%3E%3C/svg%3E"); }
.cmg-social { display: flex; gap: 14px; align-items: center; justify-content: flex-end; }

/* ---------- Header menu ---------- */
.main-header-menu .menu-link { font-weight: 600; }
.main-header-menu .current-menu-item > .menu-link { color: var(--cmg-teal) !important; }

/* ---------- Footer ---------- */
.site-footer h3.cmg-foot-title { color: #fff; font-size: 16px; margin: 0 0 14px; letter-spacing: .02em; }
.site-footer .ast-builder-html-element p { margin-bottom: 8px; }
.site-footer ul.cmg-foot-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.site-footer ul.cmg-foot-links li { margin: 0 0 8px; }
.site-footer a { text-decoration: none; }
.cmg-foot-logo { max-width: 170px; margin-bottom: 14px; background: #fff; padding: 10px 14px; border-radius: var(--cmg-radius); }

/* ---------- Reusable content helpers used inside Elementor ---------- */
.cmg-spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cmg-spec-table th { background: var(--cmg-navy); color: #fff; text-align: left; padding: 12px 16px; font-weight: 600; }
.cmg-spec-table td { padding: 11px 16px; border-bottom: 1px solid var(--cmg-border); }
.cmg-spec-table tr:nth-child(even) td { background: var(--cmg-bg-soft); }
.cmg-placeholder { color: #8a97a3; font-style: italic; }
.cmg-chip { display: inline-block; padding: 6px 14px; margin: 0 8px 8px 0; border-radius: 40px; background: var(--cmg-teal-light); color: var(--cmg-navy); font-weight: 600; font-size: 14px; }
.cmg-map svg, .cmg-map img { width: 100%; height: auto; display: block; }
.cmg-map-credit { font-size: 11px; color: #8a97a3; margin-top: 6px; }

/* Timeline (About page) */
.cmg-timeline { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; margin: 0; padding: 34px 0 0; list-style: none; }
.cmg-timeline::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: var(--cmg-border); }
.cmg-timeline li { position: relative; }
.cmg-timeline li::before { content: ""; position: absolute; top: -32px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--cmg-teal); }
.cmg-timeline .yr { display: block; font-family: Montserrat, sans-serif; font-weight: 700; font-size: 22px; color: var(--cmg-navy); margin-bottom: 6px; }
.cmg-timeline p { font-size: 14.5px; margin: 0; }
@media (max-width: 1024px) { .cmg-timeline { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) {
	.cmg-timeline { grid-template-columns: 1fr; padding: 0 0 0 30px; }
	.cmg-timeline::before { top: 0; bottom: 0; left: 7px; right: auto; width: 2px; height: auto; }
	.cmg-timeline li::before { top: 4px; left: -30px; }
}

/* QC process steps */
.cmg-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; list-style: none; margin: 0; padding: 0; counter-reset: s; }
.cmg-steps li { counter-increment: s; background: #fff; border: 1px solid var(--cmg-border); border-radius: var(--cmg-radius); padding: 18px 16px; font-weight: 600; color: var(--cmg-navy); }
.cmg-steps li::before { content: "0" counter(s); display: block; font-family: Montserrat, sans-serif; font-size: 26px; font-weight: 700; color: var(--cmg-teal); margin-bottom: 8px; }
@media (max-width: 1024px) { .cmg-steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) { .cmg-steps { grid-template-columns: repeat(2, 1fr); } }

/* Client name cards (until client logos arrive) */
.cmg-clients { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; list-style: none; margin: 0; padding: 0; }
.cmg-clients li { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 84px; padding: 14px; border: 1px solid var(--cmg-border); border-radius: var(--cmg-radius); background: #fff; font-weight: 600; color: var(--cmg-navy); }
@media (max-width: 1024px) { .cmg-clients { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) { .cmg-clients { grid-template-columns: repeat(2, 1fr); } }

/* Fluent Forms – brand the quote form */
.fluentform .ff-btn-submit { background: var(--cmg-navy) !important; border-color: var(--cmg-navy) !important; padding: 13px 30px !important; font-weight: 600; }
.fluentform .ff-btn-submit:hover { background: var(--cmg-teal) !important; border-color: var(--cmg-teal) !important; }
.fluentform .ff-el-form-control:focus { border-color: var(--cmg-teal) !important; }

/* Accessibility: visible focus */
a:focus-visible, button:focus-visible, .elementor-button:focus-visible { outline: 2px solid var(--cmg-teal); outline-offset: 2px; }

/* Footer widget columns (Corporate office / Sales) */
.site-footer .footer-widget-area,
.site-footer .footer-widget-area p { color: #C9D8E3; }
.site-footer .footer-widget-area a { color: #FFFFFF; }
.site-footer .footer-widget-area a:hover { color: #7FD0D7; }
.site-footer .ast-footer-copyright { text-align: left; }
@media (max-width: 767px) { .site-footer .ast-footer-copyright { text-align: center; } }

/* Uniform photo tiles (galleries built from image widgets) */
.cmg-tiles > .elementor-widget-image,
.cmg-tiles > .e-con-inner > .elementor-widget-image { width: 100%; justify-self: stretch; }
.cmg-tiles .elementor-widget-image a,
.cmg-tiles .elementor-widget-image img { display: block; width: 100% !important; }
.elementor-widget-image img[style*="object-fit"], .cmg-tiles img { transition: transform .35s ease; }
.cmg-tiles .elementor-widget-image { overflow: hidden; border-radius: 6px; }
.cmg-tiles .elementor-widget-image:hover img { transform: scale(1.04); }
.elementor-widget-image.cmg-cover { width: 100%; align-self: stretch; }
.elementor-widget-image.cmg-cover a, .elementor-widget-image.cmg-cover img { display: block; width: 100% !important; }
.elementor-widget-text-editor a:not([style*="color"]) { color: var(--cmg-teal); }
.elementor-widget-text-editor a:not([style*="color"]):hover { color: var(--cmg-navy); }
.elementor-widget-icon-box .elementor-icon-box-description a { color: var(--cmg-navy); font-weight: 600; }

/* Footer spacing on tablet / mobile */
@media (max-width: 921px) {
	.site-primary-footer-wrap, .site-below-footer-wrap { padding-left: 20px !important; padding-right: 20px !important; }
	.site-primary-footer-wrap .site-footer-section { margin-bottom: 26px; }
}

/* ---------- Thirukkural block [cmg_kural] (1.4) ---------- */
.cmg-kural { display: flex; align-items: center; gap: 22px; margin: 8px 0 18px; }
.cmg-kural__art { flex: 0 0 120px; width: 120px; }
.cmg-kural__art svg, .cmg-kural__art img { display: block; width: 100%; height: auto; }
.cmg-kural__body { min-width: 0; }
.cmg-kural__ta { margin: 0 0 8px; color: #1C4973; font-weight: 600; line-height: 1.55; font-size: clamp(15px, 4.4vw, 19px); }
.cmg-kural__ta span { display: block; white-space: nowrap; }
.cmg-kural__en { margin: 0 0 6px; font-style: italic; }
.cmg-kural figcaption { font-size: 13px; letter-spacing: .04em; color: #3CA9B3; font-weight: 600; text-transform: uppercase; }
.cmg-kural--card { padding: 18px 22px; border-left: 4px solid #3CA9B3; background: #F2F7F9; border-radius: 4px; }
.cmg-kural--feature { gap: 32px; }
.cmg-kural--feature .cmg-kural__art { flex-basis: 190px; width: 190px; }
.cmg-kural--feature .cmg-kural__ta { font-size: clamp(15px, 4.2vw, 28px); line-height: 1.5; margin: 0 0 10px; }
@media (max-width: 600px) {
	.cmg-kural { flex-direction: column; align-items: flex-start; gap: 12px; }
	.cmg-kural__art, .cmg-kural--feature .cmg-kural__art { flex-basis: auto; width: 120px; }
}

/* ---------- Locations map on Contact (1.4) ---------- */
.cmg-map--locations svg { display: block; width: 100%; height: auto; max-height: 560px; }
.cmg-map--locations a { cursor: pointer; }

/* ---------- Mobile polish (1.4, client item 19) ---------- */
@media (max-width: 767px) {
	/* Jump links (Products): equal full-width buttons */
	.elementor-widget-button .elementor-button { max-width: 100%; }
	.cmg-jump .elementor-widget-button, .cmg-jump .elementor-button { width: 100%; }
	/* Footer: breathing room between stacked columns */
	.site-primary-footer-wrap .site-footer-section, .site-primary-footer-wrap .footer-widget-area { margin-bottom: 28px !important; }
	.site-footer .widget-title, .site-footer h2, .site-footer h3 { margin-top: 6px; }
	/* Tables: keep columns readable, scroll sideways if needed */
	.cmg-spec-table { font-size: 14px; }
	.cmg-spec-table th, .cmg-spec-table td { padding: 10px 10px; }
	.elementor-widget-html:has(> .elementor-widget-container > .cmg-spec-table), .elementor-widget-html:has(> .cmg-spec-table) { overflow-x: auto; }
	/* Headings: avoid oversized words breaking awkwardly */
	.elementor-heading-title { overflow-wrap: break-word; hyphens: manual; }
	/* Map credits */
	.cmg-map-credit { font-size: 11px; line-height: 1.5; }
	/* WhatsApp bubble: smaller, out of the text column */
	.ht_ctc_style .ctc_s_1 img, .ht-ctc .s_1 img, .ht_ctc_chat_greetings_box_link img { width: 44px !important; height: 44px !important; }
}

/* ---------- Export countries list (Global Presence, 1.4.2) ---------- */
.cmg-map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13px; margin: 4px 0 18px; color: #3B4A57; }
.cmg-map-legend .k { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: -10px; vertical-align: middle; }
.cmg-map-legend .k-ex { background: #3CA9B3; } .cmg-map-legend .k-in { background: #1C4973; }
.cmg-countries { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 20px; }
.cmg-countries h4 { font: 700 13px/1.3 Montserrat, Arial, sans-serif; color: #1C4973; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid #3CA9B3; }
.cmg-countries h4 span { color: #3CA9B3; font-weight: 600; }
.cmg-countries ul { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.75; color: #3B4A57; }
@media (max-width: 1024px) { .cmg-countries { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cmg-countries { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Never stretch photos (1.4.3) ----------
   Image widgets given a fixed height must crop, not squash. */
.elementor-widget-image.cmg-cover img,
.cmg-tiles .elementor-widget-image img,
.cmg-founded .elementor-widget-image img { object-fit: cover !important; object-position: center; }
.elementor-widget-image img { max-width: 100%; }

/* ---------- Export flags (Global Presence, 1.5) ---------- */
.cmg-flags { display: grid; gap: 18px; }
.cmg-flags__region h4 { font: 700 13px/1.3 Montserrat, Arial, sans-serif; color: #1C4973; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid #3CA9B3; }
.cmg-flags__region h4 span { color: #3CA9B3; font-weight: 600; }
.cmg-flags__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cmg-flags__list li { position: relative; line-height: 0; border-radius: 4px; box-shadow: 0 0 0 1px rgba(15,42,68,.12), 0 2px 6px rgba(15,42,68,.08); transition: transform .2s ease, box-shadow .2s ease; cursor: default; outline: none; }
.cmg-flags__list img { width: 44px; height: 33px; object-fit: cover; border-radius: 4px; display: block; }
.cmg-flags__list li::after { content: attr(data-name); display: none; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); background: #0F2A44; color: #fff; font: 600 12px/1 Inter, Arial, sans-serif; padding: 7px 10px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; z-index: 5; }
.cmg-flags__list li:hover, .cmg-flags__list li:focus { transform: translateY(-2px); box-shadow: 0 0 0 2px #3CA9B3, 0 6px 14px rgba(15,42,68,.18); }
.cmg-flags__list li:hover::after, .cmg-flags__list li:focus::after { display: block; animation: cmgTip .15s ease forwards; }
@keyframes cmgTip { to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 600px) { .cmg-flags__list { gap: 8px; } .cmg-flags__list img { width: 40px; height: 30px; } }

/* ---------- Client tiles (Products, 1.5) ---------- */
.cmg-clients--tiles li { flex-direction: column; gap: 10px; min-height: 120px; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.cmg-clients--tiles li:hover { border-color: #3CA9B3; box-shadow: 0 8px 20px rgba(15,42,68,.08); transform: translateY(-2px); }
.cmg-client-mark { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #1C4973, #3CA9B3); color: #fff; font: 700 16px/1 Montserrat, Arial, sans-serif; letter-spacing: .02em; }
.cmg-client-name { font: 600 15px/1.35 Montserrat, Arial, sans-serif; color: #1C4973; }
.cmg-clients--tiles li.has-logo { padding: 18px 22px; }
.cmg-clients--tiles li.has-logo img { width: auto; height: auto; max-width: 100%; max-height: 72px; object-fit: contain; transition: transform .25s ease; }
.cmg-clients--tiles li.has-logo:hover img { transform: scale(1.05); }
@media (max-width: 767px) { .cmg-clients--tiles li.has-logo img { max-height: 56px; } }

/* ---------- Top bar with two emails / three phones (1.5) ---------- */
.cmg-topbar .cmg-sep { opacity: .5; margin: 0 6px; }

/* ---------- No sideways scrolling on phones (1.5.1) ----------
   Nothing on the page may make it wider than the screen (stops phones zooming out
   and showing a white strip on the right). Set on body only so sticky sections still work. */
body { overflow-x: hidden; }
@supports (overflow: clip) { body { overflow-x: clip; } }
img, svg, video, canvas, iframe { max-width: 100%; }
.cmg-map svg { max-width: 100%; height: auto; }
