/*
Theme Name: TDX Premium
Theme URI: http://moitruongthaoduongxanh.com
Description: Custom high-performance theme for TDX Group (Thảo Dương Xanh). Built for speed and SEO.
Author: Antigravity AI
Version: 1.0.0
Text Domain: tdx-premium
*/

:root {
    --primary-color: #1b5e20; /* Deep Forest Green */
    --accent-color: #43a047; /* Vibrant Grass Green */
    --secondary-color: #2e7d32;
    --dark-color: #0a140c; /* Near Black Green */
    --light-bg: #f4f7f5;
    --white: #ffffff;
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --max-width: 1240px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-premium: 0 20px 50px rgba(0,0,0,0.1);
    --glass: rgba(255, 255, 255, 0.85);
}

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

body {
    font-family: 'Montserrat', 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 25px;
}

/* Typography Enhancements */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 35px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 50px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(27, 94, 32, 0.3);
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(27, 94, 32, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

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

/* Header & Nav */
header {
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

.logo-text {
    font-size: clamp(1rem, 3vw, 1.3rem);
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

nav ul {
    display: flex;
    gap: 35px;
}

nav ul li a {
    font-weight: 700;
    font-size: 14px;
    color: var(--dark-color);
    position: relative;
    padding: 5px 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--accent-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 24px;
    cursor: pointer;
}

/* Lead Magnet Bar */
.lead-magnet-bar {
    background: #e9f5ec;
    padding: 10px 0;
    border-bottom: 1px solid #d4edda;
    font-size: 13px;
    font-weight: 600;
}

.lmb-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.lmb-content i {
    color: var(--primary-color);
}

.lmb-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Hero Section */
.hero {
    height: 90vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 25px;
    letter-spacing: -1px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-bottom: 40px;
    font-weight: 400;
    opacity: 0.95;
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h2 {
    font-size: 2.8rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-title .underline {
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* Form Styles */
.multi-step-form {
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
}

.wpcf7-form-control-wrap { margin-bottom: 20px; display: block; }
.wpcf7-text, .wpcf7-tel, .wpcf7-select, .wpcf7-textarea, .wpcf7-number, input[type="number"] {
    width: 100% !important;
    display: block !important;
    padding: 15px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #f9f9f9;
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}

.quote-form-container label {
    display: block;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.85rem; /* Slightly smaller to prevent wrapping */
    min-height: 48px; /* Fixed height for labels to keep inputs aligned */
}

.form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
}

/* Ensure labels inside grid take full width */
.form-grid label {
    width: 100% !important;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
}

.wpcf7-text:focus, .wpcf7-tel:focus, .wpcf7-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(27, 94, 32, 0.1);
}

.wpcf7-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.wpcf7-submit:hover {
    transform: scale(1.02);
}

/* Footer */
.main-footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 100px 0 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 60px;
}

.footer-brand-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-logo {
    height: 60px;
    width: auto;
}

.footer-company-name {
    font-size: 0.9rem;
    color: var(--white);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-highlight {
    font-size: 1.4rem;
    color: var(--accent-color);
    font-weight: 800;
    display: block;
    margin-top: 5px;
}

.footer-slogan {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.8;
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
}

.footer-list li {
    margin-bottom: 12px;
    font-size: 0.9rem;
    opacity: 0.85;
}

.footer-contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    opacity: 0.85;
}

.footer-contact-info i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.footer-bottom {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

.fab-wrapper {
    position: fixed;
    bottom: 40px;
    left: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fab-item {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.fab-item:hover {
    transform: scale(1.1) translateY(-5px);
}

.fab-item.zalo { background: #0068ff; }
.fab-item.phone { background: var(--accent-color); }

/* Thumb-Zone Nav */
.thumb-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    height: 80px;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.1);
    z-index: 1001;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    padding: 10px 15px;
    gap: 10px;
}

.thumb-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--dark-color);
    gap: 5px;
}

.thumb-nav i {
    font-size: 20px;
    color: var(--primary-color);
}

.btn-quote {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff !important;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-size: 0.75rem !important;
}

/* Grid System */
.grid {
    display: grid;
    gap: 40px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ISO Items */
.iso-item {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.iso-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
    border-bottom-color: var(--accent-color);
}

/* Partners */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
    align-items: center;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .hero h1 { font-size: 3.5rem; }
}

@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .partners-grid { grid-template-columns: repeat(4, 1fr); }
    .hero h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
    .partners-grid { grid-template-columns: repeat(3, 1fr); }
    
    .logo img { height: 45px; }
    
    header { padding: 10px 0; }
    
    .main-nav { display: none; }
    
    .main-nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 30px 20px;
        box-shadow: 0 15px 30px rgba(0,0,0,0.15);
        z-index: 1000;
        border-top: 1px solid #eee;
    }

    .main-nav.active .nav-list {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .main-nav.active .nav-list li a {
        color: var(--dark-color);
        font-weight: 700;
        font-size: 1.1rem;
    }

    .mobile-menu-toggle {
        display: block;
    }
    
    .header-actions .btn {
        display: none;
    }
    
    section { padding: 50px 0; }
    
    .hero { height: 60vh; text-align: center; }
    .hero h1 { font-size: 2.2rem !important; }
    .hero p { border-left: none; padding-left: 0; font-size: 0.95rem; }
    
    .section-title h2 { font-size: 1.8rem; }
    
    .multi-step-form { padding: 30px 20px; }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-contact-info p {
        justify-content: center;
    }
    
    .thumb-nav {
        display: grid;
    }
    
    .fab-wrapper {
        bottom: 110px; /* Move up to avoid thumb-nav */
        left: 15px;
    }

    .fab-item {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .footer-brand-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    /* Add padding to last section to avoid being covered by thumb-nav */
    main > section:last-of-type,
    .main-footer {
        padding-bottom: 100px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.catalog-form .form-group {
    margin-bottom: 15px;
}

.catalog-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.catalog-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

.catalog-form .form-submit {
    margin-top: 25px;
}

.catalog-form .form-submit .btn {
    width: 100%;
    padding: 15px;
    font-weight: 700;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
