@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --primary: #009246;
    --secondary: #CE2B37;
    --dark: #1a1a1a;
    --darker: #0d0d0d;
    --light: #f8f9fa;
    --accent: #009246;
    --gradient-1: linear-gradient(135deg, #009246 0%, #006633 100%);
    --gradient-2: linear-gradient(135deg, #CE2B37 0%, #a01f2a 100%);
    --gradient-3: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --gradient-italia: linear-gradient(135deg, #009246 0%, #CE2B37 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.15);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.25);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.3);
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Header Moderno */
header {
    background: #000000;
    color: white;
    padding: 1.2rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: slideDown 0.5s ease-out;
}

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

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo h1 {
    font-size: 2rem;
    margin-bottom: 0;
    font-weight: 800;
    background: var(--gradient-italia);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

header .logo p {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

header nav {
    display: flex;
    gap: 2rem;
}

header nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.3rem 0;
    font-size: 0.95rem;
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-italia);
    transition: width 0.3s ease;
}

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

header nav a:hover {
    color: var(--primary);
}

/* Hero Section Ultra Moderno */
.hero {
    background: var(--dark);
    color: white;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 146, 70, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(206, 43, 55, 0.3) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    animation: fadeInUp 0.8s ease-out;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

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

/* Cars Grid Ultra Moderno */
.cars-grid {
    padding: 5rem 0;
    background: transparent;
}

.cars-grid h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 3rem;
    color: var(--dark);
    font-weight: 700;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.cars-grid h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-italia);
    border-radius: 2px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    animation: fadeIn 0.8s ease-out;
}

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

/* Link wrapper per card cliccabile */
.car-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.car-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
}

.car-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-italia);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    border-radius: 20px;
}

.car-card:hover::before {
    opacity: 0.05;
}

.car-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.car-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.car-card:hover img {
    transform: scale(1.1);
}

.no-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: 500;
    font-size: 1.1rem;
}

.car-info {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.car-info h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-size: 1.5rem;
    font-weight: 700;
}

.car-info p {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.car-info p::before {
    content: '•';
    color: var(--secondary);
    font-weight: bold;
    font-size: 1.2rem;
}

.car-info .price {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-italia);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1.5rem 0;
    display: block;
}

.car-info .price::before {
    display: none;
}

/* Buttons Ultra Moderni */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--gradient-italia);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 146, 70, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #CE2B37 0%, #009246 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 146, 70, 0.6);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-italia);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.4);
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    margin: 0 0.3rem;
}

/* Car Details Ultra Moderno */
.car-details {
    padding: 4rem 0;
    min-height: 80vh;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.back-link:hover {
    background: rgba(255, 107, 53, 0.1);
    transform: translateX(-5px);
}

.details-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    background: white;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

.car-image {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.car-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: transform 0.4s ease;
}

.car-image:hover img {
    transform: scale(1.05);
}

.no-image-large {
    width: 100%;
    height: 500px;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 500;
}

.car-info-detail h1 {
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 800;
}

.price-large {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-italia);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    display: inline-block;
}

.specs {
    margin: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 20px;
}

.spec-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-item:hover {
    padding-left: 1rem;
    background: rgba(0, 146, 70, 0.05);
    margin: 0 -1rem;
    padding-right: 1rem;
    border-radius: 10px;
}

.spec-item strong {
    color: var(--dark);
    font-weight: 600;
}

.description {
    margin: 2rem 0;
}

.description h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 700;
    font-size: 1.5rem;
}

.description p {
    color: #666;
    line-height: 1.8;
}

.contact {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--gradient-italia);
    border-radius: 20px;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 146, 70, 0.4);
}

.contact h3 {
    margin-bottom: 1rem;
    font-weight: 700;
}

.contact a {
    color: white;
    font-weight: 600;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.contact a:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* Footer Moderno */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 0.3rem 0;
    margin-top: 1.3rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-italia);
}

footer p {
    margin: 0.17rem 0;
    font-weight: 300;
    font-size: 0.72rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Admin Styles Ultra Moderni */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 146, 70, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(206, 43, 55, 0.2) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

.login-box h1 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 800;
    font-size: 2rem;
}

.login-box h2 {
    color: #666;
    margin-bottom: 2rem;
    font-weight: 400;
}

.back-home {
    text-align: center;
    margin-top: 1.5rem;
}

.back-home a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-home a:hover {
    color: var(--secondary);
}

.back-link {
    color: var(--primary) !important;
}

