/* ================================================
   FORESTS PROFILE PAGE - STYLES
   ================================================ */

/* Profile Page Specific Variables */
.profile-page {
    --profile-hero-height: 70vh;
}

/* ================================
   PROFILE HERO SECTION
   ================================ */
.profile-hero {
    position: relative;
    min-height: var(--profile-hero-height);
    display: flex;
    align-items: flex-end;
    padding-bottom: var(--space-16);
}

.profile-hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.profile-hero .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-hero .hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(13, 38, 13, 0.3) 0%,
        rgba(13, 38, 13, 0.6) 50%,
        rgba(13, 38, 13, 0.9) 100%
    );
}

.profile-hero .hero-content {
    text-align: left;
    max-width: 800px;
    padding: 0 var(--space-6);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a {
    color: var(--light-foliage);
    transition: color var(--transition-base);
}

.breadcrumb a:hover {
    color: var(--white);
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.4);
}

.forest-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    color: var(--white);
    margin-bottom: var(--space-4);
    line-height: 1.1;
}

.forest-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-base);
}

.meta-icon {
    font-size: var(--text-xl);
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
}

@media (max-width: 768px) {
    .profile-hero {
        min-height: 60vh;
    }
    
    .forest-title {
        font-size: var(--text-3xl);
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
}

/* ================================
   QUICK STATS BAR
   ================================ */
.quick-stats-bar {
    background: var(--deep-forest);
    padding: var(--space-6) 0;
    margin-top: -1px;
}

.quick-stats-bar .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: var(--text-3xl);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--light-foliage);
}

.stat-label {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 1024px) {
    .quick-stats-bar .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .quick-stats-bar .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   PROFILE MAIN CONTENT
   ================================ */
.profile-main {
    padding: var(--space-16) 0;
    background: var(--off-white);
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
}

.profile-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-6);
}

.profile-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--light-gray);
}

.profile-section .section-header h2 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--deep-forest);
    margin: 0;
}

.section-icon {
    font-size: var(--text-2xl);
}

.section-badge {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

@media (max-width: 1024px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   MAP SECTION
   ================================ */
.map-section .map-container {
    position: relative;
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.forest-map {
    width: 100%;
    height: 100%;
}

.map-controls {
    display: flex;
    gap: var(--space-2);
}

.map-control-btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    background: var(--light-gray);
    border-radius: var(--radius-md);
    color: var(--dark-gray);
    transition: all var(--transition-base);
}

.map-control-btn:hover {
    background: var(--canopy-green);
    color: var(--white);
}

.map-control-btn.active {
    background: var(--deep-forest);
    color: var(--white);
}

.map-info-overlay {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    background: rgba(255, 255, 255, 0.95);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.map-info-overlay h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--deep-forest);
    margin-bottom: var(--space-1);
}

.map-info-overlay p {
    font-size: var(--text-xs);
    color: var(--medium-gray);
}

.map-legend {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: var(--light-gray);
    border-radius: var(--radius-md);
}

.legend-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--deep-forest);
    margin-bottom: var(--space-2);
}

.legend-countries {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.country-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    background: var(--white);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--dark-gray);
}

/* ================================
   DESCRIPTION SECTION
   ================================ */
.description-content p {
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--dark-gray);
}

/* ================================
   COMPARISON SLIDER (Before/After)
   ================================ */
.comparison-container {
    margin-top: var(--space-4);
}

.comparison-slider {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: ew-resize;
}

.comparison-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.comparison-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comparison-image.after {
    clip-path: inset(0 50% 0 0);
}

.comparison-label {
    position: absolute;
    bottom: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-md);
}

.comparison-image.before .comparison-label {
    right: var(--space-4);
}

.comparison-image.after .comparison-label {
    left: var(--space-4);
}

.comparison-handle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.handle-line {
    flex: 1;
    width: 2px;
    background: var(--white);
}

.handle-circle {
    width: 44px;
    height: 44px;
    background: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    color: var(--deep-forest);
}

.comparison-info {
    margin-top: var(--space-4);
    padding: var(--space-3);
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--dark-gray);
}

/* ================================
   MIND MAP SECTION
   ================================ */
.mindmap-section {
    background: linear-gradient(135deg, var(--white) 0%, var(--morning-dew) 100%);
}

.mindmap-container {
    padding: var(--space-4);
}

.mindmap-center {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-6);
}

