/* =====================================================
   ALGOMETIS CONTACT PAGE - BASIC FORM STYLES
   Hero design matching case-studies-overview page
   ===================================================== */

/* Ensure full-width support */
html, body {
    width: 100%;
    overflow-x: hidden;
}

/* Page Content - Case Studies Style Hero */
.contact-page {
    min-height: 100vh;
    padding: 0;
    width: 100%;
}

.page-content {
    padding: 0; /* Remove padding since hero handles it */
    width: 100%;
    max-width: 100%;
}

/* Hero Section - Minimal Height for Better Page Usage */
.page-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    height: 25vh; /* Reduced to half - 25% of viewport height */
    min-height: 200px; /* Reduced minimum height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    z-index: 1;
}

/* Geometric Background Elements for Basic Contact */
.page-header::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(34, 197, 94, 0.08) 100%);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    z-index: 1;
    animation: float-hero 6s ease-in-out infinite;
}

/* Hero Geometric Elements */
.page-header .hero-triangle {
    position: absolute;
    bottom: -20px;
    left: 10%;
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.06));
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: float-triangle 8s ease-in-out infinite;
    z-index: 1;
}

.page-header .hero-circle {
    position: absolute;
    top: 20%;
    left: 80%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
    border-radius: 50%;
    animation: pulse-hero 5s ease-in-out infinite;
    z-index: 1;
}

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

@keyframes float-triangle {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(2deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

@keyframes pulse-hero {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 70% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 20% 80%, rgba(34, 197, 94, 0.1) 0%, transparent 30%);
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    color: white;
    text-align: center; /* Ensure center alignment on all screens */
}

.page-header .lead {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    color: #f1f5f9;
    font-weight: 400;
    text-align: center; /* Ensure center alignment on all screens */
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    color: #f1f5f9;
    font-weight: 400;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 30px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    color: #c53030;
}

.alert-success {
    background: #c6f6d5;
    border: 1px solid #9ae6b4;
    color: #2f855a;
}

.alert h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.alert li {
    margin-bottom: 5px;
}

/* Contact Content */
.contact-content {
    width: 100%; /* Full width */
    max-width: 100%; /* Remove max width restriction */
    margin: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f0f8ff 100%);
    padding: 40px 0 60px; /* Reduced padding for compact design */
    position: relative;
    overflow: hidden;
}

/* Background geometric elements for content section */
.contact-content::before {
    content: '';
    position: absolute;
    top: 10%;
    right: -50px;
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, rgba(79, 70, 229, 0.08) 0%, rgba(99, 102, 241, 0.04) 100%);
    border-radius: 50%;
    animation: float-content 8s ease-in-out infinite;
    z-index: 1;
}

.contact-content::after {
    content: '';
    position: absolute;
    bottom: 15%;
    left: -30px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: float-content-triangle 7s ease-in-out infinite;
    z-index: 1;
}

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

@keyframes float-content-triangle {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(3deg); }
    66% { transform: translateY(8px) rotate(-2deg); }
}

/* Ensure containers and sections are full-width */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.contact-form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px; /* Smaller border radius for compact look */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); /* Reduced shadow */
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    margin: 0 auto; /* Center the form */
    max-width: 700px; /* Smaller form container */
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 3;
}

.contact-form-section {
    padding: 30px; /* Reduced padding for smaller boxes */
}

.contact-form-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 30px;
    text-align: center;
}

/* Form Styles */
.contact-form {
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
    color: #2d3748;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Select Dropdown */
.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* Textarea */
.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    width: 100%;
    margin-top: 20px;
}

/* Icon */
.icon-arrow-right::before {
    content: "→";
    font-size: 1.2em;
}

/* Form Validation States */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e53e3e;
    background-color: #fed7d7;
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: #38a169;
    background-color: #c6f6d5;
}

/* Loading State */
.btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn.loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Contact Alternatives Section - Matching Smart Form Style */
.contact-alternatives {
    background: #f8fafc;
    padding: 30px 0 40px;
    margin-top: 30px;
    width: 100%; /* Full width */
}

.contact-options {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin: 0 auto 25px; /* Center the options */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.contact-options h3 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.contact-methods {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
    max-width: 180px;
}

.contact-method:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.method-icon {
    width: 45px;
    height: 45px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 1.3rem;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.method-content h4 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    color: #2d3748;
    font-weight: 600;
}

.method-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.4;
}

.link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

/* Contact Info - Why Choose Algometis */
.contact-info {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 0 auto;
    margin-left: 20px;
    margin-right: 20px;
}

.contact-info h3 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 18px;
    text-align: center;
    font-weight: 600;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.benefits-list li {
    padding: 8px 0;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive Design - Case Studies Style */
/* Small screens */
@media (max-width: 480px) {
    .page-header {
        height: 20vh; /* Half of previous - very compact for mobile */
        min-height: 150px; /* Reduced minimum height */
        padding: 20px 15px;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
        text-align: center; /* Ensure center alignment on mobile */
    }
    
    .page-header .lead {
        font-size: 1.1rem;
        max-width: 90%;
        text-align: center; /* Ensure center alignment on mobile */
    }
    
    .contact-content {
        padding: 40px 0;
    }
    
    .contact-form-container {
        margin: 0 15px;
    }
    
    .contact-form-section {
        padding: 30px 20px;
    }
    
    .contact-form-section h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .btn-large {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* Medium screens */
@media (min-width: 481px) and (max-width: 768px) {
    .page-header {
        height: 22vh; /* Half of previous height for medium screens */
        min-height: 175px; /* Reduced minimum height */
        padding: 25px 20px;
    }
    
    .page-header h1 {
        font-size: 3rem;
        text-align: center; /* Ensure center alignment on medium screens */
    }
    
    .page-header .lead {
        font-size: 1.15rem;
        max-width: 600px;
        text-align: center; /* Ensure center alignment on medium screens */
    }
    
    .contact-content {
        padding: 50px 0;
    }
    
    .contact-form-container {
        margin: 0 20px;
    }
    
    .contact-form-section {
        padding: 40px 30px;
    }
    
    .contact-form-section h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .btn-large {
        padding: 13px 22px;
        font-size: 0.98rem;
    }
}

/* Large screens */
@media (min-width: 769px) {
    .page-header {
        padding: 120px 0 80px;
    }
    
    .page-header h1 {
        font-size: 3.5rem;
    }
    
    .page-header .lead {
        font-size: 1.25rem;
        max-width: 700px;
    }
    
    .contact-content {
        padding: 60px 0;
    }
    
    .contact-form-section {
        padding: 50px 40px;
    }
    
    .contact-form-section h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .btn-large {
        padding: 15px 28px;
        font-size: 1.05rem;
    }
}

/* Extra large screens */
@media (min-width: 1200px) {
    .page-header h1 {
        font-size: 3.5rem;
    }
    
    .page-header .lead {
        font-size: 1.25rem;
        max-width: 700px;
    }
    
    .contact-form-section {
        padding: 60px 50px;
    }
}

/* Focus Management */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    z-index: 1;
    position: relative;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        border-width: 3px;
    }
    
    .btn-primary {
        background: #000;
        border: 2px solid #fff;
    }
}