/* Global Styles */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1f2937;
    background-color: #f9fafb;
    line-height: 1.6;
}

/* Keep every page form aligned with the Battery Pickup Quote controls. */
main form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="reset"]):not([type="button"]):not([type="image"]),
main form select {
    width: 100%;
    height: 40px !important;
    min-height: 40px !important;
    padding: 8px 10px !important;
    border: 1px solid #bbb !important;
    border-radius: 8px !important;
    background-color: #f9fafb !important;
    color: #222 !important;
    font-size: 0.9rem !important;
    line-height: 1.25 !important;
}

main form textarea {
    width: 100%;
    padding: 8px 10px !important;
    border: 1px solid #bbb !important;
    border-radius: 8px !important;
    background-color: #f9fafb !important;
    color: #222 !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
}

main form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="reset"]):not([type="button"]):not([type="image"]):focus,
main form select:focus,
main form textarea:focus {
    border-color: #4aa547 !important;
    outline: 2px solid rgba(74, 165, 71, 0.16) !important;
    outline-offset: 0;
    box-shadow: none !important;
}

/* Persistent quote and language widget */
#quote-floating-widget {
    position: fixed;
    top: 96px;
    right: 26px;
    z-index: 1001;
}

.quote-floating-card {
    width: 230px;
    padding: 16px;
    border-radius: 15px;
    background: #b5b5b5;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
}

#quote-floating-widget .quote-floating-title {
    padding: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}

#quote-floating-widget .quote-floating-button {
    display: flex;
    width: 100%;
    height: 36px;
    margin-top: 10px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #4aa547;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

#quote-floating-widget .quote-floating-button:hover {
    background: #40963d;
}

.quote-floating-flags {
    margin-top: 12px;
}

.quote-floating-flags ul {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.quote-floating-flags button {
    display: block;
    width: 22px;
    height: 22px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

#quote-floating-widget .quote-floating-flags img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quote-floating-language {
    display: flex;
    align-items: center;
    justify-content: center;
}

#quote-floating-widget #language-selector {
    width: 80px;
    height: 28px;
    margin-top: 10px;
    padding: 3px 8px;
    border-radius: 7px;
    color: #374151;
    font-size: 12px;
    line-height: 1;
}

/* Global site footer */
.site-footer {
    width: 100%;
    min-height: 120px;
    margin: 0;
    background: #000;
    color: #fff;
}

.site-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 18px;
    text-align: center;
}

.site-footer p {
    margin: 0;
    color: #fff;
    font-size: 16px;
    line-height: 24px;
}

.site-footer__certification {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.site-footer__certification a,
.site-footer__certification img {
    display: block;
}

.site-footer__certification img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 640px) {
    #quote-floating-widget {
        top: 88px;
        right: 12px;
    }

    .quote-floating-card {
        width: 220px;
    }

    .site-footer__inner {
        padding: 22px 14px 16px;
    }

    .site-footer p {
        font-size: 12px;
    }
}

/* Form Styling */
.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-control:hover {
    border-color: #cbd5e1;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
    background-color: #94a3b8;
    color: white;
}

.btn-secondary:hover {
    background-color: #64748b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.card-header {
    padding: 1.5rem;
    background-color: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    background-color: var(--light-bg);
    border-top: 1px solid var(--border-color);
}

/* Sections */
.section {
    padding: 3rem 0;
}

.section.dark {
    background-color: #1f2937;
    color: white;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.section.dark .section-title {
    color: white;
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Content Blocks */
.content-block {
    background-color: white;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.content-block:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-block.heading {
    border-left-color: #8b5cf6;
}

.content-block.paragraph {
    border-left-color: #06b6d4;
}

.content-block.list {
    border-left-color: #10b981;
}

.content-block.image {
    border-left-color: #f59e0b;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 0.5rem;
    border-left: 4px solid;
}

.alert-info {
    background-color: #ecf0ff;
    border-color: var(--primary-color);
    color: #1e3a8a;
}

.alert-success {
    background-color: #ecfdf5;
    border-color: var(--success-color);
    color: #065f46;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.alert-danger {
    background-color: #fef2f2;
    border-color: var(--danger-color);
    color: #7f1d1d;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1f2937;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);    
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .section {
        padding: 2rem 0;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: #6b7280;
}

.text-light {
    color: #d1d5db;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.contact-field-validation {
    min-width: 0;
    width: 100%;
}

form .contact-field-validation .contact-field-error {
    display: block;
    margin-top: 4px;
    color: #dc2626 !important;
    font-size: 12px !important;
    line-height: 1.4;
}

form .contact-field-validation .contact-field-error[hidden] {
    display: none;
}
