/**
 * CESI Score Page Styles
 * Modern design with subtle animations and interactive elements
 */

:root {
    --primary-color: #1e3a5f;
    --secondary-color: #00a86b;
    --accent-color: #ffa500;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --text-dark: #333;
    --text-light: #666;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
}

.cesi-score-explained {
    background: white;
}

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

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in-scale {
    animation: fadeInScale 0.6s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

/* Hero Section */
.score-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.score-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 168, 107, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
    font-size: 1.5rem;
    margin-bottom: 50px;
    color: white;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-score-visual {
    margin-top: 60px;
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 12;
}

.progress-ring-progress {
    fill: none;
    stroke: var(--secondary-color);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 534.07; /* 2 * PI * 85 */
    stroke-dashoffset: 534.07;
    transition: stroke-dashoffset 2s ease-out;
}

.score-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: white;
}

.score-max {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.hero-score-label {
    font-size: 1.2rem;
    color: white;
    opacity: 0.9;
    font-weight: 600;
}

/* What is CESI Section */
.what-is-cesi {
    padding: 140px 0;
    background: white;
    position: relative;
    z-index: 10;
    margin-top: -80px;
    border-radius: 40px 40px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 120px;
    align-items: center;
}

.content-text h2 {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 40px;
    line-height: 1.1;
}

.lead {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 35px;
    line-height: 1.6;
    font-weight: 700;
}

.content-text p {
    font-size: 1.5rem;
    color: var(--text-dark);
    line-height: 1.9;
    margin-bottom: 40px;
    font-weight: 400;
}

.cesi-benefits {
    margin-top: 50px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    font-size: 1.45rem;
    color: var(--text-dark);
    font-weight: 700;
}

.benefit-item svg {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

/* Score Breakdown Preview */
.score-breakdown-preview {
    background: var(--light-bg);
    border-radius: 20px;
    padding: 50px;
    box-shadow: var(--shadow-lg);
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.breakdown-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.breakdown-item:last-child {
    margin-bottom: 0;
}

.category-icon {
    font-size: 3.2rem;
    width: 85px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    border-radius: 16px;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-info h4 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0 0 16px 0;
}

.category-bar {
    width: 100%;
    height: 16px;
    background: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.category-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color) 0%, #00c97d 100%);
    border-radius: 8px;
    width: 0;
    transition: width 1.5s ease-out;
}

.category-score {
    font-size: 2.1rem;
    font-weight: 900;
    color: var(--primary-color);
    min-width: 70px;
    text-align: right;
}

/* Four Components Section */
.four-components {
    padding: 120px 0;
    background: var(--light-bg);
}

.section-title {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.75rem;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 70px;
    font-weight: 600;
}

.components-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.component-card {
    background: white;
    border-radius: 20px;
    padding: 55px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.component-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.component-header {
    text-align: center;
    margin-bottom: 40px;
}

.component-icon {
    width: 110px;
    height: 110px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.component-card:hover .component-icon {
    transform: scale(1.1);
}

.component-icon.safety {
    background: rgba(30, 58, 95, 0.1);
    color: var(--primary-color);
}

.component-icon.walkability {
    background: rgba(0, 168, 107, 0.1);
    color: var(--secondary-color);
}

.component-icon.amenities {
    background: rgba(255, 165, 0, 0.1);
    color: var(--accent-color);
}

.component-icon.events {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.component-icon svg {
    width: 62px;
    height: 62px;
}

.component-header h3 {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.component-range {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 700;
}

.component-body p {
    font-size: 1.45rem;
    color: var(--text-dark);
    line-height: 1.85;
    margin-bottom: 35px;
    font-weight: 500;
}

.component-criteria {
    list-style: none;
    padding: 0;
    margin: 0;
}

.component-criteria li {
    padding: 18px 0 18px 48px;
    position: relative;
    font-size: 1.35rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.component-criteria li:last-child {
    border-bottom: none;
}

.component-criteria li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 18px;
    width: 32px;
    height: 32px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
}

/* Score Ranges Section */
.score-ranges {
    padding: 120px 0;
    background: white;
}

.ranges-list {
    max-width: 1000px;
    margin: 0 auto;
}

.range-item {
    display: flex;
    gap: 40px;
    align-items: center;
    padding: 45px;
    margin-bottom: 35px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.range-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    transition: width 0.3s ease;
}

.range-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.range-item:hover::before {
    width: 12px;
}

.range-item.excellent::before {
    background: linear-gradient(180deg, #00a86b 0%, #00c97d 100%);
}

.range-item.very-good::before {
    background: linear-gradient(180deg, #2ecc71 0%, #52d688 100%);
}

.range-item.good::before {
    background: linear-gradient(180deg, #ffa500 0%, #ffb733 100%);
}

.range-item.acceptable::before {
    background: linear-gradient(180deg, #ffc107 0%, #ffd54f 100%);
}

.range-item.below::before {
    background: linear-gradient(180deg, #dc3545 0%, #e85563 100%);
}

.range-badge {
    flex-shrink: 0;
}

.range-score {
    display: block;
    background: var(--light-bg);
    color: var(--primary-color);
    font-size: 1.9rem;
    font-weight: 900;
    padding: 24px 35px;
    border-radius: 16px;
    text-align: center;
    min-width: 150px;
}

.range-item.excellent .range-score {
    background: linear-gradient(135deg, #00a86b 0%, #00c97d 100%);
    color: white;
}

.range-item.very-good .range-score {
    background: linear-gradient(135deg, #2ecc71 0%, #52d688 100%);
    color: white;
}

.range-item.good .range-score {
    background: linear-gradient(135deg, #ffa500 0%, #ffb733 100%);
    color: white;
}

.range-item.acceptable .range-score {
    background: linear-gradient(135deg, #ffc107 0%, #ffd54f 100%);
    color: var(--primary-color);
}

.range-item.below .range-score {
    background: linear-gradient(135deg, #dc3545 0%, #e85563 100%);
    color: white;
}

.range-content {
    flex: 1;
    position: relative;
}

.range-content h3 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 18px;
}

.range-content p {
    font-size: 1.45rem;
    color: var(--text-dark);
    line-height: 1.85;
    margin: 0;
    font-weight: 500;
}

.range-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3.8rem;
    opacity: 0.15;
}

/* How We Inspect Section */
.how-we-inspect {
    padding: 120px 0;
    background: var(--light-bg);
}

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

.process-timeline::before {
    content: '';
    position: absolute;
    left: 47px;
    top: 35px;
    bottom: 35px;
    width: 4px;
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.timeline-item {
    display: flex;
    gap: 40px;
    margin-bottom: 65px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    width: 95px;
    height: 95px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #00c97d 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0, 168, 107, 0.35);
    position: relative;
    z-index: 2;
}

.timeline-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    flex: 1;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.timeline-content h3 {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 18px;
}

.timeline-content p {
    font-size: 1.45rem;
    color: var(--text-dark);
    line-height: 1.85;
    margin: 0;
    font-weight: 500;
}

/* CTA Section */
.score-cta {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.score-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 50%, rgba(0, 168, 107, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 30px;
    color: white;
    line-height: 1.2;
}

.cta-content p {
    font-size: 1.75rem;
    margin-bottom: 55px;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
    font-weight: 500;
}

.cta-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 26px 55px;
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 168, 107, 0.35);
}

.btn-primary:hover {
    background: #00c97d;
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 168, 107, 0.45);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
    background: var(--light-bg);
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(255, 255, 255, 0.35);
}

/* Responsive Design */
@media (max-width: 992px) {
    .content-grid,
    .components-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .page-title {
        font-size: 3.2rem;
    }

    .content-text h2,
    .section-title {
        font-size: 3rem;
    }

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

    .lead {
        font-size: 1.5rem;
    }

    .component-card {
        padding: 40px;
    }

    .timeline-marker {
        width: 75px;
        height: 75px;
        font-size: 2rem;
    }
}

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

    .score-hero {
        padding: 70px 0;
    }

    .page-title {
        font-size: 2.8rem;
    }

    .page-subtitle {
        font-size: 1.4rem;
    }

    .what-is-cesi,
    .four-components,
    .score-ranges,
    .how-we-inspect,
    .score-cta {
        padding: 80px 0;
    }

    .content-text h2,
    .section-title {
        font-size: 2.5rem;
    }

    .section-subtitle {
        font-size: 1.4rem;
    }

    .lead {
        font-size: 1.4rem;
    }

    .content-text p {
        font-size: 1.25rem;
    }

    .benefit-item {
        font-size: 1.2rem;
    }

    .category-info h4 {
        font-size: 1.3rem;
    }

    .category-score {
        font-size: 1.6rem;
    }

    .component-card {
        padding: 35px;
    }

    .component-header h3 {
        font-size: 1.8rem;
    }

    .component-body p {
        font-size: 1.2rem;
    }

    .component-criteria li {
        font-size: 1.15rem;
    }

    .range-item {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .range-content h3 {
        font-size: 1.6rem;
    }

    .range-content p {
        font-size: 1.2rem;
    }

    .range-score {
        font-size: 1.6rem;
    }

    .range-icon {
        position: static;
        transform: none;
        margin-top: 15px;
    }

    .process-timeline::before {
        left: 32px;
    }

    .timeline-marker {
        width: 65px;
        height: 65px;
        font-size: 1.8rem;
    }

    .timeline-content {
        padding: 28px;
    }

    .timeline-content h3 {
        font-size: 1.5rem;
    }

    .timeline-content p {
        font-size: 1.2rem;
    }

    .cta-content h2 {
        font-size: 2.8rem;
    }

    .cta-content p {
        font-size: 1.4rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
        font-size: 1.25rem;
        padding: 20px 45px;
    }
}

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

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

    .content-text h2,
    .section-title {
        font-size: 2rem;
    }

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

    .lead {
        font-size: 1.3rem;
    }

    .content-text p {
        font-size: 1.15rem;
    }

    .benefit-item {
        font-size: 1.1rem;
    }

    .component-card {
        padding: 25px;
    }

    .component-header h3 {
        font-size: 1.6rem;
    }

    .component-body p {
        font-size: 1.15rem;
    }

    .component-criteria li {
        font-size: 1.1rem;
    }

    .range-content h3 {
        font-size: 1.4rem;
    }

    .range-content p {
        font-size: 1.15rem;
    }

    .timeline-item {
        gap: 20px;
    }

    .timeline-content {
        padding: 25px;
    }

    .timeline-content h3 {
        font-size: 1.4rem;
    }

    .timeline-content p {
        font-size: 1.15rem;
    }

    .cta-content h2 {
        font-size: 2.2rem;
    }

    .cta-content p {
        font-size: 1.3rem;
    }

    .btn {
        font-size: 1.2rem;
        padding: 18px 40px;
    }
}
