/* MAKE MY DAY Custom Styles */

/* Language flicker prevention - removed as we'll handle it differently */

/* Global Font Override - Georgia as default */
* {
    font-family: Georgia, 'Times New Roman', serif !important;
}

/* Hide translation elements until loaded - prevents flicker */
[data-i18n] {
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
}

/* Show elements when translations are loaded */
body.i18n-loaded [data-i18n] {
    opacity: 1;
}

/* Root Variables */
:root {
    --primary-color: #969696;
    --secondary-color: #680029;
    --dark-color: #333333;
    --light-color: #f8f9fa;
    --white: #ffffff;
    --font-primary: Georgia, 'Times New Roman', serif;
    --bs-primary: #680029;
    --bs-primary-rgb: 104, 0, 41;
    --ar-primary: #680029;
    --ar-primary-rgb: 104, 0, 41;
}

/* Override Bootstrap Primary Color */
.btn-primary {
    --bs-btn-bg: #680029 !important;
    --bs-btn-border-color: #680029 !important;
    --bs-btn-hover-bg: #4d001f !important;
    --bs-btn-hover-border-color: #4d001f !important;
    --bs-btn-active-bg: #4d001f !important;
    --bs-btn-active-border-color: #4d001f !important;
    background-color: #680029 !important;
    border-color: #680029 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: #4d001f !important;
    border-color: #4d001f !important;
    box-shadow: 0 0 0 0.25rem rgba(104, 0, 41, 0.25) !important;
}

/* Content Section - Unified Spacing */
.content-section {
    padding: 80px 0 !important;
}

@media (max-width: 768px) {
    .content-section {
        padding: 60px 0 !important;
    }
}

/* Section Headings - Standard Style */
.section-heading {
    font-family: Georgia, serif !important;
    color: #680029 !important;
    font-size: 2rem !important;
    margin-bottom: 1.5rem !important;
    text-align: center !important;
}

@media (max-width: 768px) {
    .section-heading {
        font-size: 1.5rem !important;
    }
}

/* Links */
a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #4d001f;
    text-decoration: none;
}

/* Base Styles */
body {
    font-family: var(--font-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-primary);
    font-weight: 700;
}

p, .card-text, .card-body {
    font-family: var(--font-primary);
    line-height: 1.7;
}

.btn {
    font-family: var(--font-primary);
}

.dropdown-item {
    font-family: var(--font-primary);
}

.navbar-toggler {
    font-family: var(--font-primary);
}

.text-muted {
    font-family: var(--font-primary);
}

/* Navigation Customization */
.navbar {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    padding: 1rem 0;
    min-height: 112px; /* Adjusted for 80px logo + padding */
    background-color: white;
    z-index: 1050;
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    min-height: 80px;
}

.navbar.scrolled .navbar-brand img {
    height: 50px;
    transition: height 0.3s ease;
}

.navbar-sticky {
    position: fixed !important;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
}

.navbar-brand img {
    height: 80px;
    width: auto;
    max-width: 215px;
    object-fit: contain;
}

.navbar-nav .nav-link {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    color: var(--dark-color) !important;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--secondary-color) !important;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 30px;
}

/* Desktop specific nav underline positioning */
@media (min-width: 992px) {
    .navbar-nav .nav-link {
        padding-bottom: 0.75rem;
    }
    
    .navbar-nav .nav-link::after {
        bottom: 0.25rem;
    }
}

/* Add padding to body for fixed navbar */
body {
    padding-top: 112px;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Mobile hero height */
@media (max-width: 767px) {
    .hero-section {
        height: 35vh;
        min-height: 250px;
    }
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Bildslider */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* Overlay für bessere Lesbarkeit */
.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(104, 0, 41, 0.3) 0%, rgba(150, 150, 150, 0.3) 100%);
    z-index: 2;
}

/* Service Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(150, 150, 150, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(104, 0, 41, 0.15) !important;
    border-color: rgba(104, 0, 41, 0.2);
}

.service-icon {
    transition: transform 0.3s ease;
}

.service-icon img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.card:hover .service-icon img {
    transform: scale(1.15) rotate(5deg);
    filter: brightness(1.1) contrast(1.1);
}

/* Language Dropdown */
.dropdown-toggle img {
    margin-right: 0.5rem;
}

.dropdown-item:hover {
    background-color: rgba(104, 0, 41, 0.1);
    color: var(--secondary-color);
}

/* Additional Button Styles */
.btn-outline-secondary {
    --bs-btn-color: #680029;
    --bs-btn-border-color: #680029;
    --bs-btn-hover-bg: #680029;
    --bs-btn-hover-border-color: #680029;
    --bs-btn-active-bg: #680029;
    --bs-btn-active-border-color: #680029;
}

