/*
  Theme: Servizi Notarili con Foto Reali
  Design System: Brutalism with Warped Grids elements
  Color Scheme: Gradient
  Animation Style: 3D-effects
  Fonts: Playfair Display (headings), Source Sans Pro (body)
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Source+Sans+Pro:wght@400;600&display=swap');

:root {
    --font-primary: 'Source Sans Pro', sans-serif;
    --font-headings: 'Playfair Display', serif;

    --color-text: #333333;
    --color-text-light: #FFFFFF;
    --color-text-muted: #6c757d;
    --color-text-dark-bg: #F0F0F0; /* Lighter text for dark backgrounds */
    --color-text-headings: #222222; /* Darker for section titles */

    /* Gradient & Brutalist Palette */
    --primary-color-start: #0D47A1; /* Deep Blue */
    --primary-color-end: #1976D2;   /* Medium Blue */
    --accent-color-start: #FF8F00;  /* Amber/Orange */
    --accent-color-end: #FFB300;    /* Lighter Amber */

    --neutral-darkest: #1a1a1a;
    --neutral-dark: #222222;
    --neutral-medium: #A0A0A0;
    --neutral-light: #F5F5F5;
    --neutral-bg: #FFFFFF;

    --gradient-primary: linear-gradient(135deg, var(--primary-color-start), var(--primary-color-end));
    --gradient-accent: linear-gradient(135deg, var(--accent-color-start), var(--accent-color-end));
    --gradient-section-bg: linear-gradient(135deg, #eef2f3, #8e9eab); /* Subtle cool grey gradient */
    --gradient-dark-section-bg: linear-gradient(135deg, #3E5151, #1C2541); /* Darker gradient */


    --brutalist-border-color: var(--neutral-dark);
    --brutalist-border: 2px solid var(--brutalist-border-color);
    --brutalist-shadow: 4px 4px 0px var(--brutalist-border-color);
    --modern-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);

    --border-radius-sharp: 0px;
    --border-radius-soft: 6px;

    --container-width: 1140px;
    --spacing-unit: 1rem; /* 16px */
    --header-height: 70px; /* Approximate height of the fixed header */
}

/* Global Resets & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%; /* 16px */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--neutral-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll from skewed elements */
}

.page-wrapper {
    overflow: hidden; /* Contains any skewed elements */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--color-text-headings);
    line-height: 1.3;
    margin-bottom: calc(var(--spacing-unit) * 0.75);
    font-weight: 700;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; } /* Section titles */
h3 { font-size: 1.6rem; } /* Card titles, subsection titles */
h4 { font-size: 1.2rem; }

p {
    margin-bottom: var(--spacing-unit);
}

a {
    color: var(--primary-color-end);
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
    color: var(--primary-color-start);
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Container & Layout */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-unit);
    padding-right: var(--spacing-unit);
}

.section-padding {
    padding-top: calc(var(--spacing-unit) * 3.5);
    padding-bottom: calc(var(--spacing-unit) * 3.5);
}

.section-title {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 2.5);
    color: var(--color-text-headings);
    position: relative;
}
.section-title::after { /* Brutalist accent for titles */
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color-start);
    margin: calc(var(--spacing-unit) * 0.5) auto 0;
}


.section-intro {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.columns {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 2);
}

.column {
    flex: 1;
    min-width: 300px; /* Ensure columns don't get too narrow */
}
.column.column-text { flex-basis: 60%; }
.column.column-image { flex-basis: 35%; display: flex; align-items: center; justify-content: center;}

.image-container img {
    border: var(--brutalist-border);
    box-shadow: var(--brutalist-shadow);
    border-radius: var(--border-radius-sharp);
}

