/* ================================
   TPGC Site Works Page Styles
   Color Theme: Green

   Theme tokens (--sw-*) are defined in styles.css.
   ================================ */

/* ================================
   Page Transition Effect
   ================================ */
.siteworks-page {
    animation: pageFadeIn 0.6s ease-out;
}

@keyframes pageFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   Text Selection Color Override
   ================================ */
.siteworks-page ::selection {
    background: var(--sw-accent);
    color: white;
}

.siteworks-page ::-moz-selection {
    background: var(--sw-accent);
    color: white;
}

/* ================================
   Scrollbar Override - Green
   ================================ */
body.siteworks-page::-webkit-scrollbar,
html:has(body.siteworks-page)::-webkit-scrollbar {
    width: 10px;
}

body.siteworks-page::-webkit-scrollbar-track,
html:has(body.siteworks-page)::-webkit-scrollbar-track {
    background: var(--bg-cream);
}

body.siteworks-page::-webkit-scrollbar-thumb,
html:has(body.siteworks-page)::-webkit-scrollbar-thumb {
    background: var(--sw-primary);
    border-radius: 5px;
}

body.siteworks-page::-webkit-scrollbar-thumb:hover,
html:has(body.siteworks-page)::-webkit-scrollbar-thumb:hover {
    background: var(--sw-primary-light);
}

/* For Firefox */
.siteworks-page {
    scrollbar-color: var(--sw-primary) var(--bg-cream);
    scrollbar-width: thin;
}

/* ================================
   Navigation Overrides
   ================================ */
.nav-siteworks {
    background: rgba(250, 251, 252, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-siteworks.scrolled {
    background: rgba(250, 251, 252, 0.95);
    box-shadow: 0 4px 30px rgba(44, 110, 73, 0.1);
}

.nav-siteworks .logo-divider {
    background: linear-gradient(to bottom, transparent, var(--sw-primary), transparent);
}

.nav-siteworks .logo-tagline {
    color: var(--sw-primary);
}

.nav-cta-siteworks {
    background: var(--sw-primary-dark) !important;
}

.nav-cta-siteworks:hover {
    background: var(--sw-primary) !important;
}

/* Back to home button */
.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.nav-siteworks .back-to-home:hover {
    color: var(--sw-primary);
}

.back-to-home svg {
    display: block;
    transition: transform 0.3s ease;
}

.back-to-home:hover svg {
    transform: translateX(-4px);
}

/* ================================
   Hero Section
   ================================ */
.siteworks-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--nav-height);
}

.siteworks-hero-bg {
    /* Batch 11: now an <img> element with fetchpriority="high". */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.1);
}

.siteworks-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(44, 110, 73, 0.92) 0%, 
        rgba(30, 77, 51, 0.88) 50%,
        rgba(44, 110, 73, 0.85) 100%
    );
}

.siteworks-hero .hero-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 1;
}

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

.service-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 1s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

.service-badge .badge-dot {
    width: 8px;
    height: 8px;
    background: var(--sw-accent-light);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(48px, 10vw, 100px);
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.hero-title .title-accent {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-style: normal;
    background: linear-gradient(
        90deg, 
        var(--sw-accent-light) 0%, 
        var(--sw-accent-light) 40%,
        #c8e6c9 50%,
        var(--sw-accent-light) 60%,
        var(--sw-accent-light) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerWaveGreen 8s ease-in-out infinite;
    margin-left: 0.15em;
}

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

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: white;
    color: var(--sw-primary);
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 1s cubic-bezier(0.4, 0, 0.2, 1) 0.9s forwards;
    transition: all 0.3s ease;
}

.hero-cta:hover {
    background: var(--sw-accent-light);
    transform: translateY(-2px);
}

.service-scroll-indicator {
    /* Batch 4.5: Moved to bottom-left to avoid CTA overlap on shorter viewports */
    position: absolute;
    bottom: 48px;
    left: 48px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.service-scroll-indicator span {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.6);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; height: 60px; }
    50% { opacity: 1; height: 80px; }
}

