/* Header with Logos Only - Smaller Height */
.header-container {
    background: url("{{ url_for('static', filename='images/header-bg.jpg') }}") no-repeat center center;
    background-size: cover;
    padding: 1rem 0;
    margin-bottom: 0;
    position: relative;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: 100px;
}

/* Remove the overlay completely to show the image clearly */
.header-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    height: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
}

.company-logo {
    height: 80px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.secondary-logo {
    height: 60px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.company-logo:hover   {
    transform: scale(1.05);
}
.secondary-logo:hover {
    transform: scale(1.05);
}

/* Title below header */
.title-below-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1rem 0;
    border-bottom: 1px solid #FFE4D6;
}

.title-below-header .main-header {
    font-size: 2.5rem;
    color: #333333;
    margin: 0;
    text-align: center;
    font-weight: 750;
}

/* Tagline section below header with white background and black text */
.tagline-section {
    background: #ffffff; /* White background */
    padding: 1rem 0;
    border-bottom: 1px solid #ccc; /* light gray border */
    margin-bottom: 2rem;
}

.tagline-container {
    max-width: 1000px; /* Centered container */
    margin: 0 auto;
    padding: 0 1.5rem;
}

.tagline {
    color: #000000; /* Black text */
    font-size: 1rem;
    line-height: 1.5;
    font-style: normal; /* Remove italic */
    margin: 0;
    text-align: center;
    font-weight: 500;
    white-space: normal; /* Allow wrapping */
    overflow: visible; /* Show full text */
}

/* Logo link styling */
.logo-link {
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.logo-link:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 127, 65, 0.2);
}

/* Main content spacing */
.main-content {
    padding: 0 0 2rem 0;
}

/* Main background */
body {
    background: #ffffff;
    color: #333333;
    font-family: 'Inter', sans-serif;
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
    color: #333333 !important;
    font-weight: 600;
}

/* Section headers - CHANGED TO BLACK */
.section-header {
    color: #000000 !important; /* Changed from #FF7F41 to black */
    border-bottom: 2px solid #FF7F41;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.4rem;
}

/* Cards - Updated for equal height */
.sidebar-card, .content-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #FFE4D6;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(255, 127, 65, 0.1);
    transition: all 0.3s ease;
    height: 100%; /* Ensure cards take full height of their container */
    display: flex;
    flex-direction: column;
}

.sidebar-card:hover, .content-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 127, 65, 0.15);
}

.metric-card {
    background: #ffffff;
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid #FFE4D6;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 12px rgba(255, 127, 65, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 127, 65, 0.15);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(90deg, #FF7F41 0%, #FFA364 100%);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 127, 65, 0.3);
    background: linear-gradient(90deg, #FF7F41 0%, #FFA364 100%);
    color: white;
}

/* Toggles */
.form-check-input:checked {
    background-color: #FF7F41;
    border-color: #FF7F41;
}

/* Select boxes and sliders */
.form-select, .form-range {
    background-color: #ffffff;
    border: 1px solid #FFE4D6;
    border-radius: 8px;
    color: #333333;
}

.form-range::-webkit-slider-thumb {
    background-color: #FF7F41;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #FF7F41;
}

.form-range::-moz-range-thumb {
    background-color: #FF7F41;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #FF7F41;
}

/* Plan Section */
.plan-section {
    text-align: center;
    margin: 50px 0;
}

.plan-options {
    display: flex;
    flex-direction: row;   /* align cards in a row */
    justify-content: center; /* center horizontally */
    gap: 25px;             /* space between cards */
    flex-wrap: wrap;       /* allow wrapping on small screens */
}

.plan-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 280px;   /* same width for all cards */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* Vertical Plan Cards (for sidebar use if needed) */
.plan-selection-vertical {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.plan-card-vertical {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.plan-card-vertical:last-child {
    margin-bottom: 0;
}

.plan-card-vertical.selected {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.plan-card-vertical:hover {
    background-color: #f8f9fa;
}

/* Push Calculate button to bottom of card */
.sidebar-card .btn-primary {
    margin-top: auto;
}

/* Text */
p, .small {
    color: #666666 !important;
}

/* Info box */
.alert-info {
    background: rgba(255, 127, 65, 0.05);
    border: 1px solid #FFE4D6;
    border-radius: 8px;
    color: #666666;
}

/* Divider */
hr {
    border-color: #FFE4D6;
    margin: 1.5rem 0;
}

/* Enhanced Footer with Background */
.footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    color: #ffffff;
    font-size: 0.9rem;
    border-top: 1px solid #FF7F41;
    background: url("{{ url_for('static', filename='images/footer-bg.jpg') }}") no-repeat center center;
    background-size: cover;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for better text contrast */
    z-index: 1;
}

.footer > * {
    position: relative;
    z-index: 2;
}

.disclaimer {
    color: #ffffff;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    padding: 0 1rem;
    line-height: 1.5;
    font-weight: 500;
}

/* Custom orange text */
.orange-text {
    color: #FF7F41 !important;
    font-weight: 700;
}

/* Form labels */
.form-label {
    color: #666666;
    font-weight: 500;
}

/* Additional spacing adjustments */
.main-container {
    padding-top: 0.8rem;
}

.config-section {
    margin-top: 1.2rem;
}

/* Make all columns equal height (kept for compatibility) */
.row.g-4 {
    display: flex;
    flex-wrap: nowrap;
}

/* Ensure .col-* are flex containers where necessary */
.row.g-4 > [class*="col-"] {
    display: flex;
}

/* === Strong alignment fix for top-row alignment === */
.main-container > .row.g-4,
.main-container .row.g-4 {
    display: flex;
    align-items: flex-start; /* align children to top */
    gap: 1rem;
}

/* Make each column a column-flex so its card can stretch to full height */
.main-container .row.g-4 > [class*="col-"] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Ensure the immediate card inside each column fills height and aligns top */
.main-container .row.g-4 > [class*="col-"] > .sidebar-card,
.main-container .row.g-4 > [class*="col-"] > .content-card,
.main-container .row.g-4 > [class*="col-"] > form > .sidebar-card {
    margin: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* Normalize header spacing inside cards so titles don't push differently */
.sidebar-card .section-header,
.content-card .section-header {
    margin-top: 0;
    padding-top: 0;
}

/* Remove unexpected top margins on first child inside card containers */
.sidebar-card > *:first-child,
.content-card > *:first-child {
    margin-top: 0;
}

/* Keep calculate button pinned to bottom */
.sidebar-card .btn-primary {
    margin-top: auto;
}

/* Fallback background colors if images don't load */
.header-container {
    background-color: #2c3e50; /* Dark blue fallback */
}

.footer {
    background-color: #34495e; /* Slightly lighter blue fallback */
}

/* ===============================
   Plan Card Colors
   =============================== */
.plan-card.basic {
    background-color: #f38e32; /* Basic */
    color: #fff;
}

.plan-card.premium {
    background-color: #4dceae; /* Premium */
    color: #fff;
}

.plan-card.advance {
    background-color: #c3804e; /* Advance */
    color: #fff;
}
