/*
	Custom Styles for DJ Adamski - Big Picture Template
	-------------------------------------------------------------------
	- Custom color scheme (Vibrant Pink/Magenta)
	- Font adjustments
	- Minor layout tweaks for a modern feel
*/

:root {
	--primary-color: #002004; /* A vibrant pink/magenta */
	--secondary-color: #1a1a1a; /* A very dark grey, almost black for contrast */
	--text-color: #e0e0e0;      /* Light grey for readability on dark backgrounds */
	--light-grey: #f4f4f4;
	--dark-grey: #333;
}

body {
	color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
	color: #ffffff;
}

/* --- Sections --- */

/* Intro Section background */
#intro {
	background-color: var(--secondary-color);
	/* background-image is now handled in main.css */
	background-size: cover;
	background-position: center center;
}

#intro::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(26, 26, 26, 0.6); /* Dark overlay for text readability */
}

.main.style2 .content {
    position: relative;
    z-index: 2; /* Ensure content is on top of the overlay */
}

/* Logo Styles for Intro Section */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.intro-logo {
    max-width: 400px;
    height: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.7));
    transition: all 0.3s ease-in-out;
}

.intro-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.9));
}

/* Responsive logo sizing */
@media screen and (max-width: 736px) {
    .intro-logo {
        max-width: 250px;
    }
}

@media screen and (max-width: 480px) {
    .intro-logo {
        max-width: 200px;
    }
    
    .logo-container {
        margin-bottom: 1.5rem;
    }
}

/* Style 3 is the "My Work" (Galeria) and "Contact" sections */
#work.main.style3.primary {
	background-color: var(--primary-color);
}

#contact.main.style3.secondary {
	background-color: var(--secondary-color);
	color: var(--text-color);
}

#contact .button {
	background-color: var(--primary-color);
	color: #ffffff !important;
}

#contact .button:hover {
	background-color: #e93f82; /* Lighter pink on hover */
}

/* --- Buttons --- */
.button {
	background-color: var(--primary-color);
	color: #ffffff !important;
	border-radius: 5px;
	transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
	border: 0;
}

.button:hover {
	background-color: #b3a703;
}

.button.style2 {
    background-color: transparent;
    border: 2px solid var(--light-grey);
    color: var(--light-grey) !important;
}

.button.style2:hover {
    background-color: rgba(255, 255, 255, 0.1);
}


/* --- Header & Footer --- */
#header, #footer {
	background: rgba(10, 10, 10, 0.85);
}

#footer .icons .icon {
    color: var(--light-grey);
    transition: color 0.2s ease-in-out;
}

#footer .icons .icon:hover {
    color: var(--primary-color);
}

/* --- Gallery --- */
.gallery {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

.gallery > article {
	flex: 1 1 300px; /* Pozwala na elastyczność, ale bazowo 300px */
	max-width: 320px; /* Ogranicza maksymalną szerokość */
}

.gallery .image {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1; /* Ustawia kwadratowe proporcje */
}

.gallery .image:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.gallery .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    image-rendering: -webkit-optimize-contrast; /* Better quality on webkit */
    image-rendering: crisp-edges; /* Sharper edges */
    image-rendering: high-quality; /* High quality rendering */
    backface-visibility: hidden; /* Prevent blurry transforms */
    -webkit-backface-visibility: hidden;
    transform: translateZ(0); /* Hardware acceleration */
}

.gallery .image:hover img {
    transform: scale(1.05) translateZ(0); /* Maintain hardware acceleration during hover */
}

/* --- Form --- */
.box {
	background-color: rgba(0,0,0,0.5);
}

input[type="text"],
input[type="email"],
textarea {
	background-color: rgba(255, 255, 255, 0.1) !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	color: #002004 !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
	border-color: var(--primary-color) !important;
}

::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
  opacity: 1;
}


/* Performance Optimization */
html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

