/* ============================================
   ALDERIDGE CONSTRUCTION - HOME COST CALCULATOR
   Sophisticated Architectural Aesthetic
   ============================================ */

/* Import distinctive fonts - Cormorant Garamond for elegance, Outfit for modern clarity */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties */
:root {
    /* Background image properties */
    --bg-image: url('images/Classic/CLASSIC EXT_01.jpg');
    --bg-opacity: 1;

    /* Primary Palette - Deep Forest & Warm Stone */
    --forest-900: #1a2e1f;
    --forest-800: #243528;
    --forest-700: #2d4232;
    --forest-600: #3a5240;
    --forest-500: #4a6550;

    /* Accent - Warm Copper/Bronze */
    --copper-300: #e8c4a0;
    --copper-400: #d4a574;
    --copper-500: #c4895c;
    --copper-600: #a86f45;

    /* Neutrals - Warm Stone */
    --stone-50: #faf9f7;
    --stone-100: #f5f3ef;
    --stone-200: #e8e4dd;
    --stone-300: #d9d3c8;
    --stone-400: #b8b0a2;

    /* Text Colors */
    --text-primary: #1a2e1f;
    --text-secondary: #4a5d4f;
    --text-muted: #7a8a7e;
    --text-inverse: #faf9f7;

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(26, 46, 31, 0.06);
    --shadow-md: 0 4px 16px rgba(26, 46, 31, 0.08);
    --shadow-lg: 0 12px 40px rgba(26, 46, 31, 0.1);
    --shadow-xl: 0 24px 60px rgba(26, 46, 31, 0.12);
    --shadow-inner: inset 0 2px 4px rgba(26, 46, 31, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--forest-900);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Background image layer - for smooth transitions */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -2;
    opacity: var(--bg-opacity);
    transition: opacity 1.8s ease-in-out;
}

/* Gradient overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 30%, rgba(0, 0, 0, 0.7) 60%, rgb(0, 0, 0) 100%);
    /* background: linear-gradient(to bottom, rgba(26, 46, 31, 0.7) 0%, rgba(26, 46, 31, 0.6) 30%, rgba(26, 46, 31, 0.7) 60%, rgb(26, 46, 31) 100%); */
    z-index: -1;
    pointer-events: none;
}

/* Subtle organic texture overlay */
.texture-overlay {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 9999;
}

/* ============================================
   LOGO BAR
   ============================================ */

.logo-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-xl) var(--space-lg) var(--space-md);
    max-width: 900px;
    margin: 0 auto;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-base);
    flex: 0 0 auto;
}

.logo-link:hover {
    opacity: 0.75;
}

/* Both logos scaled to the same width so differing aspect ratios still read equally */
.logo-img {
    width: 200px;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Vertical divider line between the two logos */
.logo-divider {
    display: inline-block;
    width: 1px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 600px) {
    .logo-bar {
        gap: var(--space-md);
        padding: var(--space-lg) var(--space-md) var(--space-sm);
    }

    .logo-img {
        width: 130px;
    }

    .logo-divider {
        height: 36px;
    }
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
    max-width: 800px;
    margin: 0 auto;
}

.page-header-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-inverse);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.page-header-description {
    font-size: 1.125rem;
    color: var(--stone-300);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   MAIN CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: 1480px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-xl) var(--space-2xl);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}

/* ============================================
   CARD COMPONENT
   ============================================ */

.card {
    background: rgba(26, 46, 31, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    padding: var(--space-xl) var(--space-2xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: visible;
    border: 1px solid rgba(74, 101, 80, 0.4);
    /* Ensure tooltips can escape card boundaries */
    z-index: 1;
}

/* ============================================
   SECTION TITLES
   ============================================ */

.section-title {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-inverse);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    position: relative;
    letter-spacing: -0.01em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--copper-500), var(--copper-300));
    border-radius: 2px;
}

.cost-title::after {
    width: 70px;
}

