/* Atkinson Lead Form - Public Styles */

/* Reset & container */
.alf-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
    color: #333;
    line-height: 1.6;
    scroll-margin-top: 80px;
}

.alf-form-wrapper *,
.alf-form-wrapper *::before,
.alf-form-wrapper *::after {
    box-sizing: border-box;
}

/* Progress bar */
.alf-progress {
    margin-bottom: 30px;
}

.alf-progress-bar {
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.alf-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a7c3f, #6aab5e);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.alf-progress-steps {
    display: flex;
    justify-content: space-between;
}

.alf-progress-step {
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
    transition: color 0.3s;
}

.alf-progress-step.active {
    color: #4a7c3f;
    font-weight: 600;
}

.alf-progress-step.completed {
    color: #6aab5e;
}

/* Step titles */
.alf-step-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e2b;
    margin: 0 0 6px;
    text-align: center;
}

.alf-step-subtitle {
    font-size: 15px;
    color: #777;
    text-align: center;
    margin: 0 0 25px;
}

/* Step transitions */
.alf-step {
    display: none;
    animation: alfFadeIn 0.35s ease;
}

.alf-step.active {
    display: block;
}

@keyframes alfFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards - shared */
.alf-card {
    background: #fff;
    border: 2px solid #e4e4e4;
    border-radius: 10px;
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    position: relative;
}

.alf-card:hover {
    border-color: #6aab5e;
    box-shadow: 0 4px 16px rgba(74, 124, 63, 0.12);
    transform: translateY(-2px);
}

.alf-card.selected {
    border-color: #4a7c3f;
    background-color: #f5faf4;
    box-shadow: 0 4px 16px rgba(74, 124, 63, 0.18);
}

.alf-card.selected::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #4a7c3f;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.alf-card-title {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: #2c3e2b;
    margin: 12px 0 6px;
    padding: 0;
    line-height: 1.3;
}

.alf-card-desc {
    display: block;
    font-size: 13px;
    color: #888;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

/* Service cards grid */
.alf-service-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

/* Card icon */
.alf-card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 56px;
}

.alf-card-icon svg {
    width: 48px;
    height: 48px;
}

/* Sub-category cards — square tiles with overlay */
.alf-sub-cards {
    grid-template-columns: repeat(3, 1fr);
}

.alf-sub-card {
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-color: #f0f5ee;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.alf-sub-card-overlay {
    text-align: center;
    margin-top: auto;
    background: rgba(0, 0, 0, 0.50);
    padding: 14px 14px 12px;
}

/* No-image cards: plain background, no overlay effect */
.alf-sub-card:not(.alf-sub-card-has-image) .alf-sub-card-overlay {
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px 14px;
}

.alf-sub-card-title {
    display: block;
    font-size: 15px;
    font-family: inherit;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    color: #2c3e2b;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.alf-sub-card-desc {
    display: block;
    font-size: 11px;
    font-family: inherit;
    color: #aaa;
    margin: 1px 0 0;
    padding: 0;
    line-height: 1.2;
}

