/**
 * Test Drive Page Styles
 *
 * @package Toyota_Wisniewski
 * @since 1.0.0
 */

/* ==========================================================================
   Section 1: Hero - Full Width Background
   ========================================================================== */

.test-drive-hero {
    position: relative;
    background-size: cover;
    background-position: 70% center; /* Show person and car on mobile */
    background-repeat: no-repeat;
    min-height: 620px; /* Mobile: increased +120px */
    display: flex;
    align-items: center;
}

@media (min-width: 768px) {
    .test-drive-hero {
        min-height: 650px;
        background-position: center;
    }
}

@media (min-width: 1024px) {
    .test-drive-hero {
        min-height: 700px;
    }
}

/* Dark overlay for better text readability */
.test-drive-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

.test-drive-hero .container {
    position: relative;
    z-index: 1;
}

.test-drive-hero__content {
    max-width: 600px;
    padding: var(--space-10) 0;
}

@media (min-width: 1024px) {
    .test-drive-hero__content {
        padding: var(--space-16) 0;
    }
}

.test-drive-hero__title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-light);
    line-height: 1.1;
    margin-bottom: var(--space-6);
    color: var(--color-white);
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .test-drive-hero__title {
        font-size: var(--font-size-5xl);
    }
}

@media (min-width: 1024px) {
    .test-drive-hero__title {
        font-size: var(--font-size-6xl);
    }
}

.test-drive-hero__text {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-6);
    line-height: var(--line-height-relaxed);
    font-weight: var(--font-weight-light);
}

/* CTA Label - above button */
.test-drive-hero__cta-label {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-light);
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
    .test-drive-hero__cta-label {
        font-size: var(--font-size-xl);
    }
}

@media (min-width: 1024px) {
    .test-drive-hero__cta-label {
        font-size: var(--font-size-2xl);
    }
}

/* ==========================================================================
   Section 2: Benefits - Two Column Layout (from Figma)
   ========================================================================== */

.test-drive-benefits {
    padding: var(--space-16) 0;
    background-color: var(--color-white);
}

.test-drive-benefits__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-10);
}

@media (min-width: 1024px) {
    .test-drive-benefits__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-16);
        align-items: start;
    }
}

/* Left Column: Big Title */
.test-drive-benefits__intro {
    max-width: 725px;
}

.test-drive-benefits__title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-light);
    line-height: 1.15;
    margin-bottom: var(--space-6);
    text-transform: uppercase;
    color: var(--color-secondary);
}

@media (min-width: 768px) {
    .test-drive-benefits__title {
        font-size: var(--font-size-4xl);
        line-height: 1.15;
    }
}

@media (min-width: 1200px) {
    .test-drive-benefits__title {
        font-size: 70px;
        line-height: 80px;
    }
}

.test-drive-benefits__line {
    width: 100%;
    max-width: 569px;
    height: 4px;
    background-color: var(--color-primary);
    margin: var(--space-6) 0;
}

.test-drive-benefits__text {
    font-size: 17px;
    font-weight: var(--font-weight-light);
    color: var(--color-gray-700);
    line-height: 27px;
    margin: 0;
}

/* Right Column: Benefits List */
.test-drive-benefits__list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Single Benefit */
.test-drive-benefit {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-6) 0;
    border-bottom: 1px solid var(--color-gray-200);
}

.test-drive-benefit:first-child {
    padding-top: 0;
}

.test-drive-benefit:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.test-drive-benefit__icon {
    flex-shrink: 0;
    width: 31px;
    height: 31px;
    margin-top: 4px;
}

.test-drive-benefit__icon svg {
    width: 31px;
    height: 31px;
}

.test-drive-benefit__content {
    flex: 1;
}

.test-drive-benefit__title {
    font-size: 30px;
    font-weight: var(--font-weight-light);
    text-transform: uppercase;
    line-height: 40px;
    margin-bottom: var(--space-2);
    color: var(--color-secondary);
}

@media (max-width: 767px) {
    .test-drive-benefit__title {
        font-size: var(--font-size-xl);
        line-height: 1.3;
    }
}

.test-drive-benefit__text {
    font-size: 17px;
    font-weight: var(--font-weight-light);
    color: var(--color-gray-700);
    margin: 0;
    line-height: 27px;
}

/* ==========================================================================
   Section 3: "To prostsze niż myślisz" - Gray Background, Centered
   ========================================================================== */

.test-drive-simple {
    padding: var(--space-16) 0;
    background-color: #f2f2f2;
}

.test-drive-simple__header {
    text-align: center;
    max-width: 896px;
    margin: 0 auto;
}

