/* ==========================================================================
   CodeB.pl - Professional IT Services Website
   Mobile-first responsive design
   ========================================================================== */

/* CSS Variables */
:root {
    /* Colors - Professional Blue Theme */
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --container-max: 1200px;
    --section-padding: 4rem 1rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn--primary:hover {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn--secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn--secondary:hover {
    border-color: var(--primary-600);
    color: var(--primary-600);
}

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

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

.btn--full {
    width: 100%;
}

.btn svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav__logo img {
    height: 36px;
    width: auto;
}

.nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--white);
    padding: 5rem 2rem 2rem;
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    z-index: 100;
}

.nav__menu.show-menu {
    right: 0;
}

.nav__list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav__link {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: color var(--transition-fast);
}

.nav__link:hover {
    color: var(--primary-600);
}

.nav__cta {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-600);
    color: var(--white) !important;
    border-radius: var(--radius-md);
    text-align: center;
}

.nav__cta:hover {
    background: var(--primary-700);
    color: var(--white) !important;
}

.nav__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
}

.nav__toggle {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-700);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding: 7rem 0 4rem;
    background: linear-gradient(180deg, var(--primary-50) 0%, var(--white) 100%);
}

.hero__container {
    display: grid;
    gap: 3rem;
}

.hero__badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-100);
    color: var(--primary-700);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

.hero__title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.hero__description {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.hero__stat {
    text-align: center;
}

.hero__stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-600);
}

.hero__stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.hero__image {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */
.section__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section__badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-100);
    color: var(--primary-700);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

.section__title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.section__description {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */
.services {
    padding: var(--section-padding);
    background: var(--white);
}

.services__grid {
    display: grid;
    gap: 2rem;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--gray-100);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-card__image {
    height: 200px;
    overflow: hidden;
}

.service-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.service-card:hover .service-card__image img {
    transform: scale(1.05);
}

.service-card__content {
    padding: 1.5rem;
}

.service-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-100);
    color: var(--primary-600);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.service-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.service-card__description {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.service-card__features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-card__features li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.service-card__features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    background: var(--primary-600);
    border-radius: 50%;
}

/* ==========================================================================
   MICROSOFT 365 SECTION
   ========================================================================== */
.m365 {
    padding: var(--section-padding);
    background: var(--gray-50);
}

.m365__content {
    display: grid;
    gap: 3rem;
    align-items: center;
}

.m365__intro {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.m365__features {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.m365__feature {
    display: flex;
    gap: 1rem;
}

.m365__feature-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-100);
    color: var(--primary-600);
    border-radius: var(--radius-md);
}

.m365__feature h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.m365__feature ul {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.m365__feature li {
    font-size: 0.9375rem;
    color: var(--gray-600);
    position: relative;
    padding-left: 1.25rem;
}

.m365__feature li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.m365__image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.m365__image img {
    max-width: 300px;
}

/* ==========================================================================
   CLIENTS & PARTNERS SECTIONS
   ========================================================================== */
.clients, .partners {
    padding: var(--section-padding);
}

.clients {
    background: var(--white);
}

.partners {
    background: var(--gray-50);
}

.clients__grid, .partners__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

.client-logo, .partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    min-height: 100px;
}

.client-logo:hover, .partner-logo:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.client-logo img, .partner-logo img {
    max-height: 60px;
    max-width: 150px;
    object-fit: contain;
    transition: all var(--transition-base);
}

/* Klienci - w szarości */
.client-logo img {
    filter: grayscale(100%);
    opacity: 0.7;
}

.client-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Technologie - pełny kolor */
.partner-logo img {
    opacity: 0.85;
}

.partner-logo:hover img {
    opacity: 1;
    transform: scale(1.05);
}

/* ==========================================================================
   CTA SECTION
   ========================================================================== */
.cta {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
}

.cta__content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta__title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.cta__description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact {
    padding: var(--section-padding);
    background: var(--white);
}

.contact__content {
    display: grid;
    gap: 3rem;
}

.contact__form {
    display: grid;
    gap: 1.5rem;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form__input {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    background: var(--white);
}

.form__input:focus {
    outline: none;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.form__input::placeholder {
    color: var(--gray-400);
}

.form__textarea {
    min-height: 150px;
    resize: vertical;
}

.form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
}

.form__checkbox input {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-600);
}