.alf-sub-card-has-image .alf-sub-card-title {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.alf-sub-card-has-image .alf-sub-card-desc {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.alf-sub-card {
    transition: none !important;
    transform: none !important;
    will-change: auto;
}

.alf-sub-card:hover {
    transform: none !important;
    background-color: transparent;
    border-color: #6aab5e;
    box-shadow: 0 4px 16px rgba(74, 124, 63, 0.12);
}

.alf-sub-card.selected {
    border-color: #4a7c3f;
    box-shadow: 0 4px 16px rgba(74, 124, 63, 0.25);
    transform: none !important;
    background-color: transparent !important;
}

/* Tier cards — dynamic column layout (CSS grid for bulletproof columns) */
.alf-tier-cards {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

/* 2-column layout — same card size as 3-column, centered */
.alf-tier-cards[data-columns="2"] {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.alf-tier-cards[data-columns="2"] .alf-tier-card {
    width: calc((100% - 32px) / 3);
    flex-shrink: 0;
}

/* Center incomplete last row */
.alf-tier-cards::after {
    content: none;
}

.alf-tier-card {
    background: #fff;
    border: 2px solid #e4e4e4;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.alf-tier-card:hover {
    border-color: #6aab5e;
    box-shadow: 0 4px 16px rgba(74, 124, 63, 0.12);
    transform: translateY(-2px);
}

.alf-tier-card.selected {
    border-color: #4a7c3f;
    box-shadow: 0 4px 16px rgba(74, 124, 63, 0.18);
}

.alf-tier-card.selected::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #4a7c3f;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
    z-index: 2;
}

.alf-tier-image {
    width: 100%;
    height: 220px;
    background: #e8efe6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.alf-tier-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Old text-only placeholder (deprecated) */
.alf-tier-image .alf-tier-placeholder {
    color: #aaa;
    font-size: 13px;
}

/* BUG 2 FIX: Green gradient placeholder for tiers with no photo */
.alf-tier-placeholder-gradient {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #4a7c3f, #6aab5e);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px 8px 0 0;
    padding: 16px;
}

.alf-tier-placeholder-gradient span {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
}

.alf-tier-info {
    padding: 12px 14px;
    text-align: center;
    flex: 1;
}

.alf-tier-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e2b;
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

.alf-tier-price {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #4FA59F;
    margin: 2px 0 8px;
    padding: 0;
    letter-spacing: 0.2px;
}

.alf-tier-desc {
    display: block;
    font-size: 11px;
    color: #999;
    margin: 0;
    padding: 0;
    line-height: 1.15;
}

/* More Information expandable section */
.alf-tier-more-wrap {
    padding: 0 16px 14px;
    text-align: center;
    margin-top: auto;
}

.alf-tier-more-btn {
    display: inline-block;
    width: 100%;
    padding: 6px 12px;
    background: #f5faf4;
    border: 1px solid #d5e8d0;
    border-radius: 6px;
    color: #4a7c3f;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    font-family: inherit;
}

.alf-tier-more-btn:hover {
    background: #e8f5e3;
    border-color: #4a7c3f;
}

.alf-tier-more-btn.alf-more-open {
    border-radius: 6px 6px 0 0;
    border-bottom: none;
    background: #f5faf4;
}

.alf-tier-more-content {
    background: #f9fdf8;
    border: 1px solid #d5e8d0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 14px 16px;
    text-align: left;
}

.alf-tier-more-text {
    display: block;
    font-size: 12px;
    line-height: 1.25;
    color: #666;
    margin: 0;
    padding: 0;
    white-space: pre-line;
}

/* "More Services" overflow card */
.alf-more-services-card {
    border-style: dashed;
    border-color: #c5d9c0;
    background: #f9fdf8;
}

.alf-more-services-card .alf-sub-card-overlay {
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px 14px;
}

.alf-more-services-card:hover {
    border-color: #4a7c3f;
    background: #f0f7ee;
}

.alf-more-services-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.alf-more-services-card h3 {
    color: #4a7c3f;
}

.alf-more-services-card p {
    color: #888;
}

/* Simple option cards (Winter services, etc.) */
.alf-simple-cards {
    grid-template-columns: repeat(3, 1fr);
}

/* Contact form */
#alf-contact-form {
    max-width: 640px;
    margin: 0 auto;
}

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

.alf-form-full {
    grid-column: 1 / -1 !important;
}

.alf-form-half {
    grid-column: span 1 !important;
}

.alf-form-row {
    display: flex;
    gap: 16px;
}

.alf-form-row-2 > .alf-form-group {
    flex: 1;
}

.alf-form-group {
    margin-bottom: 0;
}

.alf-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}

.alf-required {
    color: #c0392b;
}

.alf-optional {
    font-weight: 400;
    color: #aaa;
    font-size: 12px;
}

.alf-form-group input,
.alf-form-group select,
.alf-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    color: #333;
    background: #fff;
}

.alf-form-group input:focus,
.alf-form-group select:focus,
.alf-form-group textarea:focus {
    outline: none;
    border-color: #4a7c3f;
    box-shadow: 0 0 0 3px rgba(74, 124, 63, 0.1);
}

.alf-form-group input.alf-input-error,
.alf-form-group select.alf-input-error {
    border-color: #c0392b;
}

.alf-form-error {
    background: #fdf0ef;
    border: 1px solid #e6a19c;
    color: #c0392b;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Buttons */
.alf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.alf-btn-primary {
    background: #4a7c3f;
    color: #fff;
}

.alf-btn-primary:hover {
    background: #3d6934;
}

.alf-btn-primary:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.alf-btn-back {
    background: #f0f0f0;
    color: #555;
}

.alf-btn-back:hover {
    background: #e0e0e0;
}

.alf-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

/* Spinner */
.alf-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: alfSpin 0.6s linear infinite;
}

@keyframes alfSpin {
    to { transform: rotate(360deg); }
}

/* Confirmation */
.alf-confirmation {
    text-align: center;
    padding: 16px 0;
}

.alf-confirm-icon {
    margin-bottom: 10px;
}

.alf-confirm-icon svg {
    width: 48px;
    height: 48px;
}

.alf-confirm-title {
    font-size: 22px;
    color: #4a7c3f;
    margin: 0 0 6px;
    line-height: 1.2;
}

.alf-confirm-text {
    font-size: 14px;
    color: #555;
    margin: 0 0 4px;
    line-height: 1.4;
    text-align: center;
}

.alf-confirm-signature {
    font-size: 13px;
    color: #4a7c3f;
    font-weight: 600;
    font-style: italic;
    margin: 10px 0 16px;
}

.alf-confirm-summary {
    background: #f5faf4;
    border: 1px solid #d5e8d0;
    border-radius: 8px;
    padding: 14px 20px;
    text-align: left;
    max-width: 100%;
    margin: 0;
}

.alf-confirm-summary h4 {
    font-size: 12px;
    font-weight: 600;
    color: #4a7c3f;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alf-confirm-summary p {
    margin: 2px 0;
    font-size: 13px;
    color: #555;
    line-height: 1.3;
}

.alf-confirm-summary strong {
    color: #333;
}

/* Responsive */
@media (max-width: 640px) {
    .alf-form-wrapper {
        padding: 15px;
    }

    .alf-service-cards {
        grid-template-columns: 1fr;
    }

    .alf-sub-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .alf-tier-cards {
        grid-template-columns: 1fr !important;
    }

    .alf-tier-cards[data-columns="2"] {
        display: flex !important;
        flex-direction: column;
    }

    .alf-tier-cards[data-columns="2"] .alf-tier-card {
        width: 100%;
    }

    .alf-simple-cards {
        grid-template-columns: 1fr;
    }

    .alf-form-grid {
        grid-template-columns: 1fr;
    }

    .alf-form-half {
        grid-column: span 1;
    }

    .alf-form-row {
        flex-direction: column;
        gap: 0;
    }

    .alf-step-title {
        font-size: 20px;
    }

    .alf-progress-steps {
        font-size: 11px;
    }

    .alf-step-nav {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .alf-step-nav .alf-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .alf-sub-cards {
        grid-template-columns: 1fr;
    }
}

/* Loading & error states */
.alf-loading-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    grid-column: 1 / -1;
}

.alf-loading-state p {
    margin: 12px 0 0;
    font-size: 14px;
}

.alf-spinner-lg {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #e4e4e4;
    border-top-color: #4a7c3f;
    border-radius: 50%;
    animation: alfSpin 0.7s linear infinite;
}

.alf-services-error {
    text-align: center;
    padding: 50px 20px;
    grid-column: 1 / -1;
}

.alf-services-error p {
    margin: 16px 0 0;
    font-size: 15px;
    color: #666;
    font-weight: 500;
}
