/*
Theme Name:  CanVasc (Divi child)
Theme URI:   https://canvasc.ca
Description: Divi 5 child theme for the Canadian Vasculitis Network. Brand colours, Open Sans, and the card / tile / button styles used on canvasc.ca. Add the cv- classes in a module's Advanced → CSS ID & Classes.
Author:      Tara Macdonald
Template:    Divi
Version:     1.0.0
Text Domain: canvasc-divi-child
*/

/* ------------------------------------------------------------------
   Brand
   ------------------------------------------------------------------ */
:root {
	--cv-red: #ea0014;
	--cv-red-dark: #a80c03;
	--cv-navy: #0f2a5f;
	--cv-blue-heading: #1e3a8a;
	--cv-blue: #0099ff;
	--cv-blue-light: #f0f9ff;
	--cv-text: #1a1b1f;
	--cv-muted: #55606b;
	--cv-bg: #fafafa;
	--cv-border: #dddddd;
	--cv-radius: 8px;
	--cv-shadow: 0 2px 4px rgba(0, 0, 0, .1);
	--cv-shadow-hover: 0 4px 12px rgba(0, 0, 0, .1);
}

body,
.et_pb_text,
.et_pb_module {
	font-family: "Open Sans", Arial, sans-serif;
	color: var(--cv-text);
}

/* ------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------ */
.cv-section-grey { background-color: var(--cv-bg) !important; }

.cv-hero {
	background: linear-gradient(135deg, var(--cv-red-dark) 0%, var(--cv-red) 100%) !important;
	color: #fff;
	text-align: center;
}
.cv-hero h1, .cv-hero h2, .cv-hero h3, .cv-hero p { color: #fff !important; }
.cv-hero img { filter: brightness(0) invert(1); }
.cv-hero .cv-card { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); box-shadow: none; text-align: center; }

.cv-centered, .cv-centered h1, .cv-centered h2 { text-align: center; }

/* ------------------------------------------------------------------
   Generic white card (use on a Text module or a Column)
   ------------------------------------------------------------------ */
.cv-card {
	background: #fff;
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius);
	box-shadow: var(--cv-shadow);
	padding: 20px !important;
	height: 100%;
	box-sizing: border-box;
	transition: box-shadow .3s;
}
.cv-card:hover { box-shadow: var(--cv-shadow-hover); }
.cv-card img { width: 55px; height: auto; margin-bottom: 12px; }
.cv-card h3, .cv-card h4 { padding-bottom: 6px; }

/* Equal-height cards in a row */
.cv-equal .et_pb_column { display: flex; flex-direction: column; }
.cv-equal .et_pb_column > .et_pb_module { flex: 1 1 auto; }

/* ------------------------------------------------------------------
   Educational Resources: cards with link tiles (matches canvasc.ca)
   ------------------------------------------------------------------ */
