/* =========================================================
   AILEARNIST — CONTACT STYLES (mirrored from Sqlism contact.css)
   Page tokens are namespaced --pg-* so they never override the
   sitewide tokens in /assets/css/base.css (navbar, footer,
   cookies and share keep the shared theme). Light/dark follow
   [data-theme] set by includes/theme_boot.php.
   ========================================================= */
:root {
  --pg-primary: #8b5cf6;
  --pg-primary-dark: #7c3aed;
  --pg-secondary: #22d3ee;
  --pg-accent: #8b5cf6;
  --pg-bg-primary: var(--bg);
  --pg-bg-secondary: var(--bg-alt);
  --pg-bg-card: var(--bg-card);
  --pg-text-primary: var(--text);
  --pg-text-secondary: var(--text-muted);
  --pg-border: var(--border);
  --pg-shadow: rgba(15, 23, 42, 0.1);
  --pg-shadow-lg: rgba(15, 23, 42, 0.15);
  --pg-navbar-bg: var(--bg-card);
  --pg-success: #10b981;
  --pg-error: #ef4444;
  --pg-warning: #f59e0b;
  --pg-info: #3b82f6;
}
[data-theme="dark"] {
  --pg-shadow: rgba(0, 0, 0, 0.3);
  --pg-shadow-lg: rgba(0, 0, 0, 0.5);
}

/* Import base theme variables from about.css */








/* ================================
   CONTACT HERO SECTION
   (matches the standard hero pattern used on about/quiz/challenge)
   ================================ */

.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.15),
        rgba(34, 211, 238, 0.15));
    border-bottom: 2px solid var(--pg-border);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238b5cf6' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--pg-primary), var(--pg-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--pg-text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--pg-bg-card);
    border-radius: 50px;
    box-shadow: 0 4px 12px var(--pg-shadow);
    transition: transform 0.3s ease;
}

.hero-stats .stat:hover {
    transform: translateY(-4px);
}

.hero-stats .stat i {
    color: var(--pg-primary);
    font-size: 1.25rem;
}

.hero-stats .stat span {
    font-weight: 600;
    color: var(--pg-text-primary);
}

/* ================================
   MAIN CONTENT CONTAINER
   ================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    flex: 1;
}

/* ================================
   CONTACT GRID LAYOUT
   ================================ */

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* ================================
   CONTACT FORM SECTION
   ================================ */

.contact-form-section h2,
.contact-info-section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--pg-primary);
}

