/*
 * Yard Dog Web Theme
 * Derived from MasterBuilder.Mobile/MasterBuilder.App/Resources/Styles/YardDogTheme.xaml
 */

:root {
    /* ── Core palette (from YardDogTheme.xaml) ── */
    --yd-primary: #EDF0FF;
    --yd-secondary: #FFB89C;
    --yd-background: #2F00FF;
    --yd-black: #000000;
    --yd-white: #FFFFFF;
    --yd-red: #DC3545;
    --yd-blue: #0D6EFD;
    --yd-placeholder: #D3D3D3;

    /* ── Extended palette ── */
    --yd-accent: #5B6ABF;
    --yd-avatar-bg: #5B6ABF;
    --yd-avatar-fg: #FFFFFF;
    --yd-success: #2E7D32;
    --yd-success-bg: #E8F5E9;
    --yd-error-bg: #FFEBEE;
    --yd-danger-bg: #FFF3F0;
    --yd-subtle-text: #666666;

    /* ── Derived tokens ── */
    --yd-card-bg: var(--yd-primary);
    --yd-card-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --yd-card-radius: 10px;
    --yd-btn-radius: 10px;
    --yd-btn-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    --yd-input-bg: var(--yd-white);
    --yd-input-border: #D0D0D0;
    --yd-nav-height: 64px;
    --yd-footer-bg: #1a0066;
}

/* ── Public nav ── */
.yd-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 0 1.25rem;
    height: var(--yd-nav-height);
    background: var(--yd-background);
    color: var(--yd-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.yd-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--yd-white);
    text-decoration: none;
    flex-shrink: 0;
}

.yd-nav-brand:visited {
    color: var(--yd-white);
}

.yd-brand-logo {
    height: 32px;
    width: auto;
}

/* ── Hamburger button ── */
.yd-nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.yd-nav-hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--yd-white);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
    transform-origin: center;
}

/* Animate to X when open */
.yd-nav.is-open .yd-nav-hamburger span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}
.yd-nav.is-open .yd-nav-hamburger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.yd-nav.is-open .yd-nav-hamburger span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* ── Nav links ── */
.yd-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.yd-nav-links a {
    color: var(--yd-white);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.9;
}

.yd-nav-links a:visited {
    color: var(--yd-white);
}

.yd-nav-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.yd-nav-cta {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

/* ── Mobile nav ── */
@media (max-width: 720px) {
    .yd-nav {
        padding: 0 1rem;
        height: var(--yd-nav-height);
        min-height: var(--yd-nav-height);
        align-items: center;
        flex-wrap: nowrap;
    }

    .yd-nav-hamburger {
        display: flex;
    }

    .yd-nav-links {
        display: none;
        position: absolute;
        top: var(--yd-nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.25rem 1.25rem;
        background: var(--yd-background);
        box-shadow: 0 6px 16px rgba(0,0,0,0.3);
        z-index: 99;
    }

    .yd-nav-links.yd-nav-links--open,
    .yd-nav.is-open .yd-nav-links {
        display: flex;
    }

    .yd-nav-links a {
        padding: 0.75rem 0.25rem;
        font-size: 1.05rem;
        border-bottom: 1px solid rgba(255,255,255,0.12);
        opacity: 1;
    }

    .yd-nav-links a:last-child {
        border-bottom: none;
    }

    .yd-nav-cta {
        margin-top: 0.5rem;
        text-align: center;
        padding: 0.75rem 1rem;
        border-radius: var(--yd-btn-radius);
    }
}

/* ── Buttons ── */
.btn-yd {
    display: inline-block;
    border-radius: var(--yd-btn-radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    padding: 0.55rem 1.25rem;
    font-size: 0.95rem;
    transition: opacity 0.15s, background 0.15s;
}

.btn-yd-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1.05rem;
}

.btn-yd-primary {
    background: var(--yd-secondary);
    color: var(--yd-black) !important;
    border-color: var(--yd-secondary);
}

.btn-yd-primary:hover {
    opacity: 0.88;
}

.btn-yd-outline {
    background: transparent;
    color: var(--yd-white);
    border-color: var(--yd-white);
}

.btn-yd-outline:hover {
    background: rgba(255,255,255,0.1);
}

.btn-yd-accent {
    background: var(--yd-accent);
    color: var(--yd-white);
    border-color: var(--yd-accent);
}

/* ── Public sections ── */
.yd-public-section {
    padding: 5rem 2rem;
}

.yd-public-section-alt {
    background: var(--yd-primary);
}

.yd-public-container {
    max-width: 1100px;
    margin: 0 auto;
}

.yd-public-lead {
    font-size: 1.2rem;
    color: var(--yd-subtle-text);
    margin-bottom: 2.5rem;
}

.yd-public-prose p,
.yd-public-prose li {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.yd-public-prose h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

/* ── Hero ── */
.yd-public-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 6rem;
    min-height: 85vh;
    background-image: url('/images/yard_dog_banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--yd-white);
}

/* Dark overlay so text stays legible over the photo */
.yd-public-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 50, 0.55);
    z-index: 0;
}

.yd-public-hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
}

