:root {
    --primary: #2ECC71;
    --primary-hover: #27ae60;
    --secondary: #f1c40f;
    --bg-color: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --border: rgba(255, 255, 255, 0.18);
    --border-solid: #e0e0e0;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --font-heading: 'Barlow', sans-serif;
    --font-body: 'Barlow', sans-serif;
    --radius: 16px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(circle at top right, rgba(46, 204, 113, 0.05) 0%, transparent 40%),
                      radial-gradient(circle at bottom left, rgba(241, 196, 15, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
    padding-bottom: 0;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-main);
}

.accent {
    color: var(--primary);
}

.material-icons-round {
    vertical-align: middle;
}

.icon-primary {
    color: var(--primary);
    font-size: 28px;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0 20px;
}

/* Modern Header */
.modern-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
    padding: 20px 0 40px 0;
}

@media (min-width: 768px) {
    .modern-header {
        flex-direction: row;
        text-align: left;
        gap: 30px;
        align-items: center;
        justify-content: flex-start;
    }
}

.brand-logo {
    max-height: 80px;
    object-fit: contain;
}

.header-text h1 {
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.header-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 992px) {
    .main-content {
        flex-direction: row;
        align-items: flex-start;
    }
    .calculator-form {
        flex: 1;
        min-width: 0; 
    }
    .summary-wrapper {
        width: 380px;
        position: sticky;
        top: 20px;
    }
    body {
        padding-bottom: 0;
    }
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 25px;
    margin-bottom: 25px;
}

.disabled-card {
    opacity: 0.5 !important;
    pointer-events: none;
    filter: grayscale(1);
}

.global-params h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.global-params h2 .material-icons-round {
    color: var(--primary);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 576px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .full-width {
        grid-column: 1 / -1;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
    font-size: 0.95rem;
}

input[type="text"],
input[type="number"],
input[type="tel"],
input[type="email"],
select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    background: #ffffff;
    color: var(--text-main);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.1);
}

/* Range Inputs */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    margin: 10px 0;
}
input[type=range]:focus {
    outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 4px;
}
input[type=range]::-webkit-slider-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    margin-top: -8px;
    box-shadow: 0 2px 6px rgba(46, 204, 113, 0.4);
    transition: transform 0.1s;
}
input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
.range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.range-val {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    background: rgba(46, 204, 113, 0.1);
    padding: 2px 10px;
    border-radius: 12px;
}

/* Location Address Fields Grid */
.address-split-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px; /* Increased gap for mobile */
    margin-bottom: 15px;
}
@media (min-width: 576px) {
    .address-split-grid {
        grid-template-columns: 2fr 1fr 2fr;
        gap: 10px;
    }
}

.location-actions {
    margin-top: 5px;
    display: flex;
    justify-content: flex-start;
}

/* Buttons */
.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 500;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.btn-text:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 10px 18px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.route-info {
    margin-top: 10px;
    padding: 12px;
    background: rgba(46, 204, 113, 0.1);
    border-left: 4px solid var(--primary);
    border-radius: 6px;
    font-size: 0.95rem;
}

/* Services Sections */
.services-header {
    margin-bottom: 20px;
    margin-top: 40px;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.services-list {
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.services-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
}

.services-header .subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 5px;
}

.service-card {
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: top center;
    max-height: 600px;
    overflow: hidden;
    opacity: 0.95;
    border: 2px solid transparent;
}

.service-card.active {
    opacity: 1;
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(46, 204, 113, 0.15);
}

/* Home Staging Unique Style */
#service-hs {
    background: rgba(233, 30, 99, 0.02);
}

#service-hs.active {
    border-color: #e91e63;
    background: rgba(233, 30, 99, 0.06);
    box-shadow: 0 10px 40px rgba(233, 30, 99, 0.15);
}

.hide-magically {
    opacity: 0 !important;
    transform: scale(0.9) translateY(-20px);
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-width: 0 !important;
    pointer-events: none;
    overflow: hidden !important;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.service-title {
    display: flex;
    gap: 15px;
}

.service-title h3 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.base-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modifier-desc {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
}

.service-price {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.1rem;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.service-price .price-val {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
}

.service-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-solid);
}

.btn-example {
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
    background: rgba(46, 204, 113, 0.05);
}

.btn-example:hover {
    background: var(--primary);
}

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

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Large Drone Addons */
.addons.two-cols {
    display: none; /* hidden by default */
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 15px;
    border-top: 1px dashed var(--border-solid);
    padding-top: 15px;
}

.service-card.active .addons.two-cols {
    display: grid;
    animation: fadeIn 0.4s ease;
}

