/*
 * ====================================================================
 * REVISED GLOBAL STYLES & LAYOUT
 * Theme: Dark Blue Background, White Text, Orange Accents (Consistency Fixes)
 * ====================================================================
 */

:root {
    /* Revised Color Palette (Same as before) */
    --color-background-blue: #005f73;   /* Main Background Blue (Darker for contrast) */
    --color-primary-orange: #ffb703;    /* Main Accent Orange (Topics/Subtopics) */
    --color-text-white: #ffffff;        /* Main Body Text (White) */
    --color-light-blue-accent: #0096c7; /* Lighter blue for subtle borders/accents/boxes */
    --color-link-hover: #ff8800;        /* Slightly darker orange for link hover */

    /* Typography (Same as before) */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* Import Google Fonts (Montserrat & Open Sans) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght=400;600&display=swap');

/* Reset and Base Styles */
body {
    font-family: var(--font-body);
    color: var(--color-text-white);
    background-color: var(--color-background-blue);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Container for main content, centers and adds max width */
body > * {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* -----------------------------------------------------------
 * FIX 1 & 3: Marcelo Mancini Name Header & Navigation Bar Border
 * ----------------------------------------------------------- */

/* Main name header (first h2 on all pages) */
body > h2:first-child {
    font-size: 2.2em;
    color: var(--color-text-white);
    padding-top: 20px;
    /* The orange line is now applied here and controlled by the padding/max-width */
    border-bottom: 3px solid var(--color-primary-orange);
    padding-bottom: 10px;
    margin-bottom: 0;
}

#menu {
    text-align: center;
    padding: 0 auto;
    width: 80%;
     height: 60px;
    margin-top: 0;
    background-color: var(--color-light-blue-accent);
    /* REMOVED: border-bottom was causing an extra line below the navbar content */
    font-family: var(--font-heading);
    font-weight: 600;
}

/* Menu links styling (no change here) */
#menu a {
    color: var(--color-text-white);
    line-height: 60px;
    padding: 0 10px;
    margin: 0 5px;
    font-size: 1em;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
}

#menu a:hover {
    background-color: var(--color-primary-orange);
    color: var(--color-background-blue);
    text-decoration: none;
}

#menu a + a::before {
    content: "";
}

/* -----------------------------------------------------------
 * FIX 2: Headings Consistency
 * ----------------------------------------------------------- */

/* General Headings: Topics and Sub-topics are Orange and now explicitly defined for consistency */
h2 {
    font-family: var(--font-heading);
    color: var(--color-primary-orange);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700; /* Ensuring all h2s are bold */
    font-size: 1.6em; /* Set a consistent size for content h2s */
    text-align: center;
}

h3 { /* Added H3 definition for future use, if needed, maintaining style */
    font-family: var(--font-heading);
    color: var(--color-text-white);
    font-weight: 600;
    font-size: 1.3em;
}

/* Links and Paragraphs (No change here) */
a {
    color: var(--color-primary-orange);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

/* -----------------------------------------------------------
 * ABOUT PAGE STYLES (about.html)
 * ----------------------------------------------------------- */

.myself h2 {
    font-size: 1.8em;
    text-align: center;
    color: var(--color-primary-orange);
    /* REMOVED: The line under "Hello, I'm Marcelo Mancini" to maintain consistency across pages */
    padding-bottom: 5px;
}

.intro {
    background-color: var(--color-light-blue-accent);
    padding: 30px;
    border-left: 5px solid var(--color-primary-orange);
    margin-top: 30px;
    border-radius: 5px;
}

.intro h2 {
    color: var(--color-text-white);
    text-align: center;
}

.myphoto {
  text-align: center;
  margin-top: 30px;
  margin-bottom: 30px;
}

.myphoto img {
  width: 300px;
  border-radius: 8px; /* Optional: soft corners */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Optional: subtle shadow */
}


/* -----------------------------------------------------------
 * FIX 4: EDUCATION PAGE STYLES (education.html) - Added content boxes
 * ----------------------------------------------------------- */

#degree-type {
    font-family: var(--font-heading);
    font-size: 1.2em;
    font-weight: 600;
    color: var(--color-primary-orange);
    margin-top: 30px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* New styling for Education content sections to put them in light blue boxes */
#bachelor, #master {
    margin-bottom: 40px;
    padding: 30px; /* Increased padding */
    border-bottom: none; /* Remove previous dash line */
    background-color: var(--color-light-blue-accent); /* LIGHT BLUE BOX */
    border-radius: 5px;
}

#master {
    margin-top: 20px; /* Add space between the two boxes */
}

#bachelor h2, #master h2 {
    color: var(--color-text-white);
    font-size: 1.5em;
    border-left: 4px solid var(--color-primary-orange);
    padding-left: 15px;
    margin-top: 0; /* Remove top margin inside the box */
}

/* List item consistency (no change here) */
#bachelor ul, #master ul {
    list-style: none;
    padding-left: 20px;
    margin-top: 15px;
}

#bachelor ul li::before, #master ul li::before {
    content: "•";
    color: var(--color-primary-orange);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* -----------------------------------------------------------
 * CERTIFICATES & PORTFOLIO STYLES (certificates.html & portfolio.html)
 * ----------------------------------------------------------- */

/* Main heading for certificates page */
#certifications + h2 {
    color: var(--color-text-white);
    font-size: 1.8em;
    margin-top: 30px;
}

#certifications ul {
    list-style-type: none;
    padding: 0;
    column-count: 1;
    column-gap: 40px;
}

/* Certificate items already in light blue boxes */
#certifications ul li {
    background-color: var(--color-light-blue-accent);
    border-left: 4px solid var(--color-primary-orange);
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    break-inside: avoid-column;
}

/* -----------------------------------------------------------
 * CONTACT PAGE STYLES (contact.html)
 * ----------------------------------------------------------- */

.contact-me {
    padding: 30px;
    margin-top: 30px;
    background-color: var(--color-light-blue-accent); /* LIGHT BLUE BOX */
    border-radius: 5px;
}

.contact-me h2 {
    color: var(--color-primary-orange);
    margin-top: 0;
    border-bottom: 1px solid var(--color-primary-orange);
    padding-bottom: 10px;
}

/* -----------------------------------------------------------
 * RESPONSIVENESS & UTILITIES (No significant change)
 * ----------------------------------------------------------- */

body::after {
    content: "";
    display: block;
    height: 50px;
}

@media (max-width: 600px) {
    body > * {
        padding: 0 15px;
    }

    body > h2:first-child {
        font-size: 1.8em;
        text-align: center;
    }

    #menu {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #menu a {
        margin: 5px 0;
        padding: 8px 15px;
    }
}