.cv-tools-card {
	background: #fff;
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius);
	box-shadow: var(--cv-shadow);
	padding: 20px !important;
	box-sizing: border-box;
}
.cv-tools-card h3 { font-size: 20px; line-height: 1.15; padding-bottom: 0; margin: 0; }
.cv-tools-card ul,
.cv-tools-list { list-style: none !important; padding: 0 !important; margin: 20px 0 0 !important; }
.cv-tools-card ul:first-child { margin-top: 0 !important; }
.cv-tools-card ul li {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 12px;
	padding: 12px 14px;
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius);
	background: var(--cv-bg);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
	transition: box-shadow .2s, background-color .16s;
	list-style: none;
}
.cv-tools-card ul li:last-child { margin-bottom: 0; }
.cv-tools-card ul li::after { content: "\203A"; color: #94a3b8; font-size: 18px; line-height: 1; }
.cv-tools-card ul li:hover,
.cv-tools-card ul li:focus-within { box-shadow: var(--cv-shadow-hover); background: #fff; }
.cv-tools-card ul li a { flex: 1 1 auto; color: #111; text-decoration: none; font-size: 15px; line-height: 1.35; }
.cv-tools-card ul li a::before { content: ""; position: absolute; inset: 0; border-radius: var(--cv-radius); }
.cv-tools-card ul li:focus-within { outline: 3px solid rgba(0, 153, 255, .25); outline-offset: 1px; }

/* ------------------------------------------------------------------
   Vasculitides (matches canvasc.ca/#vasculitides)
   ------------------------------------------------------------------ */
.cv-vasc-item {
	background: #fff;
	padding: 20px !important;
	border-radius: 15px;
	border: 1px solid rgba(0, 0, 0, .04);
	box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
	transition: box-shadow .3s;
	height: 100%;
	box-sizing: border-box;
}
.cv-vasc-item:hover { box-shadow: 0 8px 16px rgba(0, 0, 0, .1); }
.cv-vasc-item h2, .cv-vasc-item h3 { font-size: 20px; text-align: center; color: #000; }
.cv-vasc-item img { width: 55px; height: 55px; display: block; margin: 0 auto 15px; transition: transform .3s; }
.cv-vasc-item:hover img { transform: scale(1.1) rotate(5deg); }

.cv-vasc-type {
	background: #fff;
	padding: 20px !important;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
	transition: box-shadow .3s;
	height: 100%;
	box-sizing: border-box;
	scroll-margin-top: 100px;
}
.cv-vasc-type:hover { box-shadow: 0 8px 16px rgba(0, 0, 0, .1); }
.cv-vasc-type h3 { font-size: 20px; font-weight: 800; color: var(--cv-blue-heading); padding-bottom: 12px; }
.cv-vasc-type p, .cv-vasc-type li { font-size: 15px; }

.cv-vasc-panel {
	background: #fff;
	padding: 20px !important;
	border-radius: var(--cv-radius);
	box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
	scroll-margin-top: 100px;
}
.cv-vasc-panel h2, .cv-vasc-panel h3 { color: var(--cv-navy); }

/* ------------------------------------------------------------------
   Buttons — light-blue outline style from canvasc.ca.
   Button module: Advanced → CSS Class "cv-btn". Red filled: "cv-btn cv-btn-solid".
   ------------------------------------------------------------------ */
body .et_pb_button.cv-btn,
a.cv-btn {
	display: inline-block;
	background: var(--cv-blue-light) !important;
	border: 1px solid var(--cv-blue) !important;
	border-radius: 6px !important;
	color: var(--cv-blue) !important;
	font-size: 14px !important;
	font-weight: 600;
	line-height: 1.4 !important;
	padding: 10px 20px !important;
	text-decoration: none;
	transition: background-color .3s, color .3s, transform .2s;
}
body .et_pb_button.cv-btn:hover,
a.cv-btn:hover {
	background: var(--cv-blue) !important;
	color: #fff !important;
	padding: 10px 20px !important;
	transform: translateY(-2px);
}
body .et_pb_button.cv-btn::after { display: none !important; }
body .et_pb_button.cv-btn.cv-btn-solid { background: var(--cv-red) !important; border-color: var(--cv-red) !important; color: #fff !important; }
body .et_pb_button.cv-btn.cv-btn-solid:hover { background: var(--cv-red-dark) !important; border-color: var(--cv-red-dark) !important; }
.cv-hero .et_pb_button.cv-btn { background: #fff !important; border-color: #fff !important; color: var(--cv-red-dark) !important; }

/* ------------------------------------------------------------------
   Tables (epidemiology, webinars, meetings)
   ------------------------------------------------------------------ */
.cv-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cv-table th { background: var(--cv-red); color: #fff; text-align: left; padding: 10px 12px; }
.cv-table td { padding: 10px 12px; border-bottom: 1px solid var(--cv-border); vertical-align: top; }
.cv-table tr:nth-child(even) td { background: var(--cv-bg); }
@media (max-width: 767px) { .cv-table { overflow-x: auto; } .cv-table table { min-width: 640px; } }

/* ------------------------------------------------------------------
   Partner logos (Useful links)
   ------------------------------------------------------------------ */
.cv-logo-card img { max-width: 180px; max-height: 64px; width: auto; height: auto; object-fit: contain; margin-bottom: 12px; }
.cv-logo-card h4 a { color: var(--cv-text); }

/* ------------------------------------------------------------------
   Header / footer helpers (Theme Builder)
   ------------------------------------------------------------------ */
.cv-header { background: var(--cv-red) !important; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.cv-header .et_pb_menu .et-menu > li > a,
.cv-header .et_pb_text, .cv-header .et_pb_text a { color: #fff !important; }
.cv-footer { background: var(--cv-text) !important; color: #fff; }
.cv-footer h3, .cv-footer h4, .cv-footer p, .cv-footer a, .cv-footer li { color: #fff !important; }
.cv-footer ul { list-style: none; padding: 0 !important; }

/* Anchor offset under a sticky header */
:target { scroll-margin-top: 100px; }