/* Buttons - Global Styles */
.btn, button, input[type="submit"], input[type="button"] {
    display: inline-block;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    padding: calc(var(--spacing-unit) * 0.8) calc(var(--spacing-unit) * 1.8);
    border-radius: var(--border-radius-sharp);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-image: var(--gradient-accent);
    color: var(--neutral-darkest);
    border-color: var(--accent-color-end);
    box-shadow: var(--brutalist-shadow);
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--brutalist-border-color);
    color: var(--neutral-darkest); /* Ensure text color doesn't change if parent link color changes */
    opacity: 1;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color-start);
    border: 2px solid var(--primary-color-start);
}

.btn-secondary:hover {
    background-color: var(--primary-color-start);
    color: var(--color-text-light);
    opacity: 1;
}

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: calc(var(--spacing-unit) * 0.5) 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: var(--header-height);
}

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

.site-header .logo {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color-start);
    text-decoration: none;
}
.site-header .logo:hover {
    color: var(--accent-color-start);
}

.main-navigation ul {
    display: flex;
    list-style: none;
}

.main-navigation li {
    margin-left: calc(var(--spacing-unit) * 1.5);
}

.main-navigation a {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--neutral-dark);
    text-decoration: none;
    padding: calc(var(--spacing-unit) * 0.5) 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color-start);
    transition: width 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a.active { /* Add .active class via JS for current page/section */
    color: var(--accent-color-start);
}
.main-navigation a:hover::after,
.main-navigation a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--neutral-dark);
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 25px;
    height: 3px;
    background-color: var(--neutral-dark);
    transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }


/* Hero Section */
.hero-section {
    /* min-height: 90vh; */ /* Avoid fixed min-height if not necessary for content */
    padding-top: calc(var(--header-height) + var(--spacing-unit) * 4);
    padding-bottom: calc(var(--spacing-unit) * 4);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    /* Brutalist angled overlay (optional example of warped element) */
    /* clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%); */
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-unit);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--color-text-light);
    margin-bottom: calc(var(--spacing-unit) * 2);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* General Card Styles */
.cards-grid, .media-grid, .links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
}

.card, .link-card, .news-card {
    background-color: var(--neutral-bg);
    border: var(--brutalist-border);
    box-shadow: var(--brutalist-shadow);
    border-radius: var(--border-radius-sharp); /* Brutalist sharp edges */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch; /* STRETCH card-image and card-content to full width */
    text-align: left; /* Default text align to left for content */
}
.card:hover, .link-card:hover, .news-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0px var(--brutalist-border-color);
}
/* For cards that need centered content AND image as per strict rule */
.card.centered-content, .media-grid .card {
    align-items: center; /* Center .card-image and .card-content blocks */
    text-align: center; /* Center text within .card-content */
}
.media-grid .card .card-image { /* Ensure image container takes available width */
    width: 100%;
}


.card-image {
    width: 100%;
    overflow: hidden;
    background-color: var(--neutral-light); /* Placeholder bg color */
}
.services-section .card-image { height: 250px; }
.media-section .card-image { height: 280px; }
.news-section .card-image { height: 250px; }


.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card:hover .card-image img {
    transform: scale(1.05) rotate(1deg); /* Subtle 3D/Warped effect */
}

