/*
=================================================================
MODERNIZED CONTACT PAGE STYLESHEET FOR ULYS QUEST
VERSION: 2.1
DESCRIPTION: Contact page styles unified with the main site
             design system, featuring glassmorphism and modern
             animations.
=================================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pirata+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap');

/* --- 1. FOUNDATION & CORE STYLES --- */

:root {
    --primary: #ed1c24;   /* Malta Red - Vibrant Accent */
    --secondary: #ffffff; /* White - For text and highlights */
    --accent: #f9d423;    /* Gold - For special highlights */
    --dark: #b31217;      /* Darker Red - For hover states */
    --bg-dark: #121212;   /* Main dark background */
    --bg-light: #1a1a1a;  /* Lighter dark for card backgrounds */
    --text-light: #e0e0e0;/* Light gray for body text */
    --text-dark: #121212;  /* For use on light backgrounds */
    --border-color: rgba(255, 255, 255, 0.1); /* Standard border color */
    --transition: 0.3s ease;
}

/* General Body Styles */
body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0% 0%;
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
}

/* Modern Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(237, 28, 36, 0.5); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Typography */
h1, h2, h3 {
    font-family: 'DM Sans', sans-serif;
    color: var(--secondary);
    text-shadow: 0 0 10px rgba(237, 28, 36, 0.5);
}

h1 {
    font-family: 'Pirata One', cursive;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* --- 2. NAVIGATION & FOOTER --- */

/* Glassmorphic Navigation Menu */
#main-nav {
    background: rgba(18, 18, 18, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

#main-nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

#main-nav ul li { margin: 0 15px; }

#main-nav ul li a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#main-nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

/* Glassmorphic Footer */
footer {
    background: rgba(18, 18, 18, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--secondary);
    margin-top: 60px;
    padding: 40px 20px 20px;
    position: relative;
    z-index: 1;
}

.footer-links {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.social-icons { 
    display: flex; 
    justify-content: center; 
    gap: 25px; 
    margin: 20px 0; 
}

.social-icon { 
    color: var(--secondary); 
    font-size: 24px; 
    transition: all 0.3s ease; 
}

.social-icon:hover { 
    transform: translateY(-4px); 
    color: var(--primary); 
}

/* --- 3. CONTACT INFO SECTION --- */

.contact-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.2), rgba(26, 26, 26, 0.5));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.info-item:hover {
    transform: translateY(-5px);
}

.info-item i {
    font-size: 2rem;
    color: var(--primary);
    transition: transform 0.3s ease;
    display: inline-flex;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: rgba(237, 28, 36, 0.1);
    box-shadow: 0 0 15px rgba(237, 28, 36, 0.3);
}

.info-item:hover i {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 0 25px rgba(237, 28, 36, 0.5);
}

.info-item p {
    margin: 0;
    font-family: 'Space Mono', monospace;
    font-weight: 500;
}

/* --- 4. MAIN CONTENT --- */

main {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.content-frame {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.2), rgba(26, 26, 26, 0.5));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37), inset 0 0 10px rgba(255, 255, 255, 0.05);
    padding: 40px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 1s ease-out forwards;
}

.content-frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(237, 28, 36, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
    max-width: none;
}

.grid-left {
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
}

.grid-left header {
    margin-bottom: 30px;
    flex-shrink: 0;
    text-align: center;
}

/* --- 5. CONTACT FORM STYLES --- */

.contact-form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.02);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 16px 16px 16px;
    font-size: 16px;
    font-family: 'DM Sans', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    transition: all var(--transition);
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
    font-family: 'DM Sans', sans-serif;
}

.form-group:last-of-type {
    flex: 1;
}

.form-group:last-of-type textarea {
    flex: 1;
    height: auto;
    min-height: 200px;
}

.form-group label {
    position: absolute;
    top: 16px;
    left: 16px;
    color: rgba(224, 224, 224, 0.7);
    font-size: 16px;
    background: transparent;
    padding: 0 8px;
    transition: all var(--transition);
    pointer-events: none;
    font-family: 'Space Mono', monospace;
    font-weight: 400;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(237, 28, 36, 0.3);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -12px;
    left: 12px;
    font-size: 13px;
    color: var(--primary);
    background: linear-gradient(90deg, var(--bg-dark) 0%, var(--bg-dark) 100%);
    padding: 0 8px;
    font-weight: 500;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: transparent;
}

