/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* Body Styling */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
}
/* Section Containers */
.content-wrapper {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}
/* Card Styling */
.card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
/* File Upload Styling - Updated for better visibility */
.file-upload {
    background-color: #f5f5f5;
    border: 2px dashed #cecece;
    border-radius: 6px;
    padding: 20px;
    margin: 10px 0;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}
.file-upload:hover {
    background-color: #ebebeb;
    border-color: #b8b8b8;
}
.file-upload input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}
.file-upload label {
    display: block;
    text-align: center;
    color: #666;
    font-size: 14px;
    padding: 10px;
}
/* Updated Tab Container */
.tab-container {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}
/* Updated Tab Buttons */
.tab-btn {
    flex: 0 1 auto;
    padding: 8px 16px;
    font-size: 14px;
    background-color: #f0f0f0;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    min-width: 150px;
}
.tab-btn:hover {
    background-color: #e0e0e0;
}
.tab-btn.active {
    background-color: #4a90e2;
    color: white;
    border-color: #357abd;
}
/* Buttons */
button {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
button:hover {
    background-color: #4cae4c;
}
button:disabled {
    background-color: #d6d6d6;
    cursor: not-allowed;
    opacity: 0.7;
}
/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background-color: #f4f4f4;
}
.hero-left {
    width: 50%;
}
.hero-left h1 {
    font-size: 2em;
    margin-bottom: 10px;
}
.hero-left p {
    font-size: 1.2em;
}
.hero-right {
    width: 40%;
    padding: 20px;
}
/* Step Section */
.step {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    padding: 20px;
    flex-wrap: wrap;
}
.left {
    flex: 1 1 40%;
    margin-right: 20px;
}
.right {
    flex: 1 1 60%;
}
/* Form Styling */
.left .card form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
/* Form Group Styling */
.form-group {
    width: 100%;
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}
.form-group input, 
.form-group select {
    width: 100% !important;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}
/* LTV and Loan Fields */
.form-group-ltv, 
.form-group-loan {
    width: 48%;
    margin-bottom: 20px;
}
.form-group-ltv input, 
.form-group-loan input {
    width: 100%;
}
/* Image Grid */
.image-grid {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}
.image-grid img {
    width: 40px;
    height: auto;
    margin: 3px 5px;
    object-fit: contain;
}
/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}
.options-grid label {
    font-size: 1em;
    cursor: pointer;
}
.options-grid input {
    margin-right: 10px;
}
/* Sidebar */
.sidebar {
    width: 30%;
    position: sticky;
    top: 20px;
    padding: 20px;
}
.widget {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
/* Sliders */
.slider-container {
    margin-bottom: 20px;
}
.slider-container label {
    display: block;
    font-size: 1.1em;
}
input[type="range"] {
    width: 100%;
}
/* Headings */
h3, h4 {
    font-size: 1.5em;
    margin-bottom: 15px;
}
/* Option Cards */
.option-card {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f4f4f4;
    padding: 15px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1.1em;
    margin: 5px;
    color: #333;
}
.option-card:hover {
    border-color: #5cb85c;
    background-color: #eafaea;
    color: #333;
}
.option-card.selected {
    border-color: #5cb85c;
    background-color: #dff0d8;
    font-weight: bold;
    color: #333;
}
/* Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.option {
    background-color: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    color: #333;
}
.option:hover {
    background-color: #e9e9e9;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #333;
}
.option.selected {
    background-color: #5cb85c;
    color: white;
    border-color: #4cae4c;
}
.error-message {
    color: red;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}
#next-step {
    margin-top: 20px;
}
/* Documentation Section */
.documentation {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.documentation h2 {
    color: #5cb85c;
    font-size: 24px;
    margin-bottom: 15px;
}
.documentation p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}
/* Security Box */
.security-box {
    background-color: #f8fff8;
    border: 1px solid #e6f3e6;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}
/* Layout Container */
.document-container {
    display: flex;
    gap: 0;
    margin-top: 30px;
}
/* Tab Content Visibility */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
/* Document Sections */
.document-sections {
    flex: 1;
    display: flex;
    gap: 0;
}
.section {
    flex: 1;
    padding: 20px;
    background: white;
}
.section h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}
/* Upload Area */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    margin: 10px 0;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.upload-text {
    color: #666;
    margin: 5px 0;
}
.upload-or {
    color: #999;
    margin: 5px 0;
}
.choose-file {
    color: #5cb85c;
    text-decoration: underline;
    cursor: pointer;
}
/* Submit Button Container */
.submit-container {
    width: 200px;
    margin-left: auto;
}
.submit-button {
    width: 100%;
    padding: 20px;
    background: #5cb85c;
    color: white;
    border: none;
    cursor: pointer;
    height: 100%;
}
/* Responsive Design */
/* Submit button styling - Updated for consistency */
#submit-docs {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}
#submit-docs:hover {
    background-color: #4cae4c;
}
/*retira estes se nao fizer nada*/
.option.active {
    background-color: #007bff;
    color: white;
}
/*resultados left sidebar styling*/
/* General Navbar Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    padding: 15px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* Subtle shadow */
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}
.navbar-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-item {
    margin: 0 20px;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Smooth color transition */
    cursor: default;
}
/* Step states */
.nav-item.completed {
    background-color: #4CAF50;
    /* Green for completed steps */
    color: white;
}
.nav-item.current {
    background-color: #2196F3;
    /* Blue for the current step */
    color: white;
}
.nav-item.pending {
    background-color: #e0e0e0;
    /* Light gray for pending steps */
    color: #757575;
}
/*resultados page styling*/
/* Results page specific styles */
.results-page-container {
    flex: 1;
    padding: 20px;
}
/* Bank proposal cards styling */
.results-proposal-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.results-bank-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin: 0;
    width: 100%;
    text-decoration: none;
    color: inherit;
}
.results-bank-card h4 {
    color: #2563eb;
    font-size: 1.25rem;
    margin-bottom: 16px;
}
.results-bank-card p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.results-bank-card p strong {
    color: #4b5563;
}
.results-quote-button {
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    margin-top: 16px;
    width: 100%;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}