.card-content {
    padding: calc(var(--spacing-unit) * 1.5);
    flex-grow: 1; /* Allows content to fill space if cards are different heights */
    display: flex;
    flex-direction: column;
}
.card-content > *:last-child {
    margin-bottom: 0; /* Remove bottom margin from last child */
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: calc(var(--spacing-unit) * 0.75);
    color: var(--primary-color-start);
}
.link-card .link-title a {
    color: var(--primary-color-start);
    font-family: var(--font-headings);
}
.link-card .link-title a:hover {
    text-decoration: underline;
}
.link-card .link-description {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.news-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.read-more {
    display: inline-block;
    margin-top: auto; /* Pushes to bottom if card-content is flex-column */
    font-weight: 600;
    color: var(--accent-color-start);
    text-transform: uppercase;
    font-size: 0.9rem;
}
.read-more:hover {
    color: var(--accent-color-end);
    text-decoration: underline;
}


/* Gradient Background Section */
.gradient-background {
    background-image: var(--gradient-section-bg);
    color: var(--neutral-dark); /* Ensure text contrast on this light gradient */
}
.gradient-background .section-title,
.gradient-background .section-intro,
.gradient-background .card-title,
.gradient-background .timeline-content h3 {
    color: var(--neutral-dark); /* Override default heading colors if needed */
}
.gradient-background .section-intro {
    color: #454545;
}

/* Dark Background Section */
.dark-section {
    background-image: var(--gradient-dark-section-bg);
    color: var(--color-text-dark-bg);
}
.dark-section .section-title,
.dark-section .section-intro,
.dark-section .timeline-content h3,
.dark-section .link-card .link-title a {
    color: var(--color-text-light); /* White or very light grey for titles on dark bg */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.dark-section .section-intro,
.dark-section .timeline-content p,
.dark-section .link-card .link-description {
    color: var(--color-text-dark-bg);
    opacity: 0.9;
}
.dark-section .link-card {
    background-color: rgba(255,255,255,0.05); /* Subtle card bg on dark */
    border-color: rgba(255,255,255,0.2);
    box-shadow: 4px 4px 0px rgba(255,255,255,0.1);
}
.dark-section .link-card:hover {
     box-shadow: 7px 7px 0px rgba(255,255,255,0.1);
}
.dark-section .link-card .link-title a:hover {
    color: var(--accent-color-end);
}


/* Timeline (for Research & Awards) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after { /* The central line */
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--neutral-medium); /* Default for light bg */
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}
.dark-section .timeline::after {
    background-color: rgba(255,255,255,0.3);
}
.gradient-background .timeline::after {
    background-color: var(--neutral-dark);
}


.timeline-item {
    padding: var(--spacing-unit) calc(var(--spacing-unit) * 2.5);
    position: relative;
    background-color: transparent;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: calc(var(--spacing-unit) * 2.5 + 25px); /* Space for icon */
    text-align: right;
}
.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: calc(var(--spacing-unit) * 2.5 + 25px); /* Space for icon */
    text-align: left;
}
.timeline-item:nth-child(odd) .timeline-icon {
    right: -21px; /* Adjust to center on the line */
}
.timeline-item:nth-child(even) .timeline-icon {
    left: -29px; /* Adjust to center on the line */
}


.timeline-icon {
    position: absolute;
    top: calc(var(--spacing-unit) * 1.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-color-start);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 3px solid var(--neutral-bg); /* Creates a ring effect */
    z-index: 1;
}
.timeline-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.dark-section .timeline-icon {
    border-color: var(--neutral-darkest); /* Or the dark bg color */
}

.timeline-content {
    padding: var(--spacing-unit);
    background-color: var(--neutral-bg);
    border-radius: var(--border-radius-soft);
    box-shadow: var(--modern-shadow);
    border: var(--brutalist-border);
    position: relative;
}
.dark-section .timeline-content {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}
.gradient-background .timeline-content {
    border-color: var(--neutral-dark);
    background-color: rgba(255,255,255,0.7);
}


.timeline-content h3 {
    margin-top: 0;
    font-size: 1.3rem;
}
.timeline-item:nth-child(odd) .timeline-content::before { /* Arrow */
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: -10px;
    border: medium solid var(--brutalist-border-color);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--brutalist-border-color);
}
.timeline-item:nth-child(even) .timeline-content::before { /* Arrow */
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: -12px;
    border: medium solid var(--brutalist-border-color);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--brutalist-border-color) transparent transparent;
}
.dark-section .timeline-item:nth-child(odd) .timeline-content::before { border-left-color: rgba(255,255,255,0.2); }
.dark-section .timeline-item:nth-child(even) .timeline-content::before { border-right-color: rgba(255,255,255,0.2); }