/* ============================================
   FORM GROUPS
   ============================================ */

.form-group {
    margin-bottom: var(--space-xl);
}

.form-group>label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-inverse);
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

.value-display {
    color: var(--copper-600);
    font-size: 1.375rem;
    font-weight: 700;
    font-family: var(--font-display);
}

/* ============================================
   CUSTOM SLIDER
   ============================================ */

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(74, 101, 80, 0.6), rgba(58, 82, 64, 0.8));
    outline: none;
    -webkit-appearance: none;
    margin: var(--space-md) 0;
    cursor: pointer;
    box-shadow: var(--shadow-inner);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--copper-400), var(--copper-600));
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(196, 137, 92, 0.35), 0 0 0 4px rgba(196, 137, 92, 0.12);
    transition: var(--transition-base);
    border: 3px solid var(--stone-50);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.12);
    box-shadow: 0 5px 18px rgba(196, 137, 92, 0.45), 0 0 0 6px rgba(196, 137, 92, 0.15);
}

.slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--copper-400), var(--copper-600));
    cursor: pointer;
    border: 3px solid var(--stone-50);
    box-shadow: 0 3px 10px rgba(196, 137, 92, 0.35);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--stone-300);
    font-weight: 500;
}

/* ============================================
   BUTTON GROUPS
   ============================================ */

.button-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.button-group-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.option-btn {
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--copper-500);
    background: linear-gradient(145deg, var(--forest-700), var(--forest-900));
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-body);
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    color: var(--text-inverse);
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    border-color: var(--copper-600);
    background: linear-gradient(145deg, var(--copper-400), var(--copper-500));
    color: var(--forest-900);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.option-btn.active {
    background: linear-gradient(145deg, var(--copper-400), var(--copper-500));
    border-color: var(--forest-800);
    color: var(--text-inverse);
    box-shadow: var(--shadow-md), 0 0 0 1px var(--copper-500);
}

.option-btn.active:hover {
    transform: translateY(-2px);
}

/* Icon container in buttons */
.option-btn .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.option-btn .icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.75;
    transition: var(--transition-fast);
}

.option-btn:not(.active) .icon svg {
    stroke: var(--text-secondary);
}

.option-btn.active .icon svg {
    stroke: var(--copper-300);
}

/* ============================================
   SELECT INPUT
   ============================================ */

.select-input {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--copper-500);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: var(--font-body);
    background: linear-gradient(145deg, var(--copper-400), var(--copper-500));
    cursor: pointer;
    transition: var(--transition-base);
    color: var(--text-inverse);
    font-weight: 500;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a2e1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 48px;
}

.select-input:hover {
    border-color: var(--copper-600);
    background: linear-gradient(145deg, var(--copper-500), var(--copper-600));
}

.select-input:focus {
    outline: none;
    border-color: var(--copper-600);
    box-shadow: 0 0 0 3px rgba(196, 137, 92, 0.25);
}

/* Ensure dropdown options are legible on all browsers */
.select-input option {
    color: #000000;
    background-color: #ffffff;
}

/* ============================================
   INFO ICON - CLICKABLE TOOLTIP SYSTEM
   ============================================ */

.info-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.info-icon {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(74, 101, 80, 0.6);
    transition: var(--transition-base);
    flex-shrink: 0;
}

.info-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--stone-300);
    stroke-width: 2;
    transition: var(--transition-base);
}

.info-icon:hover {
    background: var(--copper-400);
}

.info-icon:hover svg {
    stroke: var(--stone-50);
}

.info-icon.active {
    background: var(--forest-700);
}

.info-icon.active svg {
    stroke: var(--copper-300);
}

/* Tooltip content */
.tooltip-content {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: black;
    color: var(--stone-100);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.6;
    width: 280px;
    max-width: calc(100vw - 40px);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: 10000;
    pointer-events: none;
    border: 1px solid rgba(74, 101, 80, 0.6);
}

.tooltip-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid black;
}

