/* SolarBox Cloud Styles */
html { 
    scroll-behavior: smooth; 
}

body { 
    font-family: Arial, sans-serif; 
    margin: 0; 
    background: #f5f7fa; 
    color: #222; 
    overflow-x: hidden;
}

/* ===== Animations ===== */
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-28px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

header { 
    background: linear-gradient(120deg, #1f2937, #2563eb, #0ea5e9, #ffb300, #1f2937);
    background-size: 300% 300%;
    animation: gradientShift 14s ease infinite;
    color: #fff; 
    padding: 2.5rem 1rem; 
    text-align: center; 
    position: relative;
    overflow: hidden;
}

header::after {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.18), transparent);
    animation: shimmer 6s linear infinite;
}

h1 { 
    margin: 0 0 0.5rem 0;
    animation: slideDown 0.7s ease both;
    text-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

header p { 
    margin: 0;
    animation: fadeInUp 0.7s ease 0.25s both;
}

.intro { 
    max-width: 600px; 
    margin: 2rem auto; 
    text-align: center; 
    padding: 0 1rem;
}

.products { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 2rem; 
    margin: 2rem 0; 
    padding: 0 1rem;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 1.5rem;
    width: 300px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

html.js .product-card { 
    opacity: 0; 
}

.product-card.visible { 
    animation: fadeInUp 0.6s ease both;
}

.product-card.visible:nth-child(1) { animation-delay: 0.05s; }
.product-card.visible:nth-child(2) { animation-delay: 0.12s; }
.product-card.visible:nth-child(3) { animation-delay: 0.19s; }
.product-card.visible:nth-child(4) { animation-delay: 0.26s; }
.product-card.visible:nth-child(5) { animation-delay: 0.33s; }
.product-card.visible:nth-child(6) { animation-delay: 0.40s; }

.product-card:hover { 
    transform: translateY(-8px);
    border-color: #ffb300;
    box-shadow: 0 16px 32px rgba(255, 179, 0, 0.18), 0 8px 24px rgba(0,0,0,0.12); 
}

.product-card h2 { 
    margin-top: 0; 
    color: #333;
    transition: color 0.3s ease;
}

.product-card:hover h2 { 
    color: #ffb300; 
}

.product-card a {
    position: relative;
    display: inline-block;
    margin-top: 1rem;
    color: #ffb300;
    text-decoration: none;
    font-weight: bold;
    transition: letter-spacing 0.3s ease;
}

.product-card a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -3px;
    width: 100%; height: 2px;
    background: #ffb300;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.product-card a:hover { 
    letter-spacing: 0.5px;
}

.product-card a:hover::after { 
    transform: scaleX(1);
    transform-origin: left;
}

/* ===== Scroll reveal ===== */
html.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

footer {
    background: #333;
    color: #ccc;
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: 2rem;
}

footer p {
    margin: 0 0 0.5rem 0;
    font-weight: bold;
    color: #fff;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

footer a {
    color: #ffb300;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

footer a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 100%; height: 2px;
    background: #ffb300;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

footer a:hover {
    color: #fff;
}

footer a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

footer a:hover { 
    text-decoration: none; 
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal, .product-card {
        opacity: 1 !important;
        transform: none !important;
    }
}

@media (max-width: 700px) {
    .products { 
        flex-direction: column; 
        align-items: center; 
    }
    .product-card { 
        width: 90%; 
    }
    footer ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* =========================================================
   Page content layout — shared by all pages in /pages
   ========================================================= */
.content {
    max-width: 880px;
    margin: 2rem auto;
    padding: 2rem 1.6rem;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.content p,
.content li {
    line-height: 1.75;
    color: #374151;
}

.content h2 {
    margin-top: 0;
    font-size: 1.55rem;
    color: #1f2937;
}

.content h3 {
    margin: 2.2rem 0 0.9rem;
    padding-left: 0.85rem;
    border-left: 4px solid #ffb300;
    color: #1f2937;
}

.content h4 {
    margin: 1.6rem 0 0.6rem;
    color: #2563eb;
}

.content ul,
.content ol {
    padding-left: 1.3rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content code {
    background: #eef2ff;
    color: #2563eb;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-size: 0.9em;
}

.content a {
    color: #2563eb;
}

.content img {
    max-width: 420px;
    width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.img-responsive {
    max-width: 100%;
    height: auto;
}

/* Image / video grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
    justify-items: center;
}

.media-grid img {
    width: 100%;
    max-width: 320px;
    margin: 0;
}

.video-wrap {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 9 / 16;
    margin: 1.2rem 0;
}

.video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* FAQ block */
.faq {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    margin: 1.2rem 0;
}

.faq p {
    margin: 0 0 1rem;
}

.faq p:last-child {
    margin-bottom: 0;
}

.faq strong {
    color: #1f2937;
}

/* Commercial product list */
.product-list {
    list-style: none;
    padding: 0;
    margin: 1.2rem 0;
    display: grid;
    gap: 0.7rem;
}

.product-list li {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #ffb300;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin-bottom: 0;
}

.product-list li strong {
    color: #1f2937;
}

.product-list a {
    font-weight: 600;
    text-decoration: none;
}

.product-list a:hover {
    text-decoration: underline;
}

/* Intro link pills */
.intro p {
    line-height: 1.7;
}

.intro p a {
    display: inline-block;
    margin: 0.25rem 0.3rem;
    padding: 0.55rem 1.1rem;
    background: #fff;
    color: #2563eb;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.intro p a:hover {
    border-color: #ffb300;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Mobile refinements */
@media (max-width: 700px) {
    header h1 { font-size: 1.4rem; }
    .content { margin: 1rem 0.75rem; padding: 1.25rem 1rem; border-radius: 12px; }
    .intro { margin: 1.2rem auto; }
    .video-wrap { margin: 1.2rem auto; }
}

/* =========================================================
   Product finder wizard
   ========================================================= */
.finder .choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.7rem;
    margin: 1rem 0 1.4rem;
}

.choice-card {
    appearance: none;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #1f2937;
    border-radius: 10px;
    padding: 0.8rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.choice-card:hover {
    border-color: #ffb300;
    transform: translateY(-2px);
}

.choice-card.selected {
    border-color: #ffb300;
    background: #fffbeb;
    box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.25);
}

.step {
    margin: 1.6rem 0;
}

.wizard-nav {
    display: flex;
    gap: 0.8rem;
    margin: 1rem 0;
}

.wizard-nav button {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #2563eb;
    border-radius: 999px;
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wizard-nav button:hover {
    border-color: #ffb300;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#results {
    margin-top: 1.8rem;
}

.result-card {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #2563eb;
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    margin: 1rem 0;
}

.result-img-wrap {
    flex: 0 0 160px;
}

.result-img {
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.img-placeholder {
    width: 160px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #64748b;
    border-radius: 10px;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
    padding: 0.6rem;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-info h3 {
    margin: 0 0 0.4rem;
    border: none;
    padding: 0;
    font-size: 1.15rem;
}

.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    margin: 0 0 0.6rem;
}

.badge-cloud {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-ha {
    background: #dcfce7;
    color: #15803d;
}

.result-features {
    margin: 0.4rem 0;
    padding-left: 1.2rem;
}

.result-price {
    margin: 0.6rem 0;
    line-height: 1.7;
}

.result-price strong {
    color: #b45309;
    font-size: 1.15rem;
}

.result-link {
    display: inline-block;
    margin-top: 0.4rem;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.result-link:hover {
    text-decoration: underline;
}

.finder-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
}

.finder-note p {
    margin: 0 0 0.5rem;
}

.finder-note p:last-child {
    margin-bottom: 0;
}

.finder-note.warn {
    background: #fef2f2;
    border-color: #fecaca;
}

.finder-contact {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin: 1.2rem 0 0;
}

.finder-contact p {
    margin: 0 0 0.4rem;
}

.finder-contact p:last-child {
    margin-bottom: 0;
}

.finder-share {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin: 1.2rem 0 0;
}

.finder-share p {
    margin: 0 0 0.4rem;
}

.finder-share button {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
}

.finder-share button:hover {
    background: #1d4ed8;
}

.copy-link-msg {
    color: #16a34a;
    font-weight: 600;
    margin-left: 0.5rem;
}

@media (max-width: 600px) {
    .result-card {
        flex-direction: column;
    }
    .result-img-wrap,
    .result-img,
    .img-placeholder {
        width: 100%;
        max-width: 260px;
    }
}