.section-subtitle {
    color: var(--pg-text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-form {
    background: var(--pg-bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 2px solid var(--pg-border);
    box-shadow: 0 4px 20px var(--pg-shadow);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.contact-form:hover {
    box-shadow: 0 8px 30px var(--pg-shadow-lg);
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--pg-text-primary);
}

.form-group label i {
    color: var(--pg-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--pg-bg-secondary);
    border: 2px solid var(--pg-border);
    border-radius: 8px;
    color: var(--pg-text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--pg-primary);
    background: var(--pg-bg-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.input-underline,
.textarea-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--pg-primary), var(--pg-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.form-group input:focus ~ .input-underline,
.form-group textarea:focus ~ .textarea-underline {
    transform: scaleX(1);
}

.form-group select {
    appearance: none;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 3.2rem;
    color: var(--pg-text-secondary);
    pointer-events: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ================================
   FORM ERROR STYLES
   ================================ */

.form-group {
    position: relative;
}

.field-error {
    border-color: var(--pg-error) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

.field-error-message {
    color: var(--pg-error);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease;
}

.field-error-message i {
    font-size: 0.9rem;
}

.char-counter {
    position: absolute;
    right: 0;
    bottom: -1.5rem;
    font-size: 0.85rem;
    color: var(--pg-text-secondary);
}

/* Animation for error messages */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success message animation */
.form-messages.success {
    animation: fadeIn 0.5s ease;
}

/* Error message animation */
.form-messages.error {
    animation: shake 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}


/* Submit Button */
.form-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.submit-btn {
    background: linear-gradient(135deg, var(--pg-primary), var(--pg-secondary));
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    justify-content: center;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn .btn-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover .btn-wave {
    width: 300px;
    height: 300px;
}

.form-note {
    color: var(--pg-text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ================================
   FORM MESSAGES
   ================================ */

.form-messages {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.form-messages.success {
    display: block;
    background: rgba(34, 211, 238, 0.1);
    border: 2px solid var(--pg-success);
    color: var(--pg-success);
}

.form-messages.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--pg-error);
    color: var(--pg-error);
}

.form-messages i {
    margin-right: 0.5rem;
}

/* ================================
   CONTACT INFO SECTION
   ================================ */

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--pg-bg-card);
    border-radius: 12px;
    border: 2px solid var(--pg-border);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-3px);
    border-color: var(--pg-primary);
    box-shadow: 0 6px 20px var(--pg-shadow);
}

.method-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--pg-primary), var(--pg-secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.method-icon i {
    font-size: 1.5rem;
    color: white;
}

.method-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--pg-primary);
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--pg-primary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--pg-secondary);
}

.method-content p {
    color: var(--pg-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.method-content small {
    color: var(--pg-text-secondary);
    opacity: 0.8;
}

/* FAQ Preview */
.faq-preview {
    background: var(--pg-bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--pg-border);
}

.faq-preview h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--pg-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--pg-border);
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--pg-text-primary);
}

.faq-item p {
    color: var(--pg-text-secondary);
    font-size: 0.95rem;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content p {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .hero-stats .stat {
        padding: 0.5rem 1rem;
    }

    .contact-form-section h2,
    .contact-info-section h2 {
        font-size: 1.8rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-method {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ============================================================
   MODERN HERO (Studio v2) — appended override. Markup unchanged.
   Scoped by data-page so it overrides light + dark existing rules.
   Matches the dark glassy hero card used on quiz/challenge/interview.
   ============================================================ */
body[data-page="contact"] .hero{
  position:relative; margin:clamp(16px,3vw,30px) clamp(12px,4vw,48px);
  padding:clamp(38px,6vw,68px) clamp(22px,4vw,48px);
  border-radius:24px; text-align:center; color:#fff; overflow:hidden;
  border:1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(120% 130% at 10% -10%, rgba(124,92,255,0.40), transparent 60%),
    radial-gradient(90% 120% at 100% 112%, rgba(34,211,238,0.22), transparent 58%),
    linear-gradient(158deg,#0c1024 0%,#0a0d1a 55%,#090b16 100%);
  box-shadow:0 40px 90px -42px rgba(10,13,26,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
}
body[data-page="contact"] .hero::before{
  content:''; position:absolute; inset:0; opacity:1; pointer-events:none;
  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:44px 44px;
  -webkit-mask-image:radial-gradient(120% 90% at 50% 0%,#000 42%,transparent 82%);
  mask-image:radial-gradient(120% 90% at 50% 0%,#000 42%,transparent 82%);
}
body[data-page="contact"] .hero-content{position:relative;z-index:1;max-width:920px;margin:0 auto;}
body[data-page="contact"] .hero-content h1{
  font-family:'Space Grotesk',sans-serif; font-size:clamp(2.1rem,5vw,4rem);
  font-weight:800; letter-spacing:-0.03em; line-height:1.07; color:#fff;
  -webkit-text-fill-color:#fff; background:none; margin-bottom:16px;
  display:flex; align-items:center; justify-content:center; gap:14px; flex-wrap:wrap; text-align:center;
  animation:none;
}
body[data-page="contact"] .hero-content h1 i{
  background:linear-gradient(120deg,#a3e635,#22d3ee 55%,#7c5cff);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
  transform:translateX(-4px); padding-right:4px;
}
body[data-page="contact"] .hero-content p{
  font-family:'Space Grotesk',sans-serif; color:rgba(226,232,240,0.82);
  -webkit-text-fill-color:rgba(226,232,240,0.82); background:none; opacity:1;
  font-size:clamp(1rem,1.5vw,1.22rem); line-height:1.7; max-width:680px; margin:0 auto;
}
body[data-page="contact"] .hero-stats{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:30px;}
body[data-page="contact"] .hero-stats .stat{
  display:inline-flex;align-items:center;gap:9px;padding:10px 18px;border-radius:999px;
  background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.14);
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
  transition:transform .2s ease, border-color .2s ease, background .2s ease;
}
body[data-page="contact"] .hero-stats .stat:hover{transform:translateY(-2px);border-color:rgba(124,92,255,0.5);background:rgba(124,92,255,0.14);}
body[data-page="contact"] .hero-stats .stat i{color:#a3e635;font-size:1rem;}
body[data-page="contact"] .hero-stats .stat span{color:#e7eaf5;font-weight:600;font-size:0.92rem;}

/* ============================================================
   ailearnist STUDIO — MODERN CONTENT CARDS (v1)
   Purely additive — no selector renamed, no markup/JS touched.
   Refines the form card, inputs, submit button, contact-method
   cards and FAQ card below the hero to feel like one product with
   the Studio-era hero above, without changing structure or IDs
   that contact.js depends on.
   ============================================================ */
body[data-page="contact"] {
    --contact-radius: 20px;
    --contact-border: rgba(124, 92, 255, 0.16);
    --contact-gradient: linear-gradient(120deg, #a3e635, #22d3ee 55%, #7c5cff);
}
[data-theme="dark"] body[data-page="contact"] {
    --contact-border: rgba(124, 92, 255, 0.26);
}

/* Section headings get a small eyebrow-style treatment */
body[data-page="contact"] .contact-form-section h2,
body[data-page="contact"] .contact-info-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Form card: softer radius, layered shadow, thin brand-tinted border,
   subtle gradient accent bar along the top edge */
body[data-page="contact"] .contact-form {
    position: relative;
    border-radius: var(--contact-radius);
    border: 1px solid var(--contact-border);
    box-shadow: 0 1px 2px var(--pg-shadow), 0 16px 40px -24px var(--pg-shadow-lg);
    overflow: hidden;
}
body[data-page="contact"] .contact-form::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--contact-gradient);
}
body[data-page="contact"] .contact-form:hover {
    box-shadow: 0 1px 2px var(--pg-shadow), 0 24px 48px -24px var(--pg-shadow-lg);
}

/* Inputs: friendlier radius, calmer focus ring */
body[data-page="contact"] .form-group input,
body[data-page="contact"] .form-group select,
body[data-page="contact"] .form-group textarea {
    border-radius: 12px;
    border-width: 1.5px;
}
body[data-page="contact"] .form-group input:focus,
body[data-page="contact"] .form-group select:focus,
body[data-page="contact"] .form-group textarea:focus {
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

/* Submit button: slightly refined radius, guideline gradient + softer glow */
body[data-page="contact"] .submit-btn {
    background: var(--contact-gradient);
    border-radius: 14px;
    box-shadow: 0 8px 20px -6px rgba(124, 92, 255, 0.35);
}
body[data-page="contact"] .submit-btn:hover {
    box-shadow: 0 14px 30px -8px rgba(124, 92, 255, 0.45);
}

/* Contact-method cards: thinner brand-tinted border, calmer hover */
body[data-page="contact"] .contact-method {
    border-radius: 16px;
    border: 1px solid var(--contact-border);
    box-shadow: 0 1px 2px var(--pg-shadow);
}
body[data-page="contact"] .contact-method:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 92, 255, 0.5);
    box-shadow: 0 12px 28px -16px var(--pg-shadow-lg);
}

/* Method icon badges: soft tinted glass square instead of solid block */
body[data-page="contact"] .method-icon {
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.14), rgba(34, 211, 238, 0.14), rgba(124, 92, 255, 0.14));
    border: 1px solid var(--contact-border);
    border-radius: 12px;
    transition: transform 0.3s ease;
}
body[data-page="contact"] .method-icon i {
    background: var(--contact-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body[data-page="contact"] .contact-method:hover .method-icon {
    transform: scale(1.06);
}

/* FAQ card: same refined radius/border/shadow language */
body[data-page="contact"] .faq-preview {
    border-radius: 16px;
    border: 1px solid var(--contact-border);
    box-shadow: 0 1px 2px var(--pg-shadow);
}
body[data-page="contact"] .faq-item {
    border-bottom-color: var(--contact-border);
}
