/*
Theme Name: Thuận Phát Tài
Description: Professional WordPress theme for mobile awning and folding roof company
Author: NinePoints
Version: 1.0
Text Domain: thuan-phat-tai
*/

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Ensure no gaps from WordPress admin bar when logged in */
.admin-bar .hero {
    margin-top: 0;
    padding-top: 32px; /* Height of WP admin bar */
}

@media screen and (max-width: 782px) {
    .admin-bar .hero {
        padding-top: 46px; /* Height of mobile WP admin bar */
    }
}

/* Header */
.header {
    background: #004a3a;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

/* Right section container - nav menu should be on the right */
.nav-container .nav-menu {
    margin-left: auto;
    margin-right: 1rem; /* Space between menu and phone */
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

/* Custom logo styles */
.custom-logo-link {
    display: inline-block;
    text-decoration: none;
    line-height: 1;
}

.custom-logo {
    max-height: 60px;
    width: auto;
    height: auto;
    vertical-align: middle;
    transition: opacity 0.3s ease;
}

.custom-logo:hover {
    opacity: 0.8;
}

.hero-contact {
    /* display: flex;
    justify-content: center;
    align-items: center; */
    margin-top: 1rem;
}

.hero-contact img {
    width: 320px;
}

.hero-contact img {
    max-width: 100%;
    height: auto;
}
/* Header right side container */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Header phone number */
.header-phone {
    display: flex;
    align-items: center;
}

.phone-link {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
}

.phone-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

.phone-link i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.phone-number {
    font-size: 1rem;
    letter-spacing: 0.5px;
}

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

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    /* Fallback for browsers that don't support WebP */
    background: linear-gradient(rgba(74, 134, 84, 0.6), rgba(90, 159, 102, 0.6)), url('assets/images/hero1.png');
    /* WebP version for modern browsers */
    background: linear-gradient(rgba(74, 134, 84, 0.6), rgba(90, 159, 102, 0.6)), url('assets/images/hero1.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 0;
    margin-top: 0;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #4A8654;
}

/* Services Section */
.services {
    padding: 5rem 0;
    background: #f8f9fa;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #4A8654;
}

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

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #ff6b35, #f7931e);
}

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

.service-icon {
    font-size: 3rem;
    color: #ff6b35;
    margin-bottom: 1rem;
}

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

/* About Section */
.about {
    padding: 5rem 0;
    background: white;
}

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

.about-text {
    padding: 2rem;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #4A8654;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #666;
}

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

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #ff6b35;
}

.about-image {
    position: relative;
    height: 400px;
    background: linear-gradient(45deg, #4A8654, #5a9f66);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

/* Gallery Section */
.gallery {
    padding: 5rem 0;
    background: #f8f9fa;
}

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

.gallery-item {
    height: 200px;
    background: linear-gradient(45deg, #4A8654, #5a9f66);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    padding: 2rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #4A8654;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.contact-item i {
    font-size: 1.5rem;
    color: #ff6b35;
    width: 30px;
}

.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #4A8654;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
}

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

/* Footer */
.footer {
    background: #4A8654;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #f0f8ff;
}

.footer-section p,
.footer-section li {
    margin-bottom: 0.5rem;
    color: #b8d4e3;
}

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

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

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

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #ff6b35;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #b8d4e3;
}

/* Page Header (for interior pages) */
.page-header {
    background: linear-gradient(rgba(74, 134, 84, 0.9), rgba(90, 159, 102, 0.9)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%23e8f4f8" width="1200" height="400"/><path fill="%23b8d4e3" d="M0 200l25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25 25-25 25 25v200H0z"/></svg>');
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 80px;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    max-width: 600px;
}

/* Breadcrumb */
.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 0;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.breadcrumb-nav a {
    color: #4A8654;
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

/* Project Pages Styles */
.filter-section {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #eee;
}

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

.filter-tabs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    border: 2px solid #f8f9fa;
    border-radius: 25px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-tab:hover,
.filter-tab.active {
    background: #4A8654;
    border-color: #4A8654;
    color: white;
}

.search-box {
    position: relative;
    max-width: 300px;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #4A8654;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.projects-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

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

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

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

.project-image {
    height: 250px;
    background: linear-gradient(45deg, #4A8654, #5a9f66);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ff6b35;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.project-info {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4A8654;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.project-location {
    color: #666;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.project-date {
    color: #999;
    font-size: 0.9rem;
}

.view-project-btn {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.view-project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

/* Project Detail Page Styles */
.project-header {
    background: white;
    padding: 2rem 0;
}

.project-title {
    font-size: 2.5rem;
    color: #4A8654;
    margin-bottom: 1rem;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item i {
    color: #4A8654;
}

.project-status {
    display: inline-block;
    background: #ff6b35;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.project-status.completed {
    background: #28a745;
}

.project-status.in-progress {
    background: #ffc107;
    color: #333;
}

.project-content {
    padding: 2rem 0;
}

.project-content .container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.content-main {
    background: white;
}

.content-sidebar {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.gallery-section {
    margin-bottom: 3rem;
}

.main-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(45deg, #4A8654, #5a9f66);
    border-radius: 15px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.thumbnail {
    height: 80px;
    background: linear-gradient(45deg, #4A8654, #5a9f66);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.thumbnail.active {
    border: 3px solid #ff6b35;
}

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

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

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Medium screens - tablets */
@media (max-width: 992px) and (min-width: 769px) {
    .phone-number {
        font-size: 0.9rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .custom-logo {
        max-height: 45px;
    }

    /* Mobile layout adjustments */
    .nav-container {
        justify-content: space-between; /* Logo left, right elements right */
    }

    .nav-container .nav-menu {
        margin-left: 0;
        margin-right: 0;
    }

    /* Mobile right side adjustments */
    .header-right {
        gap: 0.5rem; /* Smaller gap on mobile */
    }

    /* Mobile phone number adjustments */
    .header-phone {
        margin-left: 0;
    }

    .phone-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .phone-number {
        display: inline; /* Show full phone number on mobile */
        font-size: 0.85rem;
    }

    .phone-link i {
        margin-right: 0.4rem;
        font-size: 1rem;
    }

    .nav-menu,
    #nav-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #004a3a;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 999;
    }

    .header .nav-menu.active,
    .header #nav-menu.active,
    .nav-menu.active,
    #nav-menu.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-tabs {
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .project-title {
        font-size: 2rem;
    }

    .project-content .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .content-sidebar {
        position: static;
    }

    .main-image {
        height: 250px;
    }

    .project-meta {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Floating elements */
.floating {
    animation: float 6s ease-in-out infinite;
}