/* 
   DEXBUD DAWID KOŁAKOWSKI - Style Arkusz CSS
   Projekt: Strona Firmowa
   Standard: Mobile-first, Flexbox/Grid
*/

:root {
    --primary-color: #003366; /* Navy Blue */
    --accent-color: #ff6600;  /* Action Orange */
    --text-color: #333;
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --gray: #777;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 0;
}

/* Header & Navigation */
header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Logo Component */
.logo__link {
    color: var(--white);
    text-decoration: none;
}

.logo__main-text {
    line-height: 1.5rem;
}

.logo__sub-text {
    font-size: 50%;
    line-height: 100%;
}

.nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: fixed;
    top: 60px;
    left: -100%;
    background: var(--primary-color);
    padding: 40px 0;
    transition: transform 0.5s ease;
    height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 999;
    align-items: center; /* Wyśrodkowanie kontenera linków na ekranie */
    list-style: none;
}

.nav-links.active {
    transform: translateX(100%);
}

.nav-links li {
    font-size: 1.2rem;
    padding: 15px 0;
    width: 250px; /* Stała szerokość kontenera dla wyrównania tekstu do lewej */
    text-align: left;
}

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

.nav-links a:hover {
    color: var(--accent-color);
}

/* Menu Mobilne (Hamburger) */
.menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center; /* Wyśrodkowanie pasków */
    cursor: pointer;
    z-index: 1001;
    transition: var(--transition);
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--white);
    margin: 5px 0;
    transition: var(--transition);
    transform-origin: center; /* Punkt obrotu na środku */
}

/* Animacja Hamburgera do X */
.menu-toggle.active span:nth-child(1) {
    width: 42.4px;
    transform: translateY(13px) rotate(45deg);
    background: var(--accent-color);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    width: 42.4px;
    transform: translateY(-13px) rotate(-45deg);
    background: var(--accent-color);
}

/* Hero Section - Wspólne style */
.hero {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../img/image01.jpeg');
}

.hero-short {
    height: 40vh;
}

/* Tła dla poszczególnych podstron */
.hero-home {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../img/image01.jpeg');
}

.hero-subpage {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../img/image01.jpeg');
}


.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: float 5s ease-in-out infinite;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: float 5s ease-in-out infinite;
    animation-delay: 0.5s;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #e65c00;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #d32f2f;
}

.btn-danger:hover {
    background-color: #b71c1c;
}

.btn-secondary {
    background-color: #6c757d;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Sections */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Grid for Services */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-sm-cards {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 10px;
    transition: var(--transition);
    border-bottom: 4px solid var(--primary-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 50px;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

.list-unstyled {
    list-style: none;
    padding-left: 0;
}

.footer-link {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--accent-color);
}

/* Media Queries for Mobile */
@media (max-width: 1250px) {
    .hero h1 {
        font-size: 1.8rem;
    }
}

.filter-menu {
    margin-bottom: 2rem;
    text-align: center;
}
.filter-menu ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.filter-menu a {
    display: inline-block;
    padding: 10px 20px;
    background: #f4f4f4;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.filter-menu a.active {
    background: #777777; /*rgba(255, 102, 0, 0.7);  Mniej intensywny pomarańcz dla aktywnego */
    color: #fff;
}
.filter-menu a:hover {
    background: var(--accent-color); /* Pełny kolor przy najechaniu */
    color: #fff;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 3rem;
}

.gallery-empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    height: 250px;
    background: #eee;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.9);
    cursor: pointer;
    user-select: none;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 95%;
    max-height: 90vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 3px solid #fff;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close {
    top: 15px;
    right: 35px;
}

.lightbox-prev, .lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
    color: var(--accent-color);
    background: rgba(0,0,0,0.5);
}

@media (max-width: 700px) {
    .lightbox-content {
        width: 95%;
    }
    .lightbox-prev, .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 25px;
        padding: 10px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .gallery-item {
        height: 150px;
    }
}

/* Utilities */
.text-accent {
    color: var(--accent-color);
}

.learn-more-link {
    color: var(--accent-color);
    font-weight: bold;
    text-decoration: none;
    transition: var(--transition);
}

.learn-more-link:hover {
    text-decoration: underline;
}

.bg-light {
    background-color: var(--light-bg);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-50 {
    margin-top: 50px;
}

.mt-1 {
    margin-top: 1rem;
}

/* Page: Sprzątanie */
.hero-sprzatanie {
    background-color: #0288d1;
}

.content-container-medium {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.lead-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.checklist {
    list-style-type: none;
    padding-left: 20px;
}

.checklist-item {
    margin-bottom: 10px;
}

/* Page: Kontakt */
.grid-2-cols {
    grid-template-columns: 1fr 1fr;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.form-input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit; /* Ensure consistent font */
}

.contact-form textarea.form-input {
    min-height: 100px;
    resize: vertical; /* Allow user to resize */
}

.form-gdpr-consent {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--gray);
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.form-gdpr-consent label {
    display: flex;
    align-items: start;
    gap: 10px;
}

.form-gdpr-consent input[type="checkbox"] {
    margin-top: 4px;
}

.form-gdpr-consent a {
    color: var(--primary-color);
}

/* Page: DDD */
.hero-ddd {
    background-color: #004d40;
}

/* Admin Panel Styles */
.admin-panel-wrapper {
    padding: 2rem 0; /* Let container handle horizontal padding */
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.success-message {
    color: green;
    margin-bottom: 1rem;
}

.link-danger {
    color: red;
}

.news-list {
    margin-top: 1.5rem;
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
}

.news-actions a {
    margin-left: 1rem;
}

.image-preview-small {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #eee;
}

.gallery-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.gallery-edit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Article Cards for News Page */
.article-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.article-image-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-image-wrapper {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.article-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-image-wrapper:hover img {
    transform: scale(1.05);
}

.article-card-content {
    padding: 1.5rem;
}

.article-card-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-align: center;
}

.article-card-content small {
    color: var(--gray);
    margin-bottom: 1rem;
    display: block;
}

.article-card-body {
    line-height: 1.7;
}

@media (min-width: 768px) {
    .article-card {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: center;
    }
}

/* Scoped styles for narrow content */
.content-narrow {
    max-width: 450px;
    margin: 2rem auto;
}
