@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/playfair-400.ttf) format('truetype');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(../fonts/playfair-500.ttf) format('truetype');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(../fonts/playfair-600.ttf) format('truetype');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(../fonts/playfair-700.ttf) format('truetype');
}

@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url(../fonts/sourcesans-300.ttf) format('truetype');
}

@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/sourcesans-400.ttf) format('truetype');
}

@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(../fonts/sourcesans-600.ttf) format('truetype');
}

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

body {
    font-family: 'Source Sans Pro', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.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;
}

h2 {
    font-size: 2rem;
    color: #2c3e50;
}

h3 {
    font-size: 1.5rem;
    color: #34495e;
}

p {
    margin-bottom: 1rem;
    color: #666;
    font-size: 1.1rem;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar {
    padding: 1rem 0;
}

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

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0;
    transition: color 0.3s ease;
}

.logo span {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 300;
    transition: color 0.3s ease;
}

.logo a:hover .logo-image {
    transform: scale(1.1);
}

.logo a:hover h1 {
    color: #e74c3c;
}

.logo a:hover span {
    color: #c0392b;
}

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

.nav-menu a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 400;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.nav-menu a:hover {
    color: #e74c3c;
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background-color: #f5e6ea;
    /* Fallback color */
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.2) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-title,
.hero-subtitle-main,
.hero-subtitle {
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.9),
        0 0 20px rgba(255, 255, 255, 0.9),
        0 0 30px rgba(255, 255, 255, 0.7);
}

.hero-title {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-subtitle-main {
    font-size: 1.5rem;
    color: #e74c3c;
    margin-bottom: 1.5rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #000;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    font-weight: 500;
    text-shadow:
        -1px -1px 0 rgba(255, 255, 255, 0.9),
        1px -1px 0 rgba(255, 255, 255, 0.9),
        -1px 1px 0 rgba(255, 255, 255, 0.9),
        1px 1px 0 rgba(255, 255, 255, 0.9),
        0 0 15px rgba(255, 255, 255, 0.8);
}

.cta-button {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.cta-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Services Section */
.services {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-card {
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 10px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.service-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-link {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.service-link:hover {
    border-bottom-color: #e74c3c;
}

/* Doctor Section */
.doctor {
    padding: 80px 0;
    background: #f8f9fa;
}

.doctor-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.doctor-text h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.doctor-subtitle {
    color: #e74c3c;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doctor-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #555;
}

.doctor-credentials {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.doctor-credentials h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.doctor-credentials ul {
    list-style: none;
    padding: 0;
}

.doctor-credentials li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
}

.doctor-credentials li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #e74c3c;
    font-weight: bold;
}

.doctor-credentials li:last-child {
    border-bottom: none;
}

.doctor-image {
    background: transparent;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.doctor-photo {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    display: block;
}

.doctor-image::after {
    display: none;
}

/* Treatment Areas Section */
.treatment-areas {
    padding: 80px 0;
    background: white;
}

.treatment-areas h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.treatment-areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.treatment-area-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.treatment-area-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.treatment-area-card h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 0.5rem;
}

.treatment-area-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.treatment-area-card li {
    padding: 0.5rem 0;
    color: #666;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 1.2rem;
}

.treatment-area-card li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #e74c3c;
    font-weight: bold;
}

.treatment-area-card li:last-child {
    border-bottom: none;
}

.area-link {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
    display: inline-block;
    margin-top: 1rem;
}

.area-link:hover {
    border-bottom-color: #e74c3c;
}

/* Technologies Section */
.technologies {
    padding: 80px 0;
    background: #f8f9fa;
}

.technologies h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.technologies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.technology-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.technology-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.tech-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.technology-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.technology-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: left;
}

.tech-benefits {
    list-style: none;
    padding: 0;
    text-align: left;
}

.tech-benefits li {
    padding: 0.5rem 0;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 1.5rem;
}

.tech-benefits li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.tech-benefits li:last-child {
    border-bottom: none;
}

.tech-certification {
    margin-top: 4rem;
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    border: 2px solid #e74c3c;
}

.tech-certification h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.tech-certification p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.certifications {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.cert-badge {
    background: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Clinic About Section */
.clinic-about {
    padding: 80px 0;
    background: white;
}

.clinic-about h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.clinic-description {
    text-align: center;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: #555;
}

.clinic-about p {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.7;
}

.principles {
    text-align: center;
    margin-top: 3rem;
    padding: 2.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.principles h3 {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    line-height: 1.5;
}

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

.feature {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
    border-left: 4px solid #e74c3c;
}

.feature h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
}

/* Blog Section */
.blog {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.blog-image {
    height: 200px;
    border-radius: 10px 10px 0 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
}

.blog-image[data-content="Trattamenti Anti-Age"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.blog-image[data-content="Biorivitalizzazione"] {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.blog-image[data-content="Carbossiterapia"] {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.blog-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.2)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.4;
}

.blog-image::after {
    content: attr(data-content);
    position: relative;
    z-index: 1;
}

.blog-content {
    padding: 1.5rem;
}

.blog-category {
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-content h3 {
    margin: 0.5rem 0 1rem;
    font-size: 1.3rem;
    color: #2c3e50;
}

.blog-content p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.read-time {
    color: #999;
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: white;
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
}

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

.contact-info h3 {
    margin-bottom: 2rem;
    color: #2c3e50;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 0.5rem;
}

.contact-item a {
    color: #e74c3c;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}


/* Footer */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 20px;
    margin-top: auto;
}

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

.footer-section h4 {
    color: #ecf0f1;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

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

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

.footer-section a:hover {
    color: #e74c3c;
}

.footer-section p {
    color: #bdc3c7;
    font-size: 0.95rem;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: #95a5a6;
    font-size: 0.9rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: #95a5a6;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #e74c3c;
}

/* Responsive Design */
.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 25px rgba(0, 0, 0, 0.15);
}

body.loaded {
    opacity: 1;
}

@media (max-width: 768px) {
    .logo-image {
        width: 40px;
        height: 40px;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

    .logo span {
        font-size: 0.8rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        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-menu li {
        margin: 1rem 0;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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

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

    .service-card {
        padding: 2rem;
    }

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

    .doctor-credentials {
        margin-top: 1.5rem;
        padding: 1rem;
    }

    .treatment-areas-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .treatment-area-card {
        padding: 1.5rem;
    }

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

    .technology-card {
        padding: 1.5rem;
    }

    .certifications {
        flex-direction: column;
        align-items: center;
    }

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

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 15px 40px;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

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

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

    .service-card {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Additional animations */
.service-card,
.blog-card,
.technology-card,
.doctor-content,
.contact-content {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation delays */
.service-card:nth-child(1) {
    animation-delay: 0.1s;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.3s;
}

.service-card:nth-child(4) {
    animation-delay: 0.4s;
}

.service-card:nth-child(5) {
    animation-delay: 0.5s;
}

.service-card:nth-child(6) {
    animation-delay: 0.6s;
}

.technology-card:nth-child(1) {
    animation-delay: 0.1s;
}

.technology-card:nth-child(2) {
    animation-delay: 0.2s;
}

.technology-card:nth-child(3) {
    animation-delay: 0.3s;
}

.technology-card:nth-child(4) {
    animation-delay: 0.4s;
}

.technology-card:nth-child(5) {
    animation-delay: 0.5s;
}

.technology-card:nth-child(6) {
    animation-delay: 0.6s;
}

.blog-card:nth-child(1) {
    animation-delay: 0.1s;
}

.blog-card:nth-child(2) {
    animation-delay: 0.2s;
}

.blog-card:nth-child(3) {
    animation-delay: 0.3s;
}