.yd-public-hero h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.yd-public-hero-sub {
    font-size: 1.15rem;
    opacity: 0.92;
    line-height: 1.65;
    margin-bottom: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.yd-public-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

/* ── Page hero (inner pages) ── */
.yd-public-page-hero {
    background: var(--yd-background);
    color: var(--yd-white);
    padding: 4rem 2rem 3rem;
}

/* Banner variant — photo behind the title with dark overlay */
.yd-public-page-hero--banner {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 320px;
    display: flex;
    align-items: center;
    color: var(--yd-white);
}

.yd-public-page-hero--banner h1,
.yd-public-page-hero--banner p,
.yd-public-page-hero--banner .yd-public-lead {
    color: var(--yd-white) !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.yd-public-page-hero--banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 40, 0.55);
    z-index: 0;
}

.yd-public-page-hero--banner .yd-public-container {
    position: relative;
    z-index: 1;
}

/* Compact variant — support page, no image, reduced height */
.yd-public-page-hero--compact {
    padding: 2.5rem 2rem 2rem;
}

.yd-public-page-hero--compact .yd-public-lead {
    margin-bottom: 0;
    color: var(--yd-white) !important;
}

.yd-public-page-hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

/* ── Disabled state (early access not yet open) ── */
.btn-yd:disabled,
.btn-yd[disabled],
.btn-yd[aria-disabled='true'] {
    display: none;
}

/* ── Support cards ── */
.yd-support-card {
    display: flex;
    flex-direction: column;
}

.yd-support-card p {
    flex: 1;
}

.yd-support-note {
    margin-top: 2rem;
    font-size: 0.95rem;
    color: var(--yd-subtle-text);
    font-style: italic;
    text-align: center;
}

/* ── FAQ accordion ── */
details.yd-public-faq-item {
    padding: 0;
    border-bottom: 1px solid var(--yd-input-border);
}

details.yd-public-faq-item summary {
    padding: 1.25rem 0;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

details.yd-public-faq-item summary::-webkit-details-marker {
    display: none;
}

details.yd-public-faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--yd-accent);
    flex-shrink: 0;
}

details.yd-public-faq-item[open] summary::after {
    content: '−';
}

details.yd-public-faq-item p {
    padding: 0 0 1.25rem;
    margin: 0;
    color: var(--yd-subtle-text);
    line-height: 1.65;
}

/* ── Card grid ── */
.yd-public-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.yd-public-card {
    background: var(--yd-white);
    border-radius: var(--yd-card-radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--yd-card-shadow);
}

.yd-public-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.yd-public-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* ── Two column ── */
.yd-public-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 640px) {
    .yd-public-two-col {
        grid-template-columns: 1fr;
    }
}

/* ── Lists ── */
.yd-public-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.yd-public-list li {
    padding: 0.4rem 0;
    padding-left: 1.4rem;
    position: relative;
    font-size: 1rem;
}

.yd-public-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--yd-accent);
    font-weight: 700;
}

.yd-public-list-danger li::before {
    content: "✗";
    color: var(--yd-red);
}

/* ── Feature rows ── */
.yd-public-feature-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--yd-input-border);
}