.award-image {
    max-width: 100px;
    margin-top: var(--spacing-unit);
    border: 1px solid var(--neutral-medium);
    border-radius: var(--border-radius-soft);
}
.timeline-item:nth-child(odd) .award-image { float: right; margin-left: var(--spacing-unit);}
.timeline-item:nth-child(even) .award-image { float: left; margin-right: var(--spacing-unit);}


/* Contact Form */
.contact-form-container {
    max-width: 700px;
    margin: 0 auto calc(var(--spacing-unit) * 2.5) auto;
    background-color: var(--neutral-bg);
    padding: calc(var(--spacing-unit) * 2);
    border: var(--brutalist-border);
    box-shadow: var(--brutalist-shadow);
    border-radius: var(--border-radius-sharp);
}
.gradient-background .contact-form-container {
    background-color: rgba(255,255,255,0.8);
    border-color: var(--neutral-dark);
    box-shadow: 4px 4px 0px var(--neutral-dark);
}

.form-group {
    margin-bottom: calc(var(--spacing-unit) * 1.2);
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 0.3);
    color: var(--neutral-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: calc(var(--spacing-unit) * 0.7);
    border: 2px solid var(--neutral-medium);
    border-radius: var(--border-radius-sharp);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color-start);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb, 13, 71, 161), 0.25); /* Create --primary-color-rgb if needed */
}
/* Define --primary-color-rgb for box-shadow focus (approx from #0D47A1) */
:root { --primary-color-rgb: 13, 71, 161; }


.contact-details {
    text-align: center;
}
.contact-details h3 {
    margin-bottom: var(--spacing-unit);
}
.contact-details p {
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    color: var(--color-text-muted);
}
.gradient-background .contact-details p {
    color: var(--neutral-dark);
}
.contact-details a {
    color: var(--primary-color-end);
}
.contact-details a:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background-color: var(--neutral-darkest);
    color: var(--color-text-dark-bg);
    padding: calc(var(--spacing-unit) * 3) 0;
    font-size: 0.9rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
}

.footer-column h4 {
    font-family: var(--font-headings);
    color: var(--color-text-light);
    margin-bottom: var(--spacing-unit);
    font-size: 1.2rem;
}

.footer-column p {
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    opacity: 0.8;
}

.footer-column ul li {
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.footer-column a {
    color: var(--neutral-medium);
    text-decoration: none;
}

.footer-column a:hover {
    color: var(--accent-color-end);
    text-decoration: underline;
}

.social-links li {
    display: inline-block; /* Or flex for better control */
    margin-right: var(--spacing-unit);
}
.social-links a {
    font-weight: 600; /* Make text links stand out */
}


/* Success Page Styles */
.body-success-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background-image: var(--gradient-section-bg);
    padding: var(--spacing-unit);
    font-family: var(--font-primary);
}

.success-content-wrapper {
    background: var(--neutral-bg);
    padding: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 2);
    border-radius: var(--border-radius-sharp);
    box-shadow: var(--brutalist-shadow);
    border: var(--brutalist-border);
    text-align: center;
    max-width: 550px;
}

.success-content-wrapper h1 {
    font-family: var(--font-headings);
    color: var(--primary-color-start);
    font-size: 2.2rem;
    margin-bottom: var(--spacing-unit);
}

