/**
 * SECTION: MARINEGRADE ELEMENTS
 * ---------------------------------------------------------------------------
 */
/* --- 13. CUSTOM SERVICE BLOCKS --- */
.mgrd-service-item {
    display: flex;
    text-decoration: none !important;
    color: inherit !important;
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

.mgrd-service-item.pos-left {
    flex-direction: row;
    align-items: flex-start;
    gap: 25px;
}

.mgrd-service-item.pos-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mgrd-service-item.pos-top .mgrd-service-icon {
    margin-bottom: 20px;
}

.mgrd-service-icon {
    flex: 0 0 64px;
    max-width: 128px;
}

.mgrd-service-icon img {
    width: 100%;
    height: auto;
    display: block;
}

.mgrd-service-subtitle {
    display: block;
    font-size: 0.75rem;
    text-transform: none;
    color: #ffb400; 
    font-weight: 700;
    margin-bottom: 5px;
}

.mgrd-service-content h4 {
    margin: 0 0 10px 0 !important;
    font-size: 1.3rem !important;
    color: #1b354e; 
}

.mgrd-service-item:hover {
    transform: translateY(-5px);
}

.mgrd-service-item:hover h4 {
    color: #ffb400;
}
/* English comments: Remove underline from service box links globally */
.mgrd-service-item h4 a,
.mgrd-service-link {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.mgrd-service-item h4 a:hover,
.mgrd-service-link:hover {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* --- ELEMENT: MG CUSTOM BUTTON (class-mgrd-button.php) --- */

/**
 * 1. Layout & Alignment
 */
.mgrd-button-container {
    margin: 35px 0;
    width: 100%;
}

.mgrd-button-container.text-left   { text-align: left; }
.mgrd-button-container.text-center { text-align: center; }
.mgrd-button-container.text-right  { text-align: right; }

/**
 * 2. Button Design
 * Exact replica of the 'Request a quote' button style.
 * Yellow: #ffb400 | Text: #ffffff
 */
.mgrd-main-btn {
    display: inline-block;
    background-color: #ffb400; /* Main Brand Yellow */
    color: #ffffff !important; /* Always white text */
    padding: 10px 24px; /* Exact padding from header button */
    font-size: 16px; /* Matching site header scale */
    font-weight: 700;
    line-height: 24px; /* Precise line height from original style */
    text-decoration: none !important;
    border-radius: 4px;
    border: 2px solid #ffb400;
    transition: all 0.3s ease-in-out;
    text-transform: none; /* Per user rule: No uppercase */
    cursor: pointer;
    text-align: center;
}

/**
 * 3. Interactive States
 * Hover state: Transition to Dark Blue (#28608f) with opacity effect.
 */
.mgrd-main-btn:hover {
    background-color: #28608f; /* Interaction Blue */
    border-color: #28608f;
    color: #ffffff !important;
    opacity: 0.9; /* Subtle transparency effect from the source */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mgrd-main-btn:active {
    transform: translateY(0);
    opacity: 1;
}

/* --- MG Testimonials Slider: Hardware Accelerated Fix --- */

/**
 * SECTION: TESTIMONIALS SLIDER (MOBILE OPTIMIZED)
 */
.mgrd-testimonials-container {
    position: relative;
    width: 100% !important;
    margin: 40px 0 !important;
    overflow: hidden !important; 
    padding-bottom: 60px; 
}

.mgrd-slider-container {
    width: 100% !important;
    overflow: hidden !important;
    touch-action: pan-y;
}

.mgrd-slider-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    margin: 0 !important;
    padding: 0 !important;
}

.mgrd-slide-item {
    width: 100%;
    flex: 0 0 auto;
    padding: 0 15px; 
    box-sizing: border-box !important;
}

.mgrd-testimonial-card {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    width: 100%;
}

.mgrd-avatar-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50% !important;
    overflow: hidden;
    border: 3px solid #ffb400;
}

.mgrd-avatar-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.mgrd-client-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px !important;
    margin-top: 0 !important;
    color: #1b354e;
}

.mgrd-rating-stars {
    color: #ffb400;
    margin-bottom: 15px;
    font-size: 14px;
}

.mgrd-testimonial-text {
    font-style: italic;
    line-height: 1.6;
    color: #555;
    word-wrap: break-word;
}

/* Nav Buttons Styling */
.mgrd-slider-nav {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.mgrd-nav-btn {
    background: #ffb400;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mgrd-nav-btn:hover {
    background: #1b354e;
}

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
    .mgrd-testimonial-card {
        padding: 20px 10px;
    }
    .mgrd-testimonials-container {
        margin: 20px 0 !important;
    }
}

.mgrd-slider-track {
    display: flex;
    flex-wrap: nowrap; /* Важно: в одну линию */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    margin: 0 !important;
    padding: 0 !important;
}

.mgrd-slide-item {
    /* Ширину теперь задает JS динамически, но тут ставим базу */
    flex: 0 0 auto; 
    padding: 0 15px; 
    box-sizing: border-box !important;
    display: block !important;
}