/* CSS Variables for easy color management */
:root {
    --color-primary-bg: #fafffc;
    /* Off-White */
    --color-secondary-bg: #1d2122;
    /* Dark Charcoal */
    --color-text-dark: #1d2122;
    /* Dark Charcoal */
    --color-text-light: #fafffc;
    /* Off-White */
    --color-accent: #ff8344;
    /* Vibrant Orange */
}

/* Base Reset and Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-primary-bg);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Global Container and Section Styling */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
    /* Generous White Space */
}

h1,
h2,
h3 {
    font-weight: 700;
    margin-bottom: 20px;
}

h1 {
    font-size: 3rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
}

.subhead {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 40px;
}

/* Header Styling */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    /* Transparent initially */
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: none;
}

header.scrolled {
    background-color: rgba(250, 255, 252, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.logo-img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* Logo Swapping Logic */
.logo-dark {
    display: block;
}

.logo-white {
    display: none;
}

header.scrolled .logo-dark {
    display: block;
}

header.scrolled .logo-white {
    display: none;
}

/* --- Hero Section Styling --- */
#hero {
    background: linear-gradient(135deg, rgba(29, 33, 34, 0.95) 0%, rgba(29, 33, 34, 0.85) 100%),
        url('../images/hero_background.svg') center/cover;
    color: var(--color-text-light);
    padding: 150px 0 100px;
    text-align: left;
    position: relative;
    margin-top: 70px;
    overflow: hidden;
    z-index: 1;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(247, 37, 47, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

#hero .container {
    position: relative;
    z-index: 2;
}

#hero h1 {
    font-size: 4rem;
    max-width: 800px;
    font-weight: 800;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

#hero .subhead {
    max-width: 700px;
    font-weight: 300;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.2s forwards;
}

#hero .cta-button {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.4s forwards;
}

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

/* CTA Button Style */
.cta-button {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-text-light);
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    background-color: #e6743a;
    /* Darker orange on hover */
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 131, 68, 0.4);
}

/* Scroll Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- Services/Pillars Section Styling --- */
#services .service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: left;
}

.service-card {
    padding: 30px;
    border-left: 5px solid var(--color-accent);
    background-color: var(--color-primary-bg);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(247, 37, 47, 0.05), transparent);
    transition: left 0.6s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left-width: 8px;
}

.service-card .icon-placeholder {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    transition: transform 0.4s ease;
}

.service-card:hover .icon-placeholder {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    color: var(--color-accent);
    margin-top: 10px;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 0.95rem;
}

/* --- Value Section Styling --- */
#value {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

#value h2 {
    margin-bottom: 30px;
}

#value-points {
    display: flex;
    justify-content: space-around;
    padding-top: 30px;
    text-align: center;
    flex-wrap: wrap;
    gap: 40px;
}

.point {
    flex-basis: 30%;
    min-width: 200px;
    transition: transform 0.3s ease;
}

.point:hover {
    transform: scale(1.1);
}

.point strong {
    display: block;
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 10px;
    font-weight: 800;
}

.point span {
    font-size: 1.2rem;
    font-weight: 600;
}

/* --- Contact Section Styling --- */
#contact {
    background-color: var(--color-secondary-bg);
    color: var(--color-text-light);
    padding-bottom: 100px;
}

#contact h2 {
    color: var(--color-text-light);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--color-text-light);
    background-color: transparent;
    color: var(--color-text-light);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(247, 37, 47, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form select {
    cursor: pointer;
}

.contact-form select option {
    background-color: var(--color-secondary-bg);
    color: var(--color-text-light);
}

.form-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: none;
}

.form-message.success {
    background-color: rgba(40, 167, 69, 0.2);
    border: 1px solid #28a745;
    color: #28a745;
}

.form-message.error {
    background-color: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #dc3545;
}

/* Utility/Placeholder for Icons */
.icon-placeholder {
    font-size: 3rem;
    color: var(--color-accent);
    line-height: 1;
}

/* Footer Style */
footer {
    text-align: center;
    padding: 30px 0;
    font-size: 0.85rem;
    color: #777;
    background-color: var(--color-primary-bg);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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


/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    #value-points {
        flex-direction: column;
    }

    .point {
        flex-basis: 100%;
    }
}

/* Service Items Hover Effect */
.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}
