/* Reset & base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Stripe Element styles (moved from inline for CSP compliance) */
.StripeElement {
    box-sizing: border-box;
    height: 40px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    margin: 10px 0;
}
.StripeElement--focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}
.StripeElement--invalid { border-color: #fa755a; }
.StripeElement--webkit-autofill { background-color: #fefde5 !important; }

/* Design tokens */
:root {
    --primary: #24abe0;
    --primary-600: #1d93bf;
    --bg: #f7fafc;
    --surface: #ffffff;
    --muted: #6b7280;
    --text: #111827;
    --radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 24px rgba(0,0,0,0.12);
    --container: 1100px;
}

/* Global styles */
body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(180deg, #eef7fb 0%, #ffffff 40%);
}

/* Demo section */
#demo-section {
    background-color: #f8f9fa;
    padding: 4rem 0;
}

#demo-section .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

#demo-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #333;
}

.demo-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    line-height: 1.7;
}

.instructor-info {
    background: #f1f8ff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    border-left: 4px solid #24abe0;
}

.instructor-info h3 {
    margin-top: 0;
    color: #1a5276;
    font-size: 1.3rem;
}

#more-info-btn {
    margin-top: 1rem;
    background-color: #24abe0;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

#more-info-btn:hover {
    background-color: #1d93bf;
}

@media (max-width: 768px) {
    #demo-section {
        padding: 3rem 0;
    }
    
    .demo-content {
        padding: 1.5rem;
    }
    
    .instructor-info {
        padding: 1.25rem;
    }
}

/* Header styles */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(36,171,224,0.9);
    backdrop-filter: saturate(1.2) blur(6px);
    color: #fff;
    padding: .6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    box-shadow: var(--shadow-sm);
}

/* Mobile nav toggle base (hidden on desktop by default) */
#nav-toggle {
    display: none;
    position: absolute;
    left: 12px;
    top: 10px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
}

header nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 .75rem;
}

header nav ul li {
    display: inline;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

header nav ul li a:hover {
    text-decoration: none;
}

header nav ul li a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -4px;
    width: 0; height: 2px;
    background: #fff;
    transition: width .25s ease;
}

header nav ul li a:hover::after { width: 100%; }

#header-logo{
    width: 90px;
}

/* Landing section */
#land-section {
    background-image: url('img/etusivu-fade.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
}

#land-section h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 1rem;
    letter-spacing: .3px;
    background: linear-gradient(180deg, rgba(36,171,224,0.85), rgba(36,171,224,0.65));
    padding: .9rem 1.1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

#land-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    width: min(720px, 90%);
    color: #0b1a22;
    background: rgba(255,255,255,0.85);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

#land-section .cta-button {
    background: var(--surface);
    color: var(--primary);
    padding: 0.8rem 1.4rem;
    text-decoration: none;
    border-radius: 999px;
    font-size: 1.05rem;
    border: 2px solid rgba(255,255,255,0.8);
    backdrop-filter: blur(2px);
    transition: transform .15s ease, background .2s ease, color .2s ease;
}

#land-section .cta-button:hover {
    background: #ffffff;
    color: var(--primary-600);
    transform: translateY(-1px);
}

/* Section styles */
section {
    padding: 2.5rem 1rem;
    background: rgba(255,255,255,0.55);
    margin: 1rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 1.25rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--text);
}

/* News section */

#news-section #news{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

#news-section article {
    border: 1px solid #ddd;
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    transition: transform 0.25s ease, box-shadow .25s ease;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

#news-section article:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#news-section article img {
    width: 100%;
    height: auto;
}

#news-section article h3 {
    margin: 0;
    padding: 0.5rem;
    background: var(--primary);
    color: #fff;
    font-size: 1.5rem;
}

#news-section article .content {
    display: none;
    padding: 1rem;
}

#news-section article .hidden {
    display: none;
}

#news-section article.active .content {
    display: block;
}

#news-section article .content p {
    font-size: 1rem;
    color: #333;
}

#news-section article .content img {
    width: 150px;
    height: auto;
}


/* Products section */
#products-section  #products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
#products-section .product {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    text-align: center;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}

#products-section .product h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

#products-section .product img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
}

#products-section .product p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

#products-section .product a {
    background: var(--primary);
    color: #fff;
    padding: 0.55rem 1rem;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    display: inline-block;
    transition: transform .15s ease, background .2s ease;
}

#products-section .product a:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
}

/* Training section */
#training-section ul {
    list-style: none;
    padding-left: 0;
}

#training-section ul li {
    margin-bottom: 1rem;
}

#training-section ul li a {
    color: #24abe0; /* Footbic-Blue */
    text-decoration: none;
}

#training-section ul li a:hover {
    text-decoration: underline;
}

/* Retail section */
#retail-section ul {
    list-style: none;
    padding-left: 0;
    text-align: center;
}

#retail-section ul li {
    margin-bottom: 1rem;
}

#retail-section ul li a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

#retail-section ul li a:hover {
    text-decoration: underline;
}

#contact-section #contact-content{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50%, 1fr));
    gap: 1.25rem;
    max-width: var(--container);
    margin: 0 auto;
}

#contact-section #contact-content p{
    margin: 0;
    align-items: center;
}

/* Contact columns styling */
#contact-section #contact-content p,
#contact-section #contact-form-wrapper {
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

#contact-section #contact-content p {
    padding: 1rem 1.25rem;
    align-self: start;
    width: 100%;
}

#contact-section form { align-self: start; }

@media (min-width: 900px) {
    #contact-section #contact-content{
        grid-template-columns: 1fr 1fr;
    }
}

