/* ==========================================
   BASE STYLES & RESET
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%;
}

.marine-article {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    background: #fafbfc;
    color: #2c3e50;
    line-height: 2;
    font-size: clamp(14px, 1.2vw, 16px);
    letter-spacing: -0.01em;
    width: 100%;
    max-width: 100vw;
}

span {
    line-height: 1.8;
    color: #323232;
}

strong {
    font-weight: 500;
}

/* ==========================================
   NAVIGATION & BACK LINK
   ========================================== */
.ma-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8a969f;
    padding: 8px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(11px, 0.9vw, 12px);
    font-weight: 300;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.ma-back-link:hover {
    color: #2c3e50;
    transform: translateX(-2px);
}

.ma-back-link::before {
    content: '←';
    font-size: clamp(12px, 1vw, 14px);
    transition: transform 0.2s ease;
}

.ma-back-link:hover::before {
    transform: translateX(-2px);
}

.ma-header-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .ma-header-nav {
        justify-content: center;
    }
}

/* ==========================================
   HEADINGS & TYPOGRAPHY
   ========================================== */
.ma-heading-hero {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.02em;
    background: radial-gradient(circle, #EFB995 -20%, #98735B 110%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 300;
    line-height: 1.3;
    margin-bottom: 12px;
    text-align: center;
}

.ma-heading-subsection {
    font-size: clamp(16px, 1.8vw, 18px);
    font-weight: 400;
    margin: 24px 0 16px;
    color: #111;
    line-height: 1.6;
}

/* Mobile Headings */
@media (max-width: 768px) {
    .ma-heading-section {
        margin: 24px 0 16px;
    }
}

/* ==========================================
   CONTAINER & LAYOUT
   ========================================== */
.ma-container {
    width: 90%;
    max-width: none;
    margin: 0 auto;
}

.ma-main-layout {
    display: grid;
    margin-top: 32px;
    width: 100%;
}

/* When products exist - show sidebar */
.ma-main-layout.has-products {
    grid-template-columns: 75% 25%;
}

/* When no products - full width */
.ma-main-layout.no-products {
    grid-template-columns: 1fr;
}

.ma-article-content {
    min-width: 0; /* Prevents grid overflow */
    width: 95%;
    text-align: justify;
    hyphens: auto;

    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Medium Screen Layout */

/* Mobile Layout */
@media (max-width: 1024px) {

    .ma-main-layout,
    .ma-main-layout.has-products,
    .ma-main-layout.no-products {
        grid-template-columns: 1fr;
        gap: 0;
        width: 100%;
    }

    .ma-article-content{
        width: 100%;
    }
}

/* ==========================================
   HERO SECTION & IMAGES
   ========================================== */
.ma-hero-image {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    margin-bottom: 32px;
}

.ma-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.95) contrast(1.05);
    transition: filter 0.4s ease;
}

.ma-hero-image:hover img {
    filter: brightness(0.9) contrast(1.1);
}

.ma-hero-content {
    text-align: center;
    color: #2c3e50;
    margin: 0 auto 40px;
}

.ma-hero-content .ma-date {
    color: #8a969f;
    font-size: clamp(10px, 0.9vw, 12px);
    margin-bottom: 16px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
}

.ma-hero-content .ma-hero-paragraph {
    font-size: clamp(16px, 1.4vw, 18px);
    opacity: 0.9;
    color: #5a6c7d;
    margin-top: 16px;
    line-height: 1.8;
}

.ma-full-width-image {
    width: 100%;
    margin: 32px 0;
}

.ma-full-width-image img {
    width: 100%;
    height: auto;
    max-height: 50vh;
    object-fit: cover;
    object-position: center;
    transition: opacity 0.3s ease;
}

.ma-full-width-image img:hover {
    opacity: 0.95;
}

