/* Import Muller font from fonts.com or use a fallback */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #732753;
    --primary-hover: #5a1e42;
    --primary-light: rgba(115, 39, 83, 0.1);
    --text-dark: #0F252E;
    --text-secondary: #231F20;
    --text-light: #666;
    --background-light: #fff;
    --background-cream: #FFF9F8;
    --border-color: #ddd;
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ffc107;
    --cta-yellow: #732753;
    --cta-yellow-hover: #5a1e42;
    --light-bg: #f9f9f9;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --info-color: #2196f3;
    --card-radius: 30px;
    --button-radius: 25px;
    --pill-radius: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #ffffff;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles - Figma Design */
.site-header {
    background-color: #ffffff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
}

.logo-link {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 40px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-left: 40px;
}

.main-nav a {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
    letter-spacing: -0.005em;
}

.main-nav a:hover {
    opacity: 0.8;
    text-decoration: none;
}

.main-nav .nav-cta {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
}

.main-nav .nav-cta:hover {
    background-color: var(--primary-hover);
    opacity: 1;
    color: white;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

.header-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.3s ease;
}

.header-link:hover {
    opacity: 0.8;
    text-decoration: none;
    color: var(--primary-color);
}

/* Icon-only header links */
.header-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(115, 39, 83, 0.08) 0%, rgba(115, 39, 83, 0.15) 100%);
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.header-icon-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(115, 39, 83, 0.3);
    text-decoration: none;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background-color: white;
    padding: 20px 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: absolute;
    top: 100%; /* Posiziona subito sotto l'header */
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav .nav-cta {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    text-align: center;
    margin-top: 10px;
}

.mobile-nav .nav-cta:hover {
    color: white;
}

@media (max-width: 1200px) {
    .main-nav {
        gap: 20px;
    }
    
    .main-nav a {
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-actions .header-link {
        display: none;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .header-icon-link {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 12px 15px;
    }
    
    .header-logo {
        height: 32px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .header-icon-link {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .mobile-menu-toggle {
        font-size: 20px;
        padding: 3px;
    }
    
    .mobile-nav {
        top: 56px; /* Smaller header height on mobile */
        max-height: calc(100vh - 56px);
        padding: 15px 20px;
    }
}

/* Legacy header support */
header {
    background-color: #ffffff;
    color: var(--primary-color);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.logo-container img {
    height: 40px;
    width: auto;
}

.user-nav {
    display: flex;
    align-items: center;
}

.user-nav a {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 15px;
    display: flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.user-nav a i {
    margin-right: 6px;
}

/* Read more/less functionality for service description */
.description-wrapper {
    position: relative;
}

.description-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.description-content.collapsed {
    max-height: 150px;
    /* Increased height to accommodate more formatted content */
}

/* The description content should preserve all HTML formatting */
.description-content ul,
.description-content ol,
.description-content li,
.description-content p,
.description-content div,
.description-content h1,
.description-content h2,
.description-content h3,
.description-content h4,
.description-content h5,
.description-content h6 {
    /* Ensure all elements render correctly */
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Make lists display properly */
.description-content ul,
.description-content ol {
    padding-left: 2em;
}

.description-content ul li {
    list-style-type: disc;
}

.description-content ol li {
    list-style-type: decimal;
}

/* Gradient overlay for collapsed state */
.gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.description-content.collapsed + .gradient-overlay {
    opacity: 1;
}

.read-more-btn {
    display: block;
    margin-top: 10px;
    background: transparent;
    border: none;
    color: #3490dc;
    font-weight: 500;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.read-more-btn:hover {
    background-color: rgba(52, 144, 220, 0.1);
}

.less-text,
.less-icon {
    display: none;
}

.read-more-btn.expanded .more-text,
.read-more-btn.expanded .more-icon {
    display: none;
}

.read-more-btn.expanded .less-text,
.read-more-btn.expanded .less-icon {
    display: inline;
}

.read-more-btn i {
    margin-left: 5px;
    font-size: 0.8em;
}
