/* ==========================================================================
   Contact Page Stylesheet
   Version: 1.0
   
   TABLE OF CONTENTS:
   1. Contact Hero Section
   2. Primary Contact Grid
   3. Department Section
   4. Contact Form
   5. Office Information
   6. Animations
   7. Responsive Design
   ========================================================================== */

/* ==========================================================================
   1. Contact Hero Section
   ========================================================================== */

.contact-hero {
    position: relative;
    min-height: 60vh;
    background: linear-gradient(135deg, #898fa0 0%, #706d9c 40%, #926ecc 100%);
    padding: 12rem 0 6rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.gradient-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

/* Connection Pattern Animation */
.connection-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

.pattern-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: moveLines 10s linear infinite;
}

.line-1 { top: 20%; width: 60%; left: -60%; animation-delay: 0s; }
.line-2 { top: 40%; width: 80%; right: -80%; animation-delay: 2s; animation-direction: reverse; }
.line-3 { top: 60%; width: 70%; left: -70%; animation-delay: 4s; }
.line-4 { top: 80%; width: 90%; right: -90%; animation-delay: 6s; animation-direction: reverse; }
.line-5 { top: 30%; width: 50%; left: -50%; animation-delay: 8s; }

@keyframes moveLines {
    to { transform: translateX(200%); }
}

.connection-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: pulse 3s ease-in-out infinite;
}

.dot-1 { top: 25%; left: 20%; animation-delay: 0s; }
.dot-2 { top: 50%; right: 30%; animation-delay: 0.8s; }
.dot-3 { bottom: 30%; left: 40%; animation-delay: 1.6s; }
.dot-4 { top: 70%; right: 20%; animation-delay: 2.4s; }

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.5); opacity: 1; }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 110rem;
    margin: 0 auto;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: var(--weight-bold);
    color: white;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.title-accent {
    background: linear-gradient(45deg, #ffd6e6, #e6d6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 70rem;
    margin: 0 auto 4rem;
    line-height: 1.6;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

/* ==========================================================================
   2. Primary Contact Grid
   ========================================================================== */

.primary-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr));
    gap: 2.5rem;
    max-width: 100rem;
    margin: 0 auto 3rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.contact-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-medium);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--main-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-medium);
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.contact-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 6rem;
    height: 6rem;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, rgba(146, 110, 204, 0.1) 0%, rgba(112, 109, 156, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-medium);
}

.contact-card:hover .card-icon {
    background: var(--main-gradient);
    transform: scale(1.1) rotate(5deg);
}

.card-icon svg {
    width: 3rem;
    height: 3rem;
    stroke: var(--color-secondary);
    transition: stroke var(--transition-medium);
}

.contact-card:hover .card-icon svg {
    stroke: white;
}

.contact-card h3 {
    font-size: 2rem;
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
}

.contact-number {
    display: inline-block;
    font-size: 2.4rem;
    font-weight: var(--weight-bold);
    color: var(--color-secondary);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: all var(--transition-fast);
}

.contact-number:hover {
    color: var(--color-secondary-dark);
    transform: scale(1.05);
}

.contact-number.urgent {
    color: var(--color-error);
}

.chat-button {
    background: var(--main-gradient);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.6rem;
    font-weight: var(--weight-semibold);
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    transition: all var(--transition-medium);
    margin-bottom: 1.5rem;
}

.chat-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(146, 110, 204, 0.3);
}

.email-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.email-options a {
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 1.6rem;
    transition: color var(--transition-fast);
}

.email-options a:hover {
    color: var(--color-secondary-dark);
}

.contact-details {
    font-size: 1.5rem;
    color: var(--color-text);
    line-height: 1.6;
}

.contact-details p {
    margin: 0.5rem 0;
}

.response-tag {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(146, 110, 204, 0.1);
    color: var(--color-secondary);
    border-radius: var(--border-radius-pill);
    font-size: 1.3rem;
    font-weight: var(--weight-semibold);
    margin-top: 1rem;
}

.urgent-tag {
    background: rgba(239, 83, 80, 0.1);
    color: var(--color-error);
}

.urgent-card {
    border: 2px solid rgba(239, 83, 80, 0.2);
}

