/* Custom CSS for Officina Meccanica Rossi */

/* Italian Color Palette */
:root {
    --italian-green: #009246;
    --italian-white: #ffffff;
    --italian-red: #ce2b37;
    --primary-blue: #0d6efd;
    --dark-gray: #2c3e50;
    --light-gray: #f8f9fa;
    --accent-orange: #fd7e14;
    --success-green: #198754;
    --warning-yellow: #ffc107;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navigation Styles */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
    color: var(--italian-green) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: var(--italian-green) !important;
    border-bottom: 2px solid var(--italian-green);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--italian-green) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-buttons .btn {
    margin: 0.5rem;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Service Cards */
.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: var(--italian-green);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--italian-green), var(--primary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-card h4 {
    color: var(--dark-gray);
    margin-bottom: 15px;
    font-weight: 600;
}

.service-card p {
    color: #6c757d;
    line-height: 1.6;
}

/* Stats Section */
.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-item h3 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--italian-green), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item p {
    color: #6c757d;
    font-weight: 500;
}

/* Review Cards */
.review-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    border-left: 4px solid var(--italian-green);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.review-card .stars i {
    color: #ffc107;
    font-size: 1.2rem;
}

.reviewer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.reviewer strong {
    color: var(--dark-gray);
    font-weight: 600;
}

.reviewer small {
    display: block;
    margin-top: 5px;
}

/* Contact Section */
.contact-info {
    padding: 20px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--italian-green), var(--primary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.5rem;
    color: white;
}

.contact-details h4 {
    color: var(--dark-gray);
    margin-bottom: 5px;
    font-weight: 600;
}

.contact-details p {
    margin: 0;
    color: #6c757d;
}

.contact-details a {
    color: var(--italian-green);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-details a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.contact-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--italian-green);
    box-shadow: 0 0 0 0.2rem rgba(0, 146, 70, 0.25);
}

/* Newsletter Section */
.newsletter-form .form-control {
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50px;
    padding: 15px 25px;
}

.newsletter-form .form-control::placeholder {
    color: rgba(255,255,255,0.8);
}

.newsletter-form .form-control:focus {
    border-color: rgba(255,255,255,0.8);
    box-shadow: none;
    background: rgba(255,255,255,0.2);
}

.newsletter-form .btn {
    border-radius: 50px;
    padding: 15px 30px;
    font-weight: 600;
}

/* Social Links */
.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.social-links a:hover {
    background: var(--italian-green);
    transform: translateY(-3px);
}

/* Blog Styles */
.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

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

.blog-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

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

.blog-content {
    padding: 30px;
}

.blog-meta {
    margin-bottom: 15px;
}

.blog-meta span {
    color: #6c757d;
    font-size: 0.9rem;
    margin-right: 20px;
}

.blog-content h3 {
    margin-bottom: 15px;
    font-weight: 600;
}

.blog-content h3 a {
    color: var(--dark-gray);
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-content h3 a:hover {
    color: var(--italian-green);
}

.read-more {
    color: var(--italian-green);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--primary-blue);
}

.read-more i {
    margin-left: 5px;
    transition: all 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Article Styles */
.blog-article {
    color: #333;
    line-height: 1.8;
}

.blog-article h2, .blog-article h3, .blog-article h4 {
    color: var(--dark-gray);
    font-weight: 600;
}

.blog-article .lead {
    font-size: 1.25rem;
    color: #6c757d;
    font-weight: 400;
}

.article-meta {
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.share-buttons .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

.related-articles .card {
    transition: all 0.3s ease;
}

.related-articles .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Thank You Page */
.thank-you-content .success-icon {
    font-size: 5rem;
    color: var(--success-green);
    margin-bottom: 30px;
}

.benefit-item {
    text-align: center;
    padding: 20px;
}

.benefit-item i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.benefit-item h4 {
    color: var(--dark-gray);
    margin-bottom: 10px;
    font-weight: 600;
}

/* Legal Pages */
.privacy-content, .terms-content, .cookie-content {
    color: #333;
    line-height: 1.8;
}

.privacy-content h2, .privacy-content h3,
.terms-content h2, .terms-content h3,
.cookie-content h2, .cookie-content h3 {
    color: var(--dark-gray);
    font-weight: 600;
}

.cookie-controls {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
}

.cookie-controls .form-check {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

.cookie-controls .form-check:last-child {
    border-bottom: none;
}

.cookie-controls .form-check-label {
    font-weight: 500;
    cursor: pointer;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-gray);
    color: white;
    padding: 20px 0;
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-buttons .btn {
    margin: 5px;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 500;
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--italian-green));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--italian-green), var(--primary-blue));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-success {
    background: var(--italian-green);
    border-color: var(--italian-green);
}

.btn-success:hover {
    background: #007a3a;
    border-color: #007a3a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.2);
    border-color: white;
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.table th {
    background: var(--italian-green);
    color: white;
    font-weight: 600;
    border: none;
    padding: 15px;
}

.table td {
    padding: 15px;
    vertical-align: middle;
    border-color: #e9ecef;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 146, 70, 0.03);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* Breadcrumbs */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 30px;
}

.breadcrumb-item a {
    color: var(--italian-green);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }
    
    .hero-buttons {
        text-align: center;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .service-card {
        margin-bottom: 30px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .contact-form {
        padding: 30px 20px;
        margin-top: 30px;
    }
    
    .cookie-banner .col-lg-8,
    .cookie-banner .col-lg-4 {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .cookie-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .cookie-buttons .btn {
        margin: 0;
    }
    
    .blog-card {
        margin-bottom: 30px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    .stat-item h3 {
        font-size: 2.5rem;
    }
    
    .benefit-item i {
        font-size: 2.5rem;
    }
    
    .thank-you-content .success-icon {
        font-size: 4rem;
    }
    
    .newsletter-form .form-control,
    .newsletter-form .btn {
        border-radius: 8px;
        margin-bottom: 10px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .cookie-banner,
    .share-buttons,
    .related-articles {
        display: none !important;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .blog-article {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    .blog-article h1,
    .blog-article h2,
    .blog-article h3 {
        page-break-after: avoid;
    }
    
    .alert {
        border: 1px solid #ddd;
        background: #f8f9fa !important;
        color: #333 !important;
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn:focus,
.form-control:focus {
    outline: 2px solid var(--italian-green);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card,
    .review-card,
    .blog-card {
        border: 2px solid #333;
    }
    
    .btn-primary {
        background: #000;
        border-color: #000;
    }
    
    .btn-primary:hover {
        background: #333;
        border-color: #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .service-card:hover,
    .review-card:hover,
    .blog-card:hover,
    .contact-item:hover {
        transform: none;
    }
}
