/* CSS Variables for Consistent Styling */
:root {
    --max-container-width: 1200px;
    --secondary-color: #d6ad60;
    --secondary-color-hover: #c09853;
    --table-border-color: #dddddd;
    --table-header-bg: #f2f2f2;
    --table-row-alt-bg: #f3f3f3;
    --text-color: #333;
    --font-family-base: Arial, sans-serif;
    --font-family-title: 'Cormorant Garamond', serif;
    --box-shadow: 15px 15px 0px rgba(0, 0, 0, 1);
    --box-shadow-mobile: 10px 10px 0px rgba(0, 0, 0, 1);
    --padding-base: 20px;
    --padding-mobile: 15px;
    --margin-base: 20px;
    --margin-section: 2em 0;
    --border-radius: 5px;
    --font-size-title: 32px;
    --font-size-title-mobile: 18px;
    --font-size-table: 1em;
}

/* Container Styles */
.container,
.diamond-price-container,
.graph-container {
    max-width: var(--max-container-width);
    width: 100%;
    margin: 0 auto;
    padding: var(--padding-base);
    box-sizing: border-box;
}

.content-container {
    max-width: 801px;
    padding: 0 15px;
    margin: 0 auto;
}

/* Typography */
h1.page-title {
    font-size: var(--font-size-title);
    font-family: var(--font-family-title);
    background-color: var(--secondary-color);
    color: #fff;
    padding: var(--padding-base);
    margin: 0 0 20px 0;
    box-shadow: var(--box-shadow);
    max-width: 1000px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
}

@media screen and (max-width: 768px) {
    h1.page-title {
        font-size: var(--font-size-title-mobile);
        padding: var(--padding-mobile);
        box-shadow: var(--box-shadow-mobile);
        margin-right: 10px;
    }
}

/* Graph Embed Styles */
.diamond-graph iframe,
.diamond-graph object,
.diamond-graph embed {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.graph-container {
    max-width: 1000px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--margin-base);
    font-family: var(--font-family-base);
    box-sizing: border-box;
}

.diamond-shape-table,
.diamond-price-table {
    min-width: 400px;
}

.diamond-shape-table th,
.diamond-shape-table td,
.diamond-price-table th,
.diamond-price-table td {
    border: 1px solid var(--table-border-color);
    padding: 12px 15px;
    text-align: center;
}

.diamond-shape-table th,
.diamond-price-table thead tr {
    background-color: var(--table-header-bg);
    color: var(--text-color);
}

.diamond-price-table {
    margin: 20px 0;
    font-size: var(--font-size-table);
}

.diamond-price-table tbody tr:nth-of-type(even) {
    background-color: var(--table-row-alt-bg);
}

/* Sections */
.diamond-price-section,
.diamond-market-analysis,
.diamond-summary,
.diamond-details,
.editable-content,
.diamond-intro,
.diamond-analysis {
    margin-top: var(--margin-base);
    margin-bottom: var(--margin-section);
}

/* Buttons */
.view-all-button {
    text-align: center;
    margin: var(--margin-section) 0;
}

.view-all-button .button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: #fff;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.view-all-button .button:hover {
    background-color: var(--secondary-color-hover);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .diamond-price-container,
    .container,
    .graph-container {
        padding: 10px;
    }
}

@media screen and (max-width: 600px) {
    .graph-container {
        max-width: 100%;
    }
}

/* Hide Plotly Graph Title Text without affecting layout */
.diamond-graph .gtitle {
    display: none !important;
}

/* Add black underlining to text links within the diamond-price-container */
.diamond-price-container a {
    text-decoration: underline;
    color: black;
}

/* Custom h2 Styling */
.diamond-price-container h2 {
    position: relative;                 /* Establishes a positioning context for the pseudo-element */
    display: inline-block;              /* Shrinks the h2 to fit its content */
    color: white;                       /* Text color */
    font-size: 24px;                    /* Updated font size */
    margin: 30px;                       /* Increased spacing around the h2 */
    padding: 15px 35px 15px 15px;       /* Adjusted padding: top, right, bottom, left */
    z-index: 1;                         /* Ensures the text stays above the pseudo-element */
}

.diamond-price-container h2::before {
    content: '';                        /* Necessary to display the pseudo-element */
    position: absolute;                 /* Positions the pseudo-element relative to the h2 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;            /* Background color of the parallelogram */
    transform: skew(-20deg);            /* Skews the element to form a parallelogram */
    transform-origin: top left;         /* Sets the origin point for the transformation */
    z-index: -1;                        /* Places the pseudo-element behind the text */
    border-bottom: 5px solid #d6ad60;   /* Updated gold line color */
    box-sizing: border-box;             /* Ensures borders are included in the element's total width and height */
    padding: 0;                         /* Reset padding to prevent double padding effect */
}

/* Custom h3 Styling */
.diamond-price-container h3 {
    font-size: 20px;
}
