/* Header: custom logo sizing */
.custom-logo,
.custom-logo-link img {
  max-height: 40px;
  height: auto;
  width: auto;
  display: block;
}

/* Ensure logo and title align center vertically within flex header */
header .custom-logo-link,
header .site-title {
  display: inline-flex;
  align-items: center;
}
/*
Theme Name: FleetSignal
Theme URI: https://fleetsignal.com
Author: FleetSignal Team
Author URI: https://fleetsignal.com
Description: Tema WordPress moderno per FleetSignal - Tracking veicoli in tempo reale
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fleetsignal
*/

:root { 
    color-scheme: light; 
}

html { 
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for sticky header */
}

body { 
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; 
}

.glass { 
    backdrop-filter: blur(10px); 
    background: rgba(255,255,255,.75); 
}

/* WordPress Core Styles Reset */
.site-main {
    margin: 0;
    padding: 0;
}

/* Ensure Tailwind classes work properly */
* {
    box-sizing: border-box;
}

/* ============================================
   CONTACT FORM 7 - CUSTOM STYLES (COMPACT VERSION)
   ============================================ */

/* Form wrapper */
.cf7-fleetsignal-wrapper {
    max-width: 100%;
}

/* Row layout for side-by-side fields */
.cf7-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .cf7-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.cf7-col {
    display: flex;
    flex-direction: column;
}

/* Single field wrapper */
.cf7-field {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
}

/* Labels */
.cf7-fleetsignal-wrapper label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #334155; /* slate-700 */
    margin-bottom: 0.25rem;
}

/* Override for field labels (not checkbox labels) */
.cf7-field > label,
.cf7-col > label {
    font-size: 0.75rem;
}

/* Text inputs, email, tel */
.cf7-input,
.cf7-select,
.cf7-textarea {
    width: 100%;
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    line-height: 1.3;
    color: #0f172a; /* slate-900 */
    background-color: #ffffff;
    border: 1px solid #cbd5e1; /* slate-300 */
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
    outline: none;
}

.cf7-input:focus,
.cf7-select:focus,
.cf7-textarea:focus {
    border-color: #0ea5e9; /* sky-600 */
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.cf7-input::placeholder,
.cf7-textarea::placeholder {
    color: #94a3b8; /* slate-400 */
}

/* Textarea specific */
.cf7-textarea {
    min-height: 60px;
    resize: vertical;
    font-family: inherit;
}

/* Select dropdown */
.cf7-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 2.25rem;
}

/* Checkboxes */
.cf7-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

@media (max-width: 768px) {
    .cf7-checkbox {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.375rem;
    }
}

.cf7-checkbox .wpcf7-list-item {
    margin: 0;
    display: flex;
    align-items: center;
}

.cf7-checkbox input[type="checkbox"] {
    width: 0.875rem;
    height: 0.875rem;
    margin-right: 0.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    cursor: pointer;
    accent-color: #0ea5e9; /* sky-600 */
}

.cf7-checkbox label {
    margin: 0 !important;
    font-size: 0.6875rem !important;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
}