.info-icon-wrapper.tooltip-visible .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Close button for tooltip */
.tooltip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition-fast);
}

.tooltip-close:hover {
    opacity: 1;
}

.tooltip-close svg {
    width: 14px;
    height: 14px;
    stroke: var(--stone-300);
}

/* ============================================
   FEATURES GRID & TOGGLES
   ============================================ */

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.feature-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid rgba(74, 101, 80, 0.5);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    background: rgba(36, 53, 40, 0.6);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.feature-header label {
    font-weight: 500;
    font-size: 0.875rem;
    margin: 0;
    color: var(--text-inverse);
}

/* Custom Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--stone-300);
    transition: var(--transition-base);
    border-radius: 28px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--stone-50);
    transition: var(--transition-base);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

input:checked+.toggle-slider {
    background: linear-gradient(145deg, var(--copper-400), var(--copper-600));
}

input:checked+.toggle-slider::before {
    transform: translateX(24px);
}

input:focus+.toggle-slider {
    box-shadow: 0 0 0 3px rgba(196, 137, 92, 0.2);
}

/* ============================================
   COST SUMMARY SECTION
   ============================================ */

.summary-card {
    background: rgba(26, 46, 31, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(74, 101, 80, 0.4);
    font-size: 1.25rem;
}

.summary-item span:first-child {
    color: var(--stone-300);
    font-weight: 500;
}

.summary-item span:last-child {
    font-weight: 700;
    color: var(--text-inverse);
    font-family: var(--font-display);
}

.breakdown-title {
    font-family: var(--font-display);
    font-size: 1.1875rem;
    font-weight: 600;
    margin: var(--space-lg) 0 var(--space-md) 0;
    color: var(--text-inverse);
    letter-spacing: -0.01em;
}

.breakdown-list {
    margin-bottom: var(--space-lg);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px dashed rgba(74, 101, 80, 0.4);
    font-size: 0.875rem;
}

.breakdown-item span:first-child {
    color: var(--stone-300);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.breakdown-item span:last-child {
    font-weight: 600;
    color: var(--text-inverse);
}

.location-adjustment,
.builder-overhead {
    background: rgba(36, 53, 40, 0.6);
    padding: var(--space-md) var(--space-lg) !important;
    margin: var(--space-sm) calc(-1 * var(--space-lg));
    border-bottom: none !important;
    border-radius: var(--radius-sm);
}

/* Total Section - Premium Look */
.total-section {
    background: linear-gradient(145deg, var(--forest-700) 0%, var(--forest-900) 100%);
    color: var(--text-inverse);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) calc(-0.5 * var(--space-md)) var(--space-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.total-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--copper-400), var(--copper-500), var(--copper-400));
}

.total-section::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.total-label {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.85;
}

