/* --- Custom Properties --- */
:root {
    --primary-red: #D22B2B;
    --primary-red-hover: #a01d1d;
    --secondary-dark: #121212;
    --light-text: #f0f0f0;
    --dark-text: #333;
    --section-bg-dark: #1a1a1a;
    --section-bg-light: #f8f8f8;
    --card-bg: #2a2a2a;
    --card-bg-hover: #3a3a3a;
    --border-color: #444;

    /* Fonts */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* --- Global Styles & Typography (Mobile-First) --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--secondary-dark);
    color: var(--light-text);
    line-height: 1.6;
}

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

.section {
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--light-text);
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Mobile-first font sizes */
h1 { font-size: 2.2rem; font-weight: 700; }
h2 { font-size: 1.8rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 600; }
p { font-size: 1rem; }

/* --- Header & Navigation --- */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 5%;
    width: 100%;
    z-index: 1000;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    flex-direction: column;
}

.header .logo img {
    height: 45px;
    transition: transform 0.3s ease;
    margin-bottom: 10px;
}

.header .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.header .nav a {
    color: var(--light-text);
    text-decoration: none;
    margin: 5px 8px;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
    font-size: 0.9rem;
}

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

.header .nav a:hover::after {
    width: 100%;
}
.header .nav a:hover {
    color: var(--primary-red);
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: url('https://images.unsplash.com/photo-1517245381869-435ddc3cf2e1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80') no-repeat center center/cover;
    position: relative;
    color: var(--light-text);
    text-align: center;
    padding: 80px 0;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: 400;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-red);
    color: var(--light-text);
    text-decoration: none;
    font-weight: 700;
    font-family: var(--font-heading);
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(210, 43, 43, 0.4);
    cursor: pointer;
    border: none;
}

.cta-button:hover {
    background-color: var(--primary-red-hover);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(210, 43, 43, 0.6);
}

/* --- About Section --- */
.about-section {
    background-color: var(--section-bg-dark);
}
.about-section p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* --- Grids (Services, Why Us, Portfolio, Testimonials) --- */
.services-section, .whyus-section, .testimonials-section {
    background-color: var(--secondary-dark);
}

.portfolio-section {
    background-color: var(--section-bg-dark);
}

.services-grid, .whyus-grid, .portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
}

.service-item, .advantage-item, .case-study {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid var(--border-color);
}

.service-item:hover, .advantage-item:hover, .case-study:hover {
    transform: translateY(-10px);
    background-color: var(--card-bg-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-item i, .advantage-item i {
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.service-item h3, .advantage-item h3, .case-study h3 {
    color: var(--light-text);
    margin-bottom: 10px;
}

.case-study p {
    font-style: italic;
    opacity: 0.9;
}

/* Testimonial specific styles */
.review-text {
    font-style: italic;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.review-author {
    font-weight: 600; /* Increased font weight */
    color: var(--primary-red); /* Changed color for better contrast */
    margin-top: 10px;
}


/* --- Contact Section --- */
.contact-section {
    background: url('https://images.unsplash.com/photo-1520037566219-c0c80529d5b7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80') no-repeat center center/cover;
    position: relative;
    padding: 60px 0;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1;
}

.contact-section .container {
    position: relative;
    z-index: 2;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 30px auto 0;
    background-color: rgba(42, 42, 42, 0.9);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
}

.contact-form input, .contact-form textarea {
    padding: 15px;
    border: 1px solid var(--border-color);
    background-color: #333;
    color: var(--light-text);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input::placeholder, .contact-form textarea::placeholder {
    color: #bbb;
    opacity: 0.8;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(210, 43, 43, 0.3);
    outline: none;
}

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

.contact-form button.cta-button {
    width: 100%;
    align-self: center;
    padding: 15px 40px;
}

#form-message {
    margin-top: 10px;
    font-weight: 600;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 20px;
    background-color: var(--secondary-dark);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #aaa;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    opacity: 0;
}
.animate-fade-in-up-active {
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* --- Media Queries (Desktop-First Overrides) --- */
@media (min-width: 1025px) {
    /* Large desktop */
    .header {
        flex-direction: row;
        justify-content: space-between;
    }
    .header .logo img {
        height: 55px;
        margin-bottom: 0;
    }
    .header .nav a {
        margin-left: 25px;
        font-size: 1rem;
    }
    h1 { font-size: 3.8rem; }
    h2 { font-size: 2.8rem; }
    h3 { font-size: 2rem; }
    p { font-size: 1.1rem; }
    .hero-content h1 { font-size: 4.5rem; }
    .hero-content p { font-size: 1.8rem; }
    .cta-button { padding: 18px 35px; }
    .contact-form button.cta-button {
        width: fit-content;
    }
    .services-grid, .whyus-grid, .portfolio-grid, .testimonials-section .services-grid {
        grid-template-columns: repeat(3, minmax(280px, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    /* Small desktop & tablet view */
    .header {
        flex-direction: row;
        justify-content: space-between;
    }
    .header .nav a {
        font-size: 0.9rem;
        margin-left: 15px;
    }
    .hero-content h1 {
        font-size: 3.2rem;
    }
    .services-grid, .whyus-grid, .portfolio-grid, .testimonials-section .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .testimonials-section .services-grid {
        grid-template-columns: 1fr;
    }
}