/* C⁴ Compliance - Global Styles */

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    --primary-blue: #3973B9;
    --dark-blue: #2B5CA7;
    --accent-blue: #1C4D8C;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --emergency-red: #dc3545;
    --success-green: #28a745;
    --accent-orange: #FF7A00;
    --compassion-purple: #6f42c1;
}

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header & Navigation */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.emergency-bar {
    background: var(--emergency-red);
    color: white;
    text-align: center;
    padding: 8px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.9; }
    50% { opacity: 1; }
    100% { opacity: 0.9; }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: white;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-diamond {
    width: 85px;
    height: 85px;
    position: relative;
}

.company-name h1 {
    font-size: 1.8rem;
    color: var(--accent-blue);
    font-weight: 900;
    margin: 0;
}

.company-name p {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 5px 0;
    transition: 0.3s;
}

/* CTA Buttons */
.cta-button {
    background: var(--accent-orange);
    color: white !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: #e56700;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 122, 0, 0.3);
}

.cta-button:hover::after {
    width: 0;
}

.cta-button-white {
    background: white;
    color: var(--primary-blue) !important;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.cta-button-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Main Content */
main {
    margin-top: 140px;
    min-height: calc(100vh - 140px);
}

/* Sections */
section {
    padding: 80px 5%;
}

.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    text-align: center;
    padding: 120px 5%;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid Layouts */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 10px;
}

/* Forms */
.contact-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 50px 5% 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: var(--accent-orange);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-orange);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #555;
    color: #999;
}

/* Page Heroes */
.page-hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    padding: 80px 5%;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    background-size: cover;
    background-position: center center;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page-hero.with-image {
    background: linear-gradient(135deg, rgba(57, 115, 185, 0.85) 0%, rgba(43, 92, 167, 0.85) 100%), var(--hero-bg) center/cover no-repeat;
}

.page-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-hero p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    margin: 0 auto;
}

/* Breadcrumbs */
.breadcrumb {
    padding: 20px 5%;
    background: var(--bg-light);
}

.breadcrumb-list {
    display: flex;
    gap: 15px;
    list-style: none;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '›';
    margin-left: 15px;
    color: var(--text-light);
}

.breadcrumb-list a {
    color: var(--primary-blue);
    text-decoration: none;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    main {
        margin-top: 120px;
    }
    
    section {
        padding: 60px 5%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .company-name h1 {
        font-size: 1.5rem;
    }
    
    .logo-diamond {
        width: 60px;
        height: 60px;
    }
}

/* Skip Navigation Link */
.skip-nav {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 5px 0;
}

.skip-nav:focus {
    top: 0;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid rgba(0,0,0,0.1);
    border-left-color: var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Accessibility */
:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */
@media print {
    header, footer, .emergency-bar, .cta-button {
        display: none;
    }
    
    main {
        margin: 0;
    }
    
    body {
        color: black;
    }
}