/* Enhanced Modern Layout for VOLC-TCS */

:root {
    --primary-color: #1A2A36;
    --secondary-color: #2c5e6b;
    --accent-color: #ff6b35;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f8f9fa;
    --shadow-light: 0 2px 15px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =======================
   Global Layout
   ======================= */
body {
    background: linear-gradient(135deg, #1A2A36 0%, #ffffff 30%, #ffffff 100%);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =======================
   Enhanced Navbar
   ======================= */
.navbar-enhanced {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(26, 42, 54, 0.1);
    box-shadow: var(--shadow-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1050;
    transition: var(--transition);
}

.navbar-enhanced .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    transition: var(--transition);
}

.navbar-enhanced .navbar-brand:hover {
    transform: translateY(-2px);
}

.navbar-enhanced .navbar-brand img {
    width: 50px;
    height: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
    transition: var(--transition);
}

.navbar-enhanced .nav-link {
    color: var(--primary-color) !important;
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    border-radius: var(--border-radius);
    margin: 0 0.25rem;
    transition: var(--transition);
    position: relative;
}

.navbar-enhanced .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-enhanced .nav-link:hover::before {
    width: 80%;
}

.navbar-enhanced .nav-link:hover {
    color: var(--accent-color) !important;
    background: rgba(26, 42, 54, 0.05);
    transform: translateY(-2px);
}

/* Dropdown Enhanced */
.dropdown-enhanced {
    position: relative;
}

.dropbtn-enhanced {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropbtn-enhanced:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.dropdown-content-enhanced {
    display: none;
    position: absolute;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    min-width: 280px;
    box-shadow: var(--shadow-heavy);
    border-radius: var(--border-radius);
    z-index: 1000;
    padding: 0.75rem;
    top: 100%;
    right: 0;
    border: 1px solid rgba(26, 42, 54, 0.1);
}

.dropdown-content-enhanced a {
    color: #1A2A36;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    border-radius: calc(var(--border-radius) - 2px);
    transition: var(--transition);
    font-weight: 500;
}

.dropdown-content-enhanced a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateX(5px);
}

.dropdown-enhanced:hover .dropdown-content-enhanced {
    display: block;
    animation: fadeInDown 0.3s ease-out;
}

/* =======================
   Enhanced Sidebar
   ======================= */
.sidebar-enhanced {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    box-shadow: var(--shadow-medium);
    padding: 1.5rem 0;
    height: calc(100vh - 120px);
    position: sticky;
    top: 120px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar-enhanced::-webkit-scrollbar {
    width: 4px;
}

.sidebar-enhanced::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-enhanced::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.sidebar-enhanced .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 1rem 1.5rem !important;
    margin: 0.25rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.sidebar-enhanced .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: var(--accent-color);
    transition: var(--transition);
    z-index: 0;
}

.sidebar-enhanced .nav-link:hover::before {
    width: 100%;
}

.sidebar-enhanced .nav-link:hover {
    color: var(--text-light) !important;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sidebar-enhanced .nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.sidebar-enhanced .nav-link span {
    position: relative;
    z-index: 1;
}

/* =======================
   Main Content Area
   ======================= */
.main-content-enhanced {
    padding: 2rem;
    flex: 1;
}

.content-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(10px);
}

.content-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.content-header p {
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0;
}

/* =======================
   Map and Carousel Layout - Ultra-Compact Version
   ======================= */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.2rem;
    height: 420px;
    margin-top: 1.5rem;
    align-items: start;
}

.map-container-enhanced {
    background: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    position: relative;
    height: 100%;
}

.map-container-enhanced #map {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
}

/* =======================
   Enhanced Volcano Carousel
   ======================= */
.volcano-carousel-enhanced {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.volcano-carousel-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
    pointer-events: none;
}

.volcano-carousel-enhanced h3 {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.carousel-container-enhanced {
    position: relative;
    flex: 1;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.volcano-card-enhanced {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    color: var(--text-dark);
    opacity: 0;
    transform: translateX(100%);
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.volcano-card-enhanced.active {
    opacity: 1;
    transform: translateX(0);
}

.volcano-card-enhanced h4 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.volcano-info {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(26, 42, 54, 0.05);
    border-radius: calc(var(--border-radius) - 4px);
    font-size: 0.9rem;
}

.info-label {
    font-weight: 600;
    color: var(--secondary-color);
}

.info-value {
    font-weight: 500;
    color: var(--text-dark);
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    position: relative;
    z-index: 2;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.carousel-btn:hover,
.carousel-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* =======================
   Volcano Carousel Ultra-Compact Integration
   ======================= */
.volcano-carousel-minimal {
    height: 400px;
    max-width: 280px;
    width: 100%;
}

/* Animation for ultra-compact carousel */
.animate-slideIn .volcano-carousel-minimal {
    animation: slideInRight 0.4s ease-out;
}

/* Responsive adjustments for ultra-compact layout */
@media (max-width: 1200px) {
    .layout-grid {
        grid-template-columns: 1fr 260px;
        gap: 1rem;
        height: 380px;
    }
    
    .volcano-carousel-minimal {
        max-width: 260px;
        height: 380px;
    }
}

@media (max-width: 992px) {
    .layout-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 350px auto;
        height: auto;
        gap: 1.2rem;
    }
    
    .volcano-carousel-minimal {
        max-width: 100%;
        height: 300px;
        justify-self: center;
    }
    
    .map-container-enhanced {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .layout-grid {
        gap: 1rem;
        margin-top: 1rem;
        grid-template-rows: 280px auto;
    }
    
    .map-container-enhanced {
        height: 280px;
    }
    
    .volcano-carousel-minimal {
        height: 280px;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .volcano-carousel-minimal {
        max-width: 280px;
        height: 250px;
    }
    
    .map-container-enhanced {
        height: 250px;
    }
}

.pulse-hover:hover {
    animation: pulse 1s infinite;
}

/* =======================
   Responsive Design
   ======================= */
@media (max-width: 1200px) {
    .layout-grid {
        grid-template-columns: 1fr 350px;
    }
}

@media (max-width: 992px) {
    .layout-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 400px 350px;
        height: auto;
    }
    
    .sidebar-enhanced {
        height: auto;
        position: relative;
        top: 0;
        border-radius: var(--border-radius);
    }
    
    .main-content-enhanced {
        padding: 1rem;
    }
    
    .content-header h1 {
        font-size: 2rem;
    }
    
    .content-header p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .navbar-enhanced .nav-link {
        padding: 0.5rem 1rem !important;
        margin: 0.1rem;
    }
    
    .sidebar-enhanced .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.2rem 0.5rem;
    }
    
    .layout-grid {
        grid-template-rows: 300px 280px;
        gap: 1rem;
    }
    
    .volcano-carousel-enhanced {
        padding: 1rem;
    }
    
    .content-header {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .content-header h1 {
        font-size: 1.75rem;
    }
    
    .content-header p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .main-content-enhanced {
        padding: 0.5rem;
    }
    
    .layout-grid {
        grid-template-rows: 250px 220px;
        gap: 0.75rem;
    }
    
    .volcano-carousel-enhanced {
        padding: 0.75rem;
    }
    
    .volcano-card-enhanced {
        padding: 1rem;
    }
    
    .volcano-card-enhanced h4 {
        font-size: 1.2rem;
    }
    
    .info-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* =======================
   Animations
   ======================= */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Query Builder Tabs Enhancement */
.nav-tabs-enhanced {
    border-bottom: 2px solid #dee2e6;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 0.5rem 0.5rem 0 0;
    margin: 0;
    padding: 0.25rem 0.5rem 0;
}

.nav-tabs-enhanced .nav-link {
    border: none;
    border-radius: 0.25rem 0.25rem 0 0;
    padding: 0.75rem 1rem;
    margin: 0 0.125rem;
    background: transparent;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    min-width: 100px;
    text-align: center;
}

.nav-tabs-enhanced .nav-link:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

.nav-tabs-enhanced .nav-link.active {
    color: var(--primary-color);
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-bottom: 2px solid #ffffff;
    font-weight: 600;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.nav-tabs-enhanced .nav-link:disabled {
    color: #adb5bd;
    background: transparent;
    cursor: not-allowed;
    opacity: 0.6;
}

.nav-tabs-enhanced .nav-link:disabled:hover {
    transform: none;
    background: transparent;
}

.nav-tabs-enhanced .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px 2px 0 0;
}

/* Tab Content */
.tab-content {
    background: #ffffff;
    border-radius: 0 0 0.5rem 0.5rem;
    min-height: 400px;
}

.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile responsiveness for tabs */
@media (max-width: 768px) {
    .nav-tabs-enhanced .nav-link {
        padding: 0.5rem 0.75rem;
        min-width: 60px;
        font-size: 0.875rem;
    }
    
    .nav-tabs-enhanced .nav-link .d-md-none {
        font-weight: 700;
        font-size: 1rem;
    }
}

/* Tab navigation buttons */
.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
}

/* Enhanced progress indicator */
.nav-tabs-enhanced .nav-link.completed {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.nav-tabs-enhanced .nav-link.completed::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    right: 0.25rem;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #28a745;
}