/* Image optimization for performance */
img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Color Scheme inspired by DJ photography - warm golds, deep blues, elegant blacks */
:root {
    --primary-gold: #FFD700;
    --secondary-gold: #FFA500;
    --deep-blue: #1a237e;
    --night-blue: #0d1421;
    --warm-white: #faf7f2;
    --accent-purple: #6a1b9a;
    --silver: #c0c0c0;
}

/* Override default colors with photography-inspired palette */
.panel.color1 {
    background-color: var(--deep-blue) !important;
    background-image: linear-gradient(135deg, var(--deep-blue) 0%, var(--night-blue) 100%);
}

.panel.color2-alt {
    background-color: var(--night-blue) !important;
    background-image: linear-gradient(45deg, #1a1a1a 0%, var(--night-blue) 100%);
}

.panel.color4-alt {
    background-color: var(--accent-purple) !important;
    background-image: linear-gradient(135deg, var(--accent-purple) 0%, var(--deep-blue) 100%);
}

/* Golden accent colors for buttons and highlights */
.button.primary.color1,
.button.primary {
    background: linear-gradient(135deg, var(--primary-gold), var(--secondary-gold)) !important;
    color: var(--night-blue) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3) !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* Center the PDF download button in its container */
.content footer {
    text-align: center !important;
}

/* PDF Download Button - Subtle Elegant Style with Perfect Centering */
.button[download],
a.button[href*=".pdf"] {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.8), rgba(139, 105, 20, 0.9)) !important;
    color: var(--warm-white) !important; /* Warm white text for elegance */
    border: 1px solid rgba(255, 215, 0, 0.3) !important; /* Subtle golden border */
    box-shadow: 
        0 2px 8px rgba(184, 134, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    font-weight: 600 !important; /* Less bold for subtlety */
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important; /* Reduced spacing */
    border-radius: 4px !important; /* Smaller radius for elegance */
    padding: 12px 20px !important; /* Balanced padding for centering */
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important; /* Smoother transition */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important; /* Subtle shadow */
    display: inline-flex !important; /* Use flexbox for perfect centering */
    align-items: center !important; /* Vertical centering */
    justify-content: center !important; /* Horizontal centering */
    text-align: center !important; /* Text alignment */
    min-height: 44px !important; /* Minimum height for proper vertical centering */
    line-height: 1.2 !important; /* Better line height for centering */
}

/* Add subtle glow effect */
.button[download]:before,
a.button[href*=".pdf"]:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.button[download]:hover,
a.button[href*=".pdf"]:hover {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.9), rgba(184, 134, 11, 0.95)) !important;
    color: var(--warm-white) !important;
    border-color: rgba(255, 215, 0, 0.5) !important; /* Slightly more visible border on hover */
    box-shadow: 
        0 4px 12px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important; /* Subtle lift */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.button[download]:hover:before,
a.button[href*=".pdf"]:hover:before {
    left: 100%;
}

.button[download]:active,
a.button[href*=".pdf"]:active {
    transform: translateY(0px) scale(0.98) !important; /* Subtle press effect */
    box-shadow: 
        0 1px 4px rgba(255, 215, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1) !important; /* Inset shadow for pressed look */
}

.button.primary.color1:hover,
.button.primary:hover {
    background: linear-gradient(135deg, var(--secondary-gold), var(--primary-gold)) !important;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5) !important;
    transform: translateY(-2px) !important;
}

/* Typography enhancements */
h1.major, h2.major, h3.major {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1.2px;
}

h1.major {
    color: var(--warm-white) !important;
}

h2.major {
    color: var(--primary-gold) !important;
}

h3.major {
    color: var(--silver) !important;
}

/* Service icons with golden glow */
#services .grid-icons li .icon {
    font-size: 2.5em;
    margin-bottom: 1em;
    color: var(--primary-gold) !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    transition: all 0.3s ease;
}

#services .grid-icons li .icon:hover {
    color: var(--warm-white) !important;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    transform: scale(1.1);
}