.error-message {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 8px;
    font-family: 'Space Mono', monospace;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.error-message:not(:empty) {
    opacity: 1;
    transform: translateY(0);
}

/* CTA Button */
.cta-button {
    font-family: 'Space Mono', monospace;
    align-self: center;
    background: linear-gradient(45deg, var(--primary), var(--dark));
    color: white;
    text-decoration: none;
    padding: 16px 40px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.4s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 25px rgba(237, 28, 36, 0.5);
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
}

.cta-button:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.cta-button:hover {
    box-shadow: 0 0 40px rgba(237, 28, 36, 0.8), 0 0 60px rgba(237, 28, 36, 0.5);
    transform: translateY(-3px);
}

.cta-button:active { 
    transform: translateY(1px); 
}

/* --- 6. RESPONSIVE DESIGN --- */

@media (max-width: 768px) {
    .contact-info {
        flex-direction: column;
        gap: 30px;
        padding: 30px 20px;
    }

    .info-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    main {
        padding: 20px 15px;
    }

    .content-frame {
        padding: 30px 20px;
    }

    .contact-form {
        padding: 30px 20px;
    }

    h1 {
        font-size: 2.8rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 14px;
    }

    .form-group label {
        top: 14px;
        left: 14px;
    }

    .form-group input:focus + label,
    .form-group input:not(:placeholder-shown) + label,
    .form-group textarea:focus + label,
    .form-group textarea:not(:placeholder-shown) + label {
        top: -12px;
        left: 10px;
    }

    .cta-button {
        padding: 14px 30px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.2rem;
    }

    .contact-form {
        padding: 20px 15px;
    }

    .content-frame {
        padding: 20px 15px;
    }

    .info-item i {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 0.8rem;
    }
}

/* --- 7. LIGHT MODE STYLES --- */

.dark-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
}

.dark-mode-toggle:hover {
    background: var(--dark);
    transform: translateY(-5px);
}

.dark-mode-toggle .fa-sun { display: none; }
.dark-mode-toggle .fa-moon { display: block; }

/* Light Mode Styles */
body.light-mode {
    --primary: #E53935;
    --secondary: #212121;
    --accent: #FFC107;
    --dark: #C62828;
    --bg-dark: #F7F9FC;
    --bg-light: #FFFFFF;
    --text-light: #424242;
    --text-dark: #FFFFFF;
    --border-color: #E0E0E0;

    background-color: var(--bg-dark);
    background-image: linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    color: var(--text-light);
}

body.light-mode ::-webkit-scrollbar-track { background: #ECEFF1; }
body.light-mode ::-webkit-scrollbar-thumb { background: #BDBDBD; }
body.light-mode ::-webkit-scrollbar-thumb:hover { background: #9E9E9E; }

body.light-mode h1,
body.light-mode h2,
body.light-mode h3 {
    color: var(--secondary);
    text-shadow: none;
}

body.light-mode #main-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

body.light-mode #main-nav ul li a { 
    color: #333; 
}

body.light-mode #main-nav ul li a:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--primary);
}

body.light-mode footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
}

body.light-mode .contact-info {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: none;
}

body.light-mode .content-frame {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    backdrop-filter: none;
}

body.light-mode .contact-form {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus {
    background: var(--bg-light);
    box-shadow: 0 0 10px rgba(229, 57, 53, 0.2);
}

body.light-mode .form-group label {
    color: rgba(66, 66, 66, 0.7);
}

body.light-mode .form-group input:focus + label,
body.light-mode .form-group input:not(:placeholder-shown) + label,
body.light-mode .form-group textarea:focus + label,
body.light-mode .form-group textarea:not(:placeholder-shown) + label {
    background: linear-gradient(90deg, var(--bg-dark) 0%, var(--bg-dark) 100%);
}

body.light-mode .dark-mode-toggle {
    background: #fff;
    color: #555;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.light-mode .dark-mode-toggle:hover {
    background: #F5F5F5;
    color: #000;
}

body.light-mode .dark-mode-toggle .fa-sun { display: block; }
body.light-mode .dark-mode-toggle .fa-moon { display: none; }