/* Mobile Hero */
@media (max-width: 768px) {
    .ma-hero-image {
        height: 50vh;
        min-height: 350px;
        margin-bottom: 24px;
    }

    .ma-full-width-image img {
        max-height: 40vh;
    }

    .ma-hero-content {
        text-align: center;
        padding: 0 10px; /* Add padding */
    }
    .ma-container{
        margin: 0 auto;
    }
}

/* Small Mobile Hero */
@media (max-width: 480px) {
    .ma-full-width-image img {
        max-height: 35vh;
    }

    .ma-hero-image {
        height: 45vh;
        min-height: 300px;
        margin-bottom: 20px;
    }

    .ma-hero-content {
        padding: 0 5px; /* Further reduced padding */
    }
}
/* ==========================================
   REFINED PRODUCTS SECTION - IVORY PALETTE
   ========================================== */

/* CSS Custom Properties for updated product cards */
:root {
    --surface-light: #ffffff;
    --surface-bg: #f8f9fa;
    --text-primary: #374151;
    --text-secondary: #6b7280;
    --border-light: rgba(229, 231, 235, 0.6);
    --shadow-minimal: 0 1px 3px rgba(0, 0, 0, 0.05);
    --hover-bg: rgba(249, 250, 251, 0.8);

    /* Updated variables for minimal design */
    --border-radius-card: 8px;
    --border-radius-sm: 6px;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-focus: 0 0 0 2px rgba(59, 130, 246, 0.1);
    --primary-color: #3b82f6;
}

.ma-sidebar {
    top: 40px;
    max-height: 1200px;
}

.ma-products-section {
    margin: 32px 0;
    opacity: 0;
    animation: slideInUp 0.6s ease-out 0.2s forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ma-products-container {
    background: var(--surface-light);
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow-minimal);
    border: 1px solid var(--border-light);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: scroll;
    /* Hide scrollbars for container */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ma-products-container::-webkit-scrollbar {
    display: none;
}

.ma-products-title {
    font-size: clamp(18px, 2vw, 20px);
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text-primary);
    line-height: 1.3;
    flex-shrink: 0;
    letter-spacing: -0.01em;
    position: relative;
}

.ma-products-scroll {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    flex: 1;
    position: relative;
    padding-right: 4px;
    /* Hide scrollbars for products scroll */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ma-products-scroll::-webkit-scrollbar {
    display: none;
}

/* Updated Product Card - narrower design */
.ma-product-card {
    background: var(--surface-light);
    padding: 12px;
    border-radius: var(--border-radius-card);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.ma-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.ma-product-card:focus {
    outline: 2px solid var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-focus);
}

.ma-product-card:hover {
    transform: scale(1.05);
}

/* Updated Product Image - full cover */
.ma-product-image {
    width: 100%;
    height: 180px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
    position: relative;
}

.ma-product-image img {
    max-width: 150%;
    max-height: 150%;
    object-fit: cover; /* Changed from contain to cover */
    transition: transform 0.2s ease;
}

/* Updated Product Info */
.ma-product-info {
    flex: 1;
    min-width: 0;
    position: relative;
}

/* Updated Card Title - 2 lines max */
.ma-product-card .ma-card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 2px;
    margin-bottom: 6px;
    line-height: 1.3;
    letter-spacing: -0.005em;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Maximum 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 0;
}

.ma-product-card .ma-card-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Maximum 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 0;
}

/* Optional: Add product badge support if needed */
.ma-product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-color);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    z-index: 3;
}

/* Hide mobile scroll indicator completely */
.ma-scroll-indicator {
    display: none !important;
}

