/* HOMEPAGE-SPECIFIC STYLES - THE VISION-CORRECTED EDITION */

body {
    overflow: hidden; /* Prevent scrolling on the landing page */
}

/* The Certificate Frame itself */
.certificate-frame {
    height: 100vh;
    box-sizing: border-box; /* Ensures padding and border are inside the 100vh */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 30px 40px;
    
    border: 15px solid;
    border-image-slice: 1;
    border-image-source: var(--theme-gradient);
    
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5), inset 0 0 25px rgba(0,0,0,0.7);
}

/* Row containers for perfect layout */
.top-row, .bottom-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

/* Main content now sits perfectly in the middle */
.certificate-content { 
    max-width: 800px; 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-title { font-size: 3.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 25px; }
.hero-subtitle { font-size: 1.2rem; color: var(--text-secondary); max-width: 650px; margin: 0 auto 45px auto; }
.gradient-text { background: var(--theme-gradient); background-clip: text; -webkit-background-clip: text; color: transparent; }

/* The Corrected CTA Button */
.cta-button {
    background: var(--theme-gradient); 
    display: inline-block; 
    color: var(--theme-button-text-color);
    padding: 16px 32px; 
    border-radius: 8px; 
    font-size: 1.1rem; 
    font-weight: 700;
    text-decoration: none; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    border: 1px solid rgba(0,0,0,0.2);
    align-self: center; /* Center button within the flex container */
}
.cta-button:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }

/* --- HEADER STYLES --- */
.header-content {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
.header-spacer { flex: 1 1 0px; } /* Still works with grid */
.social-links {
    justify-self: end;
    display: flex;
    gap: 20px;
}
.social-links a i { font-size: 22px; color: var(--text-secondary); transition: all 0.3s ease; }
.social-links a:hover i { color: var(--text-primary); transform: scale(1.1); }
.main-nav {
    justify-self: center;
    display: flex;
    gap: 40px;
}
.main-nav a {
    color: var(--text-secondary); font-weight: 600; text-decoration: none;
    transition: color 0.3s ease; padding: 5px;
}
.main-nav a:hover { color: var(--text-primary); }

.menu-toggle, .hamburger-menu {
    display: none;
}

/* --- BOTTOM ROW STYLES --- */
.logo-bottom-left {
    flex: 1 1 0px;
    display: flex;
    justify-content: flex-start;
}
.logo-bottom-left img { height: 125px; width: auto; margin-left: 140px; }
.signature-block {
    flex: 1 1 0px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 220px; text-align: center; color: var(--text-secondary);
}
.signature-text { font-family: 'Sacramento', cursive; font-size: 2.8rem; line-height: 1; color: var(--text-primary); }
.signature-line { width: 100%; height: 1px; background-color: var(--text-secondary); margin: 5px 0; }
.signature-title { font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; }

/* Color Switcher */
.color-switcher {
    position: fixed; top: 50%; left: 25px; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 12px; padding: 12px;
    background: rgba(0,0,0,0.2); border-radius: 30px; z-index: 100; backdrop-filter: blur(8px);
}
.color-dot { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: all 0.2s ease; }
.color-dot:hover { transform: scale(1.2); }
.color-dot.active { border-color: var(--text-primary); }

/* Color dots definitions */
.color-dot.gold { background: linear-gradient(135deg, #B8860B, #FFD700); }
.color-dot.silver { background: linear-gradient(135deg, #AAAAAA, #FFFFFF); }
.color-dot.purple { background: linear-gradient(135deg, #480ca8, #9b5de5); }
.color-dot.rose-gold { background: linear-gradient(135deg, #B76E79, #F7CAC9); }
.color-dot.blue { background: linear-gradient(135deg, #0052D4, #65C7F7); }
.color-dot.emerald { background: linear-gradient(135deg, #006A4E, #50C878); }
.color-dot.teal { background: linear-gradient(135deg, #008080, #20B2AA); }
.color-dot.ruby { background: linear-gradient(135deg, #9B111E, #E0115F); }
.color-dot.ember { background: linear-gradient(135deg, #FF4500, #FF8C00); }
.color-dot.sapphire { background: linear-gradient(135deg, #0F52BA, #0073CF); }


/* --- RESPONSIVE STYLES --- */

@media (max-width: 1024px) {
    .main-nav { gap: 20px; }
    .hero-title { font-size: 3rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .logo-bottom-left img { margin-left: 0; height: 100px; }
}

@media (max-width: 768px) {
    body { overflow: auto; } /* Allow scrolling on mobile if content overflows */
    .certificate-frame {
        padding: 20px;
        border-width: 10px;
        min-height: 100vh; /* Ensure it at least fills the screen */
        height: auto; /* Allow it to grow if needed */
    }
    .header-content {
        grid-template-columns: auto 1fr auto;
        position: relative;
    }
    .hamburger-menu {
        display: block; font-size: 24px; cursor: pointer; color: var(--text-primary);
        z-index: 1001; grid-column: 1 / 2; padding-right: 15px;
    }
    .main-nav {
        display: none; 
        flex-direction: column; 
        position: fixed; /* Use fixed to cover the whole screen */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%; /* Full height */
        background-color: var(--background-dark); 
        padding-top: 60px; /* Space for a close button if you add one */
        z-index: 1000; 
        gap: 0;
        justify-content: center; /* Center links vertically */
        align-items: center; /* Center links horizontally */
    }

    .menu-toggle:checked ~ .main-nav { 
        display: flex; 
    }

    .main-nav a { 
        text-align: center; 
        padding: 20px 0; 
        border-bottom: 1px solid var(--border-color);
        width: 100%; /* Make links take full width */
        font-size: 1.2rem;
    }
    .main-nav a:last-child { 
        border-bottom: none; 
    }
    .social-links { grid-column: 3 / 4; justify-self: end; }
    .header-spacer { display: none; }
    
    .certificate-content { padding: 40px 0; }
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 35px; }

    .bottom-row { 
        flex-direction: column; 
        gap: 30px; 
        margin-top: 20px; 
    }
    .logo-bottom-left { 
        justify-content: center; 
        order: 2; /* Change display order */
    }
    .logo-bottom-left img { margin-left: 0; height: 90px; }
    .signature-block { 
        align-items: center; /* Center the signature on mobile */
        order: 1; /* Change display order */
    }

    /* --- ADJUSTMENT FOR THINNER COLOR SWITCHER --- */
    .color-switcher {
        top: auto;
        left: 50%;
        bottom: 15px; /* Nudged down slightly */
        transform: translateX(-50%);
        flex-direction: row;
        padding: 6px; /* Reduced padding */
        gap: 8px; /* Added a gap for spacing */
        border-radius: 20px; /* Adjusted border radius */
    }
    .color-dot {
        width: 20px; /* Reduced size */
        height: 20px; /* Reduced size */
    }
    /* --- END OF ADJUSTMENT --- */
}