/* ================================
   About Section
   ================================ */
.siteworks-about {
    padding: 100px 0;
    background: var(--bg-cream);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-content .section-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--sw-primary);
    margin-bottom: 20px;
}

.about-title {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 40px;
}

.about-title em {
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--sw-primary);
}

.about-text-wrapper {
    text-align: left;
}

.about-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: justify;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* ================================
   Services Section
   ================================ */
.siteworks-services {
    padding: 100px 0;
    background: white;
    position: relative;
}

/* Subtle background pattern */
.siteworks-services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(44, 110, 73, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 110, 73, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: center center;
    pointer-events: none;
}

.services-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.services-header .section-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--sw-primary);
    margin-bottom: 20px;
}

.services-title {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    position: relative;
    z-index: 1;
}

.service-category {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
}

.service-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(44, 110, 73, 0.12);
}

.category-icon {
    width: 64px;
    height: 64px;
    background: rgba(44, 110, 73, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--sw-primary);
}

.category-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

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

.service-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--sw-primary);
    border-radius: 50%;
}

.service-list li.license-note {
    color: var(--sw-primary);
    font-weight: 500;
}

.service-list li.license-note::before {
    background: var(--sw-accent);
}

/* ================================
   Gallery Section
   ================================ */
.gallery-section-siteworks {
    padding: 100px 0;
    background: var(--bg-cream);
}

.gallery-section-siteworks .section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label-siteworks {
    color: var(--sw-primary) !important;
}

.gallery-section-siteworks .gallery-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.gallery-section-siteworks .gallery-carousel {
    flex: 1;
    overflow: hidden;
    border-radius: 16px;
}

.gallery-section-siteworks .gallery-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 500px;
}

.gallery-section-siteworks .gallery-slide {
    flex: 0 0 calc(33.333% - 12px);
    margin: 0 6px;
    aspect-ratio: 3/4;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.gallery-section-siteworks .gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-section-siteworks .gallery-slide:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-section-siteworks .gallery-nav {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-cream);
    border: 2px solid var(--sw-primary);
    border-radius: 50%;
    color: var(--sw-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.gallery-section-siteworks .gallery-nav:hover {
    background: var(--sw-primary);
    color: white;
}

.gallery-section-siteworks .gallery-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.gallery-section-siteworks .gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(44, 110, 73, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-section-siteworks .gallery-dot.active,
.gallery-section-siteworks .gallery-dot:hover {
    background: var(--sw-primary);
    transform: scale(1.2);
}

.gallery-section-siteworks .gallery-cta {
    text-align: center;
}

/* Gallery CTA Slide (blurred last slide with link) */
.gallery-slide-cta {
    position: relative;
    overflow: hidden;
}

.gallery-cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.gallery-cta-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px);
    transform: scale(1.05);
}

.gallery-cta-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 110, 73, 0.6) 0%, rgba(30, 77, 51, 0.7) 100%);
}

.gallery-cta-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: white;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-cta-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gallery-cta-content {
    text-align: center;
    margin-bottom: 16px;
}

