/* CSS Variables */
:root {
    /* Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #0e325d;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --accent-primary: #f3ba69;
    --accent-secondary: #0e325d;
    --accent-gradient: linear-gradient(135deg, #f3ba69 0%, #f5c97a 100%);
    --accent-gradient-hover: linear-gradient(135deg, #f5c97a 0%, #f3ba69 100%);
    
    /* Typography */
    --font-family: 'Poppins', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow: 0 4px 20px rgba(243, 186, 105, 0.1);
    --shadow-hover: 0 8px 30px rgba(243, 186, 105, 0.2);
    --border-radius: 12px;
    --border-radius-small: 8px;
    --transition: all 0.3s ease;
}

/* Icon Styles */
.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-8 {
    width: 2rem;
}

.h-8 {
    height: 2rem;
}

.inline {
    display: inline;
}

.mr-2 {
    margin-right: 0.5rem;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: var(--font-size-base);
    overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
}

h1 {
    font-size: var(--font-size-6xl);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-4xl);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

p {
    font-family: var(--font-family);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

/* Privacy & rules page tweaks */
.privacy-and-rules p {
    font-size: var(--font-size-sm);
}

.privacy-and-rules ul {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.privacy-and-rules h1 {
    font-size: calc(var(--font-size-sm) * 2);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.privacy-and-rules h2 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

/* mobile break point */
@media (max-width: 768px) {
    .privacy-and-rules h1 {
       font-size: 1.1rem;
    }
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(14, 50, 93, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    height: 3rem;
    /* border: 1px solid red; */
}

.logo-img {
    width: auto;
    height: 100%;
    flex-shrink: 0;
}

.logo-link {
    display: inline-flex;
    height: 100%;
}

.logo h1 {
    font-size: var(--font-size-2xl);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin: 0;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Mobile nav toggle button */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-small);
    transition: var(--transition);
}

.nav-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(243, 186, 105, 0.35);
}

.nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.nav a:hover:not(.cta-button-small) {
    color: var(--accent-primary);
}

/* CTA Buttons */
.cta-button, .cta-button-small {
    background: var(--accent-gradient);
    color: var(--text-primary);
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: var(--font-size-base);

    -webkit-box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 6px 14px rgba(0,0,0,.08);
    box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 6px 14px rgba(0,0,0,.08);
}

/* .cta-button-small {
    padding: 8px 16px;
    font-size: var(--font-size-sm);
    font-weight: 500;
} */

.cta-button:hover, .cta-button-small:hover {
    /* make box shadow smaller than in the .cta-button, .cta-button-small */
    box-shadow: 0 1px 1px rgba(0,0,0,.05), 0 2px 5px rgba(0,0,0,.06);
    -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05), 0 2px 5px rgba(0,0,0,.06);
    -moz-box-shadow: 0 1px 1px rgba(0,0,0,.05), 0 2px 5px rgba(0,0,0,.06);
    transform: scale(0.98);

    /* background: var(--accent-gradient-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px); */
    /* -webkit-box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 6px 14px rgba(0,0,0,.08);
    box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 6px 14px rgba(0,0,0,.08); */
}

/* Delicate, natural-looking elevation */
.shadow-delicate {
    /* Legacy prefix (harmless on modern browsers) */
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 3px 8px rgba(0,0,0,.06);
            box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 3px 8px rgba(0,0,0,.06);
    transition: box-shadow 160ms ease;
    /* Prevent background from bleeding into the shadow on rounded corners */
    background-clip: padding-box;
  }
  
  /* Slight lift on hover/focus (still delicate) */
  .shadow-delicate:hover,
  .shadow-delicate:focus-within {
    -webkit-box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 6px 14px rgba(0,0,0,.08);
            box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 6px 14px rgba(0,0,0,.08);
  }

/* Hero Section */
.hero {
    position: relative;
    padding: 120px 0 80px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-image-mobile {
    display: none;
}

.hero-image-desktop {
    display: block;
}

@media (max-width: 768px) {
    .hero-image-mobile {
        display: block;
    }
    
    .hero-image-desktop {
        display: none;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(248, 249, 250, 0.9) 100%);
    z-index: 2;
}

.hero .container {
    position: relative;
    z-index: 3;
}

.hero-title {
    font-size: var(--font-size-6xl);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

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

.hero-subtitle {
    font-size: var(--font-size-lg);
    font-weight: 400;
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
}
.why-us-subtitle {
    font-size: var(--font-size-lg);
    font-weight: 400;
    margin-bottom: var(--spacing-xl);
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
    text-align: center;
}

/* Sections */
.how-it-works,
.why-us {
    padding: 80px 0;
}

.how-it-works {
    background: var(--bg-primary);
}

.why-us {
    background: var(--bg-secondary);
}

.how-it-works h2,
.why-us h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.step {
    text-align: center;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(14, 50, 93, 0.1);
}

/* .step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
} */

.step-number {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin: 0 auto 1rem;
}

/* Benefits */
.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.benefit {
    text-align: center;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(14, 50, 93, 0.1);
}

/* .benefit:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
} */

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

/* CTA Sections */
.cta-section {
    text-align: center;
    margin-top: 2rem;
}

/* Footer */
.footer {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(14, 50, 93, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8)), url('ekspert_mieszkaniowy_logo_pion.svg');
    background-repeat: no-repeat, no-repeat;
    background-position: center, center;
    background-size: cover, contain;
}

/* footer content on mobile
 */
@media (max-width: 768px) {
    .footer-content {
        background-image: linear-gradient(rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.97)), url('ekspert_mieszkaniowy_logo_pion.svg')
    }
}

.footer-content-b {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    color: var(--accent-primary);
    /* margin-bottom: 1rem; */
    font-weight: 600;
}

.footer-contact, .footer-partners h4 {
    color: var(--accent-primary);
    /* margin-bottom: 1rem; */
    font-weight: 600;
}

.footer-contact-b, .footer-partners-b h4 {
    color: var(--accent-primary);
    /* margin-bottom: 1rem; */
    font-weight: 600;
}

.footer-partners a {
    text-decoration: none;
    color: var(--text-primary);
}

.footer-partners-b a {
    text-decoration: none;
    color: var(--text-primary);
}

.footer-logo-b {
    display: flex;
    justify-content: center;
    align-items: center;
    /* make logo transparent */
    /* opacity: 0.3; */
}

/* .footer-partners-b {
    text-align: right;
} */

/* Center footer contact and partners sections */
.footer-contact,
.footer-partners {
    text-align: center;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(14, 50, 93, 0.1);
    color: var(--text-muted);
    font-weight: 400;
}

.footer-bottom a {
    color: var(--accent-secondary);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--accent-secondary);
    text-decoration: none;
}