.test-drive-simple__title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-light);
    line-height: 1.15;
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    color: var(--color-secondary);
}

@media (min-width: 768px) {
    .test-drive-simple__title {
        font-size: var(--font-size-4xl);
        line-height: 1.15;
    }
}

@media (min-width: 1200px) {
    .test-drive-simple__title {
        font-size: 70px;
        line-height: 80px;
    }
}

.test-drive-simple__subtitle {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-light);
    line-height: 40px;
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    color: var(--color-secondary);
}

@media (min-width: 768px) {
    .test-drive-simple__subtitle {
        font-size: 30px;
    }
}

.test-drive-simple__line {
    width: 209px;
    height: 4px;
    background-color: var(--color-primary);
    margin: 0 auto var(--space-6);
}

.test-drive-simple__text {
    font-size: 17px;
    font-weight: var(--font-weight-light);
    color: var(--color-gray-700);
    line-height: 27px;
    margin: 0 auto;
    max-width: 725px;
}

/* ==========================================================================
   Section 4: "Jak przebiega jazda?" - Full Width Background Image
   ========================================================================== */

.test-drive-how-v2 {
    position: relative;
    min-height: 400px;
    background-image: url('../../images/background-jazda-testowa-2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

@media (min-width: 768px) {
    .test-drive-how-v2 {
        min-height: 500px;
    }
}

@media (min-width: 1024px) {
    .test-drive-how-v2 {
        min-height: 589px;
    }
}

/* Gradient overlay on left side for text readability */
.test-drive-how-v2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.3) 70%);
    pointer-events: none;
}

@media (min-width: 1024px) {
    .test-drive-how-v2::before {
        width: 65%;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
    }
}

.test-drive-how-v2 .container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.test-drive-how-v2__content {
    max-width: 725px;
    padding: var(--space-10) 0;
}

@media (min-width: 768px) {
    .test-drive-how-v2__content {
        padding: var(--space-12) 0;
    }
}

@media (min-width: 1024px) {
    .test-drive-how-v2__content {
        padding: var(--space-16) 0;
    }
}

.test-drive-how-v2__title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-light);
    text-transform: uppercase;
    color: var(--color-white);
    margin: 0 0 var(--space-6);
    line-height: 1.15;
}

@media (min-width: 768px) {
    .test-drive-how-v2__title {
        font-size: var(--font-size-4xl);
        line-height: 1.15;
    }
}

@media (min-width: 1200px) {
    .test-drive-how-v2__title {
        font-size: 70px;
        line-height: 80px;
    }
}

.test-drive-how-v2__line {
    width: 100%;
    max-width: 569px;
    height: 4px;
    background-color: var(--color-primary);
    margin-bottom: var(--space-6);
}

.test-drive-how-v2__text {
    font-size: 17px;
    font-weight: var(--font-weight-light);
    color: rgba(255, 255, 255, 0.9);
    line-height: 27px;
    margin: 0;
}

/* ==========================================================================
   Section 5: Form Section
   ========================================================================== */

.test-drive-form {
    padding: var(--space-16) 0;
    background-color: var(--color-white);
}

.test-drive-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-10);
}

@media (min-width: 1024px) {
    .test-drive-form__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-16);
        align-items: start;
    }
}

.test-drive-form__intro {
    max-width: 725px;
}

.test-drive-form__title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-light);
    line-height: 1.15;
    margin-bottom: var(--space-6);
    text-transform: uppercase;
    color: var(--color-secondary);
}

@media (min-width: 768px) {
    .test-drive-form__title {
        font-size: var(--font-size-4xl);
        line-height: 1.15;
    }
}

@media (min-width: 1200px) {
    .test-drive-form__title {
        font-size: 70px;
        line-height: 80px;
    }
}

.test-drive-form__line {
    width: 100%;
    max-width: 569px;
    height: 4px;
    background-color: var(--color-primary);
    margin: var(--space-6) 0;
}

.test-drive-form__text {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-light);
    text-transform: uppercase;
    color: var(--color-secondary);
    line-height: 40px;
    margin: 0;
}

@media (min-width: 768px) {
    .test-drive-form__text {
        font-size: 30px;
    }
}

.test-drive-form__wrapper {
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    padding: var(--space-6);
}

@media (min-width: 768px) {
    .test-drive-form__wrapper {
        padding: var(--space-8);
    }
}

.test-drive-form__header {
    margin-bottom: var(--space-6);
}

.test-drive-form__form-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-light);
    text-transform: uppercase;
    margin-bottom: var(--space-2);
}

.test-drive-form__form-subtitle {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-light);
    color: var(--color-gray-500);
    margin: 0;
}