/* Cart overlay */
#cart-section {
    position: fixed;
    top: 80px;
    right: 16px;
    width: 360px;
    max-height: calc(100vh - 120px);
    overflow: auto;
    background: rgba(255,255,255,0.98);
    border: 1px solid #e6e6e6;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 999;
    padding: 0.75rem;
}

#cart-section .cart-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .25rem; }
#cart-section .cart-header h2 { margin: 0; font-size: 1.1rem; }
#cart-close { border: none; background: transparent; color: #666; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-size: 20px; line-height: 1; }
#cart-close:hover { background: #f1f1f1; color: #333; }

#cart-section h2 {
    font-size: 1.15rem;
    margin-bottom: .5rem;
}

#cart-contents {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.cart-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .75rem;
    align-items: center;
    padding: .5rem;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    background: #fff;
}

.cart-row .left { display: flex; align-items: center; gap: .5rem; }
.cart-row .left .title { font-weight: 600; font-size: .95rem; }
.cart-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid #eee; }

.cart-row .right { display: grid; grid-template-columns: 1fr; gap: .25rem; }
.cart-row .right label { font-size: .75rem; color: #666; margin-right: .25rem; }
.cart-row .right .qty-controls { display: inline-flex; gap: .4rem; align-items: center; }
.cart-row .right .qty-controls button { width: 28px; height: 28px; border: 1px solid #ddd; background: #f7f7f7; border-radius: 4px; cursor: pointer; }
.cart-row .right .unit span,
.cart-row .right .line-total span { font-weight: 600; }
.cart-row .right .remove { justify-self: start; border: none; background: #ffefef; color: #a33; border-radius: 4px; cursor: pointer; padding: .3rem .5rem; }

#cart-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
#cart-email { flex: 1 1 220px; padding: .5rem; border: 1px solid #ddd; border-radius: 5px; }
#checkout-button { background: var(--primary); color: #fff; padding: 0.6rem 1rem; border: none; border-radius: 10px; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .15s ease, background .2s ease; }
#checkout-button:hover { background: var(--primary-600); transform: translateY(-1px); }
#checkout-button:disabled { opacity: 0.7; cursor: not-allowed; }
#clear-cart-button { background: #f3f6f8; color: #333; padding: 0.5rem 1rem; border: 1px solid #dfe6ea; border-radius: 10px; cursor: pointer; }
#cart-total { font-weight: bold; text-align: right; margin-top: .5rem; }
#cart-message { color: #333; margin-top: .25rem; }

/* pulse feedback when cart updates */
@keyframes cartPulse { from { box-shadow: 0 0 0 rgba(36,171,224,0.0);} to { box-shadow: 0 0 0 rgba(36,171,224,0.0);} }
#cart-section.pulse { box-shadow: 0 0 0 3px rgba(36,171,224,0.25), 0 12px 24px rgba(0,0,0,0.12); transition: box-shadow .4s ease; }

/* Cart toggle button */
#cart-toggle {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: transform .15s ease, background .2s ease;
}

#cart-toggle .icon { width: 24px; height: 24px; }

#cart-toggle .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #ff4d4f;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

/* Utility */
.hidden { display: none !important; }

/* Consent banner */
.consent-banner {
    position: fixed;
    left: 0; right: 0; top: 0;
    display: flex;
    justify-content: center;
    padding: 12px;
    z-index: 2000;
    background: transparent;
}
.consent-banner .consent-card {
    width: min(720px, 95%);
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 14px 16px;
}
.consent-banner .consent-card h3 {
    margin-bottom: 6px;
    font-size: 1.05rem;
}
.consent-banner .consent-card p {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: .95rem;
}
.consent-banner .consent-actions { display: flex; gap: .5rem; justify-content: flex-end; }

/* Contact section */
#contact-section form {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

#contact-section form label {
    display: block;
    margin-bottom: 0.5rem;
}

#contact-section form input,
#contact-section form textarea {
    font-family: inherit;
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
}

#contact-section form button {
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.4rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, background .2s ease;
}

#contact-section form button:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
}

/* Footer styles */
footer {
    background: #0f172a;
    color: #fff;
    text-align: center;
    padding: 1.2rem 0;
    margin-top: 2rem;
}

footer nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

footer nav ul li a {
    color: #fff;
    text-decoration: none;
}

footer nav ul li a:hover {
    text-decoration: underline;
}

.round-img{
    border-radius: 50%;
    width: 150px;
}

/* Delivery form styling */
#delivery-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

#delivery-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.delivery-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: space-between;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #007cba;
    color: white;
}

.btn-primary:hover {
    background-color: #005a87;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 768px) {
    /* show hamburger */
    #nav-toggle { display: inline-flex; }

    /* collapse nav by default */
    header nav { width: 100%; }
    header nav ul {
        display: none;
        flex-direction: column;
        gap: 0.5rem;
        padding: .5rem .75rem 1rem;
    }
    header nav.open ul { display: flex; }
    header { padding-top: 3rem; }

    #land-section {
        background-image: url('img/etusivu-fade.png');
        background-position: 30% 50%;
        background-size: cover;
        background-repeat: no-repeat;
        color: #fff;
        min-height: 88vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 1rem;
    }

    #land-section h1 {
        font-size: 1.5rem;
        padding: 1%;
    }

    #land-section p {
        font-size: 1rem;
        width: 100%;
    }

    #land-section .cta-button {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    section {
        padding: 1rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    #news-section article h3,
    #products-section .product h3 {
        font-size: 1.25rem;
    }

    #products-section .product p {
        font-size: 0.9rem;
    }

    #contact-section #contact-content {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(90%, 1fr));
    }

    #contact-section form {
        padding: 1rem;
    }

    #contact-section form button {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    /* Make overlay full-width on small screens */
    #cart-section { left: 8px; right: 8px; width: auto; top: 70px; }

    footer nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}
