
/* Variables globales */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #ff6b6b;
    --text-dark: #2c3e50;
    --text-body: #4a5568;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
}

/* Contenedor principal */
.cpd-article {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumbs mejorado */
.cpd-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin: 15px 0 25px;
    padding: 12px 0;
    font-size: 15px;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}
.cpd-breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}
.cpd-breadcrumbs a:hover {
    color: var(--secondary);
}
.cpd-breadcrumbs .cpd-sep {
    margin: 0 10px;
    color: #cbd5e0;
}
.cpd-breadcrumbs .cpd-current {
    color: var(--text-dark);
    font-weight: 600;
}

/* Tipografía optimizada */
.cpd-article {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-body);
}
.cpd-article p {
    margin-bottom: 24px;
    font-size: 17px;
    line-height: 1.75;
}
.cpd-article h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 48px 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
.cpd-article h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 36px 0 18px;
}
.cpd-article ul,
.cpd-article ol {
    margin: 24px 0;
    padding-left: 32px;
}
.cpd-article li {
    margin-bottom: 12px;
    line-height: 1.75;
}
.cpd-article strong {
    font-weight: 600;
    color: var(--text-dark);
}

/* Enlaces internos */
.cpd-article a,
.cpd-internal-link {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}
.cpd-article a:hover,
.cpd-internal-link:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* Imagen hero */
.cpd-hero {
    margin: 32px -20px 48px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.cpd-hero img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}
@media (min-width: 768px) {
    .cpd-hero {
        margin: 40px 0 56px;
        border-radius: 16px;
    }
}

/* FAQ Section */
.cpd-faq {
    margin: 80px -20px;
    padding: 64px 20px;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
}
@media (min-width: 768px) {
    .cpd-faq {
        margin: 80px 0;
        padding: 80px;
        border-radius: 24px;
        box-shadow: var(--shadow-xl);
    }
}
.cpd-faq-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 48px;
    border: none;
}
.cpd-faq-wrapper {
    max-width: 800px;
    margin: 0 auto;
}
.cpd-faq-item {
    margin-bottom: 16px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s;
}
.cpd-faq-item:hover {
    box-shadow: var(--shadow-md);
}
.cpd-faq-toggle {
    display: none;
}
.cpd-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    cursor: pointer;
    background: var(--bg-white);
    transition: all 0.3s;
}
.cpd-faq-question:hover {
    background: #f8f9ff;
}
.cpd-faq-question span {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    padding-right: 16px;
}
.cpd-faq-icon {
    width: 24px;
    height: 24px;
    fill: var(--primary);
    transition: transform 0.3s;
    flex-shrink: 0;
}
.cpd-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: var(--bg-white);
}
.cpd-faq-answer > div {
    padding: 0 28px 24px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-body);
}
.cpd-faq-toggle:checked ~ .cpd-faq-question {
    background: #f0f4ff;
}
.cpd-faq-toggle:checked ~ .cpd-faq-question .cpd-faq-icon {
    transform: rotate(45deg);
}
.cpd-faq-toggle:checked ~ .cpd-faq-answer {
    max-height: 600px;
}

/* CTA Section */
.cpd-cta {
    margin: 80px -20px;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
@media (min-width: 768px) {
    .cpd-cta {
        margin: 80px 0;
        border-radius: 24px;
        padding: 100px 40px;
    }
}
.cpd-cta::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 10s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}
.cpd-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}
.cpd-cta-title {
    color: white;
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 24px;
    border: none;
}
.cpd-cta-text {
    color: rgba(255,255,255,0.95);
    font-size: 20px;
    margin: 0 0 36px;
    line-height: 1.6;
}
.cpd-cta-button {
    display: inline-block;
    padding: 18px 48px;
    background: var(--accent);
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(255,107,107,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cpd-cta-button:hover {
    background: #ff5252;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255,107,107,0.4);
}

/* Páginas Relacionadas - DISEÑO ATRACTIVO */
.cpd-related {
    margin: 80px 0;
    padding: 64px 0;
}
.cpd-related-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 48px;
    border: none;
}
.cpd-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.cpd-related-card {
    display: flex;
    align-items: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--bg-white) 0%, #f8f9ff 100%);
    border: 2px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.cpd-related-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    transform: translateX(-4px);
    transition: transform 0.3s;
}
.cpd-related-card:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}
.cpd-related-card:hover::before {
    transform: translateX(0);
}
.cpd-related-icon {
    width: 48px;
    height: 48px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
    transition: all 0.3s;
}
.cpd-related-card:hover .cpd-related-icon {
    background: rgba(255, 255, 255, 0.2);
}
.cpd-related-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--primary);
    transition: fill 0.3s;
}
.cpd-related-card:hover .cpd-related-icon svg {
    fill: white;
}
.cpd-related-card h3 {
    flex: 1;
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    transition: color 0.3s;
}
.cpd-related-card:hover h3 {
    color: white;
}
.cpd-related-arrow {
    font-size: 20px;
    color: var(--primary);
    transition: all 0.3s;
}
.cpd-related-card:hover .cpd-related-arrow {
    color: white;
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 768px) {
    .cpd-article {
        font-size: 16px;
    }
    .cpd-article p {
        font-size: 16px;
    }
    .cpd-article h2 {
        font-size: 28px;
    }
    .cpd-article h3 {
        font-size: 22px;
    }
    .cpd-faq-title,
    .cpd-cta-title,
    .cpd-related-title {
        font-size: 28px;
    }
    .cpd-related-grid {
        grid-template-columns: 1fr;
    }
}