/* =========================================
   EVPC System - Communications Page
   Glassboard 3D Theme w/ Terminal Form
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=Orbitron:wght@700&display=swap');

:root {
    /* Glass Properties */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    --glass-highlight: inset 0 1px 2px rgba(255, 255, 255, 0.9);
    --blur-intensity: blur(16px) saturate(180%);
    
    /* Typography & Accents */
    --text-main: #1a1e24;
    --text-muted: #4a5568;
    --accent: #2b6cb0;
    
    /* Terminal Properties */
    --term-bg: #050505;
    --term-green: #39ff14;
    --term-dim: #1e800a;
}

/* --- Base & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #e2e8f0 0%, #edf2f7 50%, #cbd5e1 100%);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    overflow-x: hidden;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Navigation --- */
nav {
    position: sticky;
    top: 20px;
    z-index: 1000;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-intensity);
    -webkit-backdrop-filter: var(--blur-intensity);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-highlight);
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

/* --- Main Content Wrapper --- */
.content-wrapper {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center; /* Enforces the centered lifestyle */
    gap: 3rem;
    width: 100%;
}

/* --- Header --- */
header {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 24px;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-intensity);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-highlight);
    width: 100%;
    max-width: 800px;
}

header h1 {
    font-weight: 800;
    color: var(--text-main);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 0.5rem;
    font-size: 3.5rem;
    letter-spacing: 4px;
}

header h2 {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 1.5rem;
    letter-spacing: 2px;
}

/* --- Contact Section --- */
.contact-wrapper {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* PHP Alert Message (Terminal Style) */
.alert {
    width: 100%;
    background: var(--term-bg);
    color: var(--term-green);
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    padding: 1rem;
    border: 1px solid var(--term-dim);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.1);
    letter-spacing: 1px;
}

/* --- Form Container (Glassboard) --- */
.contact-form {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-intensity);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: var(--glass-shadow), var(--glass-highlight);
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers all children */
}

.contact-form h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    letter-spacing: 3px;
    text-align: center;
}

/* Form Labels */
.contact-form label {
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    text-align: center;
}

.contact-form label:first-of-type {
    margin-top: 0;
}

/* --- Terminal Inputs (The Contrast) --- */
.contact-form input,
.contact-form textarea {
    width: 100%;
    max-width: 500px;
    background-color: var(--term-bg);
    color: var(--term-green);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    text-align: center; /* Centered input text */
    padding: 1.2rem;
    border: 2px solid #222;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
    resize: none;
}

/* Catty/Snappy Placeholder Styling */
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--term-dim);
    font-style: italic;
    opacity: 0.7;
    text-align: center;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--term-green);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.2), inset 0 2px 10px rgba(0,0,0,0.5);
}

/* --- NEO 3D Buttons --- */
.neo-3d-btn {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--glass-border);
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 6px 0 #cbd5e1, 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: 500px;
}

.neo-3d-btn:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 #cbd5e1, 0 4px 10px rgba(0,0,0,0.1);
}

.neo-3d-btn:hover {
    background: #ffffff;
}

.neo-3d-btn.pink {
    color: #d53f8c;
}

/* --- External Links Array --- */
.external-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    margin-top: 1rem;
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-intensity);
    border-top: 1px solid var(--glass-border);
    width: 100%;
}

/* =========================================
   Button Icon Styling & Image Masking
   ========================================= */

/* Adjust the button layout to align the icon and text */
.neo-3d-btn.has-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px; /* Space between icon and text */
    padding: 0.8rem 2rem; 
}

/* Ensure the text inside the button stays aligned */
.neo-3d-btn.has-icon span {
    line-height: 1;
    margin-top: 2px;
}

/* The Container for the Icon - Enforces exact, unbreakable dimensions */
.btn-icon {
    width: 45px;
    height: 45px;
    min-width: 45px; 
    max-width: 45px;
    border-radius: 50%; /* Makes it a perfect circle */
    overflow: hidden; /* Clips anything outside the circle */
    flex-shrink: 0; 
    
    /* Styling: Borders, Backgrounds, and Shadows */
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.2), 
        inset 0 2px 4px rgba(255, 255, 255, 0.6), 
        0 0 10px rgba(57, 255, 20, 0.15); 
    
    transition: all 0.3s ease;
    
    /* Centers the image perfectly inside the container */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The Image Itself - Handled to fit perfectly inside the container */
.btn-icon img {
    /* Reduce width/height to leave breathing room (padding) inside the circle */
    width: 60%; 
    height: 60%; 
    display: block; 
    
    /* THE FIX: Scales the image to fit entirely inside the element without cropping */
    object-fit: contain; 
    
    /* THE FIX 2: Centers the icon perfectly */
    object-position: center; 
    
    /* Styling: Image filters for contrast and saturation */
    filter: contrast(1.1) saturate(1.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
}

/* --- Interactive Hover Effects --- */

/* Elevate the container and flare the neon shadow */
.neo-3d-btn.has-icon:hover .btn-icon {
    border-color: var(--term-green);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.3), 
        0 0 18px rgba(57, 255, 20, 0.5); /* Stronger neon green glow */
    transform: rotate(-5deg); /* Slight playful tilt */
}

/* Zoom the image in even further when hovering */
.neo-3d-btn.has-icon:hover .btn-icon img {
    transform: scale(1.2); /* Zooms into the image by 20% */
    filter: contrast(1.2) saturate(1.4) brightness(1.1); /* Pops the colors */
}

/* Pink button variant override for hover state */
.neo-3d-btn.pink.has-icon:hover .btn-icon {
    border-color: #d53f8c;
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.3), 
        0 0 18px rgba(213, 63, 140, 0.5);
}

/* --- Responsive Layout Adjustments --- */
@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
        border-radius: 16px;
        padding: 1rem;
        width: 90%;
        gap: 1rem;
    }
    
    header h1 {
        font-size: 2.5rem !important;
        letter-spacing: 3px !important;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .external-links {
        flex-direction: column;
        align-items: center;
    }
    
    .neo-3d-btn {
        width: 100%;
    }
}