.yd-public-feature-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--yd-input-border);
}

.yd-public-feature-label {
    font-weight: 700;
    font-size: 1rem;
    min-width: 120px;
    color: var(--yd-accent);
}

.yd-public-feature-desc {
    color: var(--yd-subtle-text);
    font-size: 1rem;
}

/* ── Tag cloud ── */
.yd-public-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.yd-public-tag {
    background: var(--yd-primary);
    border: 1px solid var(--yd-accent);
    color: var(--yd-accent);
    border-radius: 999px;
    padding: 0.35rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ── CTA band ── */
.yd-public-cta {
    background: var(--yd-background);
    color: var(--yd-white);
    padding: 5rem 2rem;
    text-align: center;
}

.yd-public-cta h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.yd-public-cta p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 2rem;
}

/* ── FAQ ── */
.yd-public-faq {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--yd-input-border);
}

.yd-public-faq-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--yd-input-border);
}

.yd-public-faq-item h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

/* ── Contact form ── */
.yd-contact-form-wrap {
    max-width: 640px;
    margin: 0 auto;
}

.yd-contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 540px) {
    .yd-contact-row {
        grid-template-columns: 1fr;
    }
}

.yd-contact-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.yd-contact-field label {
    font-weight: 600;
    font-size: 0.95rem;
}

.yd-required {
    color: var(--yd-red);
}

.yd-optional {
    color: var(--yd-subtle-text);
    font-weight: 400;
    font-size: 0.85rem;
}

.yd-input {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--yd-input-border);
    border-radius: var(--yd-card-radius);
    font-size: 1rem;
    background: var(--yd-input-bg);
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.yd-input:focus {
    outline: none;
    border-color: var(--yd-accent);
}

.yd-textarea {
    resize: vertical;
    min-height: 110px;
    font-family: inherit;
}

.yd-contact-success {
    text-align: center;
    padding: 3rem 2rem;
}

.yd-contact-success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.yd-contact-success h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.yd-contact-success p {
    color: var(--yd-subtle-text);
    font-size: 1.05rem;
}

.yd-contact-error {
    background: var(--yd-error-bg);
    color: var(--yd-red);
    border-radius: var(--yd-card-radius);
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

/* ── Links ── */
.yd-public-link {
    color: var(--yd-accent);
    text-decoration: underline;
}

/* ── Footer ── */
.yd-footer {
    background: var(--yd-footer-bg);
    color: var(--yd-white);
    padding: 3rem 2rem 1.5rem;
}

.yd-footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto 2rem;
}

.yd-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.95rem;
    opacity: 0.85;
}

.yd-footer-brand strong {
    font-size: 1.1rem;
    opacity: 1;
}

.yd-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
}

.yd-footer-links a,
.yd-footer-contact a {
    color: var(--yd-white);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
}

.yd-footer-links a:hover,
.yd-footer-contact a:hover {
    opacity: 1;
    text-decoration: underline;
}

.yd-footer-copy {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}

/* ── Mobile section / hero padding ── */
@media (max-width: 720px) {
    .yd-public-section {
        padding: 3rem 1.25rem;
    }

    .yd-public-hero {
        padding: 5rem 1.25rem 4rem;
        min-height: 70vh;
    }

    .yd-public-hero h1 {
        font-size: clamp(1.6rem, 6vw, 2.4rem);
    }

    .yd-public-hero-sub {
        font-size: 1rem;
    }

    .yd-public-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .yd-public-hero-actions .btn-yd {
        text-align: center;
    }

    .yd-public-cta {
        padding: 3rem 1.25rem;
    }

    .yd-public-cta h2 {
        font-size: 1.5rem;
    }

    .yd-public-page-hero {
        padding: 2.5rem 1.25rem 2rem;
    }

    .yd-public-page-hero h1 {
        font-size: 1.75rem;
    }

    .yd-public-card-grid {
        grid-template-columns: 1fr;
    }

    .yd-public-feature-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .yd-footer-inner {
        flex-direction: column;
        gap: 1.25rem;
    }

    .yd-footer-links {
        gap: 0.75rem;
    }
}
