/* ============================================
   AVVOCATO MARCELLI - CUSTOM STYLES
   ============================================ */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    line-height: 1.6;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    background: #fff;
    padding: 10px 0;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

.contact-info {
    display: flex;
    gap: 20px;
    color: #666;
}

.contact-info i {
    margin-right: 5px;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
}

.social-icons a:hover {
    color: #666;
}

/* Icone social nel footer */
footer .social-icons a {
    color: #a0aec0;
}

footer .social-icons a:hover {
    color: white;
}

/* ============================================
   HEADER
   ============================================ */
header {
    background: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-header {
    width: 250px;
    height: auto;
    display: block;
}

.navbar {
    padding: 0;
}

.navbar-nav {
    gap: 20px;
}

.nav-link {
    color: #333 !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    padding: 0 !important;
}

.nav-link:hover {
    color: #666 !important;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 600px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: #3b4a5c;
    padding-bottom: 80px;
}

.hero > .container {
    position: relative;
    z-index: 1;
}

.hero .container {
    padding: 100px 0px 100px 0px
}

.hero-content {
    text-align: center;
}

.hero-logo {
    font-size: 72px;
    margin-bottom: 20px;
    font-weight: 300;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 5px;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 300;
}

.hero-subtitle {
    font-size: 16px;
    margin-bottom: 10px;
    font-style: italic;
}

.cta-button {
    margin-top: 20px;
    padding: 12px 30px;
    background: transparent;
    color: white;
    border: 2px solid white;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.cta-button:hover {
    background: white;
    color: #333;
}

/* Curva in basso della hero */
.hero-curve {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 2;
}

.hero-curve svg {
    display: block;
    width: 100%;
    height: 80px;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    background: #f9f9f9;
}

.section-subtitle {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin-bottom: 20px;
}

.about p {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.about-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 5px;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services {
    background: white;
}

.section-title {
    font-size: 32px;
    font-weight: 300;
    margin-top: 10px;
}

.service-card {
    padding: 20px;
}

.service-image {
    width: 100%;
    height: 200px;
    background: #e0e0e0;
    border-radius: 5px;
}

.activity-icon {
    width: 100%;
    height: 400px;
    background: #9E1B60;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-icon i {
    font-size: 5rem;
    color: white;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: #9E1B60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card:hover .service-icon {
    background: #2d3748;
    transform: translateY(-3px);
}

.service-card h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: bold;
}

.service-card p {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.service-link {
    color: #333;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.service-link:hover {
    color: #666;
}

/* ============================================
   PUBBLICAZIONI PAGE
   ============================================ */
.pubblicazioni-section {
    background: #f9f9f9;
}

.pubblicazione-card {
    display: flex;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 30px;
    transition: transform 0.3s;
}

.pubblicazione-card:hover {
    transform: translateY(-3px);
}

.pubblicazione-date {
    background: #9E1B60;
    color: white;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.pubblicazione-year {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}

.pubblicazione-content {
    padding: 30px 40px;
}

.pubblicazione-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    line-height: 1.6;
}

.pubblicazione-source {
    font-size: 13px;
    color: #999;
    font-style: italic;
    margin-bottom: 0;
}

.pubblicazione-source i {
    margin-right: 5px;
}

@media (max-width: 768px) {
    .pubblicazione-card {
        flex-direction: column;
    }

    .pubblicazione-date {
        min-width: auto;
        padding: 15px;
    }

    .pubblicazione-content {
        padding: 20px;
    }
}

/* ============================================
   EVENTI PAGE
   ============================================ */
.eventi-section {
    background: #f9f9f9;
}

.evento-card {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
    transition: transform 0.3s;
}

.evento-card:hover {
    transform: translateY(-3px);
}

.evento-badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    border-radius: 0 0 5px 0;
}

.badge-convegno {
    background: #9E1B60;
}

.badge-diretta {
    background: #c0392b;
}

.badge-corso {
    background: #2d3748;
}

.evento-body {
    padding: 30px 40px;
}

.evento-header {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}

.evento-date,
.evento-location {
    font-size: 13px;
    color: #999;
}

.evento-date i,
.evento-location i {
    margin-right: 5px;
}

.evento-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    line-height: 1.5;
}

.evento-description {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 0;
}

.evento-video {
    margin-top: 20px;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 5px;
}

.evento-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .evento-body {
        padding: 20px;
    }

    .evento-header {
        flex-direction: column;
        gap: 5px;
    }

    .evento-title {
        font-size: 16px;
    }
}

/* ============================================
   QUOTE SECTION
   ============================================ */
.quote {
    padding: 0;
    background: none;
    line-height: 0;
}

.quote img {
    width: 100%;
    display: block;
}

.quote-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 300;
}

