/* Base styles and variables */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #005ea8;  /* blu professionale */
    --secondary-color: #f4a261; /* tono caldo per accenti */
    --text-color: #333;
    --bg-color: #fff;
    --light-bg: #f9f9f9;
    --footer-bg: #0d1b2a;
    --footer-text: #cbd5e1;
    --border-radius: 4px;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

/* Utility classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
    margin-bottom: 0.6rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

header .logo a {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: background-color 0.3s;
}

nav a:hover, nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

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

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
}

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

.btn-primary:hover {
    background-color: #003c70;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-secondary:hover {
    background-color: #e38b2c;
}

/* Hero section */
.hero {
    /* Use a professional desk image as background with a blue overlay for readability */
    background-image: linear-gradient(rgba(0,94,168,0.75), rgba(0,94,168,0.75)), url('../img/hero.png');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 6rem 0;
    text-align: center;
}

/* Override default heading color within hero section */
.hero h1, .hero p {
    color: #fff;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    max-width: 700px;
    margin: 0 auto 2rem auto;
    font-size: 1.2rem;
}

.hero .btn-primary {
    margin-top: 1rem;
}

/* Home services */
.home-services {
    padding: 3rem 0;
    background-color: var(--light-bg);
}

.home-services h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.service-item {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.service-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

/* CTA section */
.cta {
    background-color: var(--primary-color);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta p {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

footer .footer-content {
    text-align: center;
}

/* About page */
.about-section {
    padding: 3rem 0;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
}

.about-image {
    flex: 1 1 300px;
    text-align: center;
}

.about-image img {
    max-width: 250px;
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.about-text {
    flex: 2 1 400px;
}

.about-text p {
    font-size: 1.05rem;
}

/* Services page */
.services-section {
    padding: 3rem 0;
    background-color: var(--light-bg);
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.service-block {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.service-block h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.service-block p {
    font-size: 1rem;
}

.services-cta {
    margin-top: 3rem;
    text-align: center;
}

/* Contact page */
.contact-section {
    padding: 3rem 0;
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-info, .contact-form {
    flex: 1 1 350px;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.contact-info h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact-info p, .contact-info a {
    font-size: 1rem;
    color: var(--text-color);
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.3rem;
    display: block;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 94, 168, 0.2);
}

.contact-form button {
    align-self: flex-start;
}

.map-container {
    margin-top: 2rem;
    height: 300px;
}

.map-container iframe {
    border: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
}

.map-container small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #555;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    nav ul {
        gap: 0.5rem;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-text {
        flex: 1;
    }
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}