/* CSS Custom Properties (Global Variables) */
:root {
    /* Primary Colors */
    --primary-dark: #2c3e50;
    --primary-medium: #34495e;
    --primary-light: #3498db;
    
    /* Cream Color Palette */
    --cream-main: #fdf6e3;
    --cream-secondary: #f7f3e9;
    --cream-light: #fefcf7;
    --cream-accent: #f0f0e6;
    
    /* Gold Accent Colors */
    --gold-primary: #B8860B;
    --gold-secondary: #8B6914;
    --gold-light: #DAA520;
    
    /* Text Colors */
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #7f8c8d;
    --text-white: #fff;
    --text-cream: #f8f9fa;
    
    /* Background Colors */
    --bg-main: var(--cream-main);
    --bg-secondary: var(--cream-secondary);
    --bg-cards: var(--cream-light);
    --bg-navbar: rgba(253, 246, 227, 0.95);
    --bg-navbar-scroll: rgba(253, 246, 227, 0.98);
    
    /* Border and Shadow Colors */
    --border-light: #e9ecef;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-gold: rgba(184, 134, 11, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Border Radius */
    --radius-sm: 3px;
    --radius-md: 5px;
    --radius-lg: 10px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-main);
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-medium);
    margin-bottom: 0.8rem;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition-fast);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-dark);
    color: var(--text-white);
    padding: 15px 30px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
}

.btn-primary:hover {
    background-color: var(--primary-medium);
    transform: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
    padding: 13px 28px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
}

.btn-secondary:hover {
    background-color: var(--primary-dark);
    color: var(--text-white);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-navbar);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    box-shadow: 0 2px 20px var(--shadow-light);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: var(--primary-dark);
    font-size: 1.3rem;
    margin: 0;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-dark);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-dark);
    transition: var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Header Section */
.header-section {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(44, 62, 80, 0.7) 0%, 
        rgba(52, 73, 94, 0.6) 50%, 
        rgba(44, 62, 80, 0.7) 100%),
        url('images/hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.header-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-content {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.justice-symbols {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.symbol-left,
.symbol-center,
.symbol-right {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(184, 134, 11, 0.3);
    transition: transform 0.3s ease;
}

.symbol-left:hover,
.symbol-center:hover,
.symbol-right:hover {
    transform: translateY(-5px);
}

.justice-symbols i {
    font-size: 2rem;
    color: white;
}

.header-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-subtitle {
    font-size: 2.5rem;
    font-weight: 600;
    color: #B8860B;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.header-description {
    font-size: 1.3rem;
    color: #f8f9fa;
    margin-bottom: 2rem;
    font-style: italic;
}

.gold-line {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #B8860B 0%, #DAA520 50%, #B8860B 100%);
    margin: 0 auto 2rem;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(184, 134, 11, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #B8860B;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    cursor: pointer;
}

.scroll-indicator:hover {
    color: #DAA520;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    background-color: var(--bg-main);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.balance-symbol {
    text-align: center;
    margin-bottom: 2rem;
}

.balance-symbol i {
    font-size: 3rem;
    color: var(--primary-dark);
    text-shadow: none;
    animation: none;
}

@keyframes balanceSway {
    0%, 100% {
        transform: rotate(-2deg);
    }
    50% {
        transform: rotate(2deg);
    }
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.professional-photo {
    width: 280px;
    height: 350px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-light);
    position: relative;
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition-fast);
}

.hero-photo:hover {
    transform: none;
}

/* Fallback for when image is not available */
.professional-photo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-cards);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    z-index: -1;
}

.professional-photo::after {
    content: 'Foto Professionale';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: 1rem;
    z-index: -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.professional-photo::after::before {
    content: '⚖️';
    font-size: 2rem;
}

/* Hide fallback when image is loaded */
.professional-photo img {
    position: relative;
    z-index: 1;
}

.image-placeholder {
    width: 280px;
    height: 350px;
    background: var(--bg-cards);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    box-shadow: 0 5px 15px var(--shadow-light);
}

.image-placeholder i {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.image-placeholder p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* About Section */
.about {
    padding: 60px 0;
    background-color: var(--bg-secondary);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    text-align: left;
}

.about-text h3 {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-md);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.about-text h4 {
    color: var(--gold-primary);
    font-size: 1.3rem;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.about-text strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.about-cta {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--cream-accent) 0%, var(--cream-light) 100%);
    border-left: 4px solid var(--gold-primary);
    border-radius: var(--radius-md);
}

.about-cta strong {
    color: var(--gold-secondary);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.stat {
    text-align: center;
    padding: var(--spacing-md);
    background-color: var(--bg-cards);
    border-radius: var(--radius-lg);
}

.stat h4 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-xs);
}