.test-drive-form__form .form-group {
    margin-bottom: var(--space-4);
}

.test-drive-form__form .form-input,
.test-drive-form__form .form-select,
.test-drive-form__form .form-textarea {
    background-color: var(--color-gray-50);
    border-color: var(--color-gray-200);
}

.test-drive-form__form .form-input:focus,
.test-drive-form__form .form-select:focus,
.test-drive-form__form .form-textarea:focus {
    background-color: var(--color-white);
    border-color: var(--color-secondary);
}

.test-drive-form__form .form-checkbox {
    margin-bottom: var(--space-6);
}

.test-drive-form__form .btn {
    margin-top: var(--space-4);
}

/* ==========================================================================
   Contact Form 7 Overrides
   ========================================================================== */

.test-drive-form__wrapper .wpcf7-form {
    margin: 0;
}

.test-drive-form__wrapper .wpcf7-form p {
    margin: 0 0 var(--space-4);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-light);
}

/* First paragraph = form header */
.test-drive-form__wrapper .wpcf7-form p:first-child {
    text-transform: uppercase;
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-6);
}

/* Hide label text but keep inputs visible */
.test-drive-form__wrapper .wpcf7-form label {
    display: block;
    margin-bottom: var(--space-4);
    font-size: 0;
}

.test-drive-form__wrapper .wpcf7-form label .wpcf7-form-control-wrap {
    font-size: var(--font-size-base);
}

.test-drive-form__wrapper .wpcf7-form-control-wrap {
    display: block;
}

.test-drive-form__wrapper input[type="text"],
.test-drive-form__wrapper input[type="email"],
.test-drive-form__wrapper input[type="tel"],
.test-drive-form__wrapper select,
.test-drive-form__wrapper textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-gray-700);
    background-color: var(--color-gray-50);
    border: 1px solid var(--color-gray-200);
    border-radius: 0;
    transition: border-color var(--transition-base), background-color var(--transition-base);
}

.test-drive-form__wrapper input[type="text"]:focus,
.test-drive-form__wrapper input[type="email"]:focus,
.test-drive-form__wrapper input[type="tel"]:focus,
.test-drive-form__wrapper select:focus,
.test-drive-form__wrapper textarea:focus {
    outline: none;
    background-color: var(--color-white);
    border-color: var(--color-secondary);
}

.test-drive-form__wrapper textarea {
    min-height: 120px;
    resize: vertical;
}

.test-drive-form__wrapper input[type="submit"] {
    display: block;
    width: 100%;
    padding: var(--space-4) var(--space-8);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-white);
    background-color: var(--color-primary);
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background-color var(--transition-base);
}

.test-drive-form__wrapper input[type="submit"]:hover {
    background-color: var(--color-primary-hover);
}

/* Acceptance / Checkbox */
.test-drive-form__wrapper .wpcf7-acceptance,
.test-drive-form__wrapper .wpcf7-checkbox {
    margin: 0 0 var(--space-6);
}

.test-drive-form__wrapper .wpcf7-acceptance .wpcf7-list-item,
.test-drive-form__wrapper .wpcf7-checkbox .wpcf7-list-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    margin: 0;
}

.test-drive-form__wrapper .wpcf7-acceptance input[type="checkbox"],
.test-drive-form__wrapper .wpcf7-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    flex-shrink: 0;
    margin: 2px 0 0 0;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.test-drive-form__wrapper .wpcf7-list-item-label {
    font-size: var(--font-size-sm);
    color: var(--color-gray-700);
    line-height: 1.5;
    cursor: pointer;
}

/* Response messages */
.test-drive-form__wrapper .wpcf7-response-output {
    margin: var(--space-4) 0 0 !important;
    padding: var(--space-4) !important;
    border: none !important;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-sm);
}

.test-drive-form__wrapper .wpcf7 form.sent .wpcf7-response-output {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb !important;
}

.test-drive-form__wrapper .wpcf7 form.invalid .wpcf7-response-output,
.test-drive-form__wrapper .wpcf7 form.unaccepted .wpcf7-response-output {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb !important;
}

.test-drive-form__wrapper .wpcf7 form.failed .wpcf7-response-output {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb !important;
}

/* Validation error tips */
.test-drive-form__wrapper .wpcf7-not-valid-tip {
    color: var(--color-error);
    font-size: var(--font-size-xs);
    margin-top: var(--space-1);
    display: block;
}

/* Invalid field styling */
.test-drive-form__wrapper .wpcf7-form .wpcf7-not-valid {
    border-color: var(--color-error) !important;
}

