/* Custom CSS for Italian Car Service Website */

:root {
    --primary-color: #1a237e;
    --secondary-color: #304ffe;
    --accent-color: #ff6b35;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --muted-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
}

/* Utility Classes */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

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

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.min-vh-75 {
    min-height: 75vh;
}

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

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

/* Hero Section */
.hero-section {
    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 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
}

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

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.hero-icon {
    font-size: 200px;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

.hero-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(255, 255, 255, 0.3));
    transition: transform 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.hero-svg:hover {
    transform: scale(1.05);
}

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

/* Service Cards */
.service-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

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

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* About Section */
.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    background: var(--light-color);
    border-radius: 15px;
}

.about-icon {
    font-size: 120px;
    color: var(--primary-color);
    opacity: 0.8;
}

.about-svg {
    width: 100%;
    max-width: 300px;
    height: auto;
    transition: transform 0.3s ease;
}

.about-svg:hover {
    transform: scale(1.05);
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Review Cards */
.review-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
}

.review-card:hover {
    transform: translateY(-3px);
}

.review-avatar {
    font-size: 2.5rem;
    color: var(--muted-color);
}

.stars {
    font-size: 1.2rem;
}

/* Newsletter Section */
.newsletter-form .form-control {
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
}

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

.newsletter-form .form-control:focus {
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.2);
}

/* Contact Cards */
.contact-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-3px);
}

.contact-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--dark-color) !important;
}

.footer a {
    color: white !important;
    text-decoration: none !important;
}

.footer a:hover {
    color: var(--accent-color) !important;
}

.footer .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white !important;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 1rem 0;
    z-index: 1050;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-setting {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: var(--primary-color);
}

input:checked + .cookie-slider:before {
    transform: translateX(26px);
}

/* Blog Cards */
.blog-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-card-image {
    height: 200px;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-color);
    font-size: 3rem;
}

.blog-meta {
    font-size: 0.875rem;
    color: var(--muted-color);
}

.blog-content {
    padding: 1.5rem;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.blog-excerpt {
    color: var(--muted-color);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.blog-read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.blog-read-more:hover {
    color: var(--secondary-color);
}

/* Success Page */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
}

.success-content {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 2rem;
}

.success-svg {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
}

.blog-card-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    background: var(--light-color);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-icon {
        font-size: 120px;
    }
    
    .hero-svg {
        max-width: 280px;
    }
    
    .about-icon {
        font-size: 80px;
    }
    
    .about-svg {
        max-width: 250px;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .success-svg {
        width: 100px;
        height: 100px;
    }
    
    .blog-card-image {
        height: 150px;
    }
    
    .cookie-banner .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cookie-banner .col-md-4 {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .service-icon, .contact-icon {
        font-size: 2.5rem;
    }
    
    .newsletter-form .col-md-8,
    .newsletter-form .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .cookie-modal-content {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .cookie-banner,
    .cookie-modal {
        display: none !important;
    }
}

/* Accessibility */
.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;
}

/* Focus Styles */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
