:root {
--bg-primary: #F4F6FB;
--accent-pink: #F78DA7;
--accent-blue-light: #71C7EC;
--accent-blue-deep: #2978B5;
--accent-blue-footer: #3A8BC8;
--accent-blue-footer-end: #2E7AB8;
--text-primary: #1a1a1a;
--text-secondary: #4a5568;
--white: #ffffff;

--section-spacing: 20px;
--element-spacing: 28px;
--card-spacing: 36px;
}

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

body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: var(--bg-primary);
line-height: 1.5;
color: var(--text-primary);
margin: 0;
padding: 10px;
font-size: 16px;
}



/* Pages Container */
.pages-container {
max-width: 1400px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 20px;
}

.page {
background: var(--white);
display: flex;
flex-direction: column;
box-shadow: 0 4px 20px rgba(41, 120, 181, 0.15);
border-radius: 8px;
overflow: hidden;
min-height: 100vh;
}

/* Header Section */
.header-section {
background: linear-gradient(135deg, var(--accent-blue-deep) 0%, var(--accent-blue-light) 100%);
color: var(--white);
padding: 30px;
position: relative;
min-height: 320px;
}

.header-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('assets/madrid.jpg');
background-size: cover;
background-position: center;
opacity: 0.25;
z-index: 1;
}

.header-section::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.3);
z-index: 2;
}

.header-top {
display: flex;
justify-content: space-between;
align-items: flex-start;
z-index: 3;
position: relative;
margin-bottom: 40px;
}

.header-content {
display: flex;
align-items: center;
gap: 20px;
}

.header-arrow {
width: 35px;
height: auto;
}

.header-title {
font-size: 30px;
font-weight: 900;
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.header-badges {
display: flex;
gap: 15px;
}

.header-badge {
background: rgba(255, 255, 255, 0.15);
padding: 8px 16px;
border-radius: 25px;
font-size: 14px;
font-weight: 600;
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.25);
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.header-center {
text-align: center;
z-index: 3;
position: relative;
max-width: 800px;
margin: 0 auto;
}

.main-hero-title {
font-size: 36px;
font-weight: 900;
margin: 0 0 25px 0;
text-shadow: 0 3px 12px rgba(0, 0, 0, 0.7);
letter-spacing: 1px;
line-height: 1.3;
}

.main-hero-subtitle {
font-size: 20px;
font-weight: 400;
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
line-height: 1.6;
opacity: 0.95;
}

/* Claim Section */
.claim-section {
background: rgba(255, 255, 255, 0.95);
padding: 16px 40px 8px 40px;
text-align: center;
border-top: 1px solid rgba(41, 120, 181, 0.1);
}

.claim-title {
font-size: 30px;
font-weight: 800;
color: var(--accent-blue-deep);
margin: 0;
letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
flex: 1;
padding: 12px var(--section-spacing);
}

/* Challenges Section */
.challenges-section {
max-width: 1200px;
margin: 0 auto;
}

.challenges-container {
background: white;
border-radius: 16px;
padding: var(--card-spacing);
box-shadow: 0 2px 16px rgba(41, 120, 181, 0.04);
border: 1px solid rgba(226, 232, 240, 0.6);
}

.challenge-item {
display: flex;
align-items: center;
gap: 40px;
margin-bottom: 40px;
padding: 15px 0 30px 0;
border-bottom: 1px solid rgba(226, 232, 240, 0.4);
}

.challenge-item:last-child {
margin-bottom: 0;
border-bottom: none;
}

.challenge-item.reverse {
flex-direction: row-reverse;
}

.challenge-content {
flex: 1;
}

.challenge-title {
font-size: 28px;
font-weight: 800;
color: #1a1a1a;
margin: 0 0 20px 0;
line-height: 1.3;
}

.challenge-description {
font-size: 16px;
color: #5A6B7D;
line-height: 1.6;
margin: 0 0 20px 0;
}

.challenge-impact {
background: rgba(232, 244, 253, 0.5);
padding: 15px 25px;
border-left: 4px solid var(--accent-blue-deep);
border-radius: 0 8px 8px 0;
}

.impact-label {
font-weight: 700;
color: var(--accent-blue-deep);
font-size: 14px;
}

.challenge-image-container {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}

.challenge-image {
width: 100%;
height: auto;
border-radius: 12px;
box-shadow: 0 4px 16px rgba(41, 120, 181, 0.1);
max-height: 480px;
object-fit: contain;
min-width: 360px;
}

/* Imagen específica del reto 3 más grande */
.challenge-item:last-child .challenge-image {
max-height: 550px;
}

/* Page 2 Header */
.page2-header {
background: linear-gradient(135deg, var(--accent-blue-deep) 0%, var(--accent-blue-light) 100%);
color: var(--white);
padding: 30px 40px;
text-align: center;
position: relative;
}

.page2-header::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('assets/madrid.jpg');
background-size: cover;
background-position: center;
opacity: 0.15;
z-index: 1;
}

