/* Main CSS file for Felger 2026 theme */

/* Global reset for full-width layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Prevent horizontal scrolling */
    overflow-x: hidden;
    width: 100%;
    /* Prevent zoom issues that might trigger desktop mode */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #2c2c2c;
    /* Prevent text scaling issues */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Ensure all elements respect viewport width */
*, *::before, *::after {
    max-width: 100%;
    box-sizing: border-box;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-weight: 700;
}

h2 {
    font-weight: 600;
}

p {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
}

/* Header and Navigation */
.main-nav {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.main-nav .container {
    max-width: none;
    width: 100%;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 101;
    flex-shrink: 0;
}

.site-logo {
    height: 80px !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    transition: transform 0.2s ease !important;
    display: block !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

.site-logo:hover {
    transform: scale(1.05) !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

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

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
}

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

.nav-item {
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Ensure good touch targets */
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
    /* Remove any browser-generated content */
    position: relative;
}

.nav-links a::after {
    /* Ensure no pseudo-content is added */
    content: none !important;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links a:focus {
    background-color: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(10px);
    font-weight: 600;
    outline: none;
}

/* Better focus indicators for keyboard navigation */
.nav-links a:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

.submenu-arrow {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    /* Prevent screen readers from announcing this as interactive */
    aria-hidden: true;
    pointer-events: none;
    user-select: none;
}

.has-submenu:hover .submenu-arrow {
    transform: rotate(180deg);
}

/* Submenu */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 280px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
}

/* Show submenu on hover for desktop (non-touch) */
.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Show submenu when explicitly opened (for touch devices) */
.has-submenu.submenu-open .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Rotate arrow when submenu is open */
.has-submenu.submenu-open .submenu-arrow {
    transform: rotate(180deg);
}

/* Remove any browser-generated content for submenu items */
.has-submenu::after,
.has-submenu::before,
.has-submenu > a::after,
.has-submenu > a::before {
    content: none !important;
    display: none !important;
}

.submenu li {
    margin: 0;
}

.submenu a {
    color: #333 !important;
    font-weight: 400 !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0 !important;
    display: block !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    /* Better touch targets */
    min-height: 44px !important;
    min-width: auto !important;
    justify-content: flex-start !important;
}

.submenu a:hover,
.submenu a:focus {
    background-color: #FF6B35 !important;
    color: white !important;
    font-weight: 500 !important;
}

.submenu a:focus-visible {
    outline: 2px solid #FF6B35 !important;
    outline-offset: -2px !important;
}

/* Remove any browser-generated content for submenu links */
.submenu a::after,
.submenu a::before {
    content: none !important;
    display: none !important;
}

/* Visual indicator for touch-friendly menu items */
@media (hover: none) and (pointer: coarse) {
    .has-submenu > .main-nav-link::after {
        display: none !important;
    }
}

/* For devices that support both hover and touch */
@media (hover: hover) and (pointer: coarse) {
    /* Desktop with touchscreen - show hover behavior only */
    .has-submenu > .main-nav-link {
        cursor: pointer;
    }
    
    .has-submenu > .main-nav-link::after {
        display: none !important;
    }
}

.submenu li {
    margin: 0;
}

.submenu a {
    color: #333 !important;
    font-weight: 400 !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0 !important;
    display: block !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
}

.submenu a:hover {
    background-color: #FF6B35 !important;
    color: white !important;
    font-weight: 500 !important;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #4A7C59 0%, #6A9C79 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 4rem;
    width: 100%;
}

footer h3 {
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

footer h4 {
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

footer p {
    color: white;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer li {
    color: white;
    font-family: 'Inter', sans-serif;
    margin: 0.5rem 0;
}

/* Social media links styling */
footer .social-links a {
    transition: transform 0.2s ease, opacity 0.8s ease;
}

footer .social-links a:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

footer .social-links svg {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

footer .social-links a:hover svg {
    transform: scale(1.1);
}

.contact-info {
    margin: 2rem 0;
}

.contact-info p {
    margin: 0.5rem 0;
}

/* Responsive Navigation */
/* iPad and larger tablets - keep desktop layout */
@media (max-width: 1024px) and (min-width: 769px) {
    .main-nav .container {
        padding: 1rem 1.5rem;
    }
    
    .site-logo {
        height: 70px !important;
        max-width: none !important;
    }
    
    .nav-links {
        gap: 1.2rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
        padding: 0.4rem 0.7rem;
    }
    
    .submenu {
        min-width: 250px;
    }
}

/* Only apply mobile layout to smaller screens */
@media (max-width: 768px) {
    .main-nav .container {
        padding: 1rem;
        /* Ensure no minimum width forces desktop mode */
        min-width: 0;
        width: 100%;
    }
    
    .site-logo {
        height: 60px !important;
        /* Prevent logo from being too wide but don't compress it */
        max-width: 250px !important;
        object-fit: contain !important;
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
        /* Ensure button doesn't cause overflow */
        flex-shrink: 0;
    }
    
    /* Hide desktop menu by default */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
        transition: right 0.3s ease;
        z-index: 100;
        padding-top: 80px;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        /* Prevent menu from causing horizontal scroll */
        overflow-x: hidden;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0;
        padding: 2rem 0;
        width: 100%;
        /* Prevent links from overflowing */
        overflow-wrap: break-word;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        /* Prevent items from being too wide */
        min-width: 0;
    }
    
    .nav-links a {
        padding: 1rem 2rem;
        font-size: 1rem;
        border-radius: 0;
        justify-content: space-between;
        width: 100%;
        /* Prevent text overflow */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        background-color: rgba(255,255,255,0.1);
    }
    
    /* Mobile submenu styling for screens 768px and below */
    .submenu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: rgba(255,255,255,0.1) !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin-left: 1rem !important;
        display: none !important;
    }
    
    .has-submenu.submenu-open .submenu {
        display: block !important;
    }
    
    .submenu a {
        color: rgba(255,255,255,0.9) !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
    }
    
    .submenu a:hover {
        background-color: rgba(255,255,255,0.2) !important;
        color: white !important;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        /* Prevent any potential width issues */
        width: 100%;
        max-width: 100vw;
    }
    
    /* Overlay */
    .nav-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: -1;
    }
    
    footer {
        padding: 2rem 1rem;
        /* Ensure footer doesn't cause overflow */
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Hide social media text on mobile, show only icons */
    footer a[href*="facebook.com"],
    footer a[href*="instagram.com"] {
        font-size: 0 !important;
        gap: 0 !important;
    }
    
    footer a[href*="facebook.com"] svg,
    footer a[href*="instagram.com"] svg {
        width: 32px !important;
        height: 32px !important;
        margin: 0 0.5rem !important;
    }
    
    /* Ensure the social links container is properly spaced */
    footer div[style*="display: flex"] {
        gap: 1rem !important;
    }
}

@media (max-width: 480px) {
    .main-nav .container {
        padding: 0.75rem 1rem;
    }
    
    .site-logo {
        height: 50px !important;
        max-width: 200px !important;
        object-fit: contain !important;
    }
    
    .nav-menu {
        width: 90%;
        max-width: none;
    }
    
    .nav-links a {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .submenu a {
        padding: 0.625rem 2.5rem !important;
        font-size: 0.85rem !important;
    }
    
    /* Hide social media text on small mobile, show only icons */
    footer a[href*="facebook.com"],
    footer a[href*="instagram.com"] {
        font-size: 0 !important;
        gap: 0 !important;
    }
    
    footer a[href*="facebook.com"] svg,
    footer a[href*="instagram.com"] svg {
        width: 28px !important;
        height: 28px !important;
        margin: 0 0.3rem !important;
    }
    
    footer h3 {
        font-size: 1.5rem !important;
    }
    
    footer h4 {
        font-size: 1.1rem !important;
    }
}