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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth;
}

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

/* Typography */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #2c5530;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c5530;
}

p {
    margin-bottom: 1rem;
    font-weight: 300;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(44, 85, 48, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    color: #f4d03f;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #f4d03f;
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-menu a:hover {
    background-color: rgba(244, 208, 63, 0.2);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 50%, #f39c12 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="kente" patternUnits="userSpaceOnUse" width="20" height="20"><rect width="20" height="20" fill="%23f4d03f" opacity="0.1"/><rect x="0" y="0" width="10" height="10" fill="%232c5530" opacity="0.1"/><rect x="10" y="10" width="10" height="10" fill="%232c5530" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23kente)"/></svg>') repeat;
    opacity: 0.3;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

.hero-logo {
    margin-bottom: 2rem;
}

.hero-logo-img {
    height: 120px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-services {
    margin: 1.5rem 0;
}

.typewriter-container {
    font-size: 1.1rem;
    color: #f4d03f;
    font-weight: 500;
    text-align: center;
    min-height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.typewriter-text {
    white-space: pre-wrap;
    line-height: 1.4;
}

.cursor {
    animation: blink 1s infinite;
    font-weight: bold;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}



.cta-button {
    display: inline-block;
    background: #2c5530;
    color: #f4d03f;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    background: #1e3a23;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background: #f8f9fa;
}

.about-section p {
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: #555;
}

/* Services Section */
.services-section {
    padding: 5rem 0;
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    position: relative;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    height: 280px;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.service-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

/* Before and After Images */
.before-after-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.image-wrapper.active {
    opacity: 1;
}

.before-image, .after-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-label {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(139, 69, 19, 0.9);
    color: white;
    padding: 5px 15px;
    font-weight: bold;
    border-radius: 4px;
    font-size: 16px;
    letter-spacing: 1px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.95), rgba(160, 82, 45, 0.95));
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

/* Desktop hover behavior */
@media (min-width: 769px) {
    .service-card:hover .service-overlay {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile behavior - show overlay at bottom with less height */
@media (max-width: 768px) {
    .service-overlay {
        opacity: 1;
        transform: none;
        top: auto;
        height: 40%;
        background: linear-gradient(0deg, rgba(139, 69, 19, 0.95), rgba(160, 82, 45, 0.95));
        padding: 1rem;
    }
}

/* Mobile image containment to prevent cropping and keep white sides */
@media (max-width: 768px) {
    .service-image img,
    .before-image,
    .after-image,
    .slideshow-image {
        object-fit: contain;
        object-position: center center;
        background-color: #fff;
    }
    .service-image,
    .before-after-container,
    .slideshow-container {
        background-color: #fff;
    }
}

.service-overlay h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.service-overlay p {
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.service-card.product-slideshow-card {
    position: relative;
    overflow: hidden; /* Ensures images don't spill out */
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%; /* Take full height of the service-image div */
    display: block; /* Prevent div text from showing on mobile */
}

.slideshow-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area without distorting aspect ratio */
    position: absolute;
    top: 0;
    left: 100%; /* Start from right side */
    opacity: 1;
    transition: left 0.8s ease-in-out;
}

.slideshow-image.active {
    left: 0; /* Slide in from right to left */
}

.slideshow-image.previous {
    left: -100%; /* Slide out to the left */
    transition: left 0.8s ease-in-out;
}



/* Contact Section */
.contact-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #2c5530 0%, #1e3a23 100%);
    color: white;
}

.contact-section h2 {
    color: #f4d03f;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.contact-item h3 {
    color: #f4d03f;
    margin-bottom: 1rem;
}

.contact-item a {
    color: #f4d03f;
    font-weight: 600;
}

.contact-item a:hover {
    color: white;
}

.contact-item:has(.social-link) {
    text-align: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    margin: 0.2rem 0;
    font-size: 0.95rem;
    gap: 0.5rem;
    justify-content: center;
}

.social-link:hover {
    transform: translateX(5px);
    transition: transform 0.3s ease;
}

.social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-icon:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.contact-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info h3 {
    color: #f4d03f;
    margin-bottom: 0.5rem;
}

.footer-info p {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.footer-info a {
    color: #f4d03f;
}

.footer-copyright {
    font-size: 0.9rem;
    color: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 0;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-menu {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        margin-top: 0;
    }
    
    .nav-menu a {
        padding: 0.3rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .hero-logo-img {
        height: 80px;
    }
    
    .typewriter-container {
        font-size: 0.9rem;
        min-height: 2.5rem;
    }
    
    .hero-tagline {
        font-size: 1.2rem;
    }
    
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
}

@media (max-width: 768px) {
    .service-card {
        height: 200px;
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
    }
    
    .service-overlay {
        padding: 15px;
        /* Make overlay visible on mobile by default with reduced opacity */
        opacity: 0.8;
        background: rgba(139, 69, 19, 0.8);
    }
    
    .service-card:hover .service-overlay,
    .service-card:active .service-overlay,
    .service-card:focus .service-overlay {
        opacity: 1;
        background: rgba(139, 69, 19, 0.95);
    }
    
    .service-overlay h3 {
        font-size: 1.2em;
    }
    
    .service-overlay p {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 1rem;
    }
    
    .hero-logo-img {
        height: 60px;
    }
    
    .typewriter-container {
        font-size: 0.8rem;
        min-height: 2rem;
    }
    
    .service-card {
        height: 220px;
    }
    
    .service-overlay {
        padding: 1.5rem;
    }
    
    .service-overlay h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    .service-overlay p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .hero-tagline {
        font-size: 1.1rem;
    }
    
    .service-item,
    .contact-item {
        padding: 1.5rem;
    }
}