/* ==========================================================================
   UniCompara - Generated Pages Styles
   Custom CSS for programmatically generated pages (city, comparison, guide)
   Uses uc- prefix to avoid conflicts with EduBlink theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.uc-breadcrumb-area {
    padding: 22px 0;
    background: linear-gradient(135deg, #f7f5f2 0%, #f0ede8 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.uc-breadcrumb-area .edublink-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.uc-breadcrumb-area .breadcrumbs {
    font-size: 14px;
    color: #808080;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.uc-breadcrumb-area .breadcrumbs a {
    color: var(--edublink-color-primary, #1AB69D);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.uc-breadcrumb-area .breadcrumbs a:hover {
    color: var(--edublink-color-dark, #231F40);
}

/* --------------------------------------------------------------------------
   Page Content Wrapper
   -------------------------------------------------------------------------- */
.uc-entry-content {
    padding: 45px 0 65px;
}

.uc-entry-content h1 {
    font-size: 34px;
    font-weight: 700;
    color: var(--edublink-color-dark, #231F40);
    margin-bottom: 20px;
    line-height: 1.25;
}

/* --------------------------------------------------------------------------
   Intro Text
   -------------------------------------------------------------------------- */
.uc-intro-text {
    margin: 16px 0 32px;
    font-size: 16px;
    line-height: 1.85;
    color: #555;
}

.uc-intro-text p {
    margin-bottom: 16px;
}

.uc-intro-text p:last-child {
    margin-bottom: 0;
}

.uc-intro-text a {
    color: var(--edublink-color-primary, #1AB69D);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}

.uc-intro-text a:hover {
    border-bottom-color: var(--edublink-color-primary, #1AB69D);
}

/* --------------------------------------------------------------------------
   Course Search Widget
   -------------------------------------------------------------------------- */
.uc-course-search-wrap {
    margin-bottom: 20px;
}

.uc-course-search {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid var(--edublink-color-border, #e5e5e5);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.uc-course-search:focus {
    border-color: var(--edublink-color-primary, #1AB69D);
    box-shadow: 0 0 0 3px rgba(26, 182, 157, 0.1);
}

#course-count {
    margin-bottom: 15px;
    color: #808080;
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   Sedi Section
   -------------------------------------------------------------------------- */
.uc-sedi-section {
    margin-top: 45px;
    padding-top: 35px;
    border-top: 1px solid #eee;
}

.uc-sedi-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--edublink-color-dark, #231F40);
    margin-bottom: 20px;
}

.uc-sedi-list {
    line-height: 1.8;
}

.uc-sedi-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.uc-sedi-list li {
    padding: 14px 20px;
    margin-bottom: 8px;
    background: #fafafa;
    border-radius: 8px;
    line-height: 1.7;
    border-left: 3px solid var(--edublink-color-primary, #1AB69D);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.uc-sedi-list li:hover {
    background: #f2f2f2;
    transform: translateX(3px);
}

.uc-sedi-list a {
    color: var(--edublink-color-primary, #1AB69D);
    text-decoration: none;
    font-weight: 500;
}

.uc-sedi-list a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   FAQ Section - Accordion Style
   -------------------------------------------------------------------------- */
.uc-faq-section {
    margin-top: 50px;
    padding-top: 35px;
    border-top: 1px solid #eee;
}

.uc-faq-section > h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--edublink-color-dark, #231F40);
    margin-bottom: 24px;
}

.uc-faq-item {
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.uc-faq-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border-color: #ddd;
}

.uc-faq-question {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    padding: 18px 48px 18px 24px;
    color: var(--edublink-color-dark, #231F40);
    cursor: pointer;
    position: relative;
    line-height: 1.5;
    transition: color 0.2s ease;
    -webkit-user-select: none;
    user-select: none;
}

.uc-faq-question:hover {
    color: var(--edublink-color-primary, #1AB69D);
}

.uc-faq-question::after {
    content: '';
    position: absolute;
    right: 22px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--edublink-color-primary, #1AB69D);
    border-bottom: 2px solid var(--edublink-color-primary, #1AB69D);
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.3s ease;
}

.uc-faq-item.uc-active .uc-faq-question::after {
    transform: translateY(-35%) rotate(-135deg);
}

.uc-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 24px;
}

.uc-faq-item.uc-active .uc-faq-answer {
    max-height: 600px;
    padding: 0 24px 20px;
}

.uc-faq-answer p {
    font-size: 15px;
    line-height: 1.8;
    color: #666;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Comparison Table
   -------------------------------------------------------------------------- */
.uc-comparison-table {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    -webkit-overflow-scrolling: touch;
}

.uc-comparison-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    min-width: 500px;
}

.uc-comparison-table thead tr {
    background: var(--edublink-color-primary, #1AB69D);
    color: #fff;
}

.uc-comparison-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}

.uc-comparison-table th:not(:first-child) {
    text-align: center;
}

.uc-comparison-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.uc-comparison-table td:first-child {
    font-weight: 600;
    color: var(--edublink-color-dark, #231F40);
    white-space: nowrap;
}

.uc-comparison-table td:not(:first-child) {
    text-align: center;
}

.uc-comparison-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.uc-comparison-table tbody tr {
    transition: background-color 0.2s ease;
}

.uc-comparison-table tbody tr:hover {
    background: #f0f7f6;
}

/* --------------------------------------------------------------------------
   Pro/Contro Sections
   -------------------------------------------------------------------------- */
.uc-pro-contro h2 {
    font-size: 22px;
    margin-top: 35px;
    margin-bottom: 15px;
    color: var(--edublink-color-dark, #231F40);
}

.uc-pro-label {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    color: var(--edublink-color-primary, #1AB69D);
    margin-bottom: 8px;
    padding: 4px 12px;
    background: rgba(26, 182, 157, 0.08);
    border-radius: 6px;
}

.uc-contro-label {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    color: var(--edublink-color-secondary, #EE4A62);
    margin-bottom: 8px;
    padding: 4px 12px;
    background: rgba(238, 74, 98, 0.08);
    border-radius: 6px;
}

.uc-pro-list,
.uc-contro-list {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #555;
}

.uc-pro-list ul,
.uc-contro-list ul {
    padding-left: 20px;
}

.uc-pro-list li,
.uc-contro-list li {
    margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   Conclusion Box
   -------------------------------------------------------------------------- */
.uc-conclusion {
    margin-top: 40px;
    padding: 28px 32px;
    background: linear-gradient(135deg, #f7f5f2 0%, #f0ede8 100%);
    border-radius: 12px;
    border-left: 4px solid var(--edublink-color-primary, #1AB69D);
}

.uc-conclusion h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--edublink-color-dark, #231F40);
}

.uc-conclusion > div {
    font-size: 16px;
    line-height: 1.85;
    color: #555;
}

/* --------------------------------------------------------------------------
   Hub Page Cards Grid
   -------------------------------------------------------------------------- */
.uc-hub-header {
    margin-bottom: 35px;
}

.uc-hub-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--edublink-color-dark, #231F40);
    margin-bottom: 12px;
}

.uc-hub-header p {
    font-size: 17px;
    line-height: 1.75;
    color: #666;
    max-width: 700px;
}

.uc-card-grid {
    display: grid;
    gap: 20px;
}

.uc-card-grid--cities {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.uc-card-grid--comparisons {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.uc-card-grid--guides {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.uc-card {
    display: block;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 18px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid #f0f0f0;
}

.uc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--edublink-color-primary, #1AB69D);
}

.uc-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--edublink-color-dark, #231F40);
    line-height: 1.4;
}

.uc-card .uc-card-cta {
    color: var(--edublink-color-primary, #1AB69D);
    font-size: 14px;
    font-weight: 500;
}

.uc-city-card {
    text-align: center;
    padding: 20px 15px;
}

.uc-city-card h3 {
    font-size: 16px;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Guide Article Body
   -------------------------------------------------------------------------- */
.uc-article-wrap {
    max-width: 800px;
    margin: 0 auto;
}

.uc-article-body {
    margin: 20px 0 40px;
    font-size: 16px;
    line-height: 1.85;
    color: #444;
}

.uc-article-body h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--edublink-color-dark, #231F40);
    margin: 38px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.uc-article-body h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--edublink-color-dark, #231F40);
    margin: 28px 0 12px;
}

.uc-article-body ul,
.uc-article-body ol {
    margin: 15px 0;
    padding-left: 25px;
}

.uc-article-body li {
    margin-bottom: 8px;
    line-height: 1.75;
}

.uc-article-body a {
    color: var(--edublink-color-primary, #1AB69D);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}

.uc-article-body a:hover {
    border-bottom-color: var(--edublink-color-primary, #1AB69D);
}

.uc-article-body strong {
    color: var(--edublink-color-dark, #231F40);
    font-weight: 600;
}

.uc-article-body p {
    margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Class Enrichment Section
   -------------------------------------------------------------------------- */
.uc-class-enrichment {
    padding: 35px 0;
    border-top: 1px solid #eee;
    margin-top: 30px;
}

.uc-class-enrichment h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--edublink-color-dark, #231F40);
    margin-bottom: 15px;
}

.uc-class-enrichment h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--edublink-color-dark, #231F40);
    margin: 25px 0 10px;
}

.uc-class-enrichment .uc-class-intro,
.uc-class-enrichment .uc-class-sbocchi,
.uc-class-enrichment .uc-class-requisiti {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #555;
}

/* --------------------------------------------------------------------------
   FAQ Accordion JS initialization
   -------------------------------------------------------------------------- */
/* The JS below toggles .uc-active on .uc-faq-item elements */

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .uc-entry-content h1 {
        font-size: 28px;
    }

    .uc-comparison-table th,
    .uc-comparison-table td {
        padding: 12px 14px;
    }
}

@media (max-width: 767px) {
    .uc-entry-content {
        padding: 30px 0 45px;
    }

    .uc-entry-content h1 {
        font-size: 24px;
    }

    .uc-comparison-table {
        margin: 20px -15px;
        border-radius: 0;
    }

    .uc-card-grid--cities {
        grid-template-columns: repeat(2, 1fr);
    }

    .uc-card-grid--comparisons,
    .uc-card-grid--guides {
        grid-template-columns: 1fr;
    }

    .uc-conclusion {
        padding: 20px 22px;
    }

    .uc-faq-question {
        font-size: 15px;
        padding: 16px 44px 16px 20px;
    }
}