.success-content-wrapper p {
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.success-content-wrapper .btn {
    margin-top: var(--spacing-unit);
}

/* Privacy & Terms Page Specific Styles */
.body-text-page .page-content-container {
    padding-top: calc(var(--header-height) + var(--spacing-unit) * 3);
    padding-bottom: calc(var(--spacing-unit) * 3);
    max-width: 800px; /* Narrower for readability */
    margin-left: auto;
    margin-right: auto;
}

.body-text-page .page-content-container h1,
.body-text-page .page-content-container h2,
.body-text-page .page-content-container h3 {
    font-family: var(--font-headings);
    color: var(--neutral-dark);
    margin-top: calc(var(--spacing-unit) * 2);
    margin-bottom: var(--spacing-unit);
}
.body-text-page .page-content-container h1 { font-size: 2rem; }
.body-text-page .page-content-container h2 { font-size: 1.7rem; }
.body-text-page .page-content-container h3 { font-size: 1.4rem; }


.body-text-page .page-content-container p,
.body-text-page .page-content-container li {
    font-family: var(--font-primary);
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: var(--spacing-unit);
}
.body-text-page .page-content-container ul {
    list-style: disc;
    padding-left: calc(var(--spacing-unit) * 1.5);
    margin-bottom: var(--spacing-unit);
}

/* Animation Placeholders (for JS interaction) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible { /* Class added by ScrollReveal */
    opacity: 1;
    transform: translateY(0);
}
.animate-on-scroll[data-animation="fadeIn"] { transform: translateY(0); }
.animate-on-scroll[data-animation="fadeInUp"] { transform: translateY(30px); }
.animate-on-scroll[data-animation="fadeInLeft"] { transform: translateX(-30px); opacity: 0;}
.animate-on-scroll[data-animation="fadeInRight"] { transform: translateX(30px); opacity: 0;}
.animate-on-scroll[data-animation="zoomIn"] { transform: scale(0.8); opacity: 0;}

.animate-on-scroll.is-visible[data-animation="fadeInLeft"],
.animate-on-scroll.is-visible[data-animation="fadeInRight"] {
    transform: translateX(0); opacity: 1;
}
.animate-on-scroll.is-visible[data-animation="zoomIn"] {
    transform: scale(1); opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-title { font-size: 2.8rem; }
    .hero-subtitle { font-size: 1.1rem; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.9rem; }

    .timeline::after { left: 30px; margin-left: 0; }
    .timeline-item { width: 100%; padding-left: calc(var(--spacing-unit) * 2.5 + 40px); padding-right: var(--spacing-unit); text-align: left !important; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; }
    .timeline-item:nth-child(odd) .timeline-icon,
    .timeline-item:nth-child(even) .timeline-icon { left: 10px !important; right: auto !important; } /* Adjusted to place on the left of item */

    .timeline-item .timeline-content::before { display: none; } /* Hide arrows on smaller screens for simpler layout */

    .column.column-text, .column.column-image { flex-basis: 100%; }
    .column.column-image { order: -1; margin-bottom: var(--spacing-unit); } /* Image on top in careers/intro */

}


@media (max-width: 768px) {
    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--neutral-bg);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: var(--spacing-unit) 0;
        border-top: 1px solid var(--neutral-light);
    }
    .main-navigation ul.is-open {
        display: flex;
    }
    .main-navigation li {
        margin-left: 0;
        width: 100%;
    }
    .main-navigation a {
        display: block;
        padding: calc(var(--spacing-unit) * 0.8) var(--spacing-unit);
        text-align: center;
        border-bottom: 1px solid var(--neutral-light);
    }
    .main-navigation li:last-child a {
        border-bottom: none;
    }
    .menu-toggle {
        display: block;
    }
    .menu-toggle[aria-expanded="true"] .hamburger {
        background-color: transparent; /* Hide middle line */
    }
    .menu-toggle[aria-expanded="true"] .hamburger::before {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle[aria-expanded="true"] .hamburger::after {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }

    .cards-grid, .media-grid, .links-grid {
        grid-template-columns: 1fr; /* Single column */
    }
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-column h4 { margin-top: var(--spacing-unit); }
    .social-links li { margin: 0 calc(var(--spacing-unit) * 0.5); }

}

@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    .section-padding {
        padding-top: calc(var(--spacing-unit) * 2.5);
        padding-bottom: calc(var(--spacing-unit) * 2.5);
    }
    .contact-form-container {
        padding: var(--spacing-unit);
    }
    .btn, button, input[type="submit"], input[type="button"] {
        padding: calc(var(--spacing-unit) * 0.7) calc(var(--spacing-unit) * 1.2);
        font-size: 0.9rem;
    }
}