.center-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-6);
    background: var(--gradient-forest);
    border-radius: var(--radius-full);
    color: var(--white);
    box-shadow: var(--shadow-forest);
    min-width: 150px;
}

.center-node .node-icon {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-2);
}

.center-node .node-name {
    font-size: var(--text-sm);
    font-weight: 600;
    text-align: center;
}

.mindmap-branches {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.mindmap-branch {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--light-gray);
    transition: all var(--transition-base);
}

.mindmap-branch:hover {
    box-shadow: var(--shadow-md);
}

.branch-header {
    display: flex;
    align-items: center;
    padding: var(--space-4);
    cursor: pointer;
    transition: background var(--transition-base);
}

.branch-header:hover {
    background: var(--light-gray);
}

.branch-icon {
    font-size: var(--text-xl);
    margin-right: var(--space-3);
}

.branch-title {
    flex: 1;
    font-weight: 600;
    color: var(--deep-forest);
}

.branch-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    border-radius: var(--radius-full);
    font-size: var(--text-lg);
    color: var(--dark-gray);
}

.branch-content {
    display: none;
    padding: 0 var(--space-4) var(--space-4);
    border-top: 1px solid var(--light-gray);
}

.mindmap-branch.expanded .branch-content {
    display: block;
}

.mindmap-branch.expanded .branch-toggle {
    background: var(--canopy-green);
    color: var(--white);
}

.branch-item {
    padding: var(--space-3) 0;
    border-bottom: 1px dashed var(--light-gray);
}

.branch-item:last-child {
    border-bottom: none;
}

.item-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--medium-gray);
    margin-bottom: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-value {
    font-size: var(--text-sm);
    color: var(--dark-gray);
    font-weight: 500;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.item-tag {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    background: rgba(79, 119, 45, 0.1);
    color: var(--canopy-green);
    font-size: var(--text-xs);
    border-radius: var(--radius-sm);
}

.item-tags.danger .item-tag {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.item-tags.success .item-tag {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

/* ================================
   CLIMATE SECTION
   ================================ */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--light-gray);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--canopy-green);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.climate-content {
    display: none;
    padding-top: var(--space-4);
}

.climate-content.active {
    display: block;
}

.climate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.climate-card {
    text-align: center;
    padding: var(--space-4);
    background: var(--light-gray);
    border-radius: var(--radius-lg);
}

.climate-icon {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-3);
}

.climate-bar {
    height: 8px;
    background: var(--white);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 1s ease;
}

.bar-fill.rainfall {
    background: linear-gradient(90deg, #4a90a4, #1a4d2e);
}

.bar-fill.temperature {
    background: linear-gradient(90deg, #90a955, #ef4444);
}

.bar-fill.density {
    background: linear-gradient(90deg, #90a955, #1a4d2e);
}

.climate-label {
    font-size: var(--text-xs);
    color: var(--medium-gray);
}

@media (max-width: 768px) {
    .climate-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   EXPLORE MODAL
   ================================ */
.explore-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
}

.explore-modal.active {
    display: flex;
}

.explore-content {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: var(--near-black);
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

.explore-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: var(--text-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--transition-base);
}

.explore-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.explore-viewer {
    position: relative;
    height: 500px;
}

.explore-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.explore-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.explore-scene.active {
    opacity: 1;
}

.explore-scene img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scene-label {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-2) var(--space-6);
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    font-size: var(--text-lg);
    font-weight: 500;
    border-radius: var(--radius-full);
}

.explore-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.progress-bar {
    height: 100%;
    background: var(--canopy-green);
    width: 25%;
    transition: width 0.5s ease;
}

.explore-info {
    padding: var(--space-6);
    text-align: center;
    color: var(--white);
}

.explore-info h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.explore-info p {
    color: rgba(255, 255, 255, 0.7);
}

.explore-controls {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.5);
}

/* ================================
   RELATED FORESTS
   ================================ */
.related-section {
    padding: var(--space-16) 0;
    background: var(--cream);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.related-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.related-card-image {
    height: 150px;
    overflow: hidden;
}

.related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.related-card:hover .related-card-image img {
    transform: scale(1.1);
}

.related-card-content {
    padding: var(--space-4);
}

.related-card h4 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--deep-forest);
    margin-bottom: var(--space-1);
}

.related-card p {
    font-size: var(--text-sm);
    color: var(--medium-gray);
}

@media (max-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}
