/*
 * css/contact.css - Enhanced contact page styles
 * Dark theme without textures, stunning appearance
 * Uses main.css centralized styles and variables - NO hardcoded colors/fonts
 */

/* =============================================
 * HERO SECTION STYLES - FIXED CONTENT POSITIONING
 * ============================================= */

.hero-slideshow {
    position: relative;
    height: 70vh;
    min-height: 500px;
    max-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    background: var(--dark-color); /* Fallback solid background */
}

/* Hero background layers */
.hero-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    z-index: 1;
}

/* Dark overlay - no texture */
.hero-bg-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 2;
}

/* Hero glow effect */
.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(var(--accent-gold-rgb), 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 3;
    animation: pulse 6s ease-in-out infinite alternate;
}

/* Hero content container - PROPERLY CENTERED */
.hero-slideshow .container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

/* Hero content wrapper - FIXED POSITIONING */
#hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem 1rem;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Hero title - ENHANCED VISIBILITY */
#hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
    color: #fff;
    line-height: 1.2;
    font-family: var(--font-heading);
}

/* Hero description - ENHANCED READABILITY */
#hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    color: #fff;
}

/* Hero badges - ENHANCED STYLING */
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-badges .badge {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    text-shadow: none;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-badges .badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Enhanced badge colors */
.hero-badges .bg-primary {
    background: rgba(var(--primary-color-rgb), 0.9);
    color: white;
}

.hero-badges .bg-warning {
    background: rgba(var(--accent-gold-rgb), 0.9);
    color: var(--dark-color);
}

.hero-badges .bg-success {
    background: rgba(var(--success-color-rgb), 0.9);
    color: white;
}

.hero-badges .bg-info {
    background: rgba(var(--info-color-rgb), 0.9);
    color: white;
}

/* =============================================
 * CONTACT FORM SECTION - ENHANCED LAYOUT
 * ============================================= */

.contact-form-section {
    padding: 4rem 0;
    background: var(--dark-color); /* Pure dark background - no texture */
    position: relative;
    margin-top: -50px; /* Overlap with hero */
    z-index: 5;
}

/* Remove texture overlay - clean dark background */
.contact-form-section::before {
    display: none; /* Remove texture */
}

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

/* =============================================
 * CONTACT CARD - ENHANCED DESIGN
 * ============================================= */

.contact-card {
    background: linear-gradient(145deg, var(--dark-secondary) 0%, var(--dark-tertiary) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-heavy);
    padding: 3rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-gold), var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* =============================================
 * FORM SECTIONS - REDUCED SPACING
 * ============================================= */

.form-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem; /* Reduced from 40px */
}

.form-section {
    position: relative;
    margin-bottom: 0; /* Remove extra margin */
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem; /* Reduced from 30px */
    padding-bottom: 10px; /* Reduced from 15px */
    border-bottom: 2px solid rgba(var(--primary-color-rgb), 0.3);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-text-primary);
    font-family: var(--font-heading);
}

.section-title i {
    font-size: 1.4rem;
    color: var(--accent-gold);
    background: linear-gradient(45deg, var(--primary-color), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(var(--accent-gold-rgb), 0.3));
}

/* =============================================
 * FORM GRID - OPTIMIZED SPACING
 * ============================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem; /* Reduced from 25px */
    margin-bottom: 1rem; /* Reduced from 25px */
}

.form-group {
    position: relative;
    margin-bottom: 0; /* Remove default margin */
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* =============================================
 * FORM CONTROLS - ENHANCED STYLING
 * ============================================= */

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem; /* Reduced from 8px */
    color: var(--dark-text-primary);
    font-size: 0.95rem;
    display: block;
    font-family: var(--font-primary);
}

.form-label.required::after {
    content: ' *';
    color: var(--accent-coral);
    font-weight: 700;
}

.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
    color: var(--dark-text-primary);
    padding: 12px 16px; /* Reduced padding */
    font-size: 1rem;
    transition: all var(--transition-fast);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: var(--font-primary);
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-gold);
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.1),
        0 0 0 0.25rem rgba(var(--accent-gold-rgb), 0.25);
    color: var(--dark-text-primary);
    outline: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding-right: 3rem;
    cursor: pointer;
}