.footer-privacy-rules a {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 600;
}

/* Testimonials */
.testimonials {
    padding: 80px 0;
    background: var(--bg-primary);
}

.testimonials + .testimonials {
    background: var(--bg-secondary);
}

.testimonials h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.testimonial-slider {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
}

.box-shadow {
    box-shadow: 1px 8px 24px -6px rgba(0,0,0,0.4);
    -webkit-box-shadow: 1px 8px 24px -6px rgba(0,0,0,0.4);
    -moz-box-shadow: 1px 8px 24px -6px rgba(0,0,0,0.4);
}

.testimonial-track-wrapper {
    overflow: hidden;
    /* box-shadow: 6px 14px 35px -6px rgba(0,0,0,0.75);
    -webkit-box-shadow: 6px 14px 35px -6px rgba(0,0,0,0.75);
    -moz-box-shadow: 6px 14px 35px -6px rgba(0,0,0,0.75); */
    border-radius: 10px 10px 10px 10px;
   -webkit-border-radius: 10px 10px 10px 10px;
   -moz-border-radius: 10px 10px 10px 10px;
}

.testimonial-track {
    display: flex;
    transition: transform var(--transition-normal);
    will-change: transform;
}

.testimonial-card {
    flex: 0 0 100%;
    padding: 2rem;
    background: var(--bg-primary);
    border: 1px solid rgba(14, 50, 93, 0.1);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.testimonial-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow);
}

