/* MASDAR - Main Stylesheet* /

/* 1. RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

body {
    font-family: Arial, sans-serif;
    background-color: white;
    color: black;
    line-height: 1.6;
    min-height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* =============================================================================
   2. LAYOUT & UTILITIES
   ============================================================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%
}

main {
    flex: 1;
    min-height: calc(100vh - 140px);
    padding: 2rem 0 0 0;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

.page-transition {
    animation: fadeInUp 0.3s ease-out;
}

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

/* Color utilities */
.green-text {
    color: #28a745;
    font-weight: 600;
}

/* =============================================================================
   3. BUTTONS & INTERACTIVE ELEMENTS
   ============================================================================= */
.btn {
    display: inline-block;
    background-color: #2E86AB;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #00963b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* =============================================================================
   4. HEADER & NAVIGATION
   ============================================================================= */
header {
    background: linear-gradient(135deg, white 35%, #2E86AB);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    /* Add these properties for sharper rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated; /* For pixel art */
    /* Or for smooth scaling: */
    image-rendering: auto;
    image-rendering: smooth;
}

.logo a {
    display: block;
    cursor: pointer;
}

.logo a:hover img {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: black;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(255,255,255,0.2);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =============================================================================
   5. HOME PAGE COMPONENTS
   ============================================================================= */

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

/* Carousel */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    text-align: center;
    padding: 4rem 2rem;
}

.carousel-slide h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.carousel-slide p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-btn {
    background: #2E86AB;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s;
}

.carousel-btn:hover {
    background: #1F5F85;
    transform: scale(1.1);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-arrow-left {
    transform: rotate(180deg);
    width: 20px;
    height: 20px;
}

.carousel-arrow-right {
    width: 20px;
    height: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    background: #2E86AB;
    transform: scale(1.2);
}

/* Statistics Section */
.stats-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 4rem 0;
    margin: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: #2E86AB;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 1.1rem;
}

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

/* Add loading animations */
@keyframes fadeInUpService {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card {
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: fadeInUpService 0.6s ease-out;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Background images */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: 1;
    transition: all 0.3s ease;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(255, 255, 255, 0.85) 40%,
        rgba(255, 255, 255, 0.95) 100%
    );
    z-index: 2;
    transition: all 0.3s ease;
}

.service-card:hover::before {
    filter: brightness(1.2) contrast(1.1);
    transform: scale(1.05);
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.service-card:hover::after {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.8) 40%,
        rgba(255, 255, 255, 0.7) 100%
    );
}

/* Ensure text is above overlays */
.service-card h3,
.service-card p,
.service-card .btn {
    position: relative;
    z-index: 3;
}

/* Very dark, bold text */
.service-card h3 {
    color: #1a1a1a !important; /* Very dark, force override */
    margin-bottom: 1rem;
    font-weight: 900; /* Extra bold */
    font-size: 1.2rem; /* Slightly larger */
    text-shadow: none;
}

.service-card p {
    color: #2d2d2d !important; /* Very dark */
    font-weight: 600; /* Semi-bold */
    text-shadow: none;
}

/* Make green text darker too */
.green-text {
    color: #1b5e20 !important; /* Much darker green */
    font-weight: 700;
}

.service-card .btn {
    margin-top: auto;
}

/* Hide service icons */
.service-icon {
    display: none;
}

/* Background images - CONSISTENT PATHS */
.service-card[data-bg="zwierzeta"]::before {
    background-image: url('../images/przejscie.jpg');
}

.service-card[data-bg="wysypiska"]::before {
    background-image: url('../images/wysypiska.jpg');
}

.service-card[data-bg="mundurowe"]::before {
    background-image: url('../images/sm.jpg');
}

.service-card[data-bg="logistyka"]::before {
    background-image: url('../images/monitoring-logistyki.jpg');
}

.service-card[data-bg="fotowoltaika"]::before {
    background-image: url('../images/monitoring-fotowoltaiki.jpg');
}

.service-card[data-bg="lasy"]::before {
    background-image: url('../images/monitoring-lasow.jpg');
}

/* Environmental service cards */
.service-card.environmental {
    border-left: 4px solid #28a745;
}

/* Green dot for environmental cards */
.service-card.environmental .green-text {
    position: relative;
}

/* Service Detail Pages */
.service-detail {
    background-color: #fff;
    padding: 3rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.service-detail h1 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.service-detail h2 {
    color: #28a745;
    margin: 2rem 0 1rem 0;
    font-size: 1.8rem;
}

.service-detail p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.service-detail ul {
    margin: 1rem 0 1.5rem 2rem;
}

.service-detail ul li {
    margin-bottom: 0.5rem;
}

.back-btn {
    background-color: #6c757d;
    margin-bottom: 2rem;
}

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

/* =============================================================================
   6. ABOUT PAGE
   ============================================================================= */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-header {
    text-align: center;
    margin-bottom: 0;
    padding: 3rem 0;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url("../images/o_nas_masdar.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.about-header h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.about-subtitle {
    font-size: 1.3rem;
    color: white;
    font-weight: 300;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.about-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.about-section {
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.about-section h3 {
    color: #2E86AB;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.about-section p {
    margin-bottom: 1.5rem;
    color: #444;
}

.intro-text {
    font-size: 1.25rem;
    color: #333;
    font-weight: 400;
    margin: 2rem 0;
}

.highlight-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2.5rem;
    margin: 3rem 0;
    border-radius: 8px;
    text-align: center;
}

.highlight-text {
    font-size: 1.2rem;
    color: #2E86AB;
    margin: 0;
    line-height: 1.6;
}

.team-signature {
    text-align: center;
    margin: 4rem 0 2rem 0;
    padding: 2rem;
    border-top: 1px solid #eee;
}

.team-signature p {
    font-size: 1.3rem;
    color: #2E86AB;
    margin: 0;
}

.partners-section {
    margin: 3rem 0 2rem 0;
    padding: 0 1rem;
}

.partners-section h3 {
    color: #28a745;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 500;
    text-align: center;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.partner-logo {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.partner-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.partner-logo img {
    max-width: 100%;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* =============================================================================
   7. MONITORING PAGE
   ============================================================================= */
.monitoring-hero {
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    margin-bottom: 0%;
    padding-bottom: 1%;
}

.monitoring-hero h1 {
    font-size: 2.5rem;
    color: #2E86AB;
    margin-bottom: 1rem;
    font-weight: 300;
}

.monitoring-hero p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.monitoring-hero h2 {
    font-size: 1.5rem;
    color: #333;
    margin: 2rem 0 1rem 0;
}

.monitoring-hero ul {
    list-style: none;
    padding: 0;
    max-width: 500px;
    margin: 0 auto 2rem auto;
}

.monitoring-hero li {
    padding: 0.5rem 0;
    color: #555;
    border-bottom: 1px solid #eee;
}

.monitoring-hero li:last-child {
    border-bottom: none;
}

.monitoring-header h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.monitoring-header p {
    font-size: 1.3rem;
    color: white;
    font-weight: 300;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.monitoring-header {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url("/images/oferta_background.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 5%;
    padding: 2rem 0;
    text-align: center;
}

/* Apple-style Grid */
.monitoring-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: auto;
    min-height: calc(100vh - 200px);
}

.monitoring-category {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.monitoring-category:hover {
    transform: scale(1.02);
}

/* Background images for categories */
#urzadzenia { background-image: url('images/urzadzenia-bg.jpg'); }
#mobilne { background-image: url('images/mobilne-bg.jpg'); }
#akumulatory { background-image: url('images/akumulatory-bg.jpg'); }
#odnawialne { background-image: url('images/odnawialne-bg.jpg'); }

/* Category overlay */
.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(46, 134, 171, 0.7), rgba(46, 134, 171, 0.5));
    transition: all 0.3s ease;
}

.monitoring-category:hover .category-overlay {
    background: linear-gradient(135deg, rgba(46, 134, 171, 0.8), rgba(46, 134, 171, 0.6));
}

/* Category content */
.category-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 80%;
}

.category-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    transition: transform 0.3s ease;
}

.monitoring-category:hover .category-content h2 {
    transform: translateY(-5px);
}

.category-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

/* =============================================================================
   8. CONTACT FORM
   ============================================================================= */
/* Contact header with background image */
.contact-header {
    text-align: center;
    margin-bottom: 0;
    padding: 3rem 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url("/images/kontakt.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.contact-header h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.contact-subtitle {
    font-size: 1.3rem;
    color: white;
    font-weight: 300;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

/* Contact Page Improvements */

/* Contact Information */
.contact-info {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #ddd;
}

.contact-info h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.contact-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.contact-item h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

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

.contact-item a {
    color: #007bff;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Enhanced Form Styling */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    visibility: hidden;
}

.contact-form h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2E86AB;
    box-shadow: 0 0 0 2px rgba(46, 134, 171, 0.2);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Checkbox styling */
.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.75rem;
    margin-top: 0.1rem;
}

/* Button styling */
.contact-form .btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.contact-form .btn:hover {
    background: #0056b3;
}

.form-note {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
    margin-bottom: 0;
}

.contact-item img {
    max-width: 270px; /* Adjust this value to make it smaller/larger */
    height: auto;
    display: block;
    margin: 0; /* Removes any automatic centering */
    text-align: left;
}

/* =============================================================================
   9. FOOTER
   ============================================================================= */
footer {
    background-color: #F8F8FF;
    color: black;
    padding: 2rem 0;
    margin-top: auto;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
}

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

.footer-section h4 {
    color: black;
    margin-bottom: 0.5rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
}

.logo-footer img {
    height: auto;
    width: auto;
    max-height: 40px;
    max-width: 200px;
    object-fit: contain;
}

/* =============================================================================
   10. RESPONSIVE DESIGN
   ============================================================================= */

/* Tablet and small desktop */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .monitoring-grid {
        height: auto;
        min-height: 250px;
    }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
    /* Navigation */
    .menu-toggle {
        display: block;
        color: #333; /* Changed from white to dark */
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white; /* Changed from green to white */
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Added shadow */
        z-index: 1000; /* Added z-index */
    }

    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 0;
    }
    
    .nav-links a {
        display: block;
        padding: 1rem;
        color: #333;
        border-bottom: 1px solid #eee;
    }
    
    .nav-links a:hover {
        background-color: #f8f9fa;
    }

    /* Hero section */
    .hero h1,
    .carousel-slide h1 {
        font-size: 2rem;
    }

    /* Services */
    .services {
        grid-template-columns: 1fr;
    }

    /* About page */
    .about-container {
        padding: 0 1rem;
    }
    
    .about-header h1 {
        font-size: 2.2rem;
    }
    
    .about-subtitle {
        font-size: 1.1rem;
    }
    
    .about-section {
        padding: 0;
    }
    
    .highlight-section {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    /* Monitoring page */
    .monitoring-grid {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }
    
    .monitoring-category {
        min-height: 300px;
    }
    
    .category-content h2 {
        font-size: 1.5rem;
    }
    
    .category-content p {
        font-size: 1rem;
    }
    
    .monitoring-hero h1 {
        font-size: 2rem;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero,
    .carousel-slide {
        padding: 2rem 1rem;
    }

    .category-content h2 {
        font-size: 1.3rem;
    }
    
    .monitoring-category {
        min-height: 250px;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}