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

:root {
    --primary-green: #6b9080;
    --dark-green: #4a6b5e;
    --bg-dark: #2c2c2e;
    --bg-darker: #1c1c1e;
    --bg-card: #3a3a3c;
    --text-primary: #e5e5e7;
    --text-secondary: #b8b8ba;
    --text-muted: #8e8e93;
    --accent: #7d9d8b;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(107, 144, 128, 0.15);
    transition: var(--transition);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 2.25rem;
    font-weight: 700;
    font-family: "Megrim", system-ui;
}

.logo img {
    height: auto;
    width: 60px;
    filter: brightness(0) invert(1); 
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-green);
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-green);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.btn-contact {
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    border-radius: 8px;
    color: white !important;
}

.btn-contact::after {
    display: none;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

/* Tło dla orientacji wertykalnej (domyślne) */
.hero-bg {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('bg.webp');
    background-position: center;
    opacity: 0.4;
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('bg.webp');
    background-size: 100% 100%;
    z-index: 0;
    opacity: 0.4;
}

/* Tło dla orientacji horyzontalnej */
@media (orientation: landscape) {
    .hero-bg {
        background-image: url('bgH.webp');
    }

    .hero-bg::after {
        background-image: url('bgH.webp');
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    padding: 2rem 1rem 2rem 1rem;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-green), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 700px;
    opacity: 0;
    min-height: 5rem;
    line-height: 1.6;
}

.hero-subtitle.typing::after {
    content: '|';
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
    opacity: 0;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-green);
}

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

/* Section Common Styles */
section {
    padding: 6rem 0;
    position: relative;
}

section > .container {
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
}

/* Solutions Section */
.solutions {
    background: var(--bg-dark);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.solution-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(107, 144, 128, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent));
    transform: scaleX(0);
    transition: var(--transition);
}

.solution-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-green);
}

.solution-card:hover::before {
    transform: scaleX(1);
}

.solution-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(107, 144, 128, 0.25), rgba(125, 157, 139, 0.25));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-green);
}

.solution-card h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.solution-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.solution-features {
    list-style: none;
    padding: 0;
}

.solution-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    color: var(--text-muted);
    position: relative;
}

.solution-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
}

/* About Section */
.about {
    background: var(--bg-darker);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(107, 144, 128, 0.1);
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-card.highlight {
    background: linear-gradient(135deg, rgba(107, 144, 128, 0.15), rgba(125, 157, 139, 0.15));
    border: 1px solid var(--primary-green);
}

.about-icon {
    color: var(--primary-green);
    margin-bottom: 1.5rem;
}

.about-card h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Contact Section */
.contact {
    background: var(--bg-dark);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.contact-item a {
    color: var(--text-secondary) !important;
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover,
.contact-item a:active {
    color: var(--primary-green) !important;
}

.contact-form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(107, 144, 128, 0.2);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Odstępy dla zagnieżdżonych form-group wewnątrz full-width */
.form-group.full-width > .form-group {
    margin-bottom: 1.5rem;
}

.form-group.full-width > .form-group:last-of-type {
    margin-bottom: 0;
}

/* Labels (zwykłe i dla sekcji) */
.form-group label,
.form-section-label {
    display: block;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.875rem;
    background: var(--bg-dark);
    border: 1px solid rgba(107, 144, 128, 0.25);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    width: 100%;
}

.form-group select {
    cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(107, 144, 128, 0.1);
}

.form-group input:hover:not(:focus),
.form-group textarea:hover:not(:focus),
.form-group select:hover:not(:focus) {
    border-color: rgba(107, 144, 128, 0.35);
}

/* Placeholder styling */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Validation styling - error state */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: #1cf300;
    border-width: 2px;
}

/* Error state focus - keep red border when focused */
.form-group.error input:focus,
.form-group.error textarea:focus,
.form-group.error select:focus {
    border-color:#1cf300;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.form-group.error label,
.form-group.error .form-section-label {
    color:#1cf300;
}

/* Error state for checkbox and radio groups */
.form-group.error .checkbox-group,
.form-group.error .radio-group {
    border-color:#1cf300;
    border-width: 2px;
}

/* Custom error message */
.field-error-message {
    display: block;
    color:#1cf300;
    font-size: 0.875rem;
    margin-top: 0.375rem;
    padding-left: 0.25rem;
    font-weight: 500;
}

/* Checkbox and Radio Groups */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0rem;
    padding: 0.875rem;
    background: var(--bg-dark);
    border: 1px solid rgba(107, 144, 128, 0.25);
    border-radius: 8px;
    transition: var(--transition);
}

.checkbox-group:hover,
.radio-group:hover {
    border-color: rgba(107, 144, 128, 0.35);
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-label:hover,
.radio-label:hover {
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-green);
}

/* Form message */
.form-message {
    grid-column: 1 / -1;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    display: none;
    font-size: 0.95rem;
    line-height: 1.6;
}

.form-message.success {
    display: block;
    background: rgba(107, 144, 128, 0.15);
    color: var(--primary-green);
    border: 1px solid rgba(107, 144, 128, 0.4);
}

.form-message.error {
    display: block;
    background: rgba(220, 53, 69, 0.15);
    color: #ff8a8a;
    border: 1px solid rgba(220, 53, 69, 0.4);
}

.contact-form .btn-primary {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 1rem;
    padding: 1.125rem 2rem;
}

.contact-form .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.contact-form h3 {
    grid-column: 1 / -1;
}

.contact-form h4 {
    color: var(--text-primary);
    font-size: 1.125rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 0.25rem;
}

/* Odstępy między sekcjami formularza */
.form-group.full-width > h4 {
    margin-top: 1.5rem;
}

.form-group.full-width:first-of-type > h4 {
    margin-top: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid rgba(107, 144, 128, 0.2);
    text-align: center;
    max-width: 600px;
    width: 90%;
    animation: slideUp 0.4s ease-out;
    position: relative;
}

.modal-content .thank-you-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, rgba(107, 144, 128, 0.25), rgba(125, 157, 139, 0.25));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content h2 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.modal-content .countdown {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid rgba(107, 144, 128, 0.15);
    padding: 3rem 0 1.5rem;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateZ(-50px);
    }
    to {
        opacity: 1;
        transform: translateZ(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(28, 28, 30, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

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

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

    .contact-form {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
    }
    
    .contact-form h3 {
        font-size: 1.25rem;
    }
    
    .form-group label,
    .form-section-label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .checkbox-group,
    .radio-group {
        gap: 0.75rem;
    }

    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    section {
        padding: 4rem 0;
    }
    
    .contact-form {
        padding: 1.5rem 1rem;
        gap: 1.25rem;
    }
    
    .contact-form h3 {
        font-size: 1.125rem;
    }
    
    .contact-form h4 {
        font-size: 1rem;
    }
    
    .form-group label,
    .form-section-label {
        font-size: 0.875rem;
    }
    
    .contact-form .btn-primary {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
    }
    
    .modal-content .thank-you-icon {
        width: 60px;
        height: 60px;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }
    
    .modal-content p {
        font-size: 0.95rem;
    }
}