/* Privacy checkbox */
.cf7-checkbox-privacy {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.cf7-checkbox-privacy input[type="checkbox"] {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    cursor: pointer;
    accent-color: #0ea5e9;
}

.cf7-privacy-label {
    font-size: 0.6875rem;
    color: #475569; /* slate-600 */
    line-height: 1.4;
    margin: 0 !important;
}

.cf7-link {
    color: #0ea5e9; /* sky-600 */
    text-decoration: underline;
    font-weight: 500;
}

.cf7-link:hover {
    color: #0284c7; /* sky-700 */
}

/* Submit button */
.cf7-submit-wrapper {
    margin-top: 0.75rem;
}

.cf7-submit {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #0ea5e9; /* sky-600 */
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.cf7-submit:hover {
    background-color: #0284c7; /* sky-700 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.cf7-submit:active {
    transform: translateY(0);
}

.cf7-submit:disabled {
    background-color: #cbd5e1; /* slate-300 */
    cursor: not-allowed;
    transform: none;
}

/* Validation errors */
.wpcf7-not-valid-tip {
    font-size: 0.6875rem;
    color: #dc2626; /* red-600 */
    margin-top: 0.125rem;
    display: block;
}

.wpcf7-not-valid {
    border-color: #dc2626 !important;
}

.wpcf7-not-valid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

/* Response messages */
.wpcf7-response-output {
    margin: 0.75rem 0 0;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid;
}

.wpcf7-mail-sent-ok {
    color: #065f46; /* green-800 */
    background-color: #d1fae5; /* green-100 */
    border-color: #6ee7b7; /* green-300 */
}

.wpcf7-mail-sent-ng,
.wpcf7-validation-errors {
    color: #991b1b; /* red-800 */
    background-color: #fee2e2; /* red-100 */
    border-color: #fca5a5; /* red-300 */
}

.wpcf7-spam-blocked {
    color: #92400e; /* amber-800 */
    background-color: #fef3c7; /* amber-100 */
    border-color: #fcd34d; /* amber-300 */
}

/* Loading spinner */
.wpcf7 form.submitting .cf7-submit::after {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: cf7-spinner 0.6s linear infinite;
}

@keyframes cf7-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   FAQ SECTION - Accordion Style
   ============================================ */

.faq-section {
    padding: 3.5rem 1rem;
    background-color: #f8fafc; /* slate-50 */
}

.faq-container {
    max-width: 1280px; /* max-w-7xl */
    margin: 0 auto;
    padding: 0 1rem;
}

.faq-title {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 800;
    color: #0f172a; /* slate-900 */
    margin-bottom: 1.5rem;
}

.faq-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.faq-item {
    background-color: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0; /* slate-200 */
    padding: 1rem;
    cursor: pointer;
}

.faq-item summary {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #0f172a; /* slate-900 */
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: #0ea5e9; /* sky-600 */
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.faq-item[open] summary::after {
    content: '−';
    transform: rotate(0deg);
}

.faq-item p {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #64748b; /* slate-600 */
    line-height: 1.5;
    padding-right: 1rem;
}

.faq-item summary:hover {
    color: #0ea5e9; /* sky-600 */
}

/* Remove default CF7 styles */
.wpcf7-form p {
    margin: 0;
}

.wpcf7-form br {
    display: none;
}

.wpcf7-list-item-label {
    margin-left: 0;
}

/* Accessibility improvements */
.cf7-input:focus-visible,
.cf7-select:focus-visible,
.cf7-textarea:focus-visible,
.cf7-submit:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* ============================================
   END CONTACT FORM 7 STYLES
   ============================================ */

/* ============================================
   WooCommerce tweaks: single product & related
   ============================================ */

/* Single product: make main gallery large and well fitted */
.single-product .product-images .woocommerce-product-gallery,
.single-product .product-images .woocommerce-product-gallery__wrapper {
  width: 100%;
}

.single-product .product-images .woocommerce-product-gallery__wrapper,
.single-product .product-images .woocommerce-product-gallery__image {
  aspect-ratio: 1 / 1;
  background: #f8fafc; /* slate-50 */
  border: 1px solid #e2e8f0; /* slate-200 */
  border-radius: 0.75rem; /* rounded-xl */
  overflow: hidden;
}

.single-product .product-images .woocommerce-product-gallery__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Ensure Woo/Flexslider wrappers fill and keep square ratio */
.single-product .product-images .flex-viewport,
.single-product .product-images .woocommerce-product-gallery,
.single-product .product-images .woocommerce-product-gallery__image,
.single-product .product-images .woocommerce-product-gallery__image a,
.single-product .product-images figure.woocommerce-product-gallery__wrapper {
  width: 100% !important;
  height: auto !important;
  display: block;
  aspect-ratio: 1 / 1 !important;
}

.single-product .product-images .woocommerce-product-gallery__image a img,
.single-product .product-images .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img,
.single-product .product-images img.size-woocommerce_single {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* Thumbnails spacing and layout safety */
.single-product .woocommerce-product-gallery .flex-control-thumbs {
  gap: .5rem;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs li {
  margin: 0 !important;
}

/* Space between summary blocks */
.single-product .product-summary .summary.entry-summary > * + * {
  margin-top: .5rem;
}

/* Related products: force uniform 3-column grid with proper gaps */
.single-product .related {
  text-align: left !important;
  align-self: stretch !important;
}
.single-product .related ul.products {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1.25rem !important; /* 20px */
  margin: 0 !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  list-style: none !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  text-align: left !important;
}

.single-product .related ul.products li.product {
  margin: 0 !important;
  flex: 1 1 calc((100% - 2 * 1.25rem) / 3) !important; /* 3 columns */
  max-width: calc((100% - 2 * 1.25rem) / 3) !important;
  float: none !important;
  clear: none !important;
}

@media (max-width: 1024px) {
  .single-product .related ul.products li.product {
    flex: 1 1 calc((100% - 1 * 1.25rem) / 2) !important; /* 2 columns */
    max-width: calc((100% - 1 * 1.25rem) / 2) !important;
  }
}

@media (max-width: 640px) {
  .single-product .related ul.products li.product {
    flex: 1 1 100% !important; /* 1 column */
    max-width: 100% !important;
  }
}