.urgent-card .card-icon {
    background: rgba(239, 83, 80, 0.1);
    animation: urgentPulse 2s ease-in-out infinite;
}

@keyframes urgentPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.urgent-card .card-icon svg {
    stroke: var(--color-error);
}

/* Emergency Notice */
.emergency-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 2.5rem;
    background: rgba(239, 83, 80, 0.1);
    border: 1px solid rgba(239, 83, 80, 0.2);
    border-radius: var(--border-radius-lg);
    color: white;
    font-size: 1.6rem;
    max-width: 50rem;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.emergency-notice svg {
    stroke: white;
    flex-shrink: 0;
}

/* ==========================================================================
   3. Department Section
   ========================================================================== */

.department-section {
    padding: 8rem 0;
    background-color: var(--color-background);
}

.section-title {
    text-align: center;
    font-size: 3.6rem;
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.8rem;
    color: var(--color-text);
    margin-bottom: 5rem;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 3rem;
    max-width: 120rem;
    margin: 0 auto;
}

.department-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 3.5rem 3rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.department-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: var(--main-gradient);
    transition: height var(--transition-medium);
}

.department-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.department-card:hover::after {
    height: 4px;
}

.department-card.selected {
    border: 2px solid var(--color-secondary);
}

.dept-icon {
    width: 7rem;
    height: 7rem;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, rgba(146, 110, 204, 0.1) 0%, rgba(112, 109, 156, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dept-icon svg {
    width: 3.5rem;
    height: 3.5rem;
    stroke: var(--color-secondary);
}

.department-card h3 {
    font-size: 2.2rem;
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
}

.department-card > p {
    font-size: 1.6rem;
    color: var(--color-text);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.dept-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-item {
    font-size: 1.4rem;
    color: var(--color-text);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--color-border-light);
}

.detail-item strong {
    color: var(--color-primary-dark);
}

.detail-item a {
    color: var(--color-secondary);
    text-decoration: none;
}

.detail-item a:hover {
    text-decoration: underline;
}

.dept-select-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    background: var(--main-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 1.6rem;
    font-weight: var(--weight-semibold);
    cursor: pointer;
    transition: all var(--transition-medium);
}

.dept-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(146, 110, 204, 0.3);
}

/* ==========================================================================
   4. Contact Form
   ========================================================================== */

.contact-form-section {
    padding: 8rem 0;
    background: white;
}

.form-container {
    max-width: 80rem;
    margin: 0 auto;
    background: white;
    padding: 5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.form-container h2 {
    text-align: center;
    font-size: 3.2rem;
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
}

.form-subtitle {
    text-align: center;
    font-size: 1.6rem;
    color: var(--color-text);
    margin-bottom: 4rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 1.5rem;
    font-weight: var(--weight-semibold);
    color: var(--color-primary-dark);
    margin-bottom: 0.8rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.6rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
    font-family: var(--font-secondary);
    background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(146, 110, 204, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 12rem;
}

.character-count {
    position: absolute;
    bottom: -2rem;
    right: 0;
    font-size: 1.3rem;
    color: var(--color-text-light);
}

.error-message {
    position: absolute;
    bottom: -2rem;
    left: 0;
    font-size: 1.3rem;
    color: var(--color-error);
    display: none;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--color-error);
}

.form-group.error .error-message {
    display: block;
}

/* Radio Groups */
.radio-group {
    display: flex;
    gap: 2rem;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-label span {
    padding-left: 2.5rem;
    font-size: 1.5rem;
    color: var(--color-text);
    position: relative;
}

.radio-label span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.8rem;
    height: 1.8rem;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.radio-label input[type="radio"]:checked + span::before {
    border-color: var(--color-secondary);
}

.radio-label input[type="radio"]:checked + span::after {
    content: '';
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.6rem;
    height: 0.6rem;
    background: var(--color-secondary);
    border-radius: 50%;
}

/* Urgency Options */
.urgency-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.urgency-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.urgency-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.urgency-label span {
    font-size: 1.6rem;
    font-weight: var(--weight-semibold);
    margin-bottom: 0.5rem;
}

.urgency-label small {
    font-size: 1.3rem;
    color: var(--color-text-light);
}

.urgency-label.routine {
    border-color: var(--color-border);
}

.urgency-label.urgent {
    border-color: rgba(249, 168, 37, 0.3);
}

.urgency-label.emergency {
    border-color: rgba(239, 83, 80, 0.3);
}

.urgency-label input[type="radio"]:checked ~ span {
    color: var(--color-secondary);
}

.urgency-label.routine input[type="radio"]:checked {
    + span { color: var(--color-secondary); }
}

.urgency-label.urgent input[type="radio"]:checked {
    + span { color: var(--color-warning); }
}

.urgency-label.emergency input[type="radio"]:checked {
    + span { color: var(--color-error); }
}

.urgency-label input[type="radio"]:checked ~ .urgency-label {
    border-width: 3px;
}

/* Submit Button */
.btn-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.8rem 4rem;
    font-size: 1.8rem;
    align-self: center;
    margin-top: 2rem;
}

.btn-large svg {
    transition: transform var(--transition-fast);
}

.btn-large:hover svg {
    transform: translateX(5px);
}

/* ==========================================================================
   5. Office Information
   ========================================================================== */

.office-info-section {
    padding: 8rem 0;
    background-color: var(--color-background);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 120rem;
    margin: 0 auto 6rem;
}

.info-card {
    background: white;
    padding: 4rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.info-card h3 {
    font-size: 2.4rem;
    color: var(--color-primary-dark);
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.info-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 5rem;
    height: 3px;
    background: var(--main-gradient);
    border-radius: var(--border-radius-pill);
}

.info-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-icon {
    flex-shrink: 0;
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, rgba(146, 110, 204, 0.1) 0%, rgba(112, 109, 156, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    stroke: var(--color-secondary);
}

.info-details h4 {
    font-size: 1.8rem;
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
}

.info-details p {
    font-size: 1.5rem;
    color: var(--color-text);
    line-height: 1.6;
}

.info-note {
    display: inline-block;
    font-size: 1.3rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: 0.5rem;
}

.hours-list {
    list-style: none;
    margin-top: 1rem;
}

.hours-list li {
    font-size: 1.5rem;
    color: var(--color-text);
    padding: 0.5rem 0;
}

/* Resource Links */
.resource-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.resource-link {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--color-background);
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    transition: all var(--transition-medium);
}

.resource-link:hover {
    transform: translateX(10px);
    box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.1);
    background: white;
}

.link-icon {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-icon svg {
    width: 2rem;
    height: 2rem;
    stroke: var(--color-secondary);
}

.link-content h4 {
    font-size: 1.6rem;
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
}

.link-content p {
    font-size: 1.4rem;
    color: var(--color-text);
}

/* Contact Summary */
.contact-summary {
    max-width: 100rem;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.contact-summary h3 {
    font-size: 2.2rem;
    color: var(--color-primary-dark);
    margin-bottom: 2rem;
    text-align: center;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    gap: 2rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-background);
    border-radius: var(--border-radius-md);
}

.summary-item svg {
    width: 2rem;
    height: 2rem;
    stroke: var(--color-secondary);
    flex-shrink: 0;
}

.summary-item span {
    font-size: 1.5rem;
    color: var(--color-text);
}

/* ==========================================================================
   6. Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   7. Responsive Design
   ========================================================================== */

/* Tablet (up to 992px) */
@media (max-width: 992px) {
    .contact-hero {
        padding: 10rem 0 5rem;
    }
    
    .hero-title {
        font-size: 3.6rem;
    }
    
    .primary-contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .departments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .urgency-options {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .resource-links {
        grid-template-columns: 1fr;
    }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
    .contact-hero {
        min-height: auto;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.6rem;
    }
    
    .primary-contact-grid {
        grid-template-columns: 1fr;
    }
    
    .departments-grid {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 3rem 2rem;
    }
    
    .contact-number {
        font-size: 2rem;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Small mobile (up to 576px) */
@media (max-width: 576px) {
    .hero-title {
        font-size: 2.4rem;
    }
    
    .connection-pattern {
        display: none;
    }
    
    .contact-card {
        padding: 2rem;
    }
    
    .department-card {
        padding: 2.5rem 2rem;
    }
}

/* Header active state for contact */
.main-nav a.active {
    color: var(--color-secondary);
    font-weight: var(--weight-semibold);
}