/**
 * FASTFIX Homepage - Thiết kế đơn giản, tinh tế, hài hòa
 * Màu sắc theo logo: Cam #F68B1E | Xanh navy #001A98 | Trắng #FFFFFF
 */

/* ===== HERO SECTION ===== */
.ff-hero {
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ff-secondary) 0%, #0028b8 100%);
    position: relative;
    overflow: hidden;
}
.ff-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.ff-hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 1rem;
}
.ff-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--ff-white);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}
.ff-hero__tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.9);
    font-weight: 400;
    max-width: 560px;
    margin: 0 auto;
}

/* ===== SEARCH BOX ===== */
.ff-helpbox {
    max-width: 720px;
    margin: -2rem auto 0;
    position: relative;
    z-index: 10;
    padding: 0 1rem;
}
.ff-helpbox__inner {
    background: #ffa143;
    /* border-radius: 12px; */
    box-shadow: 0 8px 32px rgba(0, 26, 152, 0.12);
    padding: 1.5rem;
    padding-bottom: 100px;
    padding-top: 30px;
    margin-bottom: 50px;
}
.ff-search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    /* border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.5rem 1rem; */
    /* transition: border-color 0.2s, box-shadow 0.2s; */
}
.ff-search-form:focus-within {
    border-color: var(--ff-primary);
    box-shadow: 0 0 0 3px rgba(246,139,30,0.15);
}
.ff-search-form input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.3rem;
    line-height: 3;
    padding: 5px;
}
.ff-search-form button {
    background: var(--ff-primary);
    color: var(--ff-white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.ff-search-form button:hover {
    background: var(--ff-primary-hover);
}
.ff-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    position: absolute;
    left: 0;
    right: 0;
    padding-top: 30px;
}
.ff-quick-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ff-secondary);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 30px;
    background: #2f418b;
    padding: 20px 30px;
    color: white;
}
.ff-quick-links a:hover {
    color: var(--ff-primary);
}
@media (max-width: 768px) {
    .ff-quick-links a {
        font-size: 24px;
        padding: 15px 12px;
    }
}

/* ===== SECTION TITLES ===== */
.ff-section {
    padding: 3rem 0;
}
.ff-section--light {
    background: var(--ff-light);
}
.ff-section__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ff-secondary);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}
.ff-section__title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--ff-primary);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* ===== CATEGORY CARDS ===== */
.ff-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.ff-category-card {
    background: var(--ff-white);
    /* border-radius: 12px; */
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: block;
}
.ff-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,26,152,0.1);
}
.ff-category-card__img {
    aspect-ratio: 16/10;
    object-fit: cover;
    width: 100%;
}
.ff-category-card__body {
    padding: 1.25rem;
}
.ff-category-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ff-secondary);
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}
.ff-category-card:hover .ff-category-card__title {
    color: var(--ff-primary);
}
.ff-category-card__desc {
    font-size: 0.9rem;
    color: var(--ff-muted);
    line-height: 1.5;
}

