/* Page specific styles */
.page-header {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.breadcrumbs {
    margin-bottom: 10px;
}

.breadcrumbs a:hover {
    color: var(--secondary-color);
}

.contact-section {
    padding: 80px 0;
}

.contact-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.contact-intro h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.contact-intro p {
    font-size: 18px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.contact-info {
    padding-right: 20px;
}

.contact-item {
    margin-bottom: 30px;
}

.contact-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-item h3 i {
    color: var(--secondary-color);
    margin-right: 10px;
    font-size: 24px;
}

.contact-item p {
    margin-bottom: 5px;
    font-size: 16px;
    color: var(--gray-dark);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--gray-light);
    color: var(--text-color);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: white;
}

.hours-table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

.hours-table tr {
    border-bottom: 1px solid var(--gray-medium);
}

.hours-table tr:last-child {
    border-bottom: none;
}

.hours-table td {
    padding: 10px 0;
}

.hours-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.contact-form {
    background-color: var(--gray-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-medium);
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
    background-color: white; /* Ensure white background for better contrast */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08); /* Add subtle shadow around input fields */
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.2), 0 2px 5px rgba(0, 0, 0, 0.1); /* Enhanced shadow when focused */
    outline: none;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1); /* Slightly stronger shadow for the textarea */
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.form-check input {
    margin-top: 0.2em;
    margin-right: 10px;
}

.form-check label {
    font-size: 14px;
    line-height: 1.4;
    color: var(--gray-dark);
}

.button-full {
    width: 100%;
}

.map-section {
    padding: 0 0 80px;
}

.map-container {
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Additional styles for the form */

.form-status {
    margin: 15px 0;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.form-status.success {
    display: block;
    background-color: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
    border: 1px solid #2e7d32;
}

.form-status.error {
    display: block;
    background-color: rgba(244, 67, 54, 0.2);
    color: #c62828;
    border: 1px solid #c62828;
}

/* Improve form elements styling */
.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.2);
}

.form-check label {
    font-size: 14px;
    line-height: 1.4;
    color: var(--gray-dark);
}

.form-check input {
    margin-top: 0.2em;
}

/* Ensure consistent styling for select dropdown */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
    background-color: white; /* Ensure white background for dropdown */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08); /* Same shadow as other inputs */
}

/* Add a slight hover effect to make fields more interactive */
.form-control:hover {
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.12);
}

/* Contact form container with slightly adjusted background for better contrast with inputs */
.contact-form {
    background-color: var(--gray-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

/* Hide language-specific select options based on current language */
html[lang="it"] .en-content,
html[lang="en"] .it-content {
    display: none !important;
}

/* Improve button hover state */
.button.primary:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Add loading state for form submission */
.button.primary.loading {
    position: relative;
    color: transparent;
}

.button.primary.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.2em;
    height: 1.2em;
    margin-top: -0.6em;
    margin-left: -0.6em;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: white;
    animation: spinner .6s linear infinite;
}

@keyframes spinner {
    to {transform: rotate(360deg);}
}

/* Placeholder styling */
::placeholder {
    color: #aaa;
    opacity: 0.7;
    font-style: italic;
    font-size: 14px;
}
  
::-webkit-input-placeholder {
    color: #aaa;
    opacity: 0.7;
    font-style: italic;
    font-size: 14px;
}
  
::-moz-placeholder {
    color: #aaa;
    opacity: 0.7;
    font-style: italic;
    font-size: 14px;
}
  
:-ms-input-placeholder {
    color: #aaa;
    opacity: 0.7;
    font-style: italic;
    font-size: 14px;
}
  
::-ms-input-placeholder {
    color: #aaa;
    opacity: 0.7;
    font-style: italic;
    font-size: 14px;
}

/* Ensure placeholder text is readable on mobile */
@media (max-width: 768px) {
    ::placeholder,
    ::-webkit-input-placeholder,
    ::-moz-placeholder,
    :-ms-input-placeholder,
    ::-ms-input-placeholder {
        font-size: 13px;
    }
    
    textarea.form-control {
        min-height: 120px; /* Slightly smaller on mobile */
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-section {
        padding: 50px 0;
    }

    .map-section {
        padding: 0 0 50px;
    }

    .map-container {
        height: 300px;
    }
}