/* ===================================
   Modern SDG Impact Detail Page Styles
   Version: 2.0 - Enhanced Visual Design
   =================================== */

:root {
    --primary-color: #003C71;
    --secondary-color: #009CDE;
    --accent-color: #00B4E0;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===================================
   Hero Section Enhancements
   =================================== */

.hero-wrap {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    max-height: 750px;
}

.hero-wrap .overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.4) 100%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-wrap .container {
    position: relative;
    z-index: 2;
}

.hero-wrap .bread {
    font-weight: 700;
    letter-spacing: 1px;
    animation: fadeInUp 0.8s ease-out;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* ===================================
   Section Header - Minimalist Modern Design
   =================================== */

.heading-section {
    position: relative;
    padding: 1rem 1.5rem 0.75rem 1.5rem;
    margin-bottom: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.heading-section::before,
.heading-section::after {
    display: none;
}

.heading-section .subheading {
    display: none;
}

.heading-section h2 {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.heading-section img {
    display: none;
}

/* Divider line under title */
.heading-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* ===================================
   SDG Icons Grid - Same as sdg-impact
   =================================== */

.sdg-grid-container {
    padding: 0;
    margin: 0;
    background: transparent;
}

.sdg-icons-row-wrapper {
    position: relative;
    padding: 0;
    margin: 0;
}

.sdg-icons-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
    overflow-x: visible;
    max-width: 100%;
    margin: 0;
}

/* SDG Icon Wrapper - Compact Size */
.sdg-icon-wrapper {
    position: relative;
    flex: 0 0 auto;
    width: 65px;
    height: 65px;
    transition: transform var(--transition-normal);
    display: inline-block;
}

@media (max-width: 1600px) {
    .sdg-icon-wrapper {
        width: 58px;
        height: 58px;
    }
    
    .sdg-icons-row {
        gap: 0.2rem;
    }
}

@media (max-width: 1400px) {
    .sdg-icon-wrapper {
        width: 54px;
        height: 54px;
    }
    
    .sdg-icons-row {
        gap: 0.2rem;
    }
}

@media (max-width: 1200px) {
    .sdg-icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .sdg-icons-row {
        gap: 0.15rem;
    }
}

@media (max-width: 992px) {
    .sdg-icon-wrapper {
        width: 46px;
        height: 46px;
    }
    
    .sdg-icons-row {
        gap: 0.15rem;
        padding: 0.3rem 0;
    }
}

@media (max-width: 768px) {
    .sdg-icons-row {
        overflow-x: auto;
        justify-content: flex-start;
    }
    
    .sdg-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .sdg-icons-row {
        gap: 0.25rem;
    }
}

@media (min-width: 1800px) {
    .sdg-icon-wrapper {
        width: 70px;
        height: 70px;
    }
    
    .sdg-icons-row {
        gap: 0.3rem;
    }
}

.sdg-icon-wrapper a {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: all var(--transition-normal);
    height: 100%;
    width: 100%;
    border: 2px solid transparent;
}

.sdg-icon-wrapper a.active {
    border-color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0, 156, 222, 0.3);
}

.sdg-icon-wrapper a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-fast);
}

.sdg-icon-wrapper a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 1;
    pointer-events: none;
}

.sdg-icon-wrapper:hover {
    transform: translateY(-3px) scale(1.05);
    z-index: 10;
}

.sdg-icon-wrapper:hover a {
    box-shadow: 0 4px 12px rgba(0, 60, 113, 0.2);
}

.sdg-icon-wrapper:hover a::before {
    opacity: 1;
}

.sdg-icon-wrapper:hover a img {
    transform: scale(1.03);
}

/* ===================================
   Indicator Detail Content Section
   =================================== */

.indicator-detail-section {
    background: #fff;
    border-radius: 15px;
    padding: 3rem;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 60, 113, 0.08);
    animation: fadeInUp 0.8s ease-out;
}

.indicator-detail-section .indicator-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid;
    position: relative;
    animation: slideInLeft 0.8s ease-out;
    line-height: 1.4;
}

.indicator-detail-section .indicator-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
}

.indicator-detail-section .indicator-title .indicator-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    color: white;
    margin-right: 1rem;
    font-size: 1.5rem;
    vertical-align: middle;
}

/* ===================================
   Content Display Area
   =================================== */

.indicator-content {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 2.5rem;
    margin-top: 2rem;
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-dark);
    border-left: 4px solid var(--secondary-color);
    animation: slideInUp 0.6s ease-out 0.2s;
    animation-fill-mode: both;
}

.indicator-content h3,
.indicator-content h4,
.indicator-content h5 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.indicator-content h3 {
    font-size: 1.75rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.indicator-content h4 {
    font-size: 1.5rem;
}

.indicator-content h5 {
    font-size: 1.25rem;
}

.indicator-content p {
    margin-bottom: 1.5rem;
}

.indicator-content ul,
.indicator-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.indicator-content li {
    margin-bottom: 0.75rem;
}

.indicator-content a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.indicator-content a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.indicator-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-md);
}

.indicator-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.indicator-content th,
.indicator-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.indicator-content th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.indicator-content tr:last-child td {
    border-bottom: none;
}

.indicator-content tr:hover {
    background: #f8f9fa;
}

/* ===================================
   YouTube Video Responsive Container
   =================================== */

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* ===================================
   Navigation Section
   =================================== */

.navigation-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

.navigation-section h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 60, 113, 0.3);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===================================
   Breadcrumb Navigation
   =================================== */

.breadcrumb-nav {
    background: white;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    padding: 0 0.75rem;
    color: var(--text-light);
}

.breadcrumb-item a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-dark);
}

/* ===================================
   Info Box / Alert Styles
   =================================== */

.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.info-box i {
    color: #2196f3;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.warning-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 4px solid #ff9800;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.warning-box i {
    color: #ff9800;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.success-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 4px solid #4caf50;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.success-box i {
    color: #4caf50;
    font-size: 1.5rem;
    margin-right: 1rem;
}

/* ===================================
   Responsive Adjustments
   =================================== */

@media (max-width: 767px) {
    .indicator-detail-section {
        padding: 1.5rem;
    }
    
    .indicator-detail-section .indicator-title {
        font-size: 1.75rem;
    }
    
    .indicator-content {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===================================
   Animations
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===================================
   Smooth Scroll
   =================================== */

html {
    scroll-behavior: smooth;
}

/* ===================================
   Loading Animation
   =================================== */

.loading-indicator {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid var(--bg-light);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   Accessibility Improvements
   =================================== */

.sdg-icon-wrapper a:focus,
.btn:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .hero-wrap,
    .navigation-section,
    .breadcrumb-nav {
        display: none;
    }
    
    .indicator-detail-section {
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .sdg-icon-wrapper:hover {
        transform: none;
    }
}

/* ===================================
   Custom Scrollbar
   =================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}