/* Enhanced styles to fix spacing issues and improve appearance */

/* Fix navigation spacing */
nav ul li {
    margin: 0 15px;
}

/* Improve header spacing and appearance */
header {
    padding: 10px 0;
}

.logo-container h1 {
    font-size: 1.8rem;
    letter-spacing: 0.5px;
}

/* Enhance hero section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../images/business_card.jpg');
    background-size: cover;
    background-position: center;
    padding: 180px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 30%, rgba(227, 6, 19, 0.1) 70%);
    z-index: 1;
}

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

.hero h2 {
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 90%;
    margin: 0 auto 25px;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 35px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Improve section spacing */
.section-title {
    margin-bottom: 50px;
    letter-spacing: 0.5px;
}

/* Enhance service cards */
.service-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 35px 25px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.service-icon {
    margin-bottom: 25px;
}

.service-card h3 {
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.service-card p {
    flex-grow: 1;
    line-height: 1.7;
}

/* Enhance project cards */
.project-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.project-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::before {
    opacity: 1;
}

.placeholder-image i {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.project-card:hover .placeholder-image i {
    transform: scale(1.1);
}

.project-card h3 {
    padding: 25px 25px 15px;
    letter-spacing: 0.5px;
}

.project-card p {
    padding: 0 25px 25px;
    flex-grow: 1;
    line-height: 1.7;
}

/* Improve contact section */
.contact-item {
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    border-right: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.contact-item i {
    font-size: 2.2rem;
    margin-right: 15px;
}

.contact-item h3 {
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

.contact-form {
    padding: 35px;
    position: relative;
    overflow: hidden;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    opacity: 0.1;
    border-radius: 0 0 0 100%;
}

.form-group label {
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    padding: 15px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(227, 6, 19, 0.2);
}

button.btn-primary {
    padding: 15px 35px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

button.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

button.btn-primary:hover::before {
    left: 100%;
}

/* Enhance footer */
footer {
    padding: 60px 0 30px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), transparent);
}

.footer-logo h3 {
    font-size: 1.6rem;
    letter-spacing: 0.5px;
}

.footer-contact p {
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.copyright {
    padding-top: 25px;
    margin-top: 25px;
}

/* Hide Manus attribution */
[href*="manus"] {
    display: none !important;
}

/* Add subtle background pattern */
body {
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Add subtle animations */
.section-title, .hero h2, .hero p {
    animation: fadeInDown 1s ease-out;
}

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

/* Add hover effect to navigation */
nav ul li a {
    position: relative;
    padding: 8px 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

nav ul li a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Enhance flame logo */
.flame-logo i {
    animation: flicker 3s infinite alternate;
}

@keyframes flicker {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    }
    25% {
        text-shadow: 0 0 15px rgba(255, 0, 0, 0.7);
    }
    50% {
        text-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
    }
    75% {
        text-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
    }
}

/* Responsive improvements */
@media (max-width: 992px) {
    .services-grid, .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .services-grid, .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card, .project-card {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
}

/* Fix back-to-top button */
.back-to-top {
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(227, 6, 19, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(227, 6, 19, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(227, 6, 19, 0);
    }
}
