/* Background styling for all pages - background image removed */
body {
    background-color: #e6f0f5; /* Very light blue mixed with silver */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Use min-height instead of height */
    margin: 0;
    padding: 10px; /* Small buffer on all sides */
    box-sizing: border-box; /* Include padding in calculations */
    overflow-x: auto; /* Allow horizontal scrolling for narrow screens */
}

/* Container for content */
.container {
    background-color: rgba(128, 128, 128, 0.9); /* Semi-transparent gray */
    width: 480px; /* Fixed width, 50% larger than min-width of 320px */
    height: 750px; /* Fixed height, 50% larger than 500px */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    border-radius: 3%;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    padding: 12px; /* Fixed padding */
    margin: 20px; /* Adds buffer around the grey box */
}

.insulation-container {
    justify-content: space-between;
}

.content-top {
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

/* Title styling */
h1 {
    color: blue;
    font-size: 20px;
    text-align: center;
    width: 100%;
    margin-bottom: 15px;
    text-decoration: underline;
}

/* Paragraph styling with light blue box */
p {
    color: #333;
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 30px 0; /* Increased margin-bottom by 50% */
    background-color: #f0f8ff; /* Light blue */
    padding: 15px 30px 30px 30px; /* Reduced top padding */
    border-radius: 20px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    flex-grow: 1;
}

/* Top section for Fiberglass Batts */
.top-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

/* Title container for Fiberglass Batts and R-value */
.title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

/* Attic size container for My Attic Size, input, and sqft label */
.attic-size-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Back button styling */
.back-button {
    width: 80px; /* Smaller width for "← Back" */
    height: 30px; /* Slightly smaller than insulation buttons */
    background-color: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.back-button:hover {
    background-color: #d0d0d0;
}

/* Fiberglass title styling */
.fiberglass-title {
    font-size: 16px;
    font-weight: bold;
    text-decoration: underline;
    text-align: center;
}

/* R-value styling */
.insulation-rvalue {
    font-size: 10px;
    text-align: center;
    opacity: 0.8;
}

/* Attic size title styling */
.attic-size-title {
    font-size: 11px;
    text-align: right;
}

/* Attic size input styling */
.attic-size-input {
    width: 60px;
    font-size: 10px;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-top: 2px;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

/* Sqft label styling */
.sqft-label {
    font-size: 11px;
    margin-left: 5px;
    align-self: center;
}

/* Total cost styling */
.diy-total, .professional-total {
    font-size: 16px;
    line-height: 1.5;
}

/* Horizontal line styling */
hr {
    width: 100%;
    border: 0;
    border-top: 1px solid #666;
    margin: 10px 0;
}

/* Section title styling for Description, Cost, Home Installation, Professional Installation */
.section-title {
    font-size: 16px;
    font-weight: bold;
    text-decoration: underline;
    text-align: left;
    margin-bottom: 5px;
}

/* Apply margin-top to all section titles except the first one after hr */
.section-title:not(.description-title) {
    margin-top: 12px;
}

/* Link styling for section links */
.section-link {
    color: #0000EE;
    text-decoration: underline;
    font-size: 16px;
    line-height: 1.5;
}

/* Button styling */
button {
    display: flex;
    flex-direction: column;      /* Stack text on top, icon below */
    align-items: center; /* Vertically center text and icon */
    justify-content: center; /* Horizontally center the content */
    text-align: center;
    width: 18%; /* Responsive width based on container */
    min-width: 70px; /* Minimum width for readability */
    height: 50px; /* Slightly smaller height */
    margin: 8px 0;
    background-color: green;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px; /* Smaller font for better fit */
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    padding: 8px 4px;            /* Optional: give a little breathing room */
    gap: 2px;                    /* Space between text and icon */
}

.button-icon {
    width: 1.3em;                  /* Square: width = height */
    height: 1.3em;                 /* Matches current font-size (14px) */
    object-fit: contain;         /* Keeps SVG proportions */
    display: block;              /* Removes inline spacing quirks */
    margin: 0 auto;              /* Extra centering safety */
}

/* Button hover effect */
button:hover {
    background-color: lightgray;
}

/* Active button state */
.active {
    background-color: black;
    color: white;
}

.buttons-bottom {
    display: flex;
    justify-content: space-between; /* Distribute buttons evenly */
    gap: 1%; /* Small gap between buttons */
    width: 100%;
    align-self: center;
    flex-wrap: wrap; /* Allow wrapping on very small screens */
}

/* Content layout for buttons and text area */
.content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex-grow: 1;
    position: relative;
}

/* Dynamic text area styling */
.text-area {
    margin-left: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    width: 200px;
    height: 100px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Page-specific styles for insulation page */
.insulation-page .content .buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
}

/* Climate buttons styling */
.climate-button {
    display: block;
    width: 100%; /* Full width of container */
    max-width: 80px; /* Reduced from 120px (2/3 size) */
    height: 37px; /* Reduced from 55px (2/3 size) */
    margin: 5px 0; /* Reduced margin */
    background-color: lightblue;
    color: #333;
    border: none;
    border-radius: 5px;
    font-size: 8px; /* Reduced from 12px (2/3 size) */
    cursor: pointer;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    padding: 4px; /* Reduced from 6px (2/3 size) */
    text-align: center;
    line-height: 1.2;
}

.climate-icon {
    width: 16px; /* Adjust size as needed for the small button */
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
    margin-bottom: 2px; /* Slight drop to align with text */
}

.climate-button:hover {
    background-color: #87CEEB;
}

.climate-button.hot {
    background-color: #ff6b6b;
    color: white;
}

.climate-button.hot:hover {
    background-color: #ff5252;
}

.climate-button.moderate {
    background-color: #ffa726;
    color: white;
}

.climate-button.moderate:hover {
    background-color: #ff9800;
}

.climate-button.cold {
    background-color: #1976d2;
    color: white;
}

.climate-button.cold:hover {
    background-color: #1565c0;
}

.climate-temp {
    font-size: 7px; /* Reduced from 11px (2/3 size) */
    color: rgba(255, 255, 255, 0.9);
    margin-top: 3px; /* Slightly reduced margin */
}

/* Insulation type buttons styling */
.insulation-button {
    display: block;
    width: 100%; /* Full width of container */
    max-width: 130px; /* Maximum width constraint */
    height: 45px; /* Smaller height */
    margin: 6px 0; /* Reduced margin */
    background-color: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 5px;
    font-size: 9px; /* Smaller font */
    cursor: pointer;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    padding: 6px; /* Reduced padding */
    text-align: center;
    line-height: 1.2;
}

.insulation-button:hover {
    background-color: #d0d0d0;
}

.insulation-button.fiberglass {
    background-color: #f8bbd9;
    color: #333;
}

.insulation-button.fiberglass:hover {
    background-color: #f5a6cc;
}

.insulation-button.cellulose {
    background-color: #616161;
    color: white;
}

.insulation-button.cellulose:hover {
    background-color: #424242;
}

.insulation-button.mineral {
    background-color: #ffd54f;
    color: #333;
}

.insulation-button.mineral:hover {
    background-color: #ffca28;
}

.insulation-button.spray-foam {
    background-color: #f5f5f5;
    color: #333;
}

.insulation-button.spray-foam:hover {
    background-color: #eeeeee;
}

.insulation-button.high-density-fiberglass {
    background-color: #ba68c8;
    color: white;
}

.insulation-button.high-density-fiberglass:hover {
    background-color: #ab47bc;
}

.insulation-rvalue {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.8;
}

/* Recommended options text styling */
.recommended-text {
    font-size: 9px; /* Reduced from 14px (33% smaller) */
    color: #666;
    margin: 10px 0 7px 0; /* Reduced margins */
    text-align: left;
    font-weight: bold;
    text-decoration: underline; /* Added underline */
}

/* Ensure anchor tags around buttons don't affect styling */
a {
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Inherit button text color */
}

/* Style for buttons inside anchor tags on main_landing.html */
.buttons a button {
    width: 120px; /* Slightly wider for landing page buttons */
    transition: background-color 0.2s ease; /* Smooth hover transition */
}

.insulation-surface-select {
    width: 140px;
    font-size: 10px;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-top: 2px;
}

.climate-text {
    margin-top: 5px; 
    font-size: 15px; 
    line-height: 1.5;
}

.price-text {
    flex: 1; 
    text-align: center; 
    font-size: 15px; 
    color: #666;
}

.climate-options-columns {
    display: flex; 
    justify-content: space-between; 
    width: 100%; 
    align-items: center; 
    margin: 6px 0;
}