.results-quote-button:hover {
    background: #16a34a;
}
/* Sidebar improvements */
.results-sidebar {
    width: 30%;
    position: sticky;
    top: 20px;
    padding: 20px;
}
.results-widget {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 24px;
}
.results-form-group {
    margin-bottom: 16px;
}
.results-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}
.results-form-group select, 
.results-form-group input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}
.results-form-group select: focus, ;
.results-form-group input[type="number"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
/* Euribor radio buttons styling */
.results-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.results-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.results-radio-label:hover {
    background-color: #f3f4f6;
}
.results-radio-label input[type="radio"] {
    margin-right: 8px;
}
.results-radio-label span {
    font-size: 14px;
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .results-content-wrapper {
        flex-direction: column;
    }
    .results-sidebar {
        width: 100%;
        position: static;
    }
    .results-page-container {
        width: 100%;
    }
}
/* Content wrapper fixes */
.results-content-wrapper {
    display: flex;
    gap: 24px;
    position: relative;
    padding: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}
/* Sidebar fixes */
.results-sidebar {
    flex: 0 0 300px;
    /* Fixed width */
    min-width: 300px;
    /* Ensure minimum width */
    position: sticky;
    top: 20px;
    height: fit-content;
    z-index: 1;
    /* Ensure sidebar stays above content */
}
/* Results container fixes */
.results-page-container {
    flex: 1;
    min-width: 0;
    /* Prevent flex item from overflowing */
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .results-content-wrapper {
        flex-direction: column;
        padding: 10px;
    }
    .results-sidebar {
        flex: none;
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
}
/*from here*/
/* Base Responsive Design */
@media (max-width: 768px) {
    /*extend input form width to allow more room for numbers*/
    .input-row input[type="number"], 
    .input-row input[type="text"], 
    .input-row select {
        width: 100% !important;
        /* Forces full width */
        max-width: 100% !important;
    }
    /* Document Structure */
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    .document-container {
        flex-direction: column;
    }
    .document-sections {
        flex-direction: column;
    }
    .content-wrapper, 
    .results-content-wrapper {
        flex-direction: column;
        padding: 10px;
    }
    /* Navigation */
    .navbar {
        padding: 1rem 0.5rem;
        width: auto;
        margin: 0;
    }
    .navbar-links {
        gap: 0px !important;
        /* Ensure no space between items */
        padding: 0 !important;
        /* Remove any padding */
        justify-content: flex-start !important;
        /* Align items to the left */
        flex-wrap: nowrap !important;
        /* Prevent wrapping */
        overflow-x: auto !important;
        /* Allow horizontal scroll if necessary */
    }
    .nav-item {
        padding: 0.1rem 0.2rem !important;
        /* Reduced padding to make items smaller */
        font-size: 0.6rem !important;
        /* Reduced font size */
        white-space: nowrap !important;
        /* Prevent text from wrapping */
        margin-left: 0 !important;
        /* Remove extra space before the first item */
        flex-shrink: 0 !important;
        /* Prevent shrinking */
        flex-grow: 0 !important;
        /* Prevent growing */
        min-width: 0 !important;
        /* Ensure no minimum width that forces overflow */
        display: inline-flex !important;
        /* Ensure the background wraps around the content */
        max-width: 25% !important;
        /* Limit the width of each item to 25% of the content*/
    }
}
/* Hero Section */
.hero {
    padding: 0 !important;
    width: 100%;
    flex-direction: column;
    margin: 0 !important;
}
.hero-left {
    width: 100%;
}
.hero-left h1 {
    font-size: 3rem !important;
}
.hero-left p {
    font-size: 2rem !important;
}
.hero-right {
    display: flex;
    justify-content: center;
    width: 100vw !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
.hero-right form {
    width: 100vw;
    max-width: none;
    padding: 5px;
    margin: 0;
}
/* Form Elements */
.input-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}
.input-row input[type="number"] {
    width: 70%;
}
.form-group-ltv, 
.form-group-loan {
    width: 100%;
}
/* Tabs and Options */
.titular-tabs {
    width: 100%;
    flex-direction: row;
}
.tab-container {
    padding: 0 10px;
}
.tab-btn {
    min-width: 120px;
}
.options-grid {
    grid-template-columns: repeat(2, 1fr);
}
/* Sidebar and Results */
.sidebar, 
.results-sidebar {
    width: 100%;
    margin-top: 20px;
    position: static;
}
.results-page-container {
    width: 100%;
}
/* Footer */
.footer {
    width: 100%;
    margin: 0;
}
.footer-container {
    width: 100%;
    padding: 0 20px;
    flex-direction: column;
    gap: 20px;
}
.footer-column {
    text-align: center;
}
.footer-header, 
.footer-text {
    font-size: 18px;
}
}
/* Extra Small Screens */
@media (max-width: 375px) {
.navbar-links {
    gap: 0px;
    padding: 0;
}
.nav-item {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
}
.hero-right form {
    width: 100vw;
    max-width: 100%;
    padding: 5px;
}
}

/* For desktop screens and above THIS IS NOT WORKING*/
@media (min-width: 1024px) {
  .hero-form {
    margin-left: auto;
    margin-right: 0;
    text-align: right;
  }
}

/* Container for footer columns */
/* Flexbox footer container */
/* Ensure that the footer container is using a grid layout */
.footer-container {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important; /* This divides the area into 3 equal columns */
  gap: 20px !important; /* Space between columns */
  padding: 20px !important;
}

/* Stack columns vertically for smaller screens (mobile view) */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr !important; /* Stack columns vertically */
  }
}

