/* ==============================
   CONTACT CARDS WITH ANIMATED BORDERS
   ============================== */

/* Variables */
:root {
    --navy: #484745;
    --gold: #c6ab7d;
    --light-gold: #d4c5a8;
    --medium-gray: #5a5a5a;
    --light-gray: #eaeaea;
    --white: #ffffff;
    --transition-medium: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Section Styles */
.section {
    padding: 120px 0;
    width: 100%;
    position: relative;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
}

.section-title h2 {
    font-size: 3.5rem;
    color: var(--navy);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    font-weight: 500;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: var(--gold);
    transition: var(--transition-medium);
}

.section-title:hover h2:after {
    width: 120px;
}

.section-title p {
    color: var(--medium-gray);
    max-width: 700px;
    margin: 30px auto 0;
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.8;
}

/* Contact Grid Layout */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 50px;
    margin-top: 50px;
}

/* Add these styles at the end of your existing CSS file */

/* Enable 3D transforms on contact cards */
.contact-card {
  transform-style: preserve-3d;
  will-change: transform;
  backface-visibility: hidden;
  cursor: pointer;
  position: relative;
}

/* Ensure child elements don't break the 3D effect */
.contact-card > * {
  backface-visibility: hidden;
}

/* Ensure border animations don't interfere with 3D effect */
.anim-border {
  transform-style: flat;
  will-change: transform, opacity;
}

/* Optional: Add a subtle shadow enhancement on hover */
.contact-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.3s ease;
}

/* Disable 3D effect on mobile for better performance */
@media (max-width: 768px) {
  .contact-card {
    transform-style: flat;
    will-change: auto;
    cursor: default;
  }
}

/* Contact Cards - Clean version without pseudo-elements */
.contact-card {
    position: relative;
    border-right: 4px solid black !important;
    border-bottom: 4px solid black !important;
    padding: 50px 40px;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-medium);
    overflow: hidden;
    z-index: 1;
    text-align: right !important;
    
}

/* Remove all pseudo-elements that might interfere */
.contact-card::before,
.contact-card::after {
    display: none !important;
    content: none !important;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-right: none !important;
    border-bottom: none !important ;
}

/* Card Title */
.contact-card h3 {
    font-size: 1.7rem;
    color: var(--navy);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    position: relative;
    z-index: 2;
    text-align: right !important;
}

/* Contact Info Sections */
.contact-info {
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
    text-align: right !important;
}

.contact-info h4 {
    color: var(--navy);
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    text-align: right !important;
}

.contact-info p {
    color: var(--medium-gray);
    margin-bottom: 10px;
    transition: var(--transition-medium);
    text-align: right !important;
}

.contact-info p:hover {
    color: var(--navy);
}

/* Animated Border Elements */
.anim-border {
    position: absolute;
    background: linear-gradient(90deg, #c6ab7d, #e4c896);
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

/* Border positions - these will be enhanced by GSAP */
.border-top {
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    transform-origin: left;
}

.border-right {
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    transform-origin: top;
}

.border-bottom {
    bottom: 0;
    right: 0;
    width: 100%;
    height: 4px;
    transform-origin: right;
}

.border-left {
    bottom: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transform-origin: bottom;
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==============================
   RTL Specific Styles
   ============================== */
.contact-card,
.contact-info,
.contact-info h4,
.contact-info p {
    text-align: right !important;
}

/* ==============================
   Mobile Responsive
   ============================== */
@media (max-width: 768px) {
    .section {
        padding: 100px 0;
    }
    
    .section-title h2 {
        font-size: 2.8rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    
    .contact-card {
        padding: 40px 30px !important;
    }
    
    .contact-card h3 {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 80px 0;
    }
    
    .section-title h2 {
        font-size: 2.3rem;
    }
    
    .contact-card {
        padding: 30px 25px !important;
    }
    
    .contact-card h3 {
        font-size: 1.3rem !important;
        margin-bottom: 25px !important;
    }
    
    .contact-info {
        margin-bottom: 25px !important;
    }
    
    .contact-info h4 {
        font-size: 1rem !important;
    }
    
    .contact-info p {
        font-size: 0.95rem !important;
    }
}