.page2-title {
font-size: 30px;
font-weight: 800;
color: var(--white);
margin: 0;
letter-spacing: 1px;
position: relative;
z-index: 2;
}

/* Solution Section */
.solution-section {
max-width: 1200px;
margin: 0 auto;
padding: var(--section-spacing) 20px;
}

.solution-intro {
font-size: 18px;
color: #5A6B7D;
line-height: 1.6;
margin: 0 auto 40px auto;
text-align: center;
max-width: 900px;
}

/* Phases Cards */
.phases-container {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 24px;
margin-bottom: 40px;
}

.phase-card {
background: white;
border: 1px solid #E2E8F0;
border-radius: 12px;
padding: 30px 15px 50px 15px;
box-shadow: 0 2px 12px rgba(41, 120, 181, 0.08);
transition: all 0.3s ease;
position: relative;
text-align: center;
display: flex;
flex-direction: column;
}

.phase-card:hover {
transform: translateY(-8px);
box-shadow: 0 16px 48px rgba(41, 120, 181, 0.2);
}

/* Phase 4 - Continuous with permanent shadow */
.phase-card.continuous {
box-shadow: 0 16px 48px rgba(41, 120, 181, 0.2);
transform: translateY(-4px);
}

.phase-card.continuous:hover {
transform: translateY(-12px);
box-shadow: 0 20px 56px rgba(41, 120, 181, 0.25);
}

.phase-number {
position: absolute;
top: -25px;
right: 15px;
background: linear-gradient(135deg, var(--accent-blue-deep) 0%, var(--accent-blue-light) 100%);
color: white;
width: 50px;
height: 50px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 1.2rem;
box-shadow: 0 4px 16px rgba(41, 120, 181, 0.3);
border: 3px solid white;
}

.phase-title {
font-size: 20px;
font-weight: 700;
color: #333;
margin: 0 0 15px 0;
line-height: 1.3;
}

.phase-subtitle {
font-size: 14px;
font-weight: 500;
color: #5A6B7D;
margin-bottom: 20px;
line-height: 1.4;
}

.phase-subsection {
margin-top: 20px;
text-align: left;
padding-left: 20px;
}

.subsection-title {
background: #ecf0f1;
color: #2c3e50;
padding: 4px 8px;
border-radius: 4px;
font-size: 14px;
font-weight: bold;
margin-bottom: 6px;
border-left: 3px solid #3498db;
}

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

.subsection-list li {
position: relative;
padding-left: 12px;
margin-bottom: 6px;
font-size: 12px;
color: #555;
line-height: 1.6;
}

.subsection-list li::before {
content: '•';
position: absolute;
left: 0;
color: #3498db;
font-weight: bold;
}

.phase-timeline {
background: var(--accent-blue-deep);
color: white;
padding: 5px 15px;
border-radius: 20px;
font-size: 0.7rem;
font-weight: 600;
display: inline-block;
position: absolute;
bottom: 15px;
left: 50%;
transform: translateX(-50%);
}

/* Benefits Section */
.benefits-section {
margin: 40px 0;
}

.benefits-title {
font-size: 30px;
font-weight: 800;
color: var(--accent-blue-deep);
text-align: center;
margin-bottom: 40px;
letter-spacing: 1px;
}

.benefits-container {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 48px;
align-items: start;
}

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

.benefit-item {
background: rgba(232, 244, 253, 0.3);
padding: 24px;
border-radius: 12px;
border: 1px solid rgba(41, 120, 181, 0.1);
transition: all 0.3s ease;
}

.benefit-item:hover {
transform: translateY(-4px);
box-shadow: 0 8px 24px rgba(41, 120, 181, 0.15);
background: rgba(232, 244, 253, 0.5);
}

