:root {
    --primary-color: #0052CC;
    --primary-hover: #0747A6;
    --text-color: #172B4D;
    --background: #F4F5F7;
    --card-background: #FFFFFF;
    --input-border: #DFE1E6;
    --input-focus: #4C9AFF;
    --success-color: #36B37E;
    --error-color: #FF5630;
    --muted-text: #5E6C84;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: var(--card-background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--input-border);
}

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

.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    height: 80px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(0, 82, 204, 0.1);
}

/* Updated Dropdown Styles */
.nav-item {
    position: relative;
}

.has-dropdown .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: 2rem;
}

.arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
    transition: var(--transition);
}

.has-dropdown:hover .arrow {
    transform: translateY(-30%) rotate(-135deg);
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--card-background);
    min-width: 300px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 0.5rem;
    z-index: 1000;
    transition: all 0.3s ease;
    pointer-events: none;
}

.has-dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-content:before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}

.dropdown-item {
    display: block;
    text-decoration: none;
    padding: 1rem;
    color: var(--text-color);
    border-radius: 6px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: rgba(0, 82, 204, 0.1);
}

.nav-item:nth-last-child(2) .dropdown-content, /* O NAMA */
.nav-item:last-child .dropdown-content { /* KONTAKT */
    left: auto;
    right: 0;
    transform: translateY(-10px);
}

.nav-item:nth-last-child(2):hover .dropdown-content,
.nav-item:last-child:hover .dropdown-content {
    transform: translateY(0);
}

.has-dropdown {
    transition-delay: 0.1s;
}

.has-dropdown:hover {
    transition-delay: 0s;
}

.has-dropdown .dropdown-content {
    transition: visibility 0s linear 0.3s, opacity 0.3s ease, transform 0.3s ease;
}

.has-dropdown:hover .dropdown-content {
    transition-delay: 0.1s;
}

.dropdown-text h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--text-color);
    text-transform: uppercase;
}

.dropdown-text p {
    font-size: 0.8125rem;
    color: var(--muted-text);
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .dropdown-content {
        visibility: visible;
        opacity: 1;
        position: static;
        transform: none;
        box-shadow: none;
        pointer-events: auto;
        padding-left: 2rem;
        min-width: 100%;
        display: none;
    }

    .has-dropdown:hover .dropdown-content {
        transform: none;
        display: block;
    }

    .nav-item:nth-last-child(2) .dropdown-content,
    .nav-item:last-child .dropdown-content {
        transform: none;
        left: 0;
        right: auto;
    }
}

@media (max-width: 1200px) {
    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }
}

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

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 1rem 0;
        gap: 0;
    }

    .nav-link {
        padding: 1rem;
        text-align: left;
    }

    .has-dropdown .nav-link {
        padding-right: 3rem;
    }

    .dropdown-content {
        margin: 0;
        padding: 0 1rem;
    }

    .dropdown-item {
        padding: 0.75rem 1rem;
    }

    .arrow {
        right: 1.5rem;
    }

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

/* Modern Form Styles */
.contact-form-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-header h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.form-header p {
    color: #666;
    font-size: 1.1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    padding: 0 0.5rem;
    color: #666;
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: transparent;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1);
    outline: none;
}

.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label {
    top: -0.5rem;
    left: 0.8rem;
    font-size: 0.85rem;
    color: var(--primary-color);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.submit-button {
    grid-column: span 2;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-button:hover {
    background: #0045a5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 82, 204, 0.2);
}

.submit-button:active {
    transform: translateY(0);
}

/* Floating label animation */
.form-control::placeholder {
    color: transparent;
}

/* Success message styles */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 5px;
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid #c3e6cb;
    max-width: 100%;
    box-sizing: border-box;
}

.success-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Error styles */
.error {
    border-color: #ff3d00;
}

.error-message {
    color: #ff3d00;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.error + .error-message {
    display: block;
}

.message-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.message-result.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-result.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer Styles */
.footer {
    background: #003366;
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.footer-links-grid {
    display: grid;
    gap: 0.75rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: white;
}

.footer-link-icon {
    font-size: 1.25rem;
}

.contact-info-grid {
    display: grid;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 1rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-link {
        justify-content: center;
    }
    
    .contact-item {
        justify-content: center;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .contact-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .contact-info h1 {
        font-size: 1.75rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .social-links,
    .contact-item {
        justify-content: center;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .footer-links a {
        margin: 0;
    }

    .contact-info-grid {
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Loading animation */
.loading-spinner {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.submit-button.loading .loading-spinner {
    display: block;
}

.submit-button.loading span {
    opacity: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

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

    .submit-button {
        grid-column: auto;
    }

    .contact-form-container {
        margin: 2rem;
        padding: 1.5rem;
    }

    .form-header h2 {
        font-size: 2rem;
    }
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 1rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-link {
        justify-content: center;
    }
    
    .contact-item {
        justify-content: center;
    }
}