.stat p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.about-image .image-placeholder {
    width: 250px;
    height: 300px;
    background: var(--bg-cards);
    border: 1px solid var(--border-light);
}

/* Services Section */
.services {
    padding: 60px 0;
    background-color: var(--bg-main);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.service-card {
    background-color: var(--bg-cards);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: var(--transition-fast);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-medium);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-dark);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto var(--spacing-md);
}

.service-icon i {
    font-size: 1.5rem;
    color: var(--text-white);
}

.service-card h3 {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.service-card ul {
    list-style: none;
    text-align: left;
}

.service-card li {
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: var(--spacing-md);
}

.service-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-dark);
    font-weight: bold;
}

/* Experience Section */
.experience {
    padding: 60px 0;
    background-color: #f7f3e9;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e9ecef;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: #2c3e50;
    border-radius: 50%;
    top: 0;
}

.timeline-item:nth-child(odd)::before {
    right: -10px;
}

.timeline-item:nth-child(even)::before {
    left: -10px;
}

.timeline-date {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.timeline-content {
    background-color: #fefcf7;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.timeline-content h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.timeline-content p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Contact Section */
.contact {
    padding: 60px 0;
    background-color: #fdf6e3;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: #2c3e50;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 1rem;
}

.contact-details h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-details p {
    margin: 0;
    line-height: 1.6;
}

.contact-form {
    background-color: #fefcf7;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c3e50;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #bdc3c7;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 35px;
    height: 35px;
    background-color: #34495e;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #3498db;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #fdf6e3;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        max-width: 100%;
        padding: 0 1rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 3rem !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .timeline-item::before {
        left: 10px !important;
        right: auto !important;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .header-title {
        font-size: 2.5rem;
    }

    .header-subtitle {
        font-size: 2rem;
    }

    .header-description {
        font-size: 1.1rem;
    }

    .justice-symbols {
        gap: 2rem;
    }

    .symbol-left,
    .symbol-center,
    .symbol-right {
        width: 60px;
        height: 60px;
    }

    .justice-symbols i {
        font-size: 1.5rem;
    }

    .header-title {
        font-size: 2rem;
    }

    .header-subtitle {
        font-size: 1.5rem;
    }

    .header-description {
        font-size: 1rem;
    }

    .justice-symbols {
        gap: 1.5rem;
    }

    .symbol-left,
    .symbol-center,
    .symbol-right {
        width: 50px;
        height: 50px;
    }

    .justice-symbols i {
        font-size: 1.2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .about,
    .services,
    .experience,
    .contact {
        padding: 60px 0;
    }

    .image-placeholder {
        width: 250px;
        height: 300px;
    }

    .professional-photo {
        width: 250px;
        height: 300px;
    }

    .about-image .image-placeholder {
        width: 200px;
        height: 250px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.timeline-item,
.contact-item {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* FAQ Section */
.faq {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--cream-secondary) 0%, var(--cream-light) 100%);
}

.faq .section-header {
    margin-bottom: 3rem;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-cards);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--gold-primary);
    box-shadow: 0 2px 10px var(--shadow-light);
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px var(--shadow-medium);
    border-left-color: var(--gold-light);
}

.faq-item h3 {
    color: var(--primary-dark);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.faq-item h3::before {
    content: "Q:";
    color: var(--gold-primary);
    font-weight: 700;
    margin-right: 0.75rem;
    font-size: 1.5rem;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

/* Responsive FAQ Styles */
@media (max-width: 768px) {
    .faq {
        padding: 60px 0;
    }
    
    .faq-item {
        padding: 1.5rem;
    }
    
    .faq-item h3 {
        font-size: 1.1rem;
    }
    
    .faq-item p {
        font-size: 0.95rem;
    }
}
