/*
Theme Name: Pichaya Construction Theme
Theme URI: https://pichayamongkolconstruction.com
Author: Pichayamongkol Construction
Author URI: https://pichayamongkolconstruction.com
Description: Full-featured WordPress theme matching React frontend design
Version: 1.0.0
License: Private
Text Domain: pichaya
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    overflow-x: hidden;
}

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

.header.scrolled {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #333;
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    list-style: none;
}

.nav-link,
.nav-menu a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s;
    padding: 8px 12px;
    display: inline-block;
}

.nav-link:hover,
.nav-menu a:hover {
    color: #E85D04;
}

/* Hero Section - Exact match with React */
.hero-section {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    position: relative;
}

.hero-media-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 10;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 20;
}

.hero-content {
    position: absolute;
    bottom: 120px;
    left: 60px;
    z-index: 30;
    color: white;
    max-width: 700px;
}

.architect-credit {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #E85D04 0%, #DC2F02 50%, #B91801 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 300;
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -3px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 16px rgba(0, 0, 0, 0.5);
    font-family: 'Montserrat', sans-serif;
}

.hero-description {
    font-size: 1.125rem;
    font-weight: 300;
    margin-bottom: 32px;
    opacity: 0.9;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 0, 0, 0.3);
    max-width: 600px;
}

.hero-button {
    display: inline-block;
    background: transparent;
    color: white;
    padding: 16px 40px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.hero-button:hover {
    background: rgba(232, 93, 4, 0.9);
    border-color: #E85D04;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(232, 93, 4, 0.3);
}

/* Hero Counter */
.hero-counter {
    position: absolute;
    bottom: 120px;
    right: 60px;
    z-index: 30;
    color: white;
    font-size: 24px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
}

.hero-dots {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    gap: 10px;
}

.hero-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.hero-dots .dot.active {
    background: #E85D04;
    width: 30px;
    border-radius: 5px;
}

/* Services Section */
.services {
    padding: 100px 0;
    background: #f8f9fa;
}

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

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

.section-title {
    font-size: 3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #E85D04 0%, #DC2F02 100%);
    transform: scaleX(0);
    transition: transform 0.3s;
}

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

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
}

.service-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(232, 93, 4, 0.1);
    font-family: 'Montserrat', sans-serif;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.service-subtitle {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 16px;
    font-family: 'Montserrat', sans-serif;
}

.service-description {
    color: #666;
    line-height: 1.8;
}

/* Portfolio Section */
.portfolio {
    padding: 100px 0;
    background: white;
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.portfolio-filter button {
    padding: 10px 24px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.portfolio-filter button.active,
.portfolio-filter button:hover {
    background: #E85D04;
    color: white;
    border-color: #E85D04;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    background: white;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

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

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.view-project {
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border: 2px solid white;
    border-radius: 25px;
    transition: all 0.3s;
}

.view-project:hover {
    background: white;
    color: #333;
}

.portfolio-info {
    padding: 24px;
    background: white;
}

.portfolio-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.portfolio-title a {
    color: #333;
    text-decoration: none;
}

.portfolio-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.9rem;
}

.portfolio-excerpt {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* About Section */
.about {
    padding: 100px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: 24px;
    font-weight: 600;
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.8;
    opacity: 0.95;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: #f8f9fa;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #333;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-icon {
    font-size: 24px;
    color: #E85D04;
    min-width: 30px;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Kanit', sans-serif;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #E85D04;
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1);
}

.submit-button {
    background: #E85D04;
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.submit-button:hover {
    background: #d54d00;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(232, 93, 4, 0.3);
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-section p {
    color: #999;
    line-height: 1.8;
    margin-bottom: 12px;
}

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

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #E85D04;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid #333;
    color: #666;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s;
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        padding: 30px;
        transition: left 0.3s;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-content {
        left: 20px;
        bottom: 80px;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

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

.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.animated {
    animation: fadeIn 0.8s ease forwards;
}

/* Rating Stars */
.rating {
    color: #ffc107;
    font-size: 1.2rem;
    margin-top: 10px;
}

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

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* Page Specific Styles */
.page-section {
    padding-top: 120px;
    min-height: 100vh;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #E85D04;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d54d00;
}