.form-select option {
    background-color: var(--dark-secondary);
    color: var(--dark-text-primary);
    padding: 10px;
}

/* Textarea specific styling */
textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* =============================================
 * FORM VALIDATION - ENHANCED
 * ============================================= */

.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--success-color);
    background-image: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-color);
    background-image: none;
}

.valid-feedback,
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem; /* Reduced spacing */
    font-size: 0.85rem;
    font-weight: 500;
}

.valid-feedback {
    color: var(--success-color);
}

.invalid-feedback {
    color: var(--danger-color);
}

/* =============================================
 * SUBMIT SECTION - ENHANCED
 * ============================================= */

.submit-section {
    text-align: center;
    padding-top: 1.5rem; /* Reduced from 20px */
    border-top: 2px solid rgba(var(--primary-color-rgb), 0.2);
    margin-top: 1rem;
}

.submit-btn {
    background: linear-gradient(135deg, var(--accent-gold), #FFA500);
    border: none;
    color: var(--dark-color);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 16px 40px; /* Slightly reduced padding */
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(var(--accent-gold-rgb), 0.4);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    justify-content: center;
    font-family: var(--font-heading);
    cursor: pointer;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFA500, var(--accent-gold));
    transition: left var(--transition-medium);
    z-index: -1;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(var(--accent-gold-rgb), 0.6);
    color: var(--dark-color);
}

.submit-btn:hover::before {
    left: 0;
}

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

.submit-btn:disabled,
.submit-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.submit-btn .btn-icon {
    font-size: 1.2rem;
    transition: transform var(--transition-fast);
}

.submit-btn:hover .btn-icon {
    transform: translateX(3px);
}

.submit-info {
    margin-top: 1.5rem; /* Reduced spacing */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--dark-text-muted);
}

.info-item i {
    color: var(--accent-gold);
    font-size: 1rem;
}

/* =============================================
 * CONTACT INFO SECTION - ENHANCED
 * ============================================= */

.contact-info-section {
    padding: 4rem 0;
    background: var(--dark-secondary);
    position: relative;
}

.contact-info-card {
    background: linear-gradient(145deg, var(--dark-tertiary), var(--dark-quaternary));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    height: 100%;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.contact-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(var(--primary-color-rgb), 0.03), rgba(var(--accent-gold-rgb), 0.03));
    z-index: -1;
}

.contact-info-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-intense);
    border-color: rgba(var(--accent-gold-rgb), 0.3);
}

.contact-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.3);
}

.contact-icon i {
    font-size: 1.8rem;
    color: #fff;
}

.contact-info-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    color: var(--dark-text-primary);
    font-weight: 700;
    font-family: var(--font-heading);
}

.contact-details {
    margin-bottom: 1.25rem;
}

.contact-details p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--dark-text-secondary);
}

.contact-details i {
    color: var(--accent-gold);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.contact-details a {
    color: var(--dark-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.contact-details a:hover {
    color: var(--accent-gold);
    text-decoration: none;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 1.25rem;
}

.social-link {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 1.1rem;
}

.social-link:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--accent-gold-rgb), 0.4);
}

/* =============================================
 * ALERT MESSAGES - ENHANCED
 * ============================================= */

#contact-message {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-medium);
    margin-bottom: 2rem;
    font-weight: 500;
    padding: 1.25rem 1.5rem;
}

#contact-message .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

#contact-message.alert-success {
    background: linear-gradient(135deg, rgba(var(--success-color-rgb), 0.15), rgba(var(--success-color-rgb), 0.1));
    border-left: 4px solid var(--success-color);
    color: #fff;
}

#contact-message.alert-danger {
    background: linear-gradient(135deg, rgba(var(--danger-color-rgb), 0.15), rgba(var(--danger-color-rgb), 0.1));
    border-left: 4px solid var(--danger-color);
    color: #fff;
}

/* =============================================
 * UTILITY CLASSES
 * ============================================= */

.character-counter {
    font-size: 0.85rem;
    color: var(--dark-text-muted);
    text-align: right;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* =============================================
 * ANIMATIONS
 * ============================================= */

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse {
    0% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.2;
    }
    100% { 
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.1;
    }
}