.quote-text {
    font-size: 20px;
    font-style: italic;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-form-section {
    padding: 150px 0px 150px 0px
}

.contact-hero {
    min-height: 300px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url('../img/contact.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-hero h1 {
    font-size: 48px;
    font-weight: 300;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin: 0;
}

.contact-info-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.contact-box {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.contact-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.contact-box .icon-circle {
    width: 80px;
    height: 80px;
    background: #9E1B60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.contact-box .icon-circle i {
    font-size: 2rem;
    color: white;
}

.contact-box h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
}

.contact-box p,
.contact-box a {
    color: #666;
    font-size: 13px;
    text-decoration: none;
    display: block;
    margin: 5px 0;
    transition: color 0.3s;
}

.contact-box a:hover {
    color: #333;
}

.map-section {
    padding: 0;
    margin: 0;
}

.map-container {
    width: 100%;
    height: 450px;
    position: relative;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.map-message {
    text-align: center;
    padding: 40px 20px;
    background-color: #2d3748;
    color: white;
}

.map-message h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 300;
    margin: 0;
}

/* Responsive per Contact Page */
@media (max-width: 768px) {
    .contact-hero h1 {
        font-size: 32px;
        letter-spacing: 3px;
    }

    .contact-info-section {
        padding: 50px 0;
    }

    .map-container {
        height: 350px;
    }
}

/* ============================================
   CONTACT FORM - Messaggi e Loading
   ============================================ */
.button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit {
    background-color: #9E1B60;
    color: #FFFFFF;
}

.btn-submit:hover {
    background-color: #2d3748;
    color: #FFFFFF;
}

#form-message {
    margin-top: 20px;
    border-radius: 5px;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-section {
    padding: 80px 0;
    background: #f9f9f9;
}

/* Left Sidebar */
.profile-sidebar {
    background: white;
    padding: 40px 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
    position: sticky;
    top: 120px;
}

.profile-photo-wrapper {
    margin-bottom: 25px;
}

.profile-photo {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.profile-name {
    font-size: 22px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.profile-contact-info {
    text-align: left;
    margin-bottom: 25px;
}

.profile-contact-info p {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

.profile-contact-info strong {
    display: inline-block;
    width: 80px;
    color: #333;
}

.profile-contact-info a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.profile-contact-info a:hover {
    color: #2d3748;
}

.profile-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.profile-social a {
    width: 40px;
    height: 40px;
    background: #2d3748;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.3s;
}

.profile-social a:hover {
    background: #1a202c;
    transform: translateY(-3px);
}

/* Right Content */
.profile-content {
    background: white;
    padding: 50px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.profile-section-block {
    margin-bottom: 50px;
}

.profile-section-block:last-child {
    margin-bottom: 0;
}

.profile-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2d3748;
}

.profile-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

.profile-content a {
    color: #2d3748;
    text-decoration: underline;
    transition: color 0.3s;
}

.profile-content a:hover {
    color: #666;
}

/* Experience Items */
.experience-item {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid #e0e0e0;
}

.experience-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.experience-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.experience-item p {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .profile-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }

    .profile-content {
        padding: 30px 25px;
    }
}

@media (max-width: 768px) {
    .profile-section {
        padding: 50px 0;
    }

    .profile-sidebar {
        padding: 30px 20px;
    }

    .profile-name {
        font-size: 20px;
    }

    .profile-section-title {
        font-size: 16px;
    }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
[data-animate] {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animate="fade-up"] {
    transform: translateY(40px);
}

[data-animate="fade-left"] {
    transform: translateX(-40px);
}

[data-animate="fade-right"] {
    transform: translateX(40px);
}

[data-animate="fade-in"] {
    transform: scale(0.95);
}

[data-animate="zoom-in"] {
    transform: scale(0.85);
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Stagger delay for service cards */
[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.2s; }
[data-delay="3"] { transition-delay: 0.3s; }
[data-delay="4"] { transition-delay: 0.4s; }
[data-delay="5"] { transition-delay: 0.5s; }
[data-delay="6"] { transition-delay: 0.6s; }
[data-delay="7"] { transition-delay: 0.7s; }
[data-delay="8"] { transition-delay: 0.8s; }

/* ============================================
   PARALLAX IMAGE
   ============================================ */
.parallax-wrapper {
    overflow: hidden;
    border-radius: 5px;
}

.parallax-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #9E1B60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #2d3748;
    color: white;
    transform: translateY(-3px);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: #2d3748;
    color: #a0aec0;
    padding: 60px 0 30px;
}

footer h3 {
    color: white;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

footer ul li {
    margin-bottom: 10px;
    font-size: 13px;
}

footer a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: white;
}

.footer-logo {
    font-size: 48px;
    color: white;
    margin-bottom: 15px;
    font-weight: 300;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 3px;
}

.footer-logo img {
    width: 250px
}

.footer-bottom {
    border-top: 1px solid #4a5568;
    font-size: 12px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .contact-info {
        flex-direction: column;
        gap: 5px;
    }

    /* Logo più piccolo su mobile per lasciare spazio al menu hamburger */
    .logo-header {
        width: 180px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-logo {
        font-size: 48px;
    }

    .quote-text {
        font-size: 18px;
    }

    .footer-logo {
        font-size: 36px;
    }
}

@media (max-width: 576px) {

    /* Logo ancora più piccolo su schermi molto piccoli */
    .logo-header {
        width: 150px;
    }

    header {
        padding: 15px 0;
    }
}

/* ============================================
   PAGE HEADER (intestazione pagine interne)
   ============================================ */
.page-header {
    background: #3b4a5c;
    color: white;
    padding: 80px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0;
}

/* ============================================
   GALLERY / FOTO PAGE
   ============================================ */
.gallery-section {
    background: #f9f9f9;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    z-index: 10000;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 20px;
    z-index: 10000;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
    color: #ccc;
}