/* Font Import: Montserrat (Titles) & Open Sans (Body) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Open+Sans:wght@300;400;600&display=swap');

:root {
    /* Color Palette - Caravati Pagani Style */
    --primary-color: #A31F1F;
    /* Deep Burgundy */
    --primary-dark: #821919;
    --primary-light: #C92A2A;

    --secondary-color: #333333;
    /* Dark Charcoal for Text */
    --accent-gray: #F5F5F5;
    /* Very Light Gray for Backgrounds */
    --accent-steel: #4A5568;
    /* Steel Gray for secondary elements */

    --bg-white: #FFFFFF;
    --border-color: #E5E5E5;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 90px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-white);
    color: var(--secondary-color);
    line-height: 1.7;
    /* Generous line height for elegance */
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    /* More white space */
}

.section-alt {
    background-color: var(--accent-gray);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.rubrica-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Components */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--primary-color);
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
    /* Square buttons for strict corporate look */
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.9rem 2.4rem;
    /* Compensate for border */
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.card {
    background: var(--bg-white);
    padding: 3rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

/* Header - Minimalist & Sticky */
header {
    background-color: var(--primary-color);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: block;
    max-height: 80px;
    width: auto;
    padding: 10px 0;
}

.logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    font-weight: 700;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

/* Hero Section - Full Image Overlay */
.hero {
    /* User provided office photo */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.4)), url('img/hero-office.jpg');
    background-size: cover;
    background-position: center;
    height: 80vh;
    /* Taller hero */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 4rem;
    /* Larger title */
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

/* CTA Bar - Below Hero */
.cta-bar {
    background-color: var(--secondary-color);
    padding: 2rem 0;
    color: white;
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.cta-item {
    padding: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-item:last-child {
    border-right: none;
}

.cta-item h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.cta-item a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.cta-item a:hover {
    color: white;
}

/* Footer */
footer {
    background-color: #1A1A1A;
    /* Darker than charcoal */
    color: white;
    padding: 5rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col h3 {
    color: white;
    margin-bottom: 2rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-col ul li a {
    color: #999;
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
    /* Subtle movement */
}

/* Form Styles */
.form-input,
.form-select {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    background-color: #FAFAFA;
    border-radius: 0;
    /* Square inputs */
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-hover);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .cta-grid {
        grid-template-columns: 1fr;
        /* Stack CTAs on mobile */
    }

    .cta-item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1.5rem 1rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Rubrica Mobile Optimization */
    .rubrica-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .rubrica-form {
        order: -1;
    }
}