.benefit-title {
font-size: 20px;
font-weight: 700;
color: var(--accent-blue-deep);
margin: 0 0 15px 0;
line-height: 1.3;
}

.benefit-text {
font-size: 16px;
color: #5A6B7D;
margin: 0;
line-height: 1.6;
}

/* Metrics */
.metrics-container {
display: flex;
flex-direction: column;
gap: 32px;
}

.metric-item {
text-align: center;
padding: 20px;
background: rgba(248, 250, 252, 0.8);
border: 1px solid rgba(41, 120, 181, 0.1);
border-radius: 12px;
transition: all 0.3s ease;
}

.metric-item:hover {
background: rgba(41, 120, 181, 0.05);
border-color: rgba(41, 120, 181, 0.2);
}

.metric-value {
font-size: 2.5rem;
font-weight: 800;
color: var(--accent-blue-deep);
margin-bottom: 8px;
letter-spacing: -0.02em;
}

.metric-description {
font-size: 14px;
color: #5A6B7D;
line-height: 1.4;
font-weight: 500;
}

/* Footer */
.premium-footer {
background: linear-gradient(135deg, var(--accent-blue-footer) 0%, var(--accent-blue-footer-end) 100%);
color: var(--white);
padding: 50px 40px 40px 40px;
margin-top: var(--section-spacing);
position: relative;
}

.footer-logo {
position: absolute;
bottom: 20px;
right: 20px;
z-index: 3;
}

.footer-logo-image {
width: 100px;
height: auto;
background: white;
padding: 8px;
border-radius: 8px;
box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.premium-footer::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('assets/madrid.jpg');
background-size: cover;
background-position: center;
opacity: 0.08;
z-index: 1;
}

.footer-content {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 80px;
max-width: 1200px;
margin: 0 auto;
position: relative;
z-index: 2;
align-items: start;
}

.footer-impact {
padding: 40px 0;
}

.footer-commitment-text {
font-size: 20px;
line-height: 1.7;
color: rgba(255, 255, 255, 0.95);
margin: 0 0 32px 0;
text-align: left;
}

.footer-commitment-highlight {
font-size: 21px;
font-weight: 600;
color: var(--white);
margin: 0;
text-align: left;
line-height: 1.6;
}

.footer-ceo {
display: flex;
gap: 20px;
align-items: flex-start;
justify-content: flex-end;
}

.footer-ceo-left {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
flex-shrink: 0;
}

.footer-ceo-image {
width: 130px;
height: 155px;
object-fit: cover;
object-position: center top;
border-radius: 12px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
border: 2px solid rgba(255, 255, 255, 0.15);
}

.footer-skills-badges {
display: flex;
flex-direction: column;
gap: 6px;
align-items: center;
}

