/* ===================================
   Industries Page Styles
   =================================== */

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    min-height: calc(100vh - 200px);
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.intro {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto 4rem;
    font-weight: 400;
}

/* Industry Cards Grid */
.industries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.industry-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 2rem;
    box-shadow:
        0 20px 60px rgba(15, 23, 42, 0.08),
        0 8px 24px rgba(15, 23, 42, 0.04);
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.industry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(56, 189, 248, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.5s;
    border-radius: 24px;
    z-index: 0;
}

.industry-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #38bdf8, #7dd3fc, #bae6fd, #7dd3fc, #38bdf8);
    background-size: 300% 300%;
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s;
    animation: gradientRotate 3s ease infinite;
}

@keyframes gradientRotate {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.industry-card:hover::before {
    opacity: 1;
}

.industry-card:hover::after {
    opacity: 1;
}

.industry-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 32px 80px rgba(14, 165, 233, 0.2),
        0 16px 40px rgba(15, 23, 42, 0.12);
    border-color: transparent;
}

.industry-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.industry-card:hover .industry-icon {
    transform: scale(1.15) translateY(-4px) rotate(5deg);
    filter: drop-shadow(0 8px 20px rgba(14, 165, 233, 0.25));
}

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

.industry-title {
    font-size: 1.5rem;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.industry-description {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Back to Home Link */
.back-link {
    text-align: center;
    margin-top: 3rem;
}

.back-button {
    display: inline-block;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 1.125rem 2.75rem;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 8px 24px rgba(14, 165, 233, 0.3),
        0 2px 8px rgba(14, 165, 233, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.back-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.back-button:hover::before {
    left: 100%;
}

.back-button:hover {
    color: white !important;
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 16px 40px rgba(14, 165, 233, 0.4),
        0 8px 16px rgba(14, 165, 233, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.back-button:active {
    transform: translateY(-2px) scale(0.98);
}

/* Industry Detail Page Styles */
.industry-header {
    text-align: center;
    margin-bottom: 3rem;
}

.industry-icon-large {
    font-size: 5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.industry-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.industry-section {
    margin-bottom: 4rem;
}

.industry-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #0c4a6e;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.applications-grid,
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.application-card,
.skill-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.application-card:hover,
.skill-card:hover {
    border-color: #0ea5e9;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.1);
    transform: translateY(-4px);
}

.application-card h3,
.skill-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.application-card p,
.skill-card p {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.7;
}

.jobs-list {
    margin-top: 2rem;
}

.job-item {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
    position: relative;
}

.job-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    padding-right: 120px;
}

.risk-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.risk-badge.high {
    background: #fee2e2;
    color: #991b1b;
}

.risk-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.risk-badge.low {
    background: #d1fae5;
    color: #065f46;
}

.risk-assessment {
    margin: 3rem 0;
}

.risk-level-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    border: 2px solid #e2e8f0;
}

.risk-level-card.high-risk {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.risk-level-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.risk-icon {
    font-size: 3rem;
}

.risk-level-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #dc2626;
    margin: 0;
}

.risk-level-card ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.risk-level-card li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: #475569;
}

.risk-note {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(14, 165, 233, 0.05);
    border-left: 4px solid #0ea5e9;
    border-radius: 8px;
    font-style: italic;
}

.uk-context {
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    border: 2px solid rgba(14, 165, 233, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #0ea5e9;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.1);
    transform: translateY(-4px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 50%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #475569;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-source {
    font-size: 0.75rem;
    color: #94a3b8;
    font-style: italic;
}

.uk-initiatives {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
}

.uk-initiatives h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0c4a6e;
    margin-bottom: 1rem;
}

.uk-initiatives ul {
    padding-left: 1.5rem;
}

.uk-initiatives li {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #475569;
}

.research-disclaimer {
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.5) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 3rem 0;
    border: 2px solid rgba(14, 165, 233, 0.1);
    text-align: center;
}

.research-disclaimer p {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.7;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 3rem 1.5rem;
    }

    .industries-grid {
        grid-template-columns: 1fr;
    }

    .industry-card {
        padding: 1.5rem;
    }

    .intro {
        font-size: 1.125rem;
        margin-bottom: 3rem;
    }

    .industry-icon-large {
        font-size: 4rem;
    }

    .industry-subtitle {
        font-size: 1.125rem;
    }

    .applications-grid,
    .skills-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .application-card,
    .skill-card {
        padding: 1.5rem;
    }

    .job-item {
        padding: 1.5rem;
    }

    .job-item h3 {
        padding-right: 0;
        margin-bottom: 1rem;
    }

    .risk-badge {
        position: static;
        display: inline-block;
        margin-bottom: 1rem;
    }

    .risk-level-card {
        padding: 2rem 1.5rem;
    }

    .uk-context {
        padding: 2rem 1.5rem;
    }

    .stat-card {
        padding: 1.5rem 1.25rem;
    }

    .uk-initiatives {
        padding: 1.5rem;
    }

    .research-disclaimer {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .robotics-explainer {
        padding: 1.25rem;
        margin-top: 1.5rem;
    }

    .robotics-disclaimer {
        padding: 0.875rem;
    }

    .chart-section {
        padding: 1rem !important;
        margin: 1rem 0 !important;
    }

    .chart-container {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 2rem 0.75rem;
    }

    .page-header {
        margin-bottom: 2rem;
    }

    .intro {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .industries-grid {
        gap: 1.25rem;
        margin-bottom: 2.5rem;
    }

    .industry-section {
        margin-bottom: 2.5rem;
    }

    .industry-card {
        padding: 1.25rem;
    }

    .industry-icon {
        font-size: 2rem;
    }

    .industry-title {
        font-size: 1.25rem;
    }

    .industry-description {
        font-size: 0.875rem;
    }

    .application-card,
    .skill-card {
        padding: 1.25rem;
    }

    .job-item {
        padding: 1.25rem;
    }

    .risk-level-card {
        padding: 1.5rem 1.25rem;
    }

    .uk-context {
        padding: 1.5rem 1.25rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .uk-initiatives {
        padding: 1.25rem;
    }

    .research-disclaimer {
        padding: 1.25rem;
    }

    .robotics-explainer {
        padding: 1rem;
        margin-top: 1.25rem;
    }

    .robotics-disclaimer {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .chart-section {
        padding: 0.75rem !important;
        margin: 0.75rem 0 !important;
    }

    .chart-container {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }

    .chart-insight {
        padding: 1rem;
    }

    .risk-assessment {
        margin: 1.5rem 0;
    }

    .stats-grid {
        margin: 1.25rem 0;
    }

    .uk-initiatives {
        margin-top: 1.5rem;
    }

    .research-disclaimer {
        margin: 1.5rem 0;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 24px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #0c4a6e;
    margin: 0;
    padding: 2.5rem 2.5rem 1.5rem 2.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.close {
    color: #94a3b8;
    float: right;
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    margin-top: -0.5rem;
}

.close:hover,
.close:focus {
    color: #0ea5e9;
    transform: rotate(90deg);
}

.sources-list {
    padding: 2rem 2.5rem 2.5rem 2.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.source-item {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

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

.source-item:hover {
    border-color: #0ea5e9;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.1);
    transform: translateY(-2px);
}

.source-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
}

.source-item p {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0 0 1rem 0;
}

.source-item a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.source-item a:hover {
    color: #0284c7;
    gap: 0.75rem;
}

.research-disclaimer a {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.research-disclaimer a:hover {
    color: #0284c7;
    text-decoration: underline;
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-content h2 {
        font-size: 1.5rem;
        padding: 2rem 1.5rem 1rem 1.5rem;
    }

    .sources-list {
        padding: 1.5rem;
        max-height: 50vh;
    }

    .source-item {
        padding: 1.5rem;
    }

    .source-item h3 {
        font-size: 1.125rem;
    }

    .source-item p {
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 5% auto;
        border-radius: 16px;
    }

    .modal-content h2 {
        font-size: 1.25rem;
        padding: 1.5rem 1rem 0.75rem 1rem;
    }

    .close {
        font-size: 2rem;
    }

    .sources-list {
        padding: 1rem;
    }

    .source-item {
        padding: 1.25rem;
    }
}

/* Robotics Explainer */
.robotics-explainer {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-left: 4px solid #f97316;
    border-radius: 8px;
}

.robotics-explainer summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: #ea580c;
}

.robotics-explainer-content {
    margin-top: 1rem;
    line-height: 1.6;
    color: #1f2937;
}

.robotics-explainer ul {
    margin-left: 1.5rem;
}

.robotics-disclaimer {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border-radius: 4px;
    font-size: 0.95rem;
}

/* Chart Sections */
.chart-section {
    background: #f0f9ff;
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
}

.chart-section .section-intro {
    text-align: center;
    font-size: 1.125rem;
    color: #475569;
    margin-bottom: 2rem;
}

.chart-container {
    height: 450px;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.chart-insight {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #0ea5e9;
}

.chart-insight p {
    color: #475569;
    line-height: 1.7;
    font-size: 1.0625rem;
    margin: 0;
}

.chart-insight strong {
    color: #0c4a6e;
    font-weight: 700;
}

/* Add margin-bottom to all p tags for better spacing */
.industry-section p {
    margin-bottom: 10px;
}

.application-card p,
.job-item p,
.skill-item p,
.action-card p {
    margin-bottom: 10px;
}