/* Form reveal animation */
.contact-card {
    animation: slideInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

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

/* Section reveal animations */
.form-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
 * WHATSAPP BUTTON
 * ============================================= */

.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    animation: float 6s ease-in-out infinite;
}

.whatsapp-btn img {
    height: 60px;
    width: 60px;
    border-radius: 50%;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.5);
}

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

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

@media (max-width: 1199.98px) {
    .hero-slideshow {
        height: 65vh;
        min-height: 450px;
    }
    
    #hero-content h1 {
        font-size: 3rem;
    }
    
    .contact-card {
        padding: 2.5rem;
    }
}

@media (max-width: 991.98px) {
    .hero-slideshow {
        height: 60vh;
        min-height: 400px;
    }
    
    #hero-content h1 {
        font-size: 2.5rem;
    }
    
    #hero-content p {
        font-size: 1.2rem;
    }
    
    .contact-form-section,
    .contact-info-section {
        padding: 3rem 0;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .contact-card {
        padding: 2rem;
    }
    
    .hero-badges {
        gap: 0.75rem;
    }
    
    .hero-badges .badge {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }
}

@media (max-width: 767.98px) {
    .hero-slideshow {
        height: 55vh;
        min-height: 350px;
        background-attachment: scroll;
    }
    
    #hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    #hero-content p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-form-section,
    .contact-info-section {
        padding: 2.5rem 0;
    }
    
    .contact-card {
        padding: 2rem 1.5rem;
    }
    
    .form-sections {
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1.25rem;
    }
    
    .form-control,
    .form-select {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
    
    .submit-btn {
        padding: 14px 35px;
        font-size: 1rem;
        min-width: 180px;
    }
    
    .submit-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-info-card {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-icon {
        width: 65px;
        height: 65px;
        margin-bottom: 1.25rem;
    }
    
    .contact-icon i {
        font-size: 1.6rem;
    }
    
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-btn img {
        height: 50px;
        width: 50px;
    }
}

@media (max-width: 575.98px) {
    .hero-slideshow {
        height: 50vh;
        min-height: 300px;
    }
    
    #hero-content h1 {
        font-size: 1.8rem;
    }
    
    #hero-content p {
        font-size: 1rem;
    }
    
    .contact-card {
        padding: 1.5rem 1rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .form-control,
    .form-select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .submit-btn {
        width: 100%;
        padding: 14px 30px;
        font-size: 0.95rem;
    }
    
    .hero-badges {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .contact-info-card h4 {
        font-size: 1.2rem;
    }
    
    .contact-details {
        font-size: 0.9rem;
    }
    
    .social-links {
        gap: 10px;
    }
    
    .social-link {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}

/* =============================================
 * LIGHT THEME OVERRIDES
 * ============================================= */

body.light-theme .hero-bg-layer::before {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

body.light-theme .contact-form-section {
    background: var(--light-color);
}

body.light-theme .contact-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--light-text-primary);
}

body.light-theme .section-title {
    color: var(--light-text-primary);
    border-bottom-color: rgba(var(--primary-color-rgb), 0.2);
}

body.light-theme .form-label {
    color: var(--light-text-primary);
}

body.light-theme .form-control,
body.light-theme .form-select {
    background-color: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--light-text-primary);
}

body.light-theme .form-control:focus,
body.light-theme .form-select:focus {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--light-text-primary);
}

body.light-theme .form-control::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .info-item {
    color: var(--light-text-muted);
}

body.light-theme .contact-info-section {
    background: var(--light-tertiary);
}

body.light-theme .contact-info-card {
    background: linear-gradient(145deg, var(--light-secondary), #f8f9fa);
    border: 1px solid var(--light-border);
}

body.light-theme .contact-info-card h4 {
    color: var(--light-text-primary);
}

body.light-theme .contact-details p {
    color: var(--light-text-secondary);
}

body.light-theme .contact-details a {
    color: var(--light-text-secondary);
}

body.light-theme .social-link {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--light-text-secondary);
}

body.light-theme .character-counter {
    color: var(--light-text-muted);
}

/* =============================================
 * PRINT STYLES
 * ============================================= */

@media print {
    .hero-slideshow,
    .whatsapp-btn,
    .submit-section {
        display: none !important;
    }
    
    .contact-card {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    .contact-info-card {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}