.footer-skill-badge {
background: rgba(255, 255, 255, 0.2);
color: var(--white);
padding: 6px 12px;
border-radius: 15px;
font-size: 12px;
font-weight: 600;
border: 1px solid rgba(255, 255, 255, 0.3);
white-space: nowrap;
backdrop-filter: blur(10px);
transition: all 0.3s ease;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-skill-badge:hover {
background: rgba(255, 255, 255, 0.25);
transform: translateY(-2px);
}

.footer-ceo-content {
display: flex;
flex-direction: column;
gap: 16px;
text-align: right;
flex: 1;
}

.footer-ceo-name {
font-size: 18px;
font-weight: 700;
color: var(--white);
margin: 0;
line-height: 1.3;
}

.footer-ceo-bio {
font-size: 17px;
line-height: 1.5;
color: rgba(255, 255, 255, 0.9);
margin: 0;
}

.footer-ceo-contact {
display: flex;
flex-direction: column;
gap: 6px;
font-size: 14px;
color: rgba(255, 255, 255, 0.9);
}

.footer-contact-line {
text-align: right;
margin: 0;
}

.footer-links-line {
display: flex;
gap: 8px;
justify-content: flex-end;
margin-top: 2px;
}

.footer-link-simple {
color: var(--accent-blue-light);
text-decoration: none;
font-weight: 500;
transition: color 0.3s ease;
}

.footer-link-simple:hover {
color: var(--white);
}

/* Print Styles */
@media print {
@page {
size: A4 portrait;
margin: 0;
}

body {
font-size: 10pt;
line-height: 1.2;
margin: 0;
padding: 0;
background: white !important;
}

.pages-container {
max-width: none;
margin: 0;
gap: 0;
}

.page {
width: 210mm !important;
height: 297mm !important;
max-height: 297mm !important;
min-height: 297mm !important;
overflow: hidden !important;
page-break-after: always;
page-break-inside: avoid;
box-shadow: none !important;
border-radius: 0 !important;
margin: 0 !important;
padding: 0 !important;
display: flex !important;
flex-direction: column !important;
position: relative !important;
background: white !important;
}

.page:last-child {
page-break-after: avoid;
}

/* Página 1 optimizada */
.page:first-child .header-section {
min-height: 6cm;
max-height: 6cm;
padding: 15px 20px;
flex-shrink: 0;
}

.page:first-child .claim-section {
padding: 10px 20px;
flex-shrink: 0;
}

.page:first-child .main-content {
flex: 1;
padding: 10px 20px;
overflow: hidden;
}

.page:first-child .challenges-container {
padding: 15px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}

.page:first-child .challenge-item {
margin-bottom: 15px;
padding: 8px 0;
gap: 20px;
}

.page:first-child .challenge-item:last-child {
margin-bottom: 0;
}

/* Página 2 optimizada */
.page:last-child .page2-header {
min-height: 1.8cm;
max-height: 1.8cm;
padding: 10px 15px;
flex-shrink: 0;
}

.page:last-child .main-content {
flex: 1;
padding: 8px 15px;
overflow: hidden;
}

.page:last-child .solution-section {
height: 100%;
display: flex;
flex-direction: column;
padding: 0;
margin: 0;
}

.page:last-child .solution-intro {
font-size: 8pt;
margin: 0 0 8px 0;
flex-shrink: 0;
}

.page:last-child .phases-container {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 6px;
margin-bottom: 8px;
flex-shrink: 0;
}

.page:last-child .benefits-section {
flex: 1;
margin: 8px 0 0 0;
overflow: hidden;
}

.page:last-child .premium-footer {
padding: 8px 15px 6px 15px;
margin-top: 0;
max-height: 4cm;
flex-shrink: 0;
overflow: hidden;
}

/* Títulos principales */
.main-hero-title {
font-size: 18pt;
margin: 0 0 10px 0;
line-height: 1.3;
}

.main-hero-subtitle {
font-size: 11pt;
line-height: 1.3;
}

.claim-title {
font-size: 16pt;
margin: 0;
}

.page2-title {
font-size: 16pt;
margin: 0;
}

/* Retos */
.challenge-title {
font-size: 12pt;
margin: 0 0 4px 0;
line-height: 1.2;
}

.challenge-description {
font-size: 8pt;
line-height: 1.1;
margin: 0 0 4px 0;
}

.challenge-impact {
padding: 4px 8px;
font-size: 7pt;
}

.challenge-image {
max-height: 2.5cm;
width: auto;
max-width: 100%;
}

/* Fases */
.phase-card {
padding: 8px 4px 4px 4px;
max-height: 3.8cm;
overflow: hidden;
}

.phase-number {
width: 35px;
height: 35px;
top: -18px;
right: 8px;
font-size: 0.9rem;
border: 2px solid white;
}

.phase-title {
font-size: 8pt;
margin: 0 0 3px 0;
line-height: 1.1;
}

.phase-subtitle {
font-size: 6pt;
margin-bottom: 4px;
line-height: 1.1;
}

.subsection-title {
font-size: 5pt;
padding: 1px 3px;
margin-bottom: 1px;
}

.subsection-list li {
font-size: 5pt;
margin-bottom: 0.5px;
line-height: 1;
padding-left: 8px;
}

.phase-timeline {
font-size: 5pt;
padding: 1px 4px;
margin-top: 4px;
}

/* Beneficios */
.benefits-title {
font-size: 12pt;
margin-bottom: 6px;
}

.benefits-container {
gap: 8px;
height: calc(100% - 30px);
}

.benefits-grid {
gap: 6px;
}

.benefit-item {
padding: 6px;
}

.benefit-title {
font-size: 9pt;
margin: 0 0 3px 0;
line-height: 1.1;
}

.benefit-text {
font-size: 7pt;
line-height: 1.1;
margin: 0;
}

.metrics-container {
gap: 6px;
}

.metric-item {
padding: 6px;
}

.metric-value {
font-size: 14pt;
margin-bottom: 2px;
}

.metric-description {
font-size: 6pt;
line-height: 1.1;
}

/* Footer */
.footer-content {
gap: 20px;
height: 100%;
}

.footer-commitment-text,
.footer-commitment-highlight {
font-size: 8pt;
line-height: 1.1;
margin: 0 0 4px 0;
}

.footer-ceo-image {
width: 60px;
height: 75px;
}

.footer-skill-badge {
font-size: 5pt;
padding: 1px 4px;
}

.footer-ceo-name {
font-size: 10pt;
margin: 0 0 2px 0;
}

.footer-ceo-bio {
font-size: 7pt;
line-height: 1.1;
margin: 0 0 4px 0;
}

.footer-contact-line {
font-size: 7pt;
line-height: 1.1;
}

.footer-logo-image {
width: 60px;
padding: 4px;
}

/* Forzar colores en impresión */
* {
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
color-adjust: exact !important;
}

/* Asegurar que los fondos se impriman */
.header-section,
.page2-header,
.premium-footer,
.phase-number,
.challenge-impact,
.benefit-item,
.metric-item,
.footer-skill-badge {
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
color-adjust: exact !important;
}
}

/* Responsive */
@media (max-width: 1200px) {
.phases-container {
grid-template-columns: repeat(2, 1fr);
gap: 20px;
}

.benefits-container {
grid-template-columns: 1fr;
gap: 30px;
}

.benefits-grid {
grid-template-columns: 1fr;
gap: 20px;
}

.metrics-container {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}

.benefit-item {
padding: 20px;
}
}

/* Tablet breakpoint mejorado */
@media (max-width: 900px) {
.phases-container {
grid-template-columns: repeat(2, 1fr);
gap: 16px;
}

.phase-card {
padding: 24px 12px 12px 12px;
}

.phase-title {
font-size: 18px;
}

.phase-subtitle {
font-size: 13px;
}

.benefits-grid {
grid-template-columns: 1fr;
gap: 18px;
}

.metrics-container {
grid-template-columns: 1fr;
gap: 16px;
}

.benefit-item {
padding: 18px;
}

.benefit-title {
font-size: 18px;
}

.benefit-text {
font-size: 15px;
}

.metric-value {
font-size: 2.2rem;
}

.metric-item {
padding: 16px;
}
}

@media (max-width: 768px) {
.phases-container {
grid-template-columns: 1fr;
gap: 20px;
}

.phase-card {
padding: 20px 15px 15px 15px;
}

.challenge-item {
flex-direction: column !important;
gap: 25px;
text-align: center;
}

.benefits-container {
gap: 24px;
}

.benefits-grid {
gap: 16px;
}

.benefit-item {
padding: 16px;
}

.benefit-title {
font-size: 17px;
}

.benefit-text {
font-size: 14px;
}

.metric-value {
font-size: 2rem;
}

.footer-content {
grid-template-columns: 1fr;
gap: 40px;
}

.footer-ceo {
flex-direction: column;
align-items: center;
gap: 16px;
}

.footer-ceo-content {
text-align: center;
}

.footer-contact-line {
text-align: center;
}

.footer-links-line {
justify-content: center;
}
}

/* Móviles pequeños */
@media (max-width: 480px) {
body {
padding: 5px;
font-size: 14px;
}

.phases-container {
gap: 16px;
}

.phase-card {
padding: 16px 12px 12px 12px;
}

.phase-title {
font-size: 16px;
}

.phase-subtitle {
font-size: 12px;
}

.subsection-title {
font-size: 12px;
}

.subsection-list li {
font-size: 11px;
}

.benefits-container {
gap: 20px;
}

.benefits-grid {
gap: 14px;
}

.benefit-item {
padding: 14px;
}

.benefit-title {
font-size: 16px;
margin-bottom: 12px;
}

.benefit-text {
font-size: 13px;
line-height: 1.5;
}

.metrics-container {
gap: 12px;
}

.metric-item {
padding: 12px;
}

.metric-value {
font-size: 1.8rem;
margin-bottom: 6px;
}

.metric-description {
font-size: 12px;
}

.main-content {
padding: 15px;
}

.solution-section {
padding: 0 10px;
}
}