/* 
 * MS Fittings Custom Styles 
 * Color Palette based on Dark Steel, Gold, and Maroon.
 */

:root {
    --steel-900: #0e1014;
    --steel-800: #14171c;
    --steel-700: #1a1e24;
    --steel-200: #9aa3b1;
    --gold: #c9a55a;
    --gold-light: #e0c585;
    --gold-dark: #8e6f33;
    --maroon: #8b1a1a;
    --maroon-dark: #6b1212;
    --maroon-light: #b8302d;
    --light-surface: #f8f9fa;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    overflow-x: hidden;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0e1014;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    text-align: center;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.pre-logo {
    height: 60px;
    margin-bottom: 25px;
}

.pre-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.pre-tagline {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.pre-bar-wrap {
    width: 250px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.pre-bar {
    width: 100%;
    height: 100%;
    background: var(--gold);
    animation: pre-load-bar 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transform-origin: left;
}

.pre-est {
    font-size: 0.75rem;
    color: #555;
    letter-spacing: 3px;
    text-transform: uppercase;
}

@keyframes pre-load-bar {
    0% { transform: scaleX(0); }
    50% { transform: scaleX(0.5); }
    100% { transform: scaleX(1); }
}

h1, h2, h3, h4, h5, h6, .navbar-brand .logo-text {
    font-family: 'Playfair Display', serif;
}

/* Colors Utilities */
.bg-dark-steel { background-color: var(--steel-900) !important; }
.bg-maroon-dark { background-color: var(--maroon-dark) !important; }
.bg-light-surface { background-color: var(--light-surface) !important; }

.text-gold { color: var(--gold) !important; }
.text-maroon { color: var(--maroon) !important; }
.text-light-gray { color: var(--steel-200) !important; }

.letter-spacing-1 { letter-spacing: 0.1em; }
.max-w-700 { max-width: 700px; }

/* Buttons */
.btn-gold {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    color: var(--steel-900);
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 15px rgba(201, 165, 90, 0.3);
    transition: all 0.3s ease;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 165, 90, 0.5);
    color: var(--steel-900);
}

.btn-outline-gold {
    color: var(--gold);
    border: 1px solid var(--gold);
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--steel-900);
}

/* Navigation - Glassmorphism & Responsive Redesign */
.glass-nav {
    background: rgba(14, 16, 20, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.2rem 0; /* Responsive padding */
}

.glass-nav.scrolled {
    background: rgba(14, 16, 20, 0.98);
    padding: 0.6rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.nav-logo {
    height: 2.8rem; /* Responsive height */
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .nav-logo {
    transform: scale(1.05);
}

.navbar-brand .logo-text {
    font-size: 1.4rem;
    line-height: 1.1;
    letter-spacing: 0.05em;
}

.logo-subtext {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.55rem; /* Responsive font size */
    color: var(--gold-light);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 0.1rem;
}

.navbar-dark .navbar-nav {
    gap: 0.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem; /* Responsive font size */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link.active {
    color: var(--steel-900);
    background-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(201, 165, 90, 0.3);
}

/* Remove old underline effect as we are using background pills now, but keep the dropdown caret */
.navbar-dark .navbar-nav .nav-link:not(.dropdown-toggle)::after {
    display: none;
}

/* Style and animate the dropdown indicator caret */
.navbar-dark .navbar-nav .nav-link.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.4rem;
    vertical-align: middle;
    border-top: 0.35em solid;
    border-right: 0.35em solid transparent;
    border-left: 0.35em solid transparent;
    border-bottom: 0;
    content: "";
    transition: transform 0.3s ease;
}

/* Rotate the indicator when the menu is open */
.navbar-dark .navbar-nav .nav-link.dropdown-toggle.show::after {
    transform: rotate(-180deg);
}

/* Custom Dropdown Styling */
.custom-dropdown {
    background: rgba(14, 16, 20, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(201, 165, 90, 0.2);
    border-radius: 8px;
    padding: 0.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    margin-top: 0.5rem;
    min-width: 200px;
}

.custom-dropdown .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

.custom-dropdown .dropdown-item:hover, .custom-dropdown .dropdown-item:focus {
    background-color: rgba(201, 165, 90, 0.15);
    color: var(--gold);
    padding-left: 1.8rem; /* Subtle indent animation */
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: url('https://images.unsplash.com/photo-1565514020179-026b92b2d718?q=80&w=1920&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
    position: relative;
    padding-top: 80px; /* Offset for fixed nav */
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(14, 16, 20, 0.95) 0%, rgba(14, 16, 20, 0.7) 100%);
    z-index: 0;
}

.hero-eyebrow {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--gold);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 15px;
}
.hero-eyebrow .line {
    width: 40px;
    height: 1px;
    background-color: var(--gold);
}

/* Dividers */
.gold-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold-dark));
    border-radius: 2px;
}

/* Product Cards */
.product-card {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}
.product-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}
.product-card img {
    transition: transform 0.6s ease;
    height: 350px;
    object-fit: cover;
}
.product-card:hover img {
    transform: scale(1.1);
}
.product-card .card-img-overlay {
    background: linear-gradient(to top, rgba(14, 16, 20, 0.9) 0%, rgba(14, 16, 20, 0) 100%);
    transition: background 0.3s ease;
}
.product-card:hover .card-img-overlay {
    background: linear-gradient(to top, rgba(201, 165, 90, 0.8) 0%, rgba(14, 16, 20, 0) 100%);
}

/* Material Spec Section */
.material-image-box {
    border: 1px solid rgba(0,0,0,0.05);
}
.cert-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: linear-gradient(180deg, var(--maroon-light) 0%, var(--maroon) 100%);
    color: white;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(139, 26, 26, 0.4);
    border: 4px solid white;
}