.testimonial-quote {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.testimonial-author {
    font-weight: 600;
    color: var(--accent-secondary);
}

.testimonial-card-simple {
    background: var(--bg-secondary);
}

/* Design-specific tweaks for the simple testimonials variant */
.testimonials-simple h2 {
    margin-bottom: 2.5rem;
}

.testimonials-simple {
    /* cover the background image */
    background: var(--bg-primary) url('assets/testimoials_background.png') center center no-repeat;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%; /* stretches to fill width & height */
    background: var(--bg-primary) url('assets/testimoials_background.png') center center no-repeat;
    background-size: 100% 100%; /* stretches to fill width & height */
}

.testimonials-simple .testimonial-slider {
    gap: 2rem;
}

.testimonials-simple .slider-btn {
    background: transparent;
    border: 2px solid var(--accent-secondary);
    color: var(--accent-secondary);
    width: 52px;
    height: 52px;
}

.testimonials-simple .slider-btn:hover {
    background: var(--bg-primary);
}

.testimonials-simple .testimonial-card {
    position: relative;
    padding: 3rem 2.5rem 2.25rem;
    background: #f6fafc; /* subtle light blue */
    border: 1px solid rgba(14, 50, 93, 0.08);
    box-shadow: 0 18px 40px rgba(14, 50, 93, 0.08);
}

.testimonials-simple .testimonial-card::before {
    content: '“';
    position: absolute;
    top: 18px;
    left: 22px;
    font-size: 54px;
    line-height: 1;
    color: var(--accent-primary);
    opacity: 1;
    font-weight: 700;
    font-family: var(--font-family);
}

.testimonials-simple .testimonial-quote {
    font-size: 1.125rem;
}

.testimonials-simple .slider-dots {
    margin-top: 1.25rem;
}

.slider-btn {
    background: var(--bg-primary);
    color: var(--accent-secondary);
    border: 1px solid rgba(14, 50, 93, 0.15);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.slider-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.slider-dots {
    grid-column: 1/-1;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(14, 50, 93, 0.25);
    border: 0;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot[aria-current="true"] {
    background: var(--accent-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2.5rem; /* 4xl */
    }
    
    .hero-subtitle {
        font-size: 1rem; /* base */
    }
    
    .contact-form {
        padding: 1.5rem 1.5rem 1em;
        margin: 0 15px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    /* Collapse nav into a dropdown */
    .nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: center;
        gap: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid rgba(14, 50, 93, 0.1);
        box-shadow: var(--shadow);
        overflow: hidden;
        max-height: 0;
        transition: max-height var(--transition-normal);
    }

    .nav.is-open {
        max-height: 85vh; /* ensure full menu is visible on mobile */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav a {
        padding: 14px 16px;
        border-top: 1px solid rgba(14, 50, 93, 0.06);
        text-align: center;
        width: 100%;
    }

    .nav a.cta-button-small {
        margin: 8px 16px 12px;
        text-align: center;
        width: auto;
    }
    
    h1 {
        font-size: 2.25rem; /* 4xl */
    }
    
    h2 {
        font-size: 1.875rem; /* 3xl */
    }
    
    h3 {
        font-size: 1.5rem; /* 2xl */
    }
    
    .steps,
    .benefits {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-content-b {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .slider-btn {
        width: 38px;
        height: 38px;
    }
}

/* Hide small inline SVG icons (email/phone) on mobile */
@media (max-width: 768px) {
    svg.w-4.h-4.inline.mr-2 { display: none; }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem; /* 3xl */
    }
    
    .contact-form {
        padding: 1rem 1rem 1em;
    }
    
    .how-it-works,
    .why-us {
        padding: 60px 0;
    }
    
    h1 {
        font-size: 1.875rem; /* 3xl */
    }
    
    h2 {
        font-size: 1.5rem; /* 2xl */
    }
    
    h3 {
        font-size: 1.25rem; /* xl */
    }
}

.partner-logo-image {
    max-height: 2rem;
    width: auto;
}

.partner-logo-container {
    padding: 0.5rem;
}

/* Tablet layout tweaks: keep key sections in a single row */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Make sure the navbar fits on one line */
    .header .container { gap: 1rem; }
    .logo { height: 2.6rem; }
    .nav { gap: 1rem; flex-wrap: nowrap; }
    .nav a { font-size: 0.95rem; white-space: nowrap; }
    .nav a.cta-button-small { padding: 10px 16px; font-size: 0.95rem; white-space: nowrap; }

    /* Force 3-up grids for cards/benefits on tablets */
    .steps { grid-template-columns: repeat(3, 1fr); }
    .benefits { grid-template-columns: repeat(3, 1fr); }

    /* Keep footer sections in a single row */
    .footer-content-b { grid-template-columns: repeat(3, 1fr); }
}

/* Footer contact links: remove underline */
#footer-email,
#footer-email:visited,
#footer-email:hover,
#footer-email:active,
#footer-phone,
#footer-phone:visited,
#footer-phone:hover,
#footer-phone:active {
    text-decoration: none;
    color: inherit;
}
