/*===========================
  Philippines Landslide Forecasting System - Custom Styles
===========================*/

/* Root Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --danger-gradient: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
}

/* Base */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 56px;
    /* height: 100%; */
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* align-items: center; */
}

* {
    transition: all 0.2s ease;
}


/*===========================
            Images
===========================*/
.placeholder-img img {
    width: 300px;
}

/*===========================
  Page Layout
===========================*/
.main-content {
    /* min-height: calc(100vh - 56px); */
    /* display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; */
    flex: 1;
    display: flex;
}

#homePage {
    flex-grow: 1;
    /* This makes the beige section grow to fill .main-content */
}



.page-content {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*===========================
  Typography
===========================*/
.gradient-text {
    /* background: linear-gradient(135deg, #2563eb 0%, #059669 100%); */
    /* background: linear-gradient(135deg, #f5f5dc 0%, #e6d5b8 100%); */
    background: linear-gradient(135deg, #8B4513 0%, #D2B48C 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {

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

    50% {
        background-position: 100% 50%;
    }
}

/*===========================
  Buttons
===========================*/
.btn-gradient {
    /* background: linear-gradient(135deg, #059669 0%, #2563eb 100%); */
    background: linear-gradient(135deg, #4E342E 0%, #A1887F 100%);


    border: none;
    color: white;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(92, 64, 51, 0.5);
    color: white;
}

.btn-gradient:active {
    transform: translateY(0);
}

.btn-gradient:disabled {
    background: #6b7280;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

a.learnhow-btn {
    /* outline: #00f2fe; */
    color: #8B4513;
    border: #8B4513 solid 1px;
}

a.learnhow-btn:hover {
    /* outline: #00f2fe; */
    color: #8B4513;
    border: #8B4513 solid 1px;
    transform: translateY(-2px);
    transition: all 0.3s ease;

}

/*===========================
  Cards & Hover Effects
===========================*/


.card-body {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
}


.card,
.hover-card,
.feature-card,
.factor-card {
    transition: all 0.3s ease;
}

.hover-card:hover,
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1) !important;
}

.factor-card {
    cursor: pointer;
}

.factor-card:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
}

/* Floating Cards */
.hero-image {
    position: relative;
    height: 500px;
}

.floating-cards .card {
    position: absolute;
    width: 200px;
    animation: float 6s ease-in-out infinite;
}

.floating-card-1 {
    top: 30px;
    right: 100px;
    animation-delay: 0s;
}

.floating-card-2 {
    top: 200px;
    right: 50px;
    animation-delay: 2s;
}

.floating-card-3 {
    top: 350px;
    right: 150px;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

/*===========================
  Sections
===========================*/
.hero-section {
    /* background: var(--primary-gradient); */
    /* background-color: #e6d5b8; */
    /* background-color: #f5f5dc; */
    background-color: #ece2c7;


    color: white;
    position: relative;
    overflow: hidden;
    /* padding: 5rem 0; */
    height: 100%;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
    /* display: flex; */
    /* justify-content: center; */
}

.features-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/*===========================
  Stats & Badges
===========================*/
.stat-item {
    padding: 1rem;
    border-radius: 0.5rem;
}

.stat-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.risk-low {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0;
}

.risk-moderate {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a;
}

.risk-high {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca;
}

.risk-extreme {
    background-color: #fecaca !important;
    color: #7f1d1d !important;
    border: 1px solid #f87171;
}

/*===========================
  Forms & Inputs
===========================*/
.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.input-group .form-control:focus+.btn {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/*===========================
  Dashboard Elements
===========================*/
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #e2e8f0;
}

/* Confusion Matrix / Training */
.confusion-matrix table {
    font-size: 0.9rem;
}

.confusion-matrix td {
    padding: 0.5rem;
    vertical-align: middle;
}

.model-params .param-item {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.model-params .param-item:last-child {
    border-bottom: none;
}

/* Guide Page */
.guide-section {
    scroll-margin-top: 100px;
}

.step-item {
    margin-bottom: 1rem;
}

.step-number {
    min-width: 30px;
    min-height: 30px;
    font-weight: bold;
    font-size: 0.9rem;
}

/*===========================
  Utilities & Animations
===========================*/
.pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.results-fade-in {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/*===========================
  Map Styles
===========================*/
#map {
    border-radius: 0.5rem;
}

.custom-marker {
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/*===========================
  Charts
===========================*/
.chart-container {
    position: relative;
    height: 300px;
}

/*===========================
  Toast
===========================*/
.toast {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/*===========================
  Scrollbars
===========================*/
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/*===========================
  Card Headers with Gradient
===========================*/
.card-header.bg-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.card-header.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

/*===========================
  Responsive Adjustments
===========================*/
@media (max-width: 768px) {
    .display-3 {
        font-size: 2.5rem;
    }

    .display-2 {
        font-size: 2rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    #map {
        height: 400px !important;
    }

    .floating-cards {
        display: none;
    }

    .hero-section .min-vh-100 {
        min-height: auto !important;
    }
}