/* Style for each footer column */
.footer-column {
  padding: 10px !important;
}

/*-------------*/
/*styles for teh loan form to be on the right on desktop only*/
/*-----------*/
/* Default behavior for smaller screens */
/* Default styles */
/* Default styles */
.hero-container {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.hero-right {
  width: 100%;
  text-align: center;
  margin: 0 auto;
  max-width: 500px;
}

/* Tablet Portrait Mode (iPad Mini, iPad Air 4, iPad Pro 11, Galaxy Tab S7) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .hero-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    padding: 20px 40px !important;
    align-items: start !important;
    position: relative;
  }

  .hero-left {
    grid-column: 1 / 2 !important;
    padding-right: 20px !important;
    max-width: 100% !important;
    text-align: center !important; /* Center align the text */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; /* Center align flex items */
  }

  .hero-left h1, 
  .hero-left p,
  .hero-left div {
    text-align: center !important; /* Ensure all text elements are centered */
    width: 100% !important; /* Full width for proper centering */
  }

  .hero-right {
    grid-column: 2 / 3 !important;
    position: sticky !important;
    top: 20px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-left: 20px !important;
  }

  #loan-form {
    width: 100% !important;
    background: white !important;
    padding: 20px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
  }

  /* Ensure text content is properly sized */
  .hero-left h1 {
    font-size: 32px !important;
    margin-bottom: 20px !important;
  }

  .hero-left p {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
}

/* MacBook Air and larger screens (landscape) */
@media (min-width: 1025px) {
  .hero-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 40px !important;
    position: relative;
    min-height: 100vh;
  }

  .hero-left {
    width: 70% !important;
    text-align: center !important;
    margin-bottom: 30px !important;
    padding: 0 60px !important;
    z-index: 1;
  }

  .hero-right {
    width: 50% !important;
    position: relative !important;
    margin: 0 auto !important;
    z-index: 2;
  }

  #loan-form {
    width: 100% !important;
    max-width: 500px !important;
    margin: 0 auto !important;
  }
}

/* Form styling */
.slider-container {
  margin-bottom: 15px !important;
}

.form-header {
  margin-bottom: 20px !important;
}

.form-title {
  font-size: 24px !important;
}

/* Additional responsive adjustments */
@media (max-width: 820px) and (orientation: portrait) {
  .hero-container {
    gap: 10px !important;
    padding: 20px !important;
  }

  .hero-right {
    padding-left: 10px !important;
  }

  .hero-left {
    padding-right: 10px !important;
  }
}