/* CTA Section */
.cta-texture {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(var(--steel-700) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}
.glass-btn {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Custom Tabs for Contact Section */
.custom-tab {
    color: var(--steel-200) !important;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent !important;
}
.custom-tab:hover {
    color: var(--gold) !important;
}
.custom-tab.active {
    color: var(--gold) !important;
    border-bottom: 2px solid var(--gold) !important;
    background: rgba(20, 23, 28, 0.5) !important;
}
.hover-gold:hover {
    color: var(--gold) !important;
}

/* Footer Links */
.footer-link {
    transition: color 0.3s ease;
}
.footer-link:hover {
    color: var(--gold) !important;
    text-decoration: underline !important;
}

/* Animations */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Footer Certified Glow */
.footer-cert-glow {
    position: relative;
    animation: cert-pulse 2.5s infinite;
    box-shadow: 0 0 10px rgba(201, 165, 90, 0.2);
    transition: all 0.3s ease;
}

@keyframes cert-pulse {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(201, 165, 90, 0.2), inset 0 0 5px rgba(201, 165, 90, 0.1); 
        border-color: rgba(201, 165, 90, 0.5); 
    }
    50% { 
        box-shadow: 0 0 25px rgba(201, 165, 90, 0.6), inset 0 0 10px rgba(201, 165, 90, 0.3); 
        border-color: rgba(201, 165, 90, 1); 
        transform: scale(1.02); 
    }
}
  /* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â

/* Products Page Specific Styles */
.category-selector select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C9A55A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    border: 1px solid var(--gold);
}
.category-selector select:focus {
    border-color: var(--gold-light);
    box-shadow: 0 0 0 0.25rem rgba(201, 165, 90, 0.25);
}

.product-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-card:hover img {
    transform: scale(1.1);
    opacity: 0.6 !important;
}

.product-card:hover .overlay-btn {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

#productsGrid {
    min-height: 400px;
}

/* Breadcrumb Styles */
.custom-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    color: var(--gold);
    padding-right: 0.5rem;
}

/* Product Circle Glow Effect */
.product-card:hover .card-img-wrapper {
    box-shadow: 0 0 25px 2px rgba(201, 165, 90, 0.8);
    border-color: var(--gold);
}
.product-card:hover img {
    opacity: 1 !important;
}

/* Animated Glowing Border Container */
.animated-border-wrapper {
    position: relative;
    border-radius: 10px;
    z-index: 0;
}

.animated-border-wrapper::before {
    content: '';
    /* Gold-themed animated gradient instead of rainbow to match brand */
    background: linear-gradient(45deg, var(--gold), #fff, var(--gold), #886823, var(--gold), #fff, var(--gold));
    position: absolute;
    top: -3px;
    left: -3px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    animation: glowing-border 10s linear infinite;
    opacity: 0;
    transition: opacity .3s ease-in-out;
    border-radius: 10px;
}

.product-card:hover .animated-border-wrapper::before {
    opacity: 1;
}

.animated-border-wrapper::after {
    z-index: -1;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #111;
    left: 0;
    top: 0;
    border-radius: 10px;
}

.animated-border-wrapper img {
    border-radius: 10px;
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

@keyframes glowing-border {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

.product-card:hover .animated-border-wrapper {
    box-shadow: none; /* override old static shadow */
}

/* Capabilities Page Styles */
.spec-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(201, 165, 90, 0.15);
    border-color: var(--gold) !important;
}
.spec-card .icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(201, 165, 90, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(201, 165, 90, 0.3);
}

/* Feedback Form Custom Styling */
.custom-rating-table th, .custom-rating-table td {
    background: transparent !important;
}
.custom-radio {
    display: inline-flex;
    align-items: center;
}
.custom-radio .form-check-input {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    margin-right: 0.5rem;
    cursor: pointer;
}
.custom-radio .form-check-input:checked {
    background-color: var(--gold);
    border-color: var(--gold);
}
.custom-radio .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(201, 165, 90, 0.25);
    border-color: var(--gold);
}
.custom-radio .form-check-label {
    color: var(--light-gray);
    cursor: pointer;
}

.custom-form-floating > .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}
.custom-form-floating > .form-control:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--gold);
    box-shadow: none;
    color: #fff;
}
.custom-form-floating > label {
    color: rgba(255, 255, 255, 0.5);
}
.custom-form-floating > .form-control:focus ~ label,
.custom-form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--gold);
}

.custom-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-gray);
    cursor: pointer;
}
.custom-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--gold);
    box-shadow: 0 0 0 0.25rem rgba(201, 165, 90, 0.25);
    color: #fff;
}
.custom-select option {
    background-color: var(--steel-800);
    color: #fff;
}

.glow-on-hover {
    width: 220px;
    height: 50px;
    border: none;
    outline: none;
    color: #fff;
    background: #111;
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 10px;
    font-weight: bold;
}

.glow-on-hover:before {
    content: '';
    background: linear-gradient(45deg, #C9A55A, #E5C77A, #C9A55A, #8A6E35, #C9A55A);
    position: absolute;
    top: -2px;
    left:-2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity .3s ease-in-out;
    border-radius: 10px;
}

.glow-on-hover:active {
    color: #C9A55A;
}

.glow-on-hover:active:after {
    background: transparent;
}

.glow-on-hover:hover:before {
    opacity: 1;
}

.glow-on-hover:after {
    z-index: -1;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #111;
    left: 0;
    top: 0;
    border-radius: 10px;
    border: 1px solid rgba(201,165,90,0.5);
}

@keyframes glowing {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}
