/* Performance Optimized CSS for PRO-QUALITY FENCE LLC */

/* CSS Variables */
:root {
    --primary-black: #000000;
    --primary-white: #ffffff;
    --neon-pink: #ff006e;
    --neon-pink-hover: #ff4590;
    --gray-light: #f8f8f8;
    --gray-medium: #666666;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--primary-black);
    background: var(--primary-white);
    overflow-x: hidden;
}

/* Section Spacing - Optimized */
section {
    padding: 4rem 0;
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Add subtle separator between sections */
section:not(:last-of-type)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1), transparent);
}

.hero {
    padding: 0;
    margin-top: 80px;
    padding-top: 2rem;
    min-height: calc(100vh - 80px);
}

.hero::after {
    display: none;
}

.trust-badges {
    padding: 3rem 0;
    position: relative;
    z-index: 1;
    margin-top: 0;
}

.trust-badges::after {
    display: none;
}

.why-choose::after,
.contact::after {
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Header - Optimized */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: baseline;
}

.logo .pro-quality {
    font-family: 'Brush Script MT', cursive;
    font-weight: 300;
    color: var(--primary-black);
    margin-right: 0.3rem;
}

.logo .fence {
    color: var(--neon-pink);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--primary-black);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-pink);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.cta-button {
    background: var(--neon-pink);
    color: var(--primary-white) !important;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 110, 0.3);
}

.cta-button:hover {
    background: var(--neon-pink-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 110, 0.4);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--primary-black);
    transition: all 0.3s ease;
}

/* Mobile menu active state */
.mobile-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section - Optimized */
.hero {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 0, 110, 0.05) 0%, transparent 70%);
    /* Reduced animation duration for better performance */
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(180deg); }
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    z-index: 1;
    position: relative;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 0, 110, 0.1);
    color: var(--neon-pink);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--primary-black);
}

.hero-text h1 span {
    color: var(--neon-pink);
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--gray-medium);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-features {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.hero-feature .check {
    color: var(--neon-pink);
    font-size: 1.2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.5rem;
}

.secondary-btn {
    background: transparent !important;
    color: var(--primary-black) !important;
    border: 2px solid var(--primary-black) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.phone-icon {
    font-size: 1.2rem;
}

.hero-urgency {
    font-size: 0.95rem;
    color: var(--gray-medium);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-image {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--shadow);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.6));
    padding: 1rem;
}

.image-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow);
    text-align: center;
}

.badge-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--neon-pink);
}

.badge-text {
    font-size: 0.9rem;
    color: var(--gray-medium);
}

/* Trust Badges */
.trust-badges {
    background: var(--primary-black);
    color: var(--primary-white);
    padding: 2rem 0;
}

.badges-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.badge-icon {
    width: 40px;
    height: 40px;
    background: var(--neon-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Services Section */
.services {
    padding: 5rem 0;
    background: var(--primary-white);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    width: 100%;
    box-sizing: border-box;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.2rem;
    color: var(--gray-medium);
    max-width: 700px;
    margin: 0 auto;
}

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

.service-card {
    background: var(--primary-white);
    border: 2px solid var(--gray-light);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--neon-pink);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow);
    border-color: var(--neon-pink);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--neon-pink) 0%, var(--neon-pink-hover) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--primary-white);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Fence Types */
.fence-types {
    background: var(--gray-light);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    margin-top: 2rem;
}

.fence-types h3 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.fence-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.fence-type {
    background: var(--primary-white);
    padding: 1rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.fence-type:hover {
    background: var(--neon-pink);
    color: var(--primary-white);
    transform: scale(1.05);
}

/* Gallery */
.gallery {
    padding: 5rem 0;
    background: var(--primary-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    height: 300px;
    background: var(--gray-light);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px var(--shadow);
}

/* About Section */
.about {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--gray-medium);
    margin-bottom: 1.5rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--neon-pink);
}

.stat-label {
    color: var(--gray-medium);
}

.about-image {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--shadow);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Why Choose Us */
.why-choose {
    padding: 5rem 0;
    background: var(--primary-black);
    color: var(--primary-white);
}

.why-choose .section-title h2 {
    color: var(--primary-white);
}

.why-choose .section-title p {
    color: rgba(255, 255, 255, 0.8);
}

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

.feature {
    text-align: center;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--neon-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature p {
    color: rgba(255, 255, 255, 0.8);
}

/* Testimonials */
.testimonials {
    padding: 5rem 0;
    background: var(--gray-light);
}

.testimonial-card {
    background: var(--primary-white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
    max-width: 800px;
    margin: 2rem auto 0;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 40px;
    font-size: 6rem;
    color: var(--neon-pink);
    opacity: 0.3;
}

.testimonial-text {
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--gray-medium);
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-black);
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: var(--primary-white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gray-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-pink);
    font-size: 1.2rem;
}

.map-container {
    background: var(--gray-light);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
}

.google-map {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.google-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
footer {
    background: var(--primary-black);
    color: var(--primary-white);
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: var(--neon-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 0, 110, 0.3);
}

.footer-info {
    margin-bottom: 2rem;
}

.footer-info p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 1rem;
    font-size: 1.2rem;
}

/* Performance Optimizations */
img {
    loading: lazy;
}

/* Reduced animations for better performance */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 110, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 0, 110, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 110, 0); }
}

.cta-button {
    animation: pulse 3s infinite;
}

.cta-button:hover {
    animation: none;
}

/* Optimized fade-in animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-number {
    animation: countUp 0.8s ease-out;
}

/* Fade In Animation - Optimized */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

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

/* Fix for body when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Mobile Responsive - Optimized */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--primary-white);
        flex-direction: column;
        justify-content: center;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -5px 0 20px var(--shadow);
    }
    
    .nav-links.active {
        right: 0;
        padding-top: 80px;
    }
    
    .mobile-menu {
        display: flex;
        z-index: 1001;
    }
    
    /* Hero adjustments for mobile */
    .hero {
        min-height: auto;
        padding: 2rem 0 4rem 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 3rem;
    }
    
    .hero-text {
        order: 1;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1.1rem;
    }
    
    .hero-features {
        justify-content: flex-start;
    }
    
    .hero-buttons {
        justify-content: flex-start;
    }
    
    .hero-image {
        height: 250px;
        order: 2;
    }
    
    .hero-urgency {
        font-size: 0.9rem;
    }
    
    /* Trust badges mobile */
    .badges-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .badge {
        width: 45%;
        margin-bottom: 1rem;
    }
    
    /* Services mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Gallery mobile */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* About mobile */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Features mobile */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Contact mobile */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    /* Map mobile */
    .map-container {
        padding: 1.5rem;
    }
    
    .google-map {
        height: 300px;
    }
    
    /* Section titles mobile */
    .section-title h2 {
        font-size: 2rem;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-content {
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small screens */
@media (max-width: 480px) {
    .hero {
        padding: 1.5rem 0 3rem 0;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
        text-align: left;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
    
    .badges-container {
        grid-template-columns: 1fr;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .hero-urgency {
        text-align: left;
        font-size: 0.85rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .fence-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    section {
        padding: 3rem 0;
    }
    
    .container {
        padding: 0 4%;
    }
}

/* Large screens */
@media (min-width: 1600px) {
    .container,
    .hero-content,
    nav,
    .badges-container,
    .footer-content {
        max-width: 1600px;
    }
}
