/* CDN Optimization Page Specific Styles */

.cdn-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/cdn-hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
}

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

.cdn-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cdn-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.cdn-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.cdn-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.cdn-card ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.cdn-card ul li {
    margin-bottom: 0.5rem;
}

.map-container {
    margin-top: 3rem;
    position: relative;
}

.cdn-map {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.performance-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-color);
}

.performance-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.comparison-item {
    background-color: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comparison-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.comparison-item h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.4rem;
}

/* Bar Chart Styling */
.chart-container {
    height: 300px;
    position: relative;
    margin-bottom: 2rem;
}

.chart-bars {
    display: flex;
    height: 100%;
    justify-content: space-around;
    align-items: flex-end;
    padding-bottom: 30px;
    position: relative;
}

.chart-bars::after {
    content: '';
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #ddd;
}

.chart-bar {
    width: 45px;
    background: linear-gradient(to top, #ff6b6b, #ff9f9f);
    border-radius: 6px 6px 0 0;
    position: relative;
    transition: height 1s ease-in-out;
    min-height: 5px;
}

.chart-bar.optimized {
    background: linear-gradient(to top, var(--primary-color), var(--primary-color-light));
    box-shadow: 0 5px 15px rgba(0, 212, 176, 0.3);
}

.bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
}

.chart-labels {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.chart-label {
    font-size: 0.85rem;
    text-align: center;
    width: 80px;
}

.chart-info {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background-color: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    margin-top: 1rem;
}

.chart-info i {
    color: #ff6b6b;
    font-size: 1.2rem;
    margin-right: 0.75rem;
    margin-top: 0.2rem;
}

.chart-info.success {
    background-color: rgba(0, 212, 176, 0.1);
}

.chart-info.success i {
    color: var(--primary-color);
}

.chart-info p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* World Map Visualization */
.world-map-container {
    position: relative;
    max-width: 900px;
    margin: 3rem auto;
}

.world-map {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.map-point {
    position: absolute;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.ping-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.ping-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: ping 2s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes ping {
    0% {
        width: 16px;
        height: 16px;
        opacity: 0.6;
    }
    70% {
        width: 40px;
        height: 40px;
        opacity: 0;
    }
    100% {
        width: 16px;
        height: 16px;
        opacity: 0;
    }
}

.map-point.north-america {
    top: 30%;
    left: 20%;
}

.map-point.europe {
    top: 25%;
    left: 48%;
}

.map-point.asia {
    top: 35%;
    left: 70%;
}

.map-point.australia {
    top: 65%;
    left: 80%;
}

.map-point.south-america {
    top: 60%;
    left: 30%;
}

.map-tooltip {
    position: absolute;
    visibility: hidden;
    opacity: 0;
    background-color: white;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 100;
    transition: opacity 0.3s ease;
    min-width: 220px;
}

.map-tooltip .region-name {
    font-weight: bold;
    color: var(--text-dark);
}

.map-tooltip .without-cdn {
    color: #ff6b6b;
}

.map-tooltip .with-cdn {
    color: var(--primary-color);
}

.map-tooltip .value {
    font-weight: bold;
}

/* Performance Metrics */
.performance-metrics {
    max-width: 900px;
    margin: 3rem auto;
}

.metrics-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.metrics-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.metric-item {
    text-align: center;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.metric-item:hover {
    transform: translateY(-5px);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.metric-label {
    color: var(--text-color);
    font-size: 1rem;
}

.comparison-cta {
    text-align: center;
    margin-top: 3rem;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .performance-comparison {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .metrics-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .chart-bar {
        width: 30px;
    }
    
    .chart-label {
        font-size: 0.75rem;
        width: 60px;
    }
    
    .metrics-container {
        grid-template-columns: 1fr;
    }
}

/* CDN Philosophy Container */
.cdn-philosophy-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2rem;
}

.philosophy-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.philosophy-content {
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.larger-heading {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.expanded-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    width: 100%;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-item {
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.1));
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-item h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.service-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.service-icon {
    background: var(--primary-color);
    color: white;
    font-size: 32px;
    padding: 30px;
    text-align: center;
}

.service-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-features {
    list-style: none;
    padding: 0;
    margin-top: auto;
}

.service-features li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.service-features li i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Implementation Process */
.process-section {
    padding: 5rem 0;
}

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

.process-step {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
    transition: all 0.3s ease;
}

.step-number {
    background-color: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-right: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.step-content {
    flex-grow: 1;
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    z-index: 2;
}

.step-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
}

.step-content p {
    line-height: 1.6;
    color: var(--text-dark);
}

.step-connector {
    position: absolute;
    left: 30px;
    top: 60px;
    bottom: -30px;
    width: 3px;
    background-color: var(--primary-color);
    opacity: 0.5;
    z-index: 1;
}

.process-step:last-child .step-connector {
    display: none;
}

.process-step:hover .step-content {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.faq-container {
    max-width: 900px;
    margin: 3rem auto 0;
}

.faq-item {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.faq-question h3 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--text-dark);
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    background: white;
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 500px;
}

/* Enhanced Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.contact-info h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.contact-details {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.contact-details li {
    display: flex;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-text strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-dark);
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-social {
    display: flex;
    gap: 1rem;
}

.contact-social a {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.contact-social a:hover {
    transform: translateY(-5px);
    background: var(--primary-color-dark);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (min-width: 992px) {
    .cdn-philosophy-container {
        flex-direction: row;
        align-items: center;
    }
    
    .philosophy-image {
        flex: 1;
    }
    
    .philosophy-content {
        flex: 1.5;
    }
    
    .process-step[data-aos="fade-right"] .step-content {
        transform: translateX(10px);
    }
    
    .process-step[data-aos="fade-left"] .step-content {
        transform: translateX(-10px);
    }
    
    .process-step:hover .step-content {
        transform: translateY(-5px) !important;
    }
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .process-step {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .step-connector {
        left: 30px;
        height: 100%;
    }
}

/* Interactive Chart Styling */
.interactive-chart-container {
    max-width: 800px;
    margin: 3rem auto;
    background-color: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.chart-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.toggle-option {
    padding: 0.75rem 1.5rem;
    background-color: #f5f5f5;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.toggle-option.active {
    background-color: var(--primary-color);
    color: white;
}

.toggle-option:not(.active):hover {
    background-color: #e9e9e9;
    transform: translateY(-2px);
}

.chart-wrapper {
    position: relative;
    height: 350px;
    margin-bottom: 2rem;
}

.chart-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.chart-container.active {
    opacity: 1;
    visibility: visible;
}

.chart-bars {
    display: flex;
    height: 85%;
    justify-content: space-around;
    align-items: flex-end;
    padding-bottom: 30px;
    position: relative;
}

.chart-bars::after {
    content: '';
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #ddd;
}

.chart-bar {
    width: 60px;
    background: linear-gradient(to top, #ff6b6b, #ff9f9f);
    border-radius: 6px 6px 0 0;
    position: relative;
    transition: height 0.5s ease-in-out;
}

.chart-bar.optimized {
    background: linear-gradient(to top, var(--primary-color), var(--primary-color-light));
    box-shadow: 0 5px 15px rgba(0, 212, 176, 0.3);
    width: 60px;
    border-radius: 6px 6px 0 0;
}

.bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: bold;
    white-space: nowrap;
}

.chart-labels {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.chart-label {
    font-size: 0.9rem;
    text-align: center;
    width: 100px;
}

.chart-info-container {
    position: relative;
    height: 100px;
}

.chart-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: flex-start;
    padding: 1.2rem;
    border-radius: 8px;
    background-color: rgba(255, 107, 107, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.chart-info.active {
    opacity: 1;
    visibility: visible;
}

.chart-info i {
    color: #ff6b6b;
    font-size: 1.2rem;
    margin-right: 0.75rem;
    margin-top: 0.2rem;
}

.chart-info.success {
    background-color: rgba(0, 212, 176, 0.1);
}

.chart-info.success i {
    color: var(--primary-color);
}

.chart-info p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* Ensure proper specificity for the chart wrapper bars */
.chart-wrapper .chart-container #chart-with .chart-bars .chart-bar.optimized {
    background: linear-gradient(to top, var(--primary-color), var(--primary-color-light));
    border: 2px solid rgba(0, 212, 176, 0.2);
} 