.total-amount {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    background: linear-gradient(135deg, var(--stone-50), var(--copper-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.disclaimer {
    font-size: 0.75rem;
    opacity: 0.65;
    font-style: italic;
}

/* Gallery Link Button */
.gallery-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    color: var(--text-inverse) !important;
    text-decoration: none !important;
    background: linear-gradient(145deg, var(--forest-600), var(--forest-700)) !important;
    padding: var(--space-md) var(--space-xl) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    font-size: 0.875rem;
    transition: var(--transition-base) !important;
    border: 1px solid var(--forest-500);
}

.gallery-link:hover {
    background: linear-gradient(145deg, var(--copper-500), var(--copper-600)) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(196, 137, 92, 0.3) !important;
    border-color: var(--copper-400) !important;
}

/* Note Section */
.note {
    font-size: 0.8125rem;
    color: var(--stone-300);
    line-height: 1.7;
    padding: var(--space-md);
    background: rgba(36, 53, 40, 0.6);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
    border-left: 3px solid var(--copper-400);
}

/* ============================================
   GALLERY SECTION
   ============================================ */

.gallery-section {
    max-width: 1480px;
    margin: var(--space-3xl) auto;
    padding: 0 var(--space-xl);
}

.gallery-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.gallery-main-title {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 600;
    color: var(--stone-50);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.gallery-subtitle {
    font-size: 1.0625rem;
    color: var(--stone-300);
    margin-bottom: var(--space-xl);
    font-weight: 400;
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.gallery-tab {
    background: linear-gradient(145deg, var(--forest-700), var(--forest-900));
    border: 2px solid var(--copper-500);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    min-width: 180px;
    font-family: var(--font-body);
}

.gallery-tab:hover {
    border-color: var(--copper-600);
    background: linear-gradient(145deg, var(--copper-500), var(--copper-600));
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-tab.active {
    background: linear-gradient(145deg, var(--copper-400), var(--copper-500));
    border-color: var(--forest-800);
    box-shadow: var(--shadow-xl), 0 0 0 2px var(--copper-400);
    transform: scale(1.02);
}

.tab-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.tab-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--stone-50);
    stroke-width: 1.5;
}

.gallery-tab.active .tab-icon svg {
    stroke: var(--copper-300);
}

.tab-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-inverse);
}

.gallery-tab.active .tab-name {
    color: var(--text-inverse);
}

/* Masonry Gallery */
.masonry-gallery {
    column-count: 3;
    column-gap: var(--space-lg);
    margin-top: var(--space-xl);
    transition: opacity 0.4s ease;
}

.masonry-gallery.transitioning {
    opacity: 0;
}

.masonry-item {
    display: block;
    text-decoration: none;
    break-inside: avoid;
    margin-bottom: var(--space-lg);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-slow);
}

.masonry-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.masonry-item img {
    width: 100%;
    display: block;
    border-radius: var(--radius-lg);
    transition: var(--transition-slow);
}

.masonry-item:hover img {
    filter: brightness(0.85);
}

.masonry-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition-base);
    pointer-events: none;
    box-shadow: var(--shadow-lg);
}

.masonry-item::before {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--forest-800);
    opacity: 0;
    transition: var(--transition-base);
    pointer-events: none;
    z-index: 1;
}

.masonry-item:hover::after,
.masonry-item:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ============================================
   MOBILE PRICING SUMMARY
   ============================================ */

.mobile-pricing-summary {
    display: none;
    background: var(--stone-50);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin: var(--space-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--stone-200);
}

.mobile-summary-title {
    font-family: var(--font-display);
    color: var(--forest-900);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--copper-400);
}

.mobile-summary-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--stone-200);
    font-size: 1.25rem;
}

.mobile-summary-item span:first-child {
    color: var(--text-secondary);
}

.mobile-summary-item span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-summary-item.mobile-total {
    background: linear-gradient(145deg, var(--forest-700), var(--forest-900));
    color: var(--stone-50);
    padding: var(--space-md);
    margin: var(--space-md) calc(-1 * var(--space-lg));
    border-radius: var(--radius-md);
    border-bottom: none;
}

.mobile-summary-item.mobile-total span {
    color: var(--stone-50);
}

.mobile-breakdown-link {
    display: block;
    text-align: center;
    color: var(--forest-800);
    text-decoration: none;
    background: var(--stone-100);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
    font-weight: 600;
    transition: var(--transition-base);
    border: 2px solid var(--stone-200);
}

.mobile-breakdown-link:hover {
    background: var(--copper-400);
    color: var(--forest-900);
    border-color: var(--copper-500);
}

/* ============================================
   GARAGE SIZE GROUP
   ============================================ */

#garageSizeGroup {
    display: block;
    animation: slideDown 0.3s ease;
}

#garageSizeGroup.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* ============================================
   PHOTOSWIPE CUSTOMIZATION
   ============================================ */

.pswp {
    backdrop-filter: blur(5px);
}