/* ===== PRODUCT CARDS ===== */
.ff-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}
.ff-product-card {
    background: var(--ff-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: block;
}
.ff-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,26,152,0.1);
}
.ff-product-card__img-wrap {
    aspect-ratio: 1;
    background: var(--ff-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.ff-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
/* .ff-product-card:hover .ff-product-card__img {
    transform: scale(1.05);
}
.ff-product-card__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(246, 139, 30, 0.4) 25%, rgba(255, 193, 7, 0.6) 50%, rgba(246, 139, 30, 0.4) 75%, transparent 100%);
    background-size: 200% 200%;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: none;
}
.ff-product-card:hover .ff-product-card__shine {
    opacity: 1;
    animation: ff-shine-diagonal 0.8s ease-in-out forwards;
}
@keyframes ff-shine-diagonal {
    0% {
        background-position: 200% 200%;
    }
    100% {
        background-position: -200% -200%;
    }
} */
.ff-product-card__body {
    padding: 1rem;
}
.ff-product-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ff-secondary);
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.ff-product-card:hover .ff-product-card__title {
    color: var(--ff-primary);
}
.ff-product-card__desc {
    font-size: 0.8rem;
    color: var(--ff-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== CTA BUTTON ===== */
.ff-btn-primary {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--ff-primary);
    color: var(--ff-white) !important;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}
.ff-btn-primary:hover {
    background: var(--ff-primary-hover);
    color: var(--ff-white) !important;
}
.ff-btn-outline {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--ff-secondary);
    color: var(--ff-secondary) !important;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.ff-btn-outline:hover {
    background: var(--ff-secondary);
    color: var(--ff-white) !important;
}

/* ===== SOLUTION CARDS ===== */
.ff-solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}
.ff-solution-card {
    background: var(--ff-white);
    /* border-radius: 12px; */
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.ff-solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,26,152,0.1);
}
.ff-solution-card__img-wrap {
    width: 100%;
    aspect-ratio: 16/15;
    background: var(--ff-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.ff-solution-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.ff-solution-card:hover .ff-solution-card__img {
    transform: scale(1.08);
}
.ff-solution-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 26, 152, 0.5) 0%, rgba(0, 26, 152, 0.2) 100%);
    transition: opacity 0.3s ease;
}
.ff-solution-card:hover .ff-solution-card__overlay {
    opacity: 0.2;
}
.ff-solution-card__content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    z-index: 2;
}
.ff-solution-card__overlay-title {
    margin: 0;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 800;
    color: var(--ff-white);
    line-height: 1.3;
    max-width: 85%;
}
.ff-solution-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--ff-primary);
    color: var(--ff-white);
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(246,139,30,0.3);
}
.ff-solution-card__btn:hover {
    background: var(--ff-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(246,139,30,0.4);
}
.ff-solution-card__btn i {
    font-size: 1rem;
}
.ff-solution-card__body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    display: none;
}
.ff-solution-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ff-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    transition: color 0.2s;
}
.ff-solution-card:hover .ff-solution-card__title {
    color: var(--ff-primary);
}
.ff-solution-card__desc {
    font-size: 0.9rem;
    color: var(--ff-muted);
    line-height: 1.55;
    flex: 1;
}

/* ===== INTRO BLOCK ===== */
.ff-intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2rem;
}
.ff-intro__title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ff-secondary);
    margin-bottom: 0.5rem;
}
.ff-intro__text {
    color: var(--ff-muted);
    line-height: 1.6;
}

/* ===== CONTAINER ===== */
.ff-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== LEGACY OVERRIDES (cho cmp-* classes) ===== */
body .ff-home .cmp-hero--darkbg .cmp-hero__content--wrapper--dark h1,
body .ff-home .cmp-display {
    color: var(--ff-white) !important;
}
body .ff-home .cmp-helpbox {
    background: transparent;
}
body .ff-home .cmp-helpbox-bar {
    background: var(--ff-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
body .ff-home .cmp-title__text,
body .ff-home .cmp-layout__title {
    color: var(--ff-secondary) !important;
}
body .ff-home .cmp-teaser--card .cmp-teaser__content h4,
body .ff-home .cmp-teaser_productContent__title {
    color: var(--ff-secondary) !important;
}
body .ff-home .cmp-teaser--card:hover .cmp-teaser__content h4,
body .ff-home .cmp-teaser_product:hover .cmp-teaser_productContent__title {
    color: var(--ff-primary) !important;
}
body .ff-home .cmp-background--light-grey {
    background: var(--ff-light) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .ff-solutions-grid {
        grid-template-columns: 1fr;
    }
    .ff-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .ff-solutions-grid {
        grid-template-columns: 1fr;
    }
    .ff-product-grid {
        grid-template-columns: 1fr;
    }
    .ff-category-grid {
        grid-template-columns: 1fr;
    }
}