@media (max-width: 1024px) {
    .ma-sidebar {
        max-height: none;
        display: none;
    }

    .ma-products-section {
        margin: 24px 0;
        padding: 0 16px;
    }

    .ma-products-container {
        height: auto;
        min-height: auto;
        padding: 16px;
        position: relative;
        /* Hide scrollbars */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .ma-products-container::-webkit-scrollbar {
        display: none;
    }

    .ma-products-title {
        font-size: 18px;
        margin-bottom: 14px;
    }

    .ma-products-scroll {
        display: flex !important;
        flex-direction: row;
        gap: 14px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 6px 0 12px 0;
        max-height: none;
        -webkit-overflow-scrolling: touch;
        grid-template-columns: none;
        grid-template-rows: none;
        scroll-snap-type: x mandatory;
        /* Hide scrollbars completely */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .ma-products-scroll::-webkit-scrollbar {
        display: none;
    }

    .ma-product-card {
        padding: 12px;
        min-width: 240px; /* Narrower cards */
        width: 240px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .ma-product-image {
        height: 120px; /* Shorter for mobile */
        margin-bottom: 12px;
    }

    /* Remove fade effects at edges - they can interfere with scrolling */
    .ma-products-container::before,
    .ma-products-container::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .ma-products-section {
        margin: 20px 0;
        padding: 0 12px;
    }

    .ma-products-container {
        padding: 14px;
        /* Hide scrollbars */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .ma-products-container::-webkit-scrollbar {
        display: none;
    }

    .ma-products-title {
        margin-bottom: 12px;
        font-size: 17px;
    }

    .ma-products-scroll {
        gap: 12px;
        padding: 4px 0 10px 0;
        /* Hide scrollbars */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .ma-products-scroll::-webkit-scrollbar {
        display: none;
    }

    .ma-product-card {
        padding: 12px;
        width: 220px; /* Even narrower for tablet */
        min-width: 220px;
    }

    .ma-product-image {
        height: 110px;
        margin-bottom: 12px;
    }

    .ma-card-title {
        font-size: 14px;
        margin-top: 2px;
    }

    .ma-card-description {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .ma-products-section {
        padding: 0 8px;
        margin: 16px 0;
    }

    .ma-products-container {
        padding: 12px;
        /* Hide scrollbars */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .ma-products-container::-webkit-scrollbar {
        display: none;
    }

    .ma-products-title {
        margin-bottom: 10px;
        font-size: 16px;
    }

    .ma-products-scroll {
        gap: 10px;
        /* Hide scrollbars */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .ma-products-scroll::-webkit-scrollbar {
        display: none;
    }

    .ma-product-card {
        min-width: 200px; /* Narrowest for mobile */
        width: 200px;
        padding: 12px;
    }

    .ma-product-image {
        height: 120px; /* Even shorter for very small screens */
        margin-bottom: 12px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .ma-product-card {
        opacity: 0;
        transform: translateY(10px);
        animation: cardFadeIn 0.4s ease-out forwards;
    }

    .ma-product-card:nth-child(1) { animation-delay: 0.05s; }
    .ma-product-card:nth-child(2) { animation-delay: 0.1s; }
    .ma-product-card:nth-child(3) { animation-delay: 0.15s; }
    .ma-product-card:nth-child(4) { animation-delay: 0.2s; }
    .ma-product-card:nth-child(n+5) { animation-delay: 0.25s; }
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   CARDS & GRIDS
   ========================================== */
.ma-card {
    background: #fff;
    border-radius: 2px;
    padding: 0;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.ma-card:hover,
.ma-card:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ma-card:focus {
    outline: 2px solid #16a085;
    box-shadow: 0 8px 25px rgba(22, 160, 133, 0.2);
}

.ma-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #16a085;
    color: #fff;
    padding: 3px 6px;
    border-radius: 2px;
    font-size: clamp(9px, 0.8vw, 10px);
    font-weight: bold;
    z-index: 2;
}

/* Grid System */
.ma-grid {
    display: grid;
    gap: 32px 24px;
    list-style: none;
    padding: 0;
    width: 100%;
}

.ma-grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.ma-grid-1 {
    grid-template-columns: 1fr;
}

/* Mobile Grids */
@media (max-width: 768px) {
    .ma-grid-auto {
        grid-template-columns: 1fr;
        gap: 20px 16px; /* Reduced gaps */
    }
}

@media (max-width: 480px) {
    .ma-grid {
        gap: 16px 12px; /* Further reduced gaps */
    }
}

/* ==========================================
   IMAGE CONTAINERS
   ========================================== */
.ma-image-container {
    width: 100%;
    overflow: hidden;
    border-radius: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.ma-image-container img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ma-card:hover .ma-image-container img,
.ma-card:focus .ma-image-container img {
    transform: scale(1.05);
}

.ma-article-image {
    min-height: 200px;
    height: 25vh;
}

/* ==========================================
   CARD CONTENT & TEXT
   ========================================== */
.ma-card-title {
    font-size: clamp(14px, 1.2vw, 16px);
    font-weight: 400;
    margin-bottom: 8px;
    line-height: 1.5;
    color: #111;
    padding-left: 15px;
}

.ma-card-description {
    font-size: clamp(12px, 1.1vw, 14px);
    color: #8a969f;
    line-height: 1.8;
    margin-bottom: 8px;
    text-align: left;
    hyphens: auto;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
    padding-left: 15px;

}


.ma-card-date {
    font-size: clamp(10px, 0.9vw, 12px);
    color: #aaa;
    font-weight: 400;
    margin-bottom: 12px;
    padding: 0 15px;
}

.ma-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2d3748;
    padding: 0 15px 15px;
    border: none;
    font-size: clamp(10px, 0.9vw, 12px);
    cursor: pointer;
    transition: color 0.3s ease;
    text-decoration: none;
    font-weight: 400;
    background: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ma-read-more:hover {
    color: #1a1a1a;
}

.ma-read-more::after {
    content: '→';
    font-size: clamp(10px, 0.9vw, 12px);
    transition: transform 0.3s ease;
}

.ma-read-more:hover::after {
    transform: translateX(2px);
}

/* Mobile Card Content */
@media (max-width: 768px) {

    .ma-card-date {
        padding: 0 8px; /* Reduced from 15px */
    }

    .ma-read-more {
        padding: 0 8px 8px; /* Reduced */
    }
}

/* ==========================================
   LISTS & CONTENT ELEMENTS
   ========================================== */
.ma-list-styled {
    margin: 24px 0;
    padding-left: 0;
    list-style: none;
}

.ma-list-styled li {
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    text-align: justify;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 2;
    font-size: clamp(14px, 1.2vw, 16px);
}

.ma-list-styled li::before {
    content: "—";
    color: #16a085;
    font-size: clamp(14px, 1.2vw, 16px);
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 300;
}

.ma-quote {
    background: transparent;
    padding: 24px 0;
    margin: 32px 0;
    border: none;
    border-top: 1px solid #b2dfdb;
    border-bottom: 1px solid #b2dfdb;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: clamp(16px, 1.4vw, 18px);
    line-height: 2;
}

.ma-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #b2dfdb 50%, transparent 100%);
    margin: 48px 0;
}

/* ==========================================
   RECENT ARTICLES SECTION
   ========================================== */
.ma-recent-articles-section {
    background: #fff;
    padding: 40px 0;
    margin-top: 48px;
    border-top: 1px solid #f0f0f0;
}

/* ==========================================
   ARTICLE CONTENT & OVERFLOW FIXES
   ========================================== */
.ma-article-section {
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.ma-article-section * {
    max-width: 100%;
    box-sizing: border-box;
    word-break: keep-all;
}

/* Ensure images don't cause horizontal scroll */
.ma-article-section img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   QUILL EDITOR STYLES
   ========================================== */
.ql-indent-1 {
    padding-left: 3em;
}

.ql-indent-2 {
    padding-left: 6em;
}

.ql-indent-3 {
    padding-left: 9em;
}

/* ==========================================
   FOOTER & COPYRIGHT
   ========================================== */
.copyright, .copyright a, .copyright span, .copyright p {
    color: white;
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .copyright-text {
        color: white;
    }
}

/* ==========================================
   TOUCH & ACCESSIBILITY
   ========================================== */
/* Touch-friendly improvements for mobile */
@media (hover: none) {
    .ma-card {
        transform: none;
    }

    .ma-card:active {
        transform: scale(0.98);
    }
}