/* ============================================
   FIRE SAFETY SERVICE INC - GLOBAL STYLESHEET
   Standardized, reusable CSS components
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
	--color-primary: #D32F2F;
	--color-secondary: #1976D2;
	--color-accent: #FF6F00;
	--color-dark: #212121;
	--color-text: #333;
	--color-text-light: #666;
	--color-border: #ddd;
	--color-bg-light: #F5F5F5;
	--color-white: #fff;
	--color-success: #388E3C;
	--color-error: #D32F2F;
	--font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
	--container-max: 1140px;
}

/* ============================================
   GLOBAL TEMPLATE SCOPING
   ============================================ */

body.fs-template {
	font-family: var(--font-main);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--color-text);
	margin: 0;
	padding: 0;
	background: var(--color-bg-light);
}

body.fs-template * {
	box-sizing: border-box;
}

body.fs-template h1,
body.fs-template h2,
body.fs-template h3,
body.fs-template h4,
body.fs-template h5,
body.fs-template h6 {
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 1rem 0;
	color: var(--color-dark);
}

body.fs-template h1 { font-size: 48px; }
body.fs-template h2 { font-size: 36px; }
body.fs-template h3 { font-size: 28px; }
body.fs-template h4 { font-size: 24px; }
body.fs-template h5 { font-size: 20px; }

body.fs-template p {
	margin: 0 0 1rem 0;
	font-weight: 400;
	line-height: 1.8;
}

body.fs-template a:not(.btn) {
	color: var(--color-primary);
	transition: color 0.2s ease;
	text-decoration: none;
}

body.fs-template a:not(.btn):hover {
	color: var(--color-secondary);
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0 15px;
	width: 100%;
}

.layout-row {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -15px;
}

.layout-row.layout-center {
	justify-content: center;
}

.layout-half {
	flex: 0 0 50%;
	padding: 0 15px;
}

.layout-third {
	flex: 0 0 33.333%;
	padding: 0 15px;
}

.layout-quarter {
	flex: 0 0 25%;
	padding: 0 15px;
}

.layout-full {
	flex: 0 0 100%;
	padding: 0 15px;
}

@media (max-width: 768px) {
	.layout-half,
	.layout-third,
	.layout-quarter {
		flex: 0 0 100%;
	}
}

/* ============================================
   HEADER
   ============================================ */

.header-main {
	background: var(--color-white);
	border-bottom: 1px solid var(--color-border);
	padding: 1rem 0;
	position: sticky;
	top: 0;
	z-index: 1000;
}

.header-transparent {
	background: transparent;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	transition: background 0.3s ease;
	border-bottom: 1px solid rgba(255,255,255,0.2);
}

.header-transparent.scrolled {
	background: var(--color-white);
	border-bottom-color: var(--color-border);
}

.header-inner {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0 15px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.header-logo img {
	height: 50px;
	width: auto;
}

.nav-main {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 2rem;
}

.nav-main li {
	margin: 0;
}

.nav-main a {
	color: var(--color-dark);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.header-transparent .nav-main a {
	color: var(--color-white);
}

.header-transparent.scrolled .nav-main a {
	color: var(--color-dark);
}

.nav-main a:hover {
	color: var(--color-primary);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
	background-size: cover;
	background-position: center;
	min-height: 500px;
	display: flex;
	align-items: center;
	position: relative;
}

.hero-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.4);
}

.hero-content {
	position: relative;
	color: var(--color-white);
	text-align: center;
	padding: 80px 0;
}

.hero-title {
	font-size: 56px;
	margin: 0;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.content-section {
	padding: 60px 0;
}

.section-title {
	margin-bottom: 1rem;
}

.section-subtitle {
	color: var(--color-text-light);
	margin-bottom: 2rem;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
	margin-bottom: 1.5rem;
}

.form-label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: var(--color-dark);
}

.form-control {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--color-border);
	border-radius: 4px;
	font-size: 16px;
	transition: border-color 0.2s ease;
}

.form-control:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.form-buttons {
	margin-top: 2rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
	display: inline-block;
	padding: 12px 24px;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-primary {
	background: var(--color-primary);
	color: var(--color-white);
}

.btn-primary:hover {
	background: #B71C1C;
	color: var(--color-white);
}

.btn-secondary {
	background: var(--color-secondary);
	color: var(--color-white);
}

.btn-secondary:hover {
	background: #1565C0;
	color: var(--color-white);
}

.btn-lg {
	padding: 16px 32px;
	font-size: 18px;
}

/* ============================================
   CARDS / BOXES
   ============================================ */

.card {
	background: var(--color-white);
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	padding: 2rem;
	margin-bottom: 2rem;
}

.signin-container {
	max-width: 500px;
	margin: 60px auto;
	padding: 0 20px;
}

.signin-box {
	background: var(--color-white);
	padding: 40px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.signin-box h1 {
	text-align: center;
	margin-bottom: 30px;
	color: var(--color-dark);
}

.signin-register {
	text-align: center;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--color-border);
}

.signin-register p {
	margin: 0;
	color: var(--color-text-light);
}

.signin-register a {
	color: var(--color-primary);
	font-weight: 600;
}

/* ============================================
   MESSAGES
   ============================================ */

.message {
	padding: 1rem 1.5rem;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.message-success {
	background: #E8F5E9;
	border-left: 4px solid var(--color-success);
	color: #2E7D32;
}

.message-error {
	background: #FFEBEE;
	border-left: 4px solid var(--color-error);
	color: #C62828;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
	background: var(--color-dark);
	color: var(--color-white);
	padding: 3rem 0 1rem;
	margin-top: 4rem;
}

.footer p {
	color: rgba(255,255,255,0.7);
	line-height: 1.6;
}

.footer a {
	color: var(--color-white);
	text-decoration: none;
}

.footer a:hover {
	color: var(--color-primary);
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.font-weight-bold { font-weight: 700; }
.rounded { border-radius: 8px; }
.shadow { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
	.hero-title { font-size: 36px; }
	body.fs-template h2 { font-size: 28px; }
	body.fs-template h3 { font-size: 24px; }
	.nav-main { flex-direction: column; gap: 1rem; }
}
