/* Dropdown menu styles - Desktop hover */
@media (min-width: 769px) {
    .nav-menu .group:hover .sub-menu,
    .nav-menu .group:focus-within .sub-menu {
        display: flex !important;
    }
}

/* Mobile dropdown styles - Toggle via button */
@media (max-width: 768px) {
    /* Hide by default */
    .nav-menu .sub-menu.hidden {
        display: none !important;
    }
    
    /* Show when not hidden */
    .nav-menu .sub-menu:not(.hidden) {
        display: flex !important;
    }
}

/* Ensure proper z-index layering */
.nav-menu .sub-menu {
    z-index: 1000;
}

/* Smooth arrow rotation for dropdown toggles */
.dropdown-toggle span {
    display: inline-block;
    transition: transform 0.3s ease;
    transform-origin: center;
}

/* Sticky navbar */
.main-navigation {
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.3s ease-in-out;
}

.nav-menu a {
    transition: all 0.3s ease-in-out;
}

iframe {
    transition: opacity 0.5s ease, filter 0.5s ease;
}

iframe:hover {
    opacity: 1;
    filter: none;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Header image loading states */
.header-image img {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.header-image img.loaded {
    opacity: 1;
}

/* ============================================
   CONTACT FORM STYLES
   ============================================ */

/* Field error messages */
.field-error {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #dc2626;
    font-weight: 500;
}

/* Form message container */
.form-message {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    display: none;
    transition: all 0.3s ease-in-out;
}

.form-message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

/* Success message */
.form-message.success {
    background-color: #d1fae5;
    border: 2px solid #10b981;
    color: #065f46;
}

/* Error message */
.form-message.error {
    background-color: #fee2e2;
    border: 2px solid #dc2626;
    color: #991b1b;
}

/* Animation for message appearance */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form field focus states */
.focused {
    position: relative;
}

.filled {
    position: relative;
}

/* Enhanced input focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #b8860b !important;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

/* Input error state */
input.error,
textarea.error,
select.error {
    border-color: #dc2626 !important;
    border-width: 2px;
}

/* Input valid state */
input.valid,
textarea.valid,
select.valid {
    border-color: #10b981 !important;
    border-width: 2px;
}

/* Disabled button state */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