@media (min-width: 576px) {
    .service-card.active .addons.two-cols {
        grid-template-columns: 1fr 1fr;
    }
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox {
    height: 22px;
    width: 22px;
    background-color: #eee;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: var(--transition);
    border: 2px solid transparent;
}

.checkbox-label input:checked ~ .custom-checkbox {
    background-color: var(--primary);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
    border-color: var(--primary);
}

.custom-checkbox:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .custom-checkbox:after {
    display: block;
}

.checkbox-label.large {
    border: 1px solid var(--border-solid);
    padding: 15px;
    border-radius: 12px;
    align-items: flex-start;
}

.checkbox-label.large:hover {
    border-color: var(--primary);
    background: rgba(46, 204, 113, 0.05);
}

.checkbox-label.large input:checked ~ span.opt-label,
.checkbox-label.large input:checked ~ span.opt-price {
    color: var(--text-main);
}

.opt-label {
    flex: 1;
    font-weight: 500;
    line-height: 1.3;
}

.opt-label small {
    display: block;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 3px;
    font-size: 0.85rem;
}

.opt-price {
    font-weight: 700;
    color: var(--primary);
}


/* Summary Panel */
.summary-panel {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

.summary-panel h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: white;
}

.summary-details {
    list-style: none;
    margin-bottom: 25px;
    min-height: 100px;
}

.summary-details li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 0.95rem;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255,255,255,0.2);
}

.summary-details li .item-name {
    font-weight: 500;
}
.summary-details li .item-name small {
    display: block;
    color: rgba(255,255,255,0.6);
    font-weight: normal;
    margin-top: 3px;
    font-size: 0.8rem;
}

.summary-details li .item-val {
    font-weight: 600;
    white-space: nowrap;
    margin-left: 10px;
}

.summary-details li.sub-item {
    padding-left: 15px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    border-bottom: none;
    margin-top: -10px;
    margin-bottom: 5px;
}
.summary-details li.sub-item::before {
    content: "↳";
    margin-right: 5px;
    color: var(--primary);
}


.empty-state {
    color: rgba(255,255,255,0.6);
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

.summary-totals {
    margin-top: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.summary-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.5);
    font-weight: 700;
    margin-bottom: 20px;
}

.summary-totals .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.discount-row {
    color: #e74c3c;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 15px !important;
}

.discount-row .discount-val {
    font-weight: 700;
}

.net-row {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.4rem;
}

.gross-row {
    color: #fff;
    font-weight: 600;
    font-size: 1.15rem;
}

.vat-row {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.mobile-only {
    display: none;
    color: white;
}

/* Mobile sticky footer adjustments */
@media (max-width: 991px) {
    body {
        padding-bottom: 110px; /* Minimalny bezpieczny margines na okienko z ceną, aby stopka mogła pojawić się nad nim na samym dole ekranu. */
    }
    .summary-wrapper {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 100;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    }
    .summary-wrapper.mobile-hidden {
        transform: translateY(120%);
    }
    .summary-panel {
        margin-bottom: 0;
        border-radius: 20px 20px 0 0;
        padding: 0; /* padding przesunięto do wewnątrz collapsible */
        max-height: 85vh;
        overflow-y: auto;
    }
    .summary-panel h2 {
        display: none; 
    }
    .summary-details {
        display: block; 
    }
    .summary-collapsible {
        padding: 20px;
        animation: fadeIn 0.3s;
    }
    .summary-wrapper.is-collapsed .summary-collapsible {
        display: none !important;
    }
    .summary-wrapper:not(.is-collapsed) .summary-minibar {
        display: none !important;
    }
    .summary-minibar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        cursor: pointer;
    }
    .mobile-only {
        display: flex;
    }
    .summary-totals {
        display: flex;
        flex-direction: column;
    }
    .net-total-main {
        font-size: 1.3rem;
    }
}

/* Footer Style */
.app-footer {
    margin-top: 50px;
}

/* Minimalist Footer */
.minimalist-footer {
    margin-top: auto;
    padding: 15px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-solid);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.icon-spin {
    animation: spin 1s linear infinite;
}

.footer-compact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

@media (min-width: 900px) {
    .footer-compact-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-compact-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.compact-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.3;
}
.compact-text strong {
    color: var(--text-main);
    font-size: 0.95rem;
}

.footer-compact-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-compact-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f8f9fa;
    color: var(--text-main);
    border: 1px solid var(--border-solid);
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-compact-links a:hover {
    background: rgba(46,204,113,0.1);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.footer-compact-links .material-icons-round {
    font-size: 18px;
}

.footer-divider {
    width: 1px;
    height: 20px;
    background: var(--border-solid);
    margin: 0 5px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none; 
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    max-height: calc(100% - 40px);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-solid);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.btn-icon:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
}

.map-container {
    width: 100%;
    height: 400px;
    background: #eee;
    border-radius: 8px;
    margin-bottom: 20px;
}



/* Media Modal */
.media-modal-content {
    background: #000;
    max-width: 1000px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.media-close-bar {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}
.media-close-bar .btn-icon {
    color: white;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-close-bar .btn-icon:hover {
    background: var(--primary);
}

.media-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
}

.media-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.media-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: fadeIn 0.3s;
}

.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #111;
    color: white;
}

.gallery-controls.hidden {
    display: none !important;
}

.gallery-btn {
    color: white;
    background: #222;
    padding: 10px;
    border-radius: 8px;
}
.gallery-btn:hover {
    background: var(--primary);
}

.gallery-counter {
    font-weight: 600;
    letter-spacing: 2px;
}

.hidden {
    display: none !important;
}

/* Step Navigation */
.step-container {
    transition: var(--transition);
}

#step-2 {
    margin-top: 40px;
    padding-top: 20px;
}

#step-2.active {
    animation: slideUp 0.6s ease-out;
}

.step-indicator {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.step-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-start;
}

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