/* Base Styles */
:root {
    /* Dark theme (default) */
    --primary-color: #2c3e50;
    --secondary-color: #d35400;
    --light-color: #ecf0f1;
    --dark-color: #1a1a1a;
    --text-color: #f9f9f9;
    --border-color: #333;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --card-bg: #222;
    --input-bg: #2c2c2c;
    --bg-color: #121212;
    --header-bg: #1a1a1a;
    --footer-bg: #1a1a1a;
    --modal-bg: rgba(0, 0, 0, 0.9);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --primary-color-soft: rgba(44, 62, 80, 0.2);
    --gold-border: #d4af37;
}

/* Light theme */
[data-theme="light"] {
    --primary-color: #2c3e50;
    --secondary-color: #d35400;
    --light-color: #2c3e50;
    --dark-color: #f0f0f0;
    --text-color: #333;
    --border-color: #ddd;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --card-bg: #fff;
    --input-bg: #f5f5f5;
    --bg-color: #f9f9f9;
    --header-bg: #fff;
    --footer-bg: #f0f0f0;
    --modal-bg: rgba(255, 255, 255, 0.95);
    --shadow-color: rgba(0, 0, 0, 0.05);
    --primary-color-soft: rgba(44, 62, 80, 0.1);
    --gold-border: #d4af37;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    overflow-x: hidden;
    padding-top: 80px;
}

body.menu-open {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

a {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-color);
}