/* Force all primary buttons to use our color */
.btn-primary,
.btn-primary:link,
.btn-primary:visited,
.btn-primary:not(:disabled):not(.disabled) {
    background-color: #680029 !important;
    border-color: #680029 !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):hover,
.btn-primary:not(:disabled):not(.disabled):focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
    background-color: #4d001f !important;
    border-color: #4d001f !important;
    color: #ffffff !important;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .logo-main {
        max-width: 150px !important;
    }
    
    .navbar-brand img {
        height: 60px;
    }
    
    /* Navbar collapse inherits positioning from parent rule */
}

/* Footer */
.footer {
    margin-top: auto;
}

/* Accessibility */
.btn:focus,
a:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4d001f;
}

/* Page Transitions */
.page-transition {
    opacity: 1;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.page-transition.fade-out {
    opacity: 0;
    transform: translateY(30px);
}

/* Ensure navbar is not affected by page transitions */
.navbar,
.navbar * {
    transition: none !important;
}

/* Re-enable specific navbar transitions */
.navbar.scrolled {
    transition: box-shadow 0.3s ease, padding 0.3s ease !important;
}

/* Sticky navbar instead of fixed to maintain document flow */

/* Prevent body scroll during transition */
body.transitioning {
    overflow: hidden;
}

/* Navbar Scroll Effects */
.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* AOS-like animations */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

[data-aos="zoom-in"] {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="zoom-in"].aos-animate {
    opacity: 1;
    transform: scale(1);
}

/* Scroll down button */
.scroll-down-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.scroll-down-btn:hover {
    opacity: 0.8;
}

.scroll-down-btn .mouse {
    width: 26px;
    height: 40px;
    border: 2px solid #fff;
    border-radius: 13px;
    margin: 0 auto 10px;
    position: relative;
}

.scroll-down-btn .mouse::after {
    content: '';
    width: 4px;
    height: 8px;
    background: #fff;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
    border-radius: 2px;
    animation: scroll-animation 2s infinite;
}

@keyframes scroll-animation {
    0% {
        opacity: 1;
        top: 8px;
    }
    50% {
        opacity: 0.5;
        top: 20px;
    }
    100% {
        opacity: 0;
        top: 30px;
    }
}

/* Fix for contact links - prevent text transformation */
.card-body a[href^="mailto:"],
.card-body a[href^="tel:"] {
    text-transform: none !important;
    text-decoration: none;
    font-family: Georgia, 'Times New Roman', serif !important;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Ensure email addresses display correctly */
a[href^="mailto:"],
a[href^="tel:"] {
    text-transform: none !important;
    font-family: Georgia, 'Times New Roman', serif !important;
}

/* Mobile Navigation Overlay - only show on mobile */
@media (max-width: 991px) {
    .navbar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }

    .navbar-backdrop.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* Hide backdrop on desktop */
@media (min-width: 992px) {
    .navbar-backdrop {
        display: none !important;
    }
}

/* Body scroll lock when mobile menu is open - like millmann.at */
body.navbar-open {
    overflow: hidden !important;
}


/* Mobile navigation styles - like millmann.at */
@media (max-width: 991px) {
    /* Navbar mobile menu - exactly like millmann.at */
    .navbar-collapse {
        background-color: var(--bs-body-bg, #fff);
        margin: 0 -1rem;
        padding: 1rem;
        border-radius: 0.5rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
        position: relative;
        z-index: 1060;
    }
    
    /* Adjust for container padding */
    .navbar > .container .navbar-collapse {
        margin-left: calc(-1 * var(--bs-gutter-x, 0.75rem));
        margin-right: calc(-1 * var(--bs-gutter-x, 0.75rem));
    }
    
    .navbar-collapse.show {
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
    
    /* Make sure navbar is on top of backdrop */
    .navbar {
        position: sticky;
        top: 0;
        background-color: white;
    }
}

/* Ensure navbar stays sharp and on top */
.navbar {
    position: relative;
    z-index: 1050 !important;
}

/* Contact Icons in Navigation */
.nav-contact-icons {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.nav-contact-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 0.5rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-contact-icon:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.nav-contact-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Tooltip for contact icons - only on desktop */
@media (min-width: 992px) {
    .nav-contact-icon .tooltip-text {
        visibility: hidden;
        opacity: 0;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 8px;
        padding: 6px 12px;
        background-color: #333;
        color: #fff;
        text-align: center;
        border-radius: 6px;
        white-space: nowrap;
        font-size: 0.875rem;
        font-family: Georgia, serif;
        z-index: 1000;
        transition: opacity 0.3s, visibility 0.3s;
    }
    
    .nav-contact-icon .tooltip-text::after {
        content: '';
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-width: 5px;
        border-style: solid;
        border-color: transparent transparent #333 transparent;
    }
    
    .nav-contact-icon:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
    }
}

/* Hide tooltip on mobile */
@media (max-width: 991px) {
    .nav-contact-icon .tooltip-text {
        display: none !important;
    }
}

/* Equal width mobile buttons */
.mobile-contact-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.mobile-contact-buttons .btn {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Remove outline/border on link hover and focus */
a:hover,
a:focus,
a:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Prevent layout shift on navigation links */
.navbar-nav .nav-link {
    border: 1px solid transparent !important;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
    white-space: nowrap; /* Prevent text wrapping */
}

.navbar-nav .nav-link:active,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link:hover {
    transform: none !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    padding: 0.5rem 1rem !important;
    margin: 0 !important;
}

/* Prevent navbar height changes */
.navbar {
    min-height: 112px !important;
}

.navbar.scrolled {
    min-height: 80px !important;
}


/* Stabilize navigation layout */
html {
    /* Reserve space for scrollbar without forcing it to show */
    scrollbar-gutter: stable;
}

body {
    overflow-x: hidden; /* Prevent horizontal scroll that could cause shifts */
}

/* Page content fade effect - like millmann.at */
body > *:not(.navbar):not(script):not(style):not(.page-transition) {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Show content when page is loaded */
body.page-loaded > *:not(.navbar):not(script):not(style):not(.page-transition) {
    opacity: 1;
    transform: translateY(0);
}

/* Hide content during transition */
body.transitioning > *:not(.navbar):not(script):not(style):not(.page-transition) {
    opacity: 0;
    transform: translateY(20px);
}

/* Prevent scrollbar from disappearing during transition */
body.transitioning {
    overflow-y: auto !important;
    position: static !important;
}


/* Service Section Mobile Styles */
@media (max-width: 991px) {
    /* Service Section - zentriert auf Mobile */
    .service-section-content {
        text-align: center !important;
    }
    
    .service-section-content h3 {
        text-align: center !important;
    }
    
    .service-section-content p {
        text-align: center !important;
    }
}

/* Mobile adjustments */
@media (max-width: 991px) {
    /* Mobile header layout */
    .navbar {
        padding: 0.75rem 0;
        min-height: auto;
    }
    
    body {
        padding-top: 80px;
    }
    
    
    /* Mobile contact icons */
    .nav-contact-icon {
        width: 36px;
        height: 36px;
        margin-left: 0.25rem;
    }
    
    .nav-contact-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .nav-contact-icon .tooltip-text {
        display: none;
    }
    
    /* Hamburger menu styling */
    .navbar-toggler {
        border: none;
        padding: 0.25rem;
    }
    
    /* Mobile navigation collapse - position dynamically based on navbar */
    .navbar-collapse {
        position: absolute;
        top: 100%; /* Position right below navbar */
        left: 0;
        right: 0;
        background-color: var(--white);
        overflow-y: auto;
        z-index: 1040;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        max-height: calc(100vh - 76px);
    }
    
    .navbar-collapse.show {
        transform: translateX(0);
    }
    
    /* Mobile menu items */
    .navbar-nav {
        padding: 2rem 0;
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 1rem;
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--dark-color);
        border: none;
        position: relative;
        transition: color 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        color: var(--secondary-color);
    }
    
    .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background-color: var(--secondary-color);
        transition: width 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover::after {
        width: 50px;
    }
    
    /* Hero section adjustments for mobile */
    .hero-section {
        height: 300px !important;
    }
    
    /* Mobile navigation padding */
    .navbar-nav {
        padding-top: 1rem;
        padding-bottom: 1rem;
        align-items: center;
    }
    
    /* Mobile nav items spacing */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        text-align: center;
        font-size: 1rem;
        font-weight: 600;
        color: var(--dark-color);
        transition: all 0.3s ease;
        position: relative;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .navbar-nav .nav-link:hover {
        color: var(--secondary-color);
    }
    
    /* Mobile nav link underline effect */
    .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background-color: var(--secondary-color);
        transition: width 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover::after,
    .navbar-nav .nav-link.active::after {
        width: 30px;
    }
    
    /* Mobile controls in navbar */
    .navbar-collapse .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding-top: 1rem;
        margin-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    /* Mobile dropdown adjustments */
    .navbar-collapse .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        background-color: rgba(248, 249, 250, 0.9);
        margin: 0.5rem 0;
        padding: 0.5rem;
    }
    
    /* Override Bootstrap collapse for smooth slide animation */
    .navbar-collapse {
        display: block !important;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
        transition: max-height 0.4s ease-out, 
                    opacity 0.3s ease-out, 
                    transform 0.3s ease-out,
                    margin-top 0.3s ease-out;
    }
    
    .navbar-collapse.show {
        max-height: 500px; /* Adjust based on content */
        opacity: 1;
        transform: translateY(0) scale(1);
        margin-top: 0;
    }
    
    /* Remove Bootstrap's collapsing class animations */
    .navbar-collapse.collapsing {
        transition: none;
    }
    
}