.gallery-cta-text {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.gallery-cta-subtext {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.gallery-cta-arrow {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gallery-cta-card:hover .gallery-cta-arrow {
    background: white;
    color: var(--sw-primary);
    transform: translateX(4px);
}

.gallery-cta-card:hover .gallery-cta-arrow svg {
    stroke: var(--sw-primary);
}

.gallery-slide-cta.in-view .gallery-cta-arrow {
    animation: pulseGreen 0.6s ease-in-out 2;
}

@keyframes pulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(143, 188, 143, 0.7);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(143, 188, 143, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(143, 188, 143, 0);
    }
}

.btn-secondary-siteworks {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: transparent;
    color: var(--sw-primary);
    border: 2px solid var(--sw-primary);
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

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

.btn-secondary-siteworks svg {
    transition: transform 0.3s ease;
}

.btn-secondary-siteworks:hover svg {
    transform: translateX(4px);
}

/* ================================
   Quote Section (Testimonial)
   ================================ */
.siteworks-quote {
    padding: 80px 0;
    background: var(--sw-primary);
    position: relative;
    overflow: hidden;
}

/* Decorative pattern */
.siteworks-quote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.quote-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.quote-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.quote-icon-img {
    width: 56px;
    height: auto;
    opacity: 0.6;
    filter: brightness(0) invert(1);
}

.quote-text {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(24px, 4vw, 36px);
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: white;
    line-height: 1.5;
    margin: 0 0 32px 0;
    position: relative;
}

/* Typing effect */
.quote-text.typing {
    overflow: hidden;
}

.quote-text .text-content {
    display: inline;
}

.quote-text .quote-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: var(--sw-accent-light);
    margin-left: 4px;
    animation: cursorBlink 0.8s ease-in-out infinite;
    vertical-align: middle;
    transform: translateY(-0.05em);
}

.quote-text .quote-cursor.hidden {
    opacity: 0;
}

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

.quote-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--sw-accent-light), white);
    margin: 0 auto 24px;
    border-radius: 2px;
}

.quote-author {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-style: normal;
}

/* ================================
   Contact Section
   ================================ */
.contact-section-siteworks {
    background: white;
}

.contact-icon-siteworks {
    background: rgba(44, 110, 73, 0.1) !important;
    color: var(--sw-primary) !important;
}

.input-line-siteworks {
    background: linear-gradient(90deg, var(--sw-primary), var(--sw-primary-light)) !important;
}

.submit-btn-siteworks {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 36px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 100px;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--sw-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(44, 110, 73, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit-btn-siteworks:hover {
    background: var(--sw-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(44, 110, 73, 0.25);
}

.submit-btn-siteworks svg {
    transition: transform 0.3s ease;
}

.submit-btn-siteworks:hover svg {
    transform: translateX(4px);
}

/* ================================
   Footer Overrides
   ================================ */
.footer-siteworks {
    background: var(--sw-primary-dark);
}

.footer-top-line-siteworks {
    background: linear-gradient(90deg, var(--sw-accent), var(--sw-primary), var(--sw-accent));
}

.footer-siteworks .footer-logo .logo-text {
    color: white;
}

.footer-siteworks .footer-logo .logo-est,
.logo-est-siteworks {
    color: var(--sw-accent-light);
}

.footer-siteworks .social-links a:hover {
    background: var(--sw-primary);
    border-color: var(--sw-primary);
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-section-siteworks .gallery-slide {
        flex: 0 0 calc(50% - 12px);
    }
    
    .gallery-section-siteworks .gallery-track {
        min-height: 450px;
    }
}

@media (max-width: 768px) {
    .siteworks-hero {
        min-height: 100vh;
    }
    
    .hero-title {
        font-size: clamp(36px, 10vw, 60px);
    }
    
    .hero-title .title-accent {
        display: block;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .siteworks-about,
    .siteworks-services,
    .gallery-section-siteworks,
    .siteworks-quote {
        padding: 70px 0;
    }
    
    .service-category {
        padding: 30px;
    }
    
    .gallery-cta-text {
        font-size: 20px;
    }
    
    .gallery-cta-arrow {
        width: 48px;
        height: 48px;
    }
    
    .about-text {
        text-align: left;
    }
    
    .gallery-section-siteworks .gallery-carousel-wrapper {
        flex-direction: column;
        gap: 16px;
    }
    
    .gallery-section-siteworks .gallery-slide {
        flex: 0 0 calc(100% - 12px);
    }
    
    .gallery-section-siteworks .gallery-track {
        min-height: 400px;
    }
    
    .gallery-section-siteworks .gallery-nav {
        width: 44px;
        height: 44px;
    }
    
    .service-scroll-indicator {
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .service-badge {
        padding: 10px 18px;
        font-size: 12px;
    }
    
    .service-scroll-indicator {
        display: none;
    }
    
    .hero-cta {
        padding: 14px 24px;
        font-size: 14px;
    }
}