/* Gallery optimizations */
.gallery {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

.gallery > article {
	flex: 1 1 300px; /* Pozwala na elastyczność, ale bazowo 300px */
	max-width: 320px; /* Ogranicza maksymalną szerokość */
}

.gallery .image {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1; /* Ustawia kwadratowe proporcje */
}

/* Contact form with elegant styling */
#contact .field input,
#contact .field textarea,
#contact .field select {
    background-color: rgba(250, 247, 242, 0.9);
    border: 2px solid rgba(255, 215, 0, 0.3) !important;
    color: var(--night-blue) !important;
    border-radius: 6px !important;
    padding: 12px !important;
    font-size: 16px !important;
}

#contact .field input:focus,
#contact .field textarea:focus,
#contact .field select:focus {
    background-color: var(--warm-white) !important;
    border-color: var(--primary-gold) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4) !important;
    outline: none !important;
}

#contact .field label {
    color: var(--warm-white) !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 14px !important;
}

/* Pricing section with elegant presentation */
#offer .inner h3 {
    color: var(--primary-gold) !important;
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 0.5rem;
}

#offer ul {
    list-style: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

#offer ul li {
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
    padding-left: 2rem;
    color: var(--warm-white);
}

#offer ul li:before {
    content: "✓";
    color: var(--primary-gold);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2em;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

#offer ul li:last-child {
    border-bottom: none;
}

#offer p strong {
    color: var(--primary-gold) !important;
    font-size: 1.3em !important;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3) !important;
}

/* Contact icons with golden theme */
.contact-icons li {
    margin: 0.5rem 0;
}

.contact-icons li .icon {
    color: var(--primary-gold) !important;
    font-size: 1.5em;
    margin-right: 0.5rem;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.contact-icons li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    text-decoration: none;
    color: var(--warm-white) !important;
    transition: all 0.3s ease;
    border-radius: 6px;
    padding-left: 0.5rem;
}

.contact-icons li a:hover {
    color: var(--primary-gold) !important;
    background: rgba(255, 215, 0, 0.1);
    padding-left: 1rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Performance improvements */
.panel {
    will-change: transform;
    transform: translateZ(0);
}

.image {
    will-change: transform;
    transform: translateZ(0);
}

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

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive optimizations */
@media screen and (max-width: 768px) {
    .panel .content h1.major {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .panel .content h2.major {
        font-size: 1.8rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    /* Better quality thumbnails on mobile */
    .gallery .image img {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
        image-rendering: high-quality !important;
        filter: contrast(1.1) brightness(1.02); /* Slight enhancement */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    #offer .inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    #services .grid-icons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Ensure boxes stay dark on tablets */
    .box {
        background-color: rgba(0, 0, 0, 0.6) !important;
        color: var(--text-color) !important;
    }
    
    .box.style2 {
        background-color: rgba(0, 0, 0, 0.7) !important;
        color: var(--text-color) !important;
    }
}

@media screen and (max-width: 480px) {
    .panel .content {
        padding: 2rem 1.5rem;
    }
    
    .contact-icons li a {
        font-size: 0.9rem;
    }
    
    #offer ul {
        padding: 1rem;
    }
}

/* Hide white caption bar under gallery images - aggressive approach */
.poptrox-popup .caption,
div.caption,
.poptrox-popup div.caption,
.poptrox-overlay .caption,
[class*="poptrox"] .caption {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Additional override for any caption that might slip through */
*[style*="caption"] {
    display: none !important;
}

/* Fix mobile box background - keep dark theme */
@media screen and (max-width: 736px) {
    .box {
        background-color: rgba(0, 0, 0, 0.7) !important; /* Dark background instead of white */
        color: var(--text-color) !important; /* Light text color */
    }
    
    .box.style2 {
        background-color: rgba(0, 0, 0, 0.8) !important; /* Slightly darker for style2 */
        color: var(--text-color) !important;
    }
    
    /* Enhanced image quality for mobile */
    .gallery .image img {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
        image-rendering: high-quality !important;
        filter: contrast(1.15) brightness(1.05) saturate(1.1) !important; /* Better visual enhancement */
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
        transform: translateZ(0) !important; /* Force hardware acceleration */
    }
    
    .gallery .image {
        /* Slightly larger thumbnails on mobile for better quality */
        min-height: 250px;
    }
}