.form__checkbox a {
    color: var(--primary-600);
    text-decoration: underline;
}

.contact__info {
    display: grid;
    gap: 1rem;
}

.contact__card {
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    text-align: center;
}

.contact__card--highlight {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: var(--white);
}

.contact__card--highlight h4, .contact__card--highlight p {
    color: var(--white);
}

.contact__card--highlight .contact__card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.contact__card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-100);
    color: var(--primary-600);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.contact__card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.contact__card a, .contact__card p {
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.contact__card a:hover {
    color: var(--primary-600);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    padding: 3rem 0 1.5rem;
    background: var(--gray-900);
    color: var(--gray-400);
}

.footer__content {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer__brand img {
    height: 36px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer__brand p {
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer__links h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1rem;
}

.footer__links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__links a {
    font-size: 0.9375rem;
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

.footer__links a:hover {
    color: var(--white);
}

.footer__bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
}

.footer__bottom p {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.footer__legal {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer__legal a {
    font-size: 0.875rem;
    color: var(--gray-400);
}

.footer__legal a:hover {
    color: var(--white);
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary-600);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 99;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-700);
    transform: translateY(-3px);
}

/* ==========================================================================
   RESPONSIVE - TABLET (768px+)
   ========================================================================== */
@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero {
        padding: 9rem 0 5rem;
    }
    
    .hero__title {
        font-size: 3rem;
    }
    
    .hero__stats {
        max-width: 400px;
    }
    
    .section__title {
        font-size: 2.25rem;
    }
    
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .m365__features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .clients__grid, .partners__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact__form {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form__group--full {
        grid-column: span 2;
    }
    
    .contact__info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer__content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
    
    .footer__bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .footer__bottom p {
        margin-bottom: 0;
    }
    
    .cta__title {
        font-size: 2.25rem;
    }
}

/* ==========================================================================
   RESPONSIVE - DESKTOP (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
    .nav__menu {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        box-shadow: none;
        background: transparent;
    }
    
    .nav__list {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
    
    .nav__link {
        font-size: 0.9375rem;
    }
    
    .nav__close, .nav__toggle {
        display: none;
    }
    
    .hero__container {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
    
    .hero__title {
        font-size: 3.5rem;
    }
    
    .section__title {
        font-size: 2.5rem;
    }
    
    .services__grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .service-card__image {
        height: 180px;
    }
    
    .m365__content {
        grid-template-columns: 1.5fr 1fr;
    }
    
    .clients__grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .partners__grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .contact__content {
        grid-template-columns: 1.5fr 1fr;
    }
    
    .contact__info {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Scroll animations - elements hidden by default */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   DEVOPS SECTION - ADDITIONAL STYLES
   ========================================================================== */
.devops {
    padding: var(--section-padding);
    background: linear-gradient(180deg, var(--primary-50) 0%, var(--white) 100%);
}

.service-card--featured {
    background: var(--white);
    border: 2px solid var(--primary-100);
}

.service-card--featured:hover {
    border-color: var(--primary-300);
}

.service-card--featured .service-card__content {
    padding: 2rem;
}

.service-card--featured .service-card__icon {
    width: 56px;
    height: 56px;
}

.service-card__icon--aws { background: #FF9900; color: white; }
.service-card__icon--k8s { background: #326CE5; color: white; }
.service-card__icon--gitops { background: #F05032; color: white; }
.service-card__icon--iac { background: #7B42BC; color: white; }
.service-card__icon--docker { background: #2496ED; color: white; }
.service-card__icon--monitoring { background: #E6522C; color: white; }

/* Partners Grid - Large variant */
.partners__grid--large {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .partners__grid--large {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .partners__grid--large {
        grid-template-columns: repeat(6, 1fr);
    }
}

.partners__grid--large .partner-logo {
    min-height: 80px;
    padding: 1rem;
}

.partners__grid--large .partner-logo img {
    max-height: 50px;
    max-width: 100px;
}

/* DevOps services grid - 3 columns on tablet */
@media (min-width: 768px) {
    .devops .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .devops .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* IT services - 4 columns */
@media (min-width: 1024px) {
    .services .services__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
