/**
 * Contact Intro Component Styles
 *
 * Introduction section for contact page with team card and case studies.
 *
 * @package RIKAI_Marketing
 * @since 1.0.0
 */

/* ==================================================
   Intro Title
   ================================================== */

.contact-intro-title {
    text-align: center;
    margin-bottom: 30px;
}

/* ==================================================
   Team Card
   ================================================== */

.contact-team-card {
    padding: 20px;
    background-color: #ffffff;
    position: relative;
    border-bottom: 3px solid var(--primary-color);
}

/* triangle */
/* triangle màu xanh (border thật) */
.contact-team-card::before {
    content: "";
    position: absolute;
    bottom: -13px;
    left: 50%;
    transform: translateX(-50%);

    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--primary-color);
}

/* triangle trắng (đè lên để tạo effect cut) */
.contact-team-card::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);

    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ffffff; /* màu nền dưới */
}

.team-highlight {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.team-image {
    width: 100%;
    margin: 10px 0px 20px;
    overflow: hidden;
}

.team-image img {
    width: 100%;
    height: auto;
    display: block;
}

.team-description {
    margin-bottom: 0px;
}

/* ==================================================
   Case Studies Section
   ================================================== */

.contact-case-studies {
    margin-top: 20px;
    background-color: var(--secondary-color-lightest);
    border-radius: 20px;
    padding: 30px 20px 20px;
}

.case-studies-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

/* ==================================================
   Case Studies Grid
   ================================================== */

/* Tablet and below: full 3-column grid, no scroll */
.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Desktop: horizontal scroll carousel */
@media (min-width: 992px) {
    .case-studies-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 20px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        cursor: grab;
    }

    .case-studies-grid::-webkit-scrollbar {
        display: none;
    }

    .case-studies-grid.is-grabbing {
        cursor: grabbing;
    }
}

/* ==================================================
   Case Study Card
   ================================================== */

.case-study-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-bottom: 2px solid var(--secondary-color-light);
    padding: 30px 20px;
    overflow: hidden;
    transition: box-shadow 1s ease;
    min-width: 220px;
    cursor: default !important;
}

.case-study-card:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.14);
}

/* Desktop: fixed width per card so 3 cards overflow container and enable scroll */
@media (min-width: 992px) {
    .case-study-card {
        flex: 0 0 calc(45% - 10px);
        scroll-snap-align: center;
    }
}

.case-study-image-wrapper {
    position: relative;
    overflow: hidden;
}

.case-study-feature-image {
    width: 100%;
    height: auto;
    min-height: 120px;
    object-fit: cover;
    opacity: 0.7;
}

.case-study-number-image {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 60px;
    height: auto;
}

.case-study-number-text {
    /* position: absolute;
    top: 10px;
    left: 12px; */
    font-size: 50px;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 2px var(--secondary-color-light);
    line-height: 1;
    letter-spacing: -3px;
    margin-bottom: -32px;
    z-index: 2;
}

.case-study-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    margin: 20px 0px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

.case-study-button {
    font-size: 14px;
    margin: 0 auto;
    padding: 7px 20px;
}

.contact-form-area {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    height: 100%;
}

/* ==================================================
   Responsive Design
   ================================================== */

@media (max-width: 992px) {
    .case-study-card {
        min-width: auto;
    }

    .contact-intro-section {
        padding: 60px 0;
    }

    /* Tablet: keep all 3 cards visible in a row */
    .case-studies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .case-studies-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .contact-intro-section {
        padding: 50px 0;
    }

    .contact-intro-title {
        margin-bottom: 40px;
    }

    .contact-team-card {
        margin-bottom: 60px;
    }

    /* Mobile: horizontal scroll carousel (same as desktop) */
    .case-studies-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .case-studies-grid::-webkit-scrollbar {
        display: none;
    }

    .case-study-card {
        flex: 0 0 78%;
        scroll-snap-align: center;
    }
}

@media (max-width: 576px) {
    .contact-intro-section {
        padding: 40px 0;
    }

    .case-studies-title {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .case-study-title {
        font-size: 15px;
    }
}

/* ==================================================
   Contact Form 7
   ================================================== */
/* Form wrapper */
.contact-form .wpcf7 {
    /* ... */
}

/* Input fields & textarea */
.contact-form .wpcf7 input[type="text"],
.contact-form .wpcf7 input[type="email"],
.contact-form .wpcf7 input[type="tel"],
.contact-form .wpcf7 textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease;
}

.contact-form .wpcf7 input:focus,
.contact-form .wpcf7 textarea:focus {
    border-color: var(--primary-color);
}

/* Labels */
.contact-form .wpcf7 .wpcf7-form-control-wrap {
    display: contents;
    margin-bottom: 16px;
}

/* Submit button */
.contact-form .wpcf7 input[type="submit"] {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.contact-form .wpcf7 input[type="submit"]:hover {
    background: var(--primary-color-dark);
}

/* Validation error */
.contact-form .wpcf7 .wpcf7-not-valid-tip {
    color: #d63638;
    font-size: 12px;
    margin-top: 4px;
}

/* Response messages */
.contact-form .wpcf7 .wpcf7-response-output {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
}

.custom-form .contact-form--row {
    display: flex;
    align-items: stretch;
    margin-bottom: 10px;
}

.contact-form--row .contact-form--row-label {
    font-weight: 700;
    width: 35%;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 10px;
    padding-right: 20px;
    justify-content: space-between;
    min-width: 205px;
}

.contact-form--row .contact-form--row-label .required {
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 1px 8px;
    background-color: #d63638;
}

.contact-form--row .contact-form--row-value {
    width: 65%;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--secondary-border-color);
}

.contact-form--row .contact-form--row-value .text-muted {
    font-size: 14px;
    opacity: 0.8;
}

.contact-form--row .contact-form--row-value .wpcf7-checkbox {
    display: flex;
    flex-direction: column;
}

.contact-form--row .contact-form--row-value .wpcf7-checkbox .wpcf7-list-item {
    margin-left: 0px;
}

.contact-form--row .contact-form--row-value .wpcf7-textarea {
    height: 100px;
}

.contact-form--row.contact-form--row-acceptance {
    margin-top: 50px;
}

.wpcf7-acceptance {
    margin: 0 auto;
}

.contact-form .wpcf7 input[type="submit"] {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 32px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    min-width: 150px;
    margin-left: calc(50% - 75px);
    margin-top: 30px;
}

@media (max-width: 768px) {
    .contact-form--row {
        flex-direction: column;
        margin-top: 20px;
    }

    .contact-form--row .contact-form--row-label {
        font-weight: 700;
        width: 100%;
        display: flex;
        align-items: center;
        border-bottom: 0px;
        padding-bottom: 5px;
        gap: 10px;
        justify-content: flex-start;
    }

    .contact-form--row .contact-form--row-value {
        width: 100%;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--primary-color);
    }

    .contact-form--row
        .contact-form--row-value
        .wpcf7-checkbox
        .wpcf7-list-item {
        margin-left: 20px;
    }
}