.pswp__custom-caption {
    display: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        padding: var(--space-lg);
    }

    .summary-card {
        position: static;
    }

    .masonry-gallery {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .page-header {
        padding: var(--space-2xl) var(--space-md) var(--space-xl);
    }

    .page-header-title {
        font-size: 2.25rem;
    }

    .page-header-description {
        font-size: 1rem;
    }

    .container {
        padding: var(--space-md);
        gap: var(--space-md);
    }

    .mobile-pricing-summary {
        display: none;
    }

    .card {
        padding: var(--space-lg);
        border-radius: var(--radius-lg);
    }

    .section-title {
        font-size: 1.5rem;
    }

    .button-group,
    .button-group-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .masonry-gallery {
        column-count: 2;
        column-gap: var(--space-md);
    }

    .gallery-tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-tab {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        gap: var(--space-md);
        padding: var(--space-md) var(--space-lg);
    }

    .gallery-main-title {
        font-size: 1.75rem;
    }

    .total-amount {
        font-size: 1.75rem;
    }

    /* Tooltip adjustments for mobile */
    .tooltip-content {
        width: 240px;
        left: 0;
        transform: translateX(0) translateY(4px);
    }

    .tooltip-content::before {
        left: 10px;
        transform: none;
    }

    .info-icon-wrapper.tooltip-visible .tooltip-content {
        transform: translateX(0) translateY(0);
    }
}

@media (max-width: 480px) {
    .masonry-gallery {
        column-count: 1;
    }

    .feature-item {
        padding: var(--space-md);
    }

    .total-section {
        padding: var(--space-lg);
    }
}

/* ============================================
   ANIMATION UTILITIES
   ============================================ */

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

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

.card {
    animation: fadeInUp 0.5s ease backwards;
}

.input-section .card:nth-child(1) {
    animation-delay: 0.1s;
}

.input-section .card:nth-child(2) {
    animation-delay: 0.2s;
}

.summary-section .card {
    animation-delay: 0.3s;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--copper-500);
    outline-offset: 2px;
}

/* ============================================
   PAGE FOOTER
   ============================================ */

.page-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-sm) var(--space-lg) var(--space-3xl);
    max-width: 900px;
    margin: 0 auto;
}

.footer-logo-img {
    width: 250px;
}

@media (max-width: 600px) {
    .footer-logo-img {
        width: 180px;
    }
}

/* ============================================
   CONSULTATION CTA CARD
   ============================================ */

.cta-card {
    margin-top: var(--space-lg);
    text-align: center;
    background: linear-gradient(135deg, var(--forest-800) 0%, var(--forest-700) 100%);
    border: 1px solid var(--copper-500);
    color: var(--text-inverse);
    padding: var(--space-xl);
}

.cta-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-inverse);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

.cta-description {
    color: var(--stone-300);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.cta-button {
    display: inline-block;
    background-color: var(--copper-500);
    color: var(--text-inverse);
    text-decoration: none;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: background-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    background-color: var(--copper-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   CALCULATE BUTTON (GA4 tracking trigger)
   ============================================ */

.calculate-btn {
    background: linear-gradient(145deg, var(--copper-400), var(--copper-600));
    color: var(--text-inverse);
    border: 2px solid var(--copper-500);
    padding: 14px 32px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: var(--font-body);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
    width: 100%;
    max-width: 320px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: var(--shadow-md);
}

.calculate-btn:hover {
    background: linear-gradient(145deg, var(--copper-500), var(--copper-600));
    border-color: var(--copper-600);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(196, 137, 92, 0.35);
}

.calculate-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Mobile-specific sizing for the button inside the mobile pricing summary */
.calculate-btn-mobile {
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    padding: 12px 24px;
}

/* Confirmation message shown after clicking Calculate */
.calculate-confirmation {
    margin-top: var(--space-md);
    padding: 10px 16px;
    background: rgba(74, 101, 80, 0.35);
    color: var(--stone-100);
    border: 1px solid var(--forest-500);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    animation: calcFadeIn 0.3s ease;
}

@keyframes calcFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}