p {
    margin-bottom: 1rem;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.my-16 {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-16 {
    margin-top: 4rem;
}

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

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.shadow {
    box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px 0 var(--shadow-color);
    transition: box-shadow 0.3s ease;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -2px var(--shadow-color);
    transition: box-shadow 0.3s ease;
}

.grid {
    display: grid;
    gap: 1.5rem;
    width: 100%;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-16 {
    gap: 4rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.p-12 {
    padding: 3rem;
}

.block {
    display: block;
}

.w-full {
    width: 100%;
}

.h-32 {
    height: 8rem;
}

.border {
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.bg-gray-100 {
    background-color: var(--card-bg);
    transition: background-color 0.3s ease;
}

.bg-black {
    background-color: #000;
}

.bg-opacity-60 {
    --tw-bg-opacity: 0.6;
}

.text-white {
    color: white;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-center {
    justify-content: center;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

.mr-4 {
    margin-right: 1rem;
}

.italic {
    font-style: italic;
}

/* Theme Toggle */
.theme-toggle {
    margin-right: 1.5rem;
}

.theme-toggle button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    position: relative;
    width: 40px;
    height: 26px;
    border-radius: 13px;
    background-color: var(--card-bg);
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.theme-toggle-dark,
.theme-toggle-light {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.theme-toggle-dark {
    left: 5px;
}

.theme-toggle-light {
    right: 5px;
}

[data-theme="dark"] .theme-toggle-dark {
    transform: translateY(-50%) scale(1);
}

[data-theme="dark"] .theme-toggle-light {
    transform: translateY(-50%) scale(0);
}

[data-theme="light"] .theme-toggle-dark {
    transform: translateY(-50%) scale(0);
}

[data-theme="light"] .theme-toggle-light {
    transform: translateY(-50%) scale(1);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--light-color);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    animation: sheen 3s infinite;
    pointer-events: none;
}

@keyframes sheen {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: var(--light-color);
}

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

.btn-secondary:hover {
    background-color: #234160;
    color: white;
}

/* Header Styles */
.main-header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 4px var(--shadow-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-image {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.logo-container h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    transition: color 0.3s ease;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: 1.5rem;
}

.main-nav a {
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
    background-color: var(--secondary-color);
}

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

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

/* Hero Section */
.hero {
    min-height: 45vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    padding: 0;
    margin: 0;
    width: 100%;
    background-attachment: fixed;
    padding-top: 100px;
    margin-top: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 1rem;
    padding-top: 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    min-height: 150px;
    height: auto;
    overflow: visible;
    padding-top: 20px;
}

.hero-image {
    max-width: 100%;
    height: auto;
    z-index: 3;
    position: relative;
    object-fit: contain;
    display: block;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: white;
    margin-top: auto;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: white;
    margin-top: 0;
}

/* Specific adjustment for image ID 776633 */
#776633 {
    transform: translateY(-200px);
    position: relative;
    z-index: 2;
}

/* Mobile adjustments for hero section */
@media (max-width: 768px) {
    .hero {
        padding-top: 85px;
        margin-top: 0;
        min-height: 35vh;
    }
    
    #776633 {
        transform: translateY(-200px);
        position: relative;
        z-index: 2;
    }
    
    .hero-image-container {
        min-height: auto;
        height: auto;
        padding-top: 10px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-content {
        padding-top: 1rem;
        gap: 0.5rem;
        height: auto;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 60px;
    }
    
    .hero-image-container {
        padding-top: 5px;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-top: 120px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 320px) {
    .hero {
        min-height: 30vh;
    }
}

/* Specific mobile device adjustments */
@media (min-width: 321px) and (max-width: 375px) {
    .hero-content {
        padding-top: 1.5rem;
    }
}

@media (min-width: 376px) and (max-width: 414px) {
    .hero-content {
        padding-top: 1.5rem;
    }
}

@media (min-width: 415px) and (max-width: 480px) {
    .hero-content {
        padding-top: 1.5rem;
    }
}

@media (min-width: 481px) and (max-width: 600px) {
    .hero-content {
        padding-top: 1.5rem;
    }
}

@media (min-width: 601px) and (max-width: 768px) {
    .hero-content {
        padding-top: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-content {
        padding-top: 2rem;
    }
}

/* Desktop styles (unchanged) */
@media (min-width: 1025px) {
    .hero {
        align-items: center;
        min-height: 85vh;
        padding-top: 80px;
    }
    
    .hero-content {
        padding: 2rem;
        padding-top: 3rem;
    }
    
    .hero-image-container {
        margin-top: 1.5rem;
    }

    /* Move hero image 30% higher on desktop */
    .hero-image[src="images/om-oss/gjerder-porter.png"] {
        transform: translateY(-60%);
    }
}

/* Card Styles */
.card {
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    min-height: 0;
    margin: 0;
    width: 100%;
    border: 1px solid var(--gold-border);
}

.card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.5rem;
}

.card-image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: 0.5rem 0.5rem 0 0;
    border-bottom: 1px solid var(--gold-border);
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.card p {
    margin-bottom: 1rem;
    flex: 1;
}

.card ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.card .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* Product/Feature Cards Grid */
.grid-cols-1.md\:grid-cols-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-1.md\:grid-cols-2 .card {
        width: 100%;
        max-width: none;
    }
}

/* Specific styles for product/category cards */
.grid-cols-1.md\:grid-cols-2 .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.grid-cols-1.md\:grid-cols-2 .card img {
    height: 300px;
    width: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.grid-cols-1.md\:grid-cols-2 .card h3 {
    font-size: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.grid-cols-1.md\:grid-cols-2 .card p {
    flex-grow: 0;
    margin-bottom: 1rem;
}

.grid-cols-1.md\:grid-cols-2 .card ul {
    margin-bottom: 1.5rem;
}

.grid-cols-1.md\:grid-cols-2 .card .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* Main Content */
main {
    flex: 1;
}

#content-container {
    position: relative;
    min-height: 300px;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(127, 127, 127, 0.1);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s linear infinite;
}

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

.error-message {
    padding: 2rem;
    text-align: center;
    color: var(--error-color);
}

/* Section Styles */
.section {
    margin-bottom: 2rem;
    padding: 0 1rem;
    padding-top: 0;
}

/* Fix section alignment with fixed header */
@media (max-width: 768px) {
    body {
        padding-top: 80px; /* Account for fixed header */
    }
    
    .main-header {
        padding: 0.5rem 1rem;
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        z-index: 100;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .main-nav ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 15px;
        padding-left: 0;
    }
    
    .main-nav li {
        width: 100%;
        opacity: 0;
        transform: translateX(20px);
        transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
        list-style: none;
    }
    
    .main-nav a {
        display: block;
        padding: 14px 15px;
        font-size: 1.25rem;
        line-height: 1.4;
        letter-spacing: 0.5px;
        font-weight: 500;
        text-align: left;
        border-radius: 4px;
        border-left: 3px solid transparent;
        transition: all 0.2s ease;
        color: var(--text-color);
        text-shadow: none;
        text-decoration: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Improve mobile nav UI for small devices */
@media (max-width: 480px) {
    .main-nav {
        width: 85%;
    }
    
    .main-nav a {
        font-size: 1.2rem;
        padding: 12px 15px;
    }
}

.banner {
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.banner-content {
    position: relative;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 800px;
}

.banner-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: white;
}

.banner-content p {
    font-size: 1.25rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: white;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.product-grid .card {
    border: 1px solid var(--gold-border);
}

.gallery-item {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--gold-border);
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .caption {
    transform: translateY(0);
}

/* File Upload */
.file-upload-container {
    text-align: center;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    border: 2px dashed var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.file-upload-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.file-upload-label:hover {
    background-color: #b94700;
}

.file-upload-input {
    display: none;
}

/* Parallax Section */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Styles */
.inquiry-form input,
.inquiry-form textarea,
.inquiry-form select {
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.75rem;
    width: 100%;
    background-color: var(--input-bg);
    color: var(--text-color);
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.inquiry-form input:focus,
.inquiry-form textarea:focus,
.inquiry-form select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(211, 84, 0, 0.2);
}

/* Testimonial Styles */
.testimonial-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    background-color: var(--secondary-color);
    color: white;
    transition: background-color 0.3s ease;
}

.social-icon:hover {
    background-color: #b94700;
    color: white;
}

/* Gallery Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 0;
}

.gallery-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-modal-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.gallery-modal-image img {
    display: block;
    margin: 0 auto;
    max-width: 90vw;
    max-height: 85vh;
    border: 2px solid var(--gold-border);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.gallery-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.gallery-modal-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

.gallery-modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 28px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    outline: none;
    z-index: 10000;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.gallery-modal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.gallery-modal-nav.prev {
    left: 20px;
}

.gallery-modal-nav.next {
    right: 20px;
}

/* Papildomi stiliai mobilių įrenginių galerijai */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .section {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-top: 0;
        padding-top: 0;
    }

    .py-12 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .gap-8, .gap-16 {
        gap: 5px !important;
    }
    
    .mb-16 {
        margin-bottom: 1.5rem !important;
    }
    
    .gallery-item {
        height: 160px !important;
        margin-bottom: 5px !important;
    }
    
    .grid {
        row-gap: 5px !important;
    }
}

/* Papildomi stiliai, kad spręstų vertikalių tarpų problemą */
.gallery-item {
    break-inside: avoid;
    page-break-inside: avoid;
}

/* Contact Information Styles */
.contact-info {
    margin-top: 1.5rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.contact-icon {
    width: 1.5rem;
    text-align: center;
    color: #ffffff;
    font-size: 1.1rem;
}

.contact-link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.contact-link:hover {
    color: #d35400;
}

.contact-address {
    color: #ffffff;
    margin: 0;
    line-height: 1.4;
    font-size: 1rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .contact-info-item {
        margin-bottom: 0.75rem;
    }
    
    .contact-icon {
        font-size: 1rem;
    }
    
    .contact-link,
    .contact-address {
        font-size: 0.95rem;
    }
}

/* Responsive stiliai skirtingiems ekranams */
@media (max-width: 768px) {
    .gallery-item {
        aspect-ratio: 3/4;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .gallery-item {
        aspect-ratio: 4/3;
    }
}

@media (min-width: 1025px) {
    .gallery-item {
        aspect-ratio: 16/9;
    }
}

/* Pagrindinio puslapio (hjem) galerijos stiliai */
.recent-projects-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.recent-projects-gallery .gallery-item {
    display: block;
    position: relative;
    height: 100%;
    margin-bottom: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gold-border);
}

.recent-projects-gallery .gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-projects-gallery .gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    font-size: 14px;
}

/* Mobilių įrenginių stiliai visam puslapiui */
@media (max-width: 768px) {
    .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .py-12 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .mb-16 {
        margin-bottom: 1.5rem !important;
    }
    
    .gap-8, .gap-16 {
        gap: 5px !important;
    }
    
    .grid {
        row-gap: 5px !important;
    }
    
    .gallery-item {
        height: 160px !important;
        margin-bottom: 5px !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
    
    .recent-projects-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        margin-bottom: 1rem;
    }
    
    .recent-projects-gallery .gallery-item img {
        height: 150px;
    }
    
    .recent-projects-gallery .gallery-item .caption {
        font-size: 12px;
        padding: 6px;
    }
    
    .grid-cols-1.md\:grid-cols-3 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
        margin-bottom: 1rem !important;
    }
    
    .grid-cols-1.md\:grid-cols-3 .gallery-item {
        display: flex;
        flex-direction: column;
    }
    
    .grid-cols-1.md\:grid-cols-3 .gallery-item img {
        width: 100%;
        height: 150px;
        object-fit: cover;
        flex: 1;
    }
    
    .grid-cols-1.md\:grid-cols-3 .gallery-item .caption {
        font-size: 12px;
        padding: 5px;
        height: auto;
    }
    
    .h-64 {
        height: 150px !important;
    }
    
    .p-6 {
        padding: 1rem !important;
    }
    
    .mb-6 {
        margin-bottom: 1rem !important;
    }
    
    .card {
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #000000;
        display: flex;
        flex-direction: column;
        padding: 80px 20px 40px;
        z-index: 99;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        margin-top: 20px;
        padding-left: 0;
    }
    
    .main-nav li {
        width: 100%;
        opacity: 0;
        transform: translateX(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        list-style: none;
        margin: 0;
    }
    
    .main-nav.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .main-nav a {
        display: block;
        padding: 14px 15px;
        font-size: 1.25rem;
        line-height: 1.5;
        font-weight: 500;
        text-align: left;
        border-radius: 6px;
        border-left: 3px solid transparent;
        transition: all 0.25s ease;
        color: #ffffff;
        background-color: rgba(255, 255, 255, 0.05);
        margin: 0;
        width: 100%;
        text-decoration: none;
    }
    
    .main-nav a:hover,
    .main-nav a:focus {
        background-color: rgba(255, 255, 255, 0.1);
        border-left-color: #ffffff;
        padding-left: 20px;
        color: #ffffff;
    }
    
    .main-nav a.active {
        background-color: rgba(255, 255, 255, 0.15);
        border-left-color: #ffffff;
        padding-left: 20px;
        color: #ffffff;
        font-weight: 600;
    }
}

/* Paprastos klases paveikslėlių valdymui */
.image-up {
    margin-top: -2rem !important;
}

.image-down {
    margin-top: 2rem !important;
}

.image-bigger {
    max-width: 120% !important;
}

.image-smaller {
    max-width: 80% !important;
}

/* Mobilių įrenginių paveikslėlių valdymas */
@media (max-width: 768px) {
    .mobile-image-up {
        margin-top: -2cm !important;
    }
    
    .mobile-image-down {
        margin-top: 1rem !important;
    }
    
    .mobile-image-bigger {
        max-width: 100% !important;
    }
    
    .mobile-image-smaller {
        max-width: 60% !important;
    }
}

@media (max-width: 480px) {
    .small-mobile-image-up {
        margin-top: -2cm !important;
    }
    
    .small-mobile-image-down {
        margin-top: 0.5rem !important;
    }
    
    .small-mobile-image-bigger {
        max-width: 90% !important;
    }
    
    .small-mobile-image-smaller {
        max-width: 50% !important;
    }
}

/* Kompiuterių paveikslėlių valdymas */
.desktop-image-up {
    margin-top: -2rem !important;
}

.desktop-image-down {
    margin-top: 2rem !important;
}

.desktop-image-bigger {
    max-width: 120% !important;
}

.desktop-image-smaller {
    max-width: 80% !important;
}

/* Planšetės paveikslėlių valdymas */
@media (min-width: 769px) and (max-width: 1024px) {
    .tablet-image-up {
        margin-top: -1.5rem !important;
    }
    
    .tablet-image-down {
        margin-top: 1.5rem !important;
    }
    
    .tablet-image-bigger {
        max-width: 110% !important;
    }
    
    .tablet-image-smaller {
        max-width: 70% !important;
    }
}

/* Vidutinių mobilių įrenginių paveikslėlių valdymas */
@media (max-width: 768px) {
    .mobile-image-up {
        margin-top: -2cm !important;
    }
    
    .mobile-image-down {
        margin-top: 1rem !important;
    }
    
    .mobile-image-bigger {
        max-width: 100% !important;
    }
    
    .mobile-image-smaller {
        max-width: 60% !important;
    }
}

/* Mažų mobilių įrenginių paveikslėlių valdymas */
@media (max-width: 480px) {
    .small-mobile-image-up {
        margin-top: -2cm !important;
    }
    
    .small-mobile-image-down {
        margin-top: 0.5rem !important;
    }
    
    .small-mobile-image-bigger {
        max-width: 90% !important;
    }
    
    .small-mobile-image-smaller {
        max-width: 50% !important;
    }
}

/* Specialus paveikslėlio 776633 (gjerder-porter.png) valdymas */
@media (min-width: 1025px) {
    /* Kompiuterių stilius - naudokite inline style nustatymus */
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Planšečių stilius - proporcingai pritaikyti kompiuterio nustatymus */
    .hero-image[src="images/om-oss/gjerder-porter.png"] {
        /* Inline stiliai prioritetiniai */
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    /* Vidutinių mobilių įrenginių stilius - proporcingai pritaikyti kompiuterio nustatymus */
    .hero-image[src="images/om-oss/gjerder-porter.png"] {
        /* Inline stiliai prioritetiniai */
    }
}

@media (max-width: 480px) {
    /* Mažų mobilių įrenginių stilius - proporcingai pritaikyti kompiuterio nustatymus */
    .hero-image[src="images/om-oss/gjerder-porter.png"] {
        /* Inline stiliai prioritetiniai */
    }
}

/* Specific adjustment for gjerder-porter.png on mobile devices */
@media (max-width: 768px) {
    .hero-image[src="images/om-oss/gjerder-porter.png"] {
        display: block;
        width: 100%;
        height: auto;
        margin-top: 0;
        transform: none;
        object-fit: cover;
    }
}

/* Paveiksliuko 776633 (gjerder-porter.png) vertikalaus aukščio sumažinimas perpus */
.hero-image[src="images/om-oss/gjerder-porter.png"] {
    /* transform: scaleY(0.5); Pašalinama aukščio transformacija, kad išliktų natūralios proporcijos */
    /* transform-origin: center top; Pašalinama, nes nebereikia */
}

/* Add a style for menu instruction */
.menu-instruction {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1002;
    max-width: 250px;
    font-size: 0.9rem;
    animation: fadeIn 0.5s ease;
}

.menu-instruction p {
    margin-bottom: 10px;
}

.close-instruction {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    margin-left: auto;
}

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

@media (max-width: 768px) {
    .main-nav a:hover,
    .main-nav a:focus {
        background-color: rgba(var(--primary-rgba), 0.08);
        border-left-color: var(--primary-color);
        padding-left: 18px;
        color: var(--primary-color);
    }
    
    .main-nav a.active {
        border-left-color: var(--primary-color);
        background-color: rgba(var(--primary-rgba), 0.08);
        padding-left: 18px;
        color: var(--primary-color);
        font-weight: 600;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 24px;
        position: relative;
        z-index: 100;
        cursor: pointer;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #000000;
        display: flex;
        flex-direction: column;
        padding: 80px 20px 40px;
        z-index: 99;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .logo-container {
        flex: 1;
    }
    
    .theme-toggle {
        margin-right: 1rem;
    }
    
    .hero {
        padding-top: 0;
        min-height: 35vh;
        background-attachment: scroll;
    }
}

/* Ensure gold borders on all galleries across the site */
.grid-cols-1.md\:grid-cols-2 .card img,
.grid-cols-1.md\:grid-cols-3 .gallery-item,
.product-gallery .gallery-item,
.projects-gallery .gallery-item,
.references-gallery .gallery-item,
[class*="gallery"] .gallery-item {
    border: 1px solid var(--gold-border);
}

/* Add gold border to card images */
.card-image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: 0.5rem 0.5rem 0 0;
    border-bottom: 1px solid var(--gold-border);
}

/* Add gold border to banner sections */
.banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--gold-border);
    pointer-events: none;
    z-index: 1;
}