.back-link:hover {
    background: rgba(0, 146, 70, 0.1) !important;
}

.admin-container {
    min-height: 100vh;
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
}

.admin-header {
    background: var(--dark);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
}

.admin-header h1 {
    font-weight: 700;
    font-size: 1.8rem;
}

.admin-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.admin-nav a,
.admin-nav span {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-nav a:hover {
    color: var(--primary);
}

.admin-main {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.admin-main h2 {
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.admin-actions {
    margin-bottom: 2rem;
}

.admin-table {
    width: 100%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.admin-table th,
.admin-table td {
    padding: 1.5rem;
    text-align: left;
}

.admin-table th {
    background: var(--dark);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.admin-table tr {
    transition: all 0.3s ease;
}

.admin-table tbody tr:hover {
    background: rgba(0, 146, 70, 0.05);
    transform: scale(1.01);
}

.admin-table tr:nth-child(even) {
    background: #f8f9fa;
}

.table-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.table-no-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #999;
    font-weight: 500;
}

.actions {
    white-space: nowrap;
}

/* Forms Ultra Moderni */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 146, 70, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.car-form {
    background: white;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

/* Messages Moderni */
.success-message,
.error-message {
    padding: 1.5rem 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInDown 0.4s ease-out;
}

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

.success-message::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #155724;
    color: white;
    border-radius: 50%;
    font-weight: bold;
}

.error-message::before {
    content: '✕';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #721c24;
    color: white;
    border-radius: 50%;
    font-weight: bold;
}

.success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #c3e6cb;
    box-shadow: 0 4px 15px rgba(21, 87, 36, 0.1);
}

.error-message {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #f5c6cb;
    box-shadow: 0 4px 15px rgba(114, 28, 36, 0.1);
}

.no-cars {
    text-align: center;
    padding: 5rem 2rem;
    color: #666;
    font-size: 1.2rem;
    font-weight: 500;
}

/* Responsive Ultra Ottimizzato */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
        gap: 0.3rem;
    }
    
    header nav {
        margin-top: 0;
        gap: 1rem;
    }
    
    .logo-main {
        height: 74px;
        max-width: 281px;
    }
    
    header .logo h1 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .cars-grid h2 {
        font-size: 2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .details-grid,
    .form-row {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
    
    .car-info-detail h1 {
        font-size: 2rem;
    }
    
    .price-large {
        font-size: 2.5rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .admin-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-table thead {
        display: none;
    }
    
    .admin-table tbody {
        display: block;
    }
    
    .admin-table tr {
        display: block;
        margin-bottom: 1.5rem;
        background: white;
        border-radius: 15px;
        padding: 1rem;
        box-shadow: var(--shadow-sm);
    }
    
    .admin-table td {
        display: block;
        text-align: left;
        padding: 0.5rem 0;
        border: none;
    }
    
    .admin-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--dark);
        display: inline-block;
        width: 120px;
    }
    
    .admin-table td:first-child {
        text-align: center;
        padding: 1rem 0;
    }
    
    .admin-table td:first-child::before {
        display: none;
    }
    
    .table-thumb,
    .table-no-image {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }
    
    .actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .actions .btn-small {
        width: 100%;
        text-align: center;
        margin: 0;
    }
    
    .car-form {
        padding: 2rem;
    }
    
    .btn {
        padding: 0.9rem 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .car-card {
        border-radius: 15px;
    }
    
    .details-grid {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .login-box {
        padding: 2rem;
        border-radius: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Animazioni aggiuntive */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.car-card:hover {
    animation: float 2s ease-in-out infinite;
}

/* Scrollbar personalizzata */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Selezione testo personalizzata */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}

/* Logo Styles */
header .logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    cursor: pointer;
}

/* Logo Principale */
.logo-main {
    height: 94px;
    width: auto;
    max-width: 374px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: brightness(1);
}

.logo-main:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

/* Fallback Logo Testo */
.logo-text-fallback {
    display: flex;
    flex-direction: column;
}

.logo-text-fallback h1 {
    font-size: 2rem;
    margin-bottom: 0;
    font-weight: 800;
    background: var(--gradient-italia);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.logo-text-fallback p {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Vecchio logo circolare (mantieni per retrocompatibilità) */
.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 146, 70, 0.3);
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 146, 70, 0.5);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 8px 30px rgba(0, 146, 70, 0.3);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Responsive logo */
@media (max-width: 768px) {
    .logo-main {
        height: 92px;
        max-width: 342px;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
    }
    
    header .logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .login-logo-img {
        width: 80px;
        height: 80px;
    }
}

/* About Page Styles */
.about-hero {
    background: var(--dark);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 50%, rgba(0, 146, 70, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(206, 43, 55, 0.2) 0%, transparent 50%);
}

.about-hero .container {
    position: relative;
    z-index: 1;
}

.about-hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.about-hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Our Story Section */
.our-story {
    padding: 6rem 0;
    background: white;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.story-image {
    position: relative;
}

.story-img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.8s ease-out;
    object-fit: cover;
}

.story-placeholder {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.8s ease-out;
}

.story-content h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 2rem;
    font-weight: 800;
}

.story-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1.5rem;
}

.story-features {
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-italia);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.feature-text h4 {
    color: var(--dark);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.feature-text p {
    color: #666;
    margin: 0;
    font-size: 1rem;
}

/* Contact Section */
.contact-section {
    padding: 6rem 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
}

.contact-section h2 {
    text-align: center;
    font-size: 3rem;
    color: var(--dark);
    margin-bottom: 1rem;
    font-weight: 800;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 4rem;
}

/* Mappa a tutta larghezza */
.map-container-full {
    background: white;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

.map-container-full h3 {
    color: var(--dark);
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
}

/* Grid contatti sotto la mappa */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    color: var(--dark);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.contact-card p {
    color: #666;
    line-height: 1.8;
    margin: 0.5rem 0;
}

.contact-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-card a:hover {
    color: var(--secondary);
}

.contact-note {
    font-size: 0.85rem;
    color: #999;
    font-style: italic;
    margin-top: 0.5rem;
}

.map-wrapper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: var(--dark);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 146, 70, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(206, 43, 55, 0.2) 0%, transparent 50%);
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Responsive About Page */
@media (max-width: 1024px) {
    .story-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .about-hero h1 {
        font-size: 2.5rem;
    }
    
    .about-hero p {
        font-size: 1.1rem;
    }
    
    .story-content h2 {
        font-size: 2rem;
    }
    
    .contact-section h2,
    .cta-section h2 {
        font-size: 2rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon {
        margin: 0 auto;
    }
    
    .map-container-full {
        padding: 2rem;
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
}

/* WhatsApp Styles */
.whatsapp-link {
    position: relative;
    color: #25D366 !important;
    font-weight: 600 !important;
}

.whatsapp-link::before {
    content: '💬 ';
    margin-right: 0.3rem;
}

.whatsapp-link:hover {
    color: #128C7E !important;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
}

/* Responsive WhatsApp Button */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

/* Orari a tutta larghezza */
.contact-card-full {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2.5rem 2rem;
    background: white;
    margin-top: 2rem;
}

.contact-card-full .contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-card-full h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.contact-card-full p {
    font-size: 1.2rem;
    line-height: 2;
}

/* Link contatti nella pagina dettagli auto */
.contact a {
    color: white;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    padding-bottom: 2px;
}

.contact a:hover {
    border-bottom-color: white;
    transform: translateY(-1px);
}

/* Galleria Immagini Admin */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.image-item {
    position: relative;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.image-item .btn-small {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

/* Galleria Immagini Frontend */
.car-gallery {
    margin-bottom: 2rem;
}

.gallery-main {
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.gallery-thumb {
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.gallery-thumb:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.gallery-thumb.active {
    border-color: var(--primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .gallery-main {
        height: 300px;
    }
    
    .gallery-thumbs {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .gallery-thumb {
        height: 60px;
    }
}

/* Dashboard Responsive Migliorato */
@media (min-width: 769px) and (max-width: 1024px) {
    .admin-table {
        font-size: 0.9rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 1rem 0.5rem;
    }
    
    .table-thumb,
    .table-no-image {
        width: 70px;
        height: 70px;
    }
    
    .btn-small {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .admin-main {
        padding: 0 1rem;
    }
    
    .admin-main h2 {
        font-size: 1.5rem;
    }
    
    .admin-actions {
        margin-bottom: 1.5rem;
    }
    
    .admin-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Mappa Cliccabile */
.map-container-full a:hover .map-overlay {
    opacity: 1;
}

.map-container-full a {
    text-decoration: none;
}

.map-container-full a:hover .map-wrapper {
    box-shadow: 0 8px 30px rgba(0, 146, 70, 0.3);
}
