/* Custom CSS for Pulidiamond Landing Page */

:root {
    --bs-primary: #1e40af;
    --bs-primary-rgb: 30, 64, 175;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Bootstrap theme */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

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

.bg-primary {
    background-color: var(--bs-primary) !important;
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
}

.navbar-brand {
    color: var(--bs-primary) !important;
}

.nav-link {
    color: #6c757d !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--bs-primary) !important;
}

/* Rimuovi bordo grigio dal menu mobile */
.navbar-toggler:focus {
    box-shadow: none;
    border: none;
}

/* Consistent icon circles - MAIN STYLE */
.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
    position: relative;
}

/* Fallback per icone mancanti */
.icon-circle i {
    color: inherit;
    font-size: inherit;
}

/* Se l'icona non si carica, mostra un simbolo di default */
.icon-circle:empty::before {
    content: "●";
    color: currentColor;
    font-size: 1.5rem;
}

/* Hero section with optional background */
.hero-section {
    background-color: var(--bs-primary);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(30, 64, 175, 0.7);
    z-index: 1;
}

.hero-section .container {
    z-index: 2;
}

/* Gallery carousel - Sezione separata */
#gallery-section {
    background-color: #f8f9fa;
}

#gallery-section h3 {
    color: var(--text-dark);
}

#gallery-section p {
    color: var(--text-light);
}

.carousel-item {
    height: 400px;
    background-color: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0.5rem;
    padding: 1rem;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
}

.carousel-caption h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.carousel-caption p {
    font-size: 0.9rem;
    margin-bottom: 0;
    opacity: 0.9;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(30, 64, 175, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-prev {
    left: -25px;
}

.carousel-control-next {
    right: -25px;
}

.carousel-indicators [data-bs-target] {
    background-color: var(--bs-primary);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    margin: 0 0.25rem;
}

/* Fallback quando non ci sono immagini gallery */
#gallery-section.hidden {
    display: none !important;
}

/* Typography improvements */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
}

.display-4 {
    font-size: 2.75rem;
    font-weight: 400;
    line-height: 1.2;
}

.display-5 {
    font-size: 2.25rem;
    font-weight: 500;
    line-height: 1.3;
}

.display-6 {
    font-size: 1.75rem;
    font-weight: 600;
}

h1, h2, h3, h4, h5 {
    font-weight: 500;
}

/* Card improvements with equal heights */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none !important;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Ensure all cards in a row have equal height */
.h-100 {
    height: 100% !important;
}

/* Flexbox for equal height content */
.d-flex.flex-column {
    display: flex !important;
    flex-direction: column !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

/* Contact items - consistent with icon circles */
.contact-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.contact-item-icon {
    width: 50px;
    height: 50px;
    background-color: var(--bs-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.contact-item-content {
    flex: 1;
    margin-top: 0.25rem;
}

.contact-item-label {
    font-weight: 600;
    color: #212529;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* FAQ styling */
.faq-item {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-question {
    background-color: #f8f9fa;
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
}

.faq-question:hover {
    background-color: #e9ecef;
}

.faq-question.active {
    background-color: var(--bs-primary);
    color: white;
}

.faq-toggle {
    transition: transform 0.3s ease;
    font-size: 1.25rem;
    opacity: 0.7;
}

.faq-toggle.open {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background-color: white;
}

.faq-answer.open {
    max-height: 300px;
    padding: 1.25rem;
}

/* Testimonial cards */
.testimonial-card {
    margin-bottom: 1.5rem;
}

.testimonial-stars {
    color: #ffc107;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.testimonial-author {
    font-weight: 600;
    color: var(--bs-primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.testimonial-text {
    font-style: italic;
    color: #6c757d;
    line-height: 1.7;
    font-size: 1rem;
}

/* Sections spacing */
section {
    scroll-margin-top: 76px; /* Account for fixed navbar */
}

/* Buttons */
.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

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

/* Footer improvements */
footer {
    margin-top: 0;
}

footer .text-primary {
    color: #60a5fa !important;
}

/* Loading states */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Form improvements */
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-check-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.25rem;
    }
    
    .display-5 {
        font-size: 1.875rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .btn-lg {
        padding: 0.625rem 1.5rem;
        font-size: 1rem;
    }
    
    .icon-circle {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
    }
    
    .contact-item-icon {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
    }
}

@media (max-width: 576px) {
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
}

/* Navbar scroll effect */
.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

/* Animation for stats */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-stats {
    animation: countUp 0.8s ease-out;
}