:root {
    --color-primary: #1e3a8a; /* Deep blue */
    --color-primary-light: #3b82f6;
    --color-primary-dark: #1e293b;
    --color-secondary: #0f172a; /* Darker slate */
    --color-text-main: #334155;
    --color-text-muted: #64748b;
    --color-bg-light: #f8fafc;
    --color-white: #ffffff;
    --font-main: 'Inter', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: var(--font-main);
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

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

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

.btn-secondary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-bg-light);
}

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

.btn-primary-dark:hover {
    background-color: #0f172a;
}

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

.btn-primary-light:hover {
    background-color: #2563eb;
}

/* Header */
.header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 50px;
    object-fit: contain;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-main);
    transition: color 0.3s;
}

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

/* Hero Section */
.hero {
    position: relative;
    padding: 80px 0 160px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
    z-index: -2;
    background-image: url('assets/building.jpg');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 40%, rgba(248,250,252,0) 100%);
    z-index: -1;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 8px solid rgba(255, 255, 255, 0.5);
}

.floating-x {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 40px;
    font-weight: 900;
    color: var(--color-primary-dark);
    opacity: 0.7;
}

/* Clean hero bottom transition */
.hero {
    position: relative;
    padding: 80px 0 160px;
    background-color: var(--color-white);
    overflow: hidden;
    z-index: 2;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(248,250,252,1) 100%);
    z-index: 0;
    pointer-events: none;
}

/* Typography basics */
h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 25px;
}

/* About Section */
.about {
    padding: 120px 0 40px;
    background-image: url('assets/rigamap.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
}

.about::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, rgba(248,250,252,1) 0%, rgba(248,250,252,0) 100%);
    z-index: -1;
    pointer-events: none;
}

.about::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(248, 250, 252, 0.45);
    z-index: -1;
}

.about-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-row {
    position: relative;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    background-color: rgba(255, 255, 255, 0.95);
}

.about-content {
    position: relative;
    z-index: 3;
}

.about-content .row-title {
    color: var(--color-primary);
    font-size: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-content .row-title i {
    color: var(--color-primary-dark);
    font-size: 28px;
    opacity: 0.8;
}

.about-content h4 {
    color: var(--color-primary);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 18px;
}

.about-content p {
    color: var(--color-text-main);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.about-content ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 30px;
    line-height: 1.6;
}

.about-content ul li i {
    position: absolute;
    left: 0;
    top: 5px;
    color: var(--color-secondary);
}

/* Services Section */
.services {
    padding: 40px 0 100px;
    background-image: url('assets/rigamap.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
}

.services::after {
    display: none;
}

.services::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(248, 250, 252, 0.45);
    z-index: -1;
}

.services h2 {
    text-align: left;
    margin-bottom: 40px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.service-card {
    background-color: var(--color-white);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.icon-wrapper {
    margin: 0 auto 20px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrapper img {
    max-width: 80px;
    height: auto;
    object-fit: contain;
}

.service-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 15px;
    height: 44px;
}

.service-card p {
    font-size: 14px;
    color: var(--color-text-muted);
}

.services-action {
    text-align: center;
}

/* Form Section */
.custom-form-section {
    padding: 20px 0 140px;
    background-image: url('assets/rigamap.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
}

.custom-form-section .gradient-top {
    display: none;
}

.custom-form-section .form-bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(248, 250, 252, 0.45);
    z-index: -2;
}

.custom-form-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    z-index: 0;
    pointer-events: none;
}

.custom-form-container {
    display: flex;
    justify-content: center;
}

.form-wrapper {
    background-color: var(--color-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 800px;
}

.form-wrapper h2 {
    text-align: center;
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text-main);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dynamic-group {
    animation: fadeIn 0.3s ease-in-out;
}

.dynamic-split-row {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.dynamic-split-row .labels-col {
    flex: 4;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.dynamic-split-row .inputs-col {
    flex: 6;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dynamic-split-row .split-group {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    height: 46px; /* Match input height */
}

.dynamic-split-row .split-group label {
    margin-bottom: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Emergency Section */
.emergency {
    position: relative;
    padding: 100px 0 80px;
    color: var(--color-text-main);
    background-color: var(--color-white);
    overflow: hidden;
    z-index: 2;
}

.emergency-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background-image: url('assets/sch.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.emergency-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 40%, rgba(248,250,252,0) 100%);
}

.emergency-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.emergency-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.emergency-content {
    flex: 1;
    max-width: 600px;
}

.emergency-content h2 {
    color: var(--color-primary);
}

.emergency-content p {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.emergency-content ul {
    margin-bottom: 30px;
}

.emergency-content li {
    margin-bottom: 10px;
    font-size: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    opacity: 0.85;
}

.emergency-content li i {
    color: var(--color-primary-light);
    margin-top: 4px;
}

.emergency-contact {
    flex: 0 0 350px;
}

.contact-box {
    background-color: var(--color-white);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.contact-title {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.contact-phone {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 25px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Footer */
.footer {
    background-color: var(--color-white);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 20px;
}

.footer-nav ul {
    display: flex;
    gap: 30px;
}

.footer-nav a {
    font-size: 14px;
    color: var(--color-text-main);
    transition: color 0.3s;
}

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

.footer-bottom {
    background-color: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 20px 0;
    font-size: 14px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 20px;
    }

    .about-row {
        padding: 30px 20px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .emergency-container {
        flex-direction: column;
    }

    .emergency-bg {
        width: 100%;
        opacity: 0.3;
    }

    .emergency-bg::before {
        background: linear-gradient(to bottom, #1a2942 0%, rgba(26,41,66,0.8) 100%);
    }

    .footer-top {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}
