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

:root {
    --primary-color: #2D4A3D;
    --secondary-color: #F8F9FA;
    --accent-color: #4A6B5A;
    --text-dark: #1A1A1A;
    --text-light: #6B7280;
    --text-white: #FFFFFF;
    --border-light: #E5E7EB;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-primary: linear-gradient(135deg, #2D4A3D 0%, #4A6B5A 100%);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Lazy Loading Transitions */
.lazyload,
.lazyloading {
    opacity: 0;
}

.lazyloaded {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

/* Performance optimizations */
img {
    content-visibility: auto;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #FFFFFF;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw + 1rem, 3.5rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem);
    color: var(--text-dark);
}

h3 {
    font-size: clamp(1.25rem, 2vw + 0.5rem, 1.5rem);
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

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

.nav-logo .logo-img {
    height: clamp(60px, 12vw, 100px);
    width: auto;
    position: relative;
    z-index: 1001;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.contact-btn {
    background: var(--gradient-primary);
    color: var(--text-white) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: clamp(80px, 15vh, 120px);
    padding-bottom: 2rem;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 50%, #F1F5F9 100%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    width: 100%;
}

.hero-title {
    font-size: clamp(2rem, 5vw + 0.5rem, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw + 0.25rem, 1.25rem);
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    opacity: 1; /* Ensure buttons are always visible */
}

.hero-image {
    position: relative;
}

.image-placeholder {
    background: linear-gradient(135deg, #E5E7EB, #F3F4F6);
    border-radius: 1rem;
    height: clamp(250px, 40vw, 400px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-weight: 500;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.staging-preview {
    width: 100%;
    height: 100%;
    position: relative;
}

.before-after {
    position: absolute;
    inset: 0;
    display: flex;
}

.before, .after {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.before img, .after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.before img:hover, .after img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.before .label, .after .label {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    backdrop-filter: blur(10px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-light);
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg);
    margin: 0.5rem auto;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(-10px) rotate(45deg);
    }
    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* Services Section */
.services {
    padding: 6rem 0;
    background: var(--secondary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.service-card {
    background: white;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 1rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.service-icon svg {
    width: 28px;
    height: 28px;
}

.service-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.service-card p {
    margin-bottom: 1.5rem;
}

.service-card ul {
    list-style: none;
    padding: 0;
}

.service-card li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.service-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Process Section */
.process {
    padding: 6rem 0;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: clamp(2rem, 4vw, 3rem);
}

.process-step {
    text-align: center;
}

.step-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.7;
}

.process-step h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Portfolio Section */
.portfolio {
    padding: 6rem 0;
    background: var(--secondary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.portfolio-item {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.portfolio-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.portfolio-placeholder {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.portfolio-before-after {
    display: flex;
    height: 100%;
    width: 100%;
}

.portfolio-side {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.portfolio-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.portfolio-side img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.portfolio-side .label {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    backdrop-filter: blur(10px);
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.portfolio-info p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* About Section */
.about {
    padding: 6rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.features-list {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.feature h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.feature p {
    margin-bottom: 0;
}

.about-stats {
    display: grid;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--secondary-color);
    border-radius: 1rem;
    border: 1px solid var(--border-light);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-weight: 500;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: var(--secondary-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.submit-btn {
    justify-self: start;
    margin-top: 1rem;
}

.contact-info h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.contact-item p {
    margin-bottom: 0;
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--text-white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: clamp(2rem, 4vw, 3rem);
    margin-bottom: 2rem;
}

.footer-logo .logo-img {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 1rem;
}

.footer-logo p {
    color: #9CA3AF;
    margin-bottom: 0;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #9CA3AF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-white);
}

.footer-contact p {
    color: #9CA3AF;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: #9CA3AF;
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-image {
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero {
        padding-top: 80px;
        min-height: auto;
    }
    
    .hero-content {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .services,
    .portfolio,
    .contact {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 0.9375rem;
    }
    
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
        min-width: 120px;
    }
    
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .step-number {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .portfolio-info,
    .service-card {
        padding: 1.25rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem;
        font-size: 1rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Smooth scrolling for Safari */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
    .btn,
    .nav-link,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* Improve form field sizing on mobile */
@media (max-width: 768px) {
    select,
    textarea,
    input[type="text"],
    input[type="email"],
    input[type="tel"] {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
}

/* Better image handling */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure sections don't overflow */
section {
    overflow-x: hidden;
}

/* Better spacing for very small screens */
@media (max-width: 360px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .nav-container {
        padding: 0 0.5rem;
    }
    
    h1, .hero-title {
        line-height: 1.2;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Smooth scrolling improvements for mobile */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: rgba(45, 74, 61, 0.1);
    }
}

/* Better mobile menu visibility */
@media (max-width: 768px) {
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* Improved portfolio and service card mobile layout */
@media (max-width: 768px) {
    .portfolio-image {
        height: 220px;
    }
    
    .portfolio-placeholder {
        font-size: 1rem;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
    
    .service-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* Optimize stat display on mobile */
@media (max-width: 480px) {
    .about-stats {
        gap: 1.5rem;
    }
    
    .stat {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.875rem;
    }
}
