/*
 * Contact Page Styles for Security Certifications Theme
 * 
 * Extends the main theme styles with contact-specific components
 * File: /css/contact-page.css
 */

/* ===================================
   CONTACT HERO SECTION
   =================================== */
.contact-hero {
    background: var(--gradient-primary);
    color: white;
    padding: 8rem 0 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="contact-bg" cx="50%" cy="50%"><stop offset="0%" stop-color="white" stop-opacity="0.1"/><stop offset="100%" stop-color="white" stop-opacity="0"/></radialGradient></defs><circle cx="150" cy="150" r="80" fill="url(%23contact-bg)"/><circle cx="850" cy="250" r="120" fill="url(%23contact-bg)"/><circle cx="300" cy="800" r="100" fill="url(%23contact-bg)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.contact-hero-content {
    position: relative;
    z-index: 2;
}

.contact-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: white;
}

.contact-hero .hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
}

/* Contact Stats */
.contact-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 3rem;
}

.contact-stat {
    text-align: center;
}

.contact-stat .stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.5rem;
}

.contact-stat .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.8);
}

/* ===================================
   MAIN CONTACT SECTION
   =================================== */
.contact-main {
    padding: 5rem 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* ===================================
   CONTACT FORM STYLES
   =================================== */
.contact-form-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.contact-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Form Layout */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Input Styles */
.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
    border-color: #ef4444;
}

.form-group input:valid,
.form-group select:valid,
.form-group textarea:valid {
    border-color: var(--success-green);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6,9 12,15 18,9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: calc(100% - 1rem) center;
    background-size: 1rem;
    padding-right: 3rem;
    appearance: none;
}

/* Checkbox Styling */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-light);
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: relative;
    top: 2px;
    height: 20px;
    width: 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    border-color: var(--primary-blue);
}

.checkbox-label input:checked ~ .checkmark {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

/* Form Errors */
.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
    min-height: 1.25rem;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Form Actions */
.form-actions {
    margin-top: 1rem;
}

.form-submit {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-submit:disabled:hover {
    transform: none;
}

/* Loading Spinner */
.button-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 20px;
    height: 20px;
    color: currentColor;
}

/* Form Result Messages */
.form-result {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 600;
    text-align: center;
}

.form-result.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.form-result.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===================================
   CONTACT INFO SECTION
   =================================== */
.contact-info-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.contact-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
}

.contact-info-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.contact-info-card > p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Contact Methods */
.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--bg-light);
    transition: var(--transition);
}

.contact-method:hover {
    background: #e2e8f0;
    transform: translateX(5px);
}

.method-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.method-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.method-content a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.method-content a:hover {
    color: var(--primary-blue-light);
}

.method-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0.25rem 0 0 0;
}

/* Emergency Contact */
.emergency-contact {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.emergency-contact h4 {
    color: #dc2626;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.emergency-contact p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.emergency-phone {
    display: inline-block;
    background: #dc2626;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
    margin-bottom: 0.5rem;
}

.emergency-phone:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

.emergency-note {
    font-size: 0.8rem !important;
    color: #6b7280 !important;
    font-style: italic;
}

/* Trust Indicators */
.trust-indicators {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.trust-indicators h4 {
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.trust-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--bg-light);
    transition: var(--transition);
}

.trust-item:hover {
    background: #e2e8f0;
}

.trust-icon {
    font-size: 1.25rem;
    width: 30px;
    flex-shrink: 0;
}

/* ===================================
   FAQ SECTION
   =================================== */
.contact-faq {
    padding: 4rem 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.faq-item {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.faq-item h3 {
    color: var(--primary-blue);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.faq-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===================================
   FINAL CTA SECTION
   =================================== */
.contact-final-cta {
    margin-top: 0;
}

.scroll-to-form {
    cursor: pointer;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet (768px to 1023px) */
@media (max-width: 1023px) and (min-width: 769px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-form-section {
        padding: 2.5rem;
    }
    
    .faq-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .contact-hero {
        padding: 6rem 0 4rem 0;
    }
    
    .contact-hero h1 {
        font-size: 2.5rem;
    }
    
    .contact-hero .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .contact-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .contact-stat .stat-number {
        font-size: 2rem;
    }
    
    .contact-stat .stat-label {
        font-size: 0.8rem;
    }
    
    .contact-main {
        padding: 3rem 0;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form-section {
        padding: 2rem;
    }
    
    .form-header h2 {
        font-size: 1.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-info-card {
        padding: 2rem;
    }
    
    .contact-method {
        padding: 1rem;
    }
    
    .method-icon {
        width: 35px;
        height: 35px;
        font-size: 1.25rem;
    }
    
    .emergency-contact {
        padding: 1.25rem;
    }
    
    .trust-indicators {
        padding: 1.5rem;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .faq-item {
        padding: 1.5rem;
    }
    
    .contact-faq {
        padding: 3rem 0;
    }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
    .contact-hero {
        padding: 5rem 0 3rem 0;
    }
    
    .contact-hero h1 {
        font-size: 2rem;
    }
    
    .contact-stats {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
    
    .contact-form-section {
        padding: 1.5rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .form-header p {
        font-size: 1rem;
    }
    
    .contact-info-card {
        padding: 1.5rem;
    }
    
    .contact-method {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }
    
    .method-content {
        text-align: center;
    }
    
    .emergency-contact {
        padding: 1rem;
    }
    
    .emergency-phone {
        font-size: 1rem;
        padding: 0.625rem 1.25rem;
    }
    
    .faq-item {
        padding: 1.25rem;
    }
    
    .faq-item h3 {
        font-size: 1.1rem;
    }
}

/* ===================================
   ACCESSIBILITY ENHANCEMENTS
   =================================== */

/* Focus indicators for form elements */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.checkbox-label:focus-within .checkmark {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .contact-form-section,
    .contact-info-card,
    .trust-indicators,
    .faq-item {
        border: 2px solid;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .contact-method:hover,
    .faq-item:hover,
    .trust-item:hover {
        transform: none;
    }
    
    .form-submit:hover {
        transform: none;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.contact-page .hidden {
    display: none;
}

.contact-page .visible {
    display: block;
}

.contact-page .loading {
    pointer-events: none;
    opacity: 0.7;
}