/**
 * TopLine Member Stories Styles
 * Modern, clean design matching TopLine brand
 */

/* ==========================================================================
   Hero Section
   ========================================================================== */
.ms-hero {
    background: linear-gradient(135deg, #c8102e 0%, #a00d24 100%);
    padding: 120px 24px 100px;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.ms-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.ms-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.ms-hero-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
}

.ms-hero-title {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 20px;
    color: #ffffff;
}

.ms-hero-desc {
    font-size: 18px;
    line-height: 1.7;
    margin: 0 0 32px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.ms-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    color: #c8102e;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.ms-hero-cta:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
    color: #a00d24;
}

.ms-hero-cta svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.ms-hero-cta:hover svg {
    transform: translateX(4px);
}

/* ==========================================================================
   Featured Story Section
   ========================================================================== */
.ms-featured {
    padding: 80px 24px;
}

.ms-featured--bg-white {
    background: #ffffff;
}

.ms-featured--bg-cream {
    background: #faf8f5;
}

.ms-featured--bg-navy {
    background: #1a365d;
    color: #ffffff;
}

.ms-featured--bg-navy .ms-featured-tagline,
.ms-featured--bg-navy .ms-featured-name,
.ms-featured--bg-navy .ms-featured-since,
.ms-featured--bg-navy .ms-featured-quotes blockquote {
    color: #ffffff;
}

.ms-featured--bg-navy .ms-featured-since {
    color: rgba(255, 255, 255, 0.7);
}

.ms-featured-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.ms-featured--media-left .ms-featured-inner {
    direction: rtl;
}

.ms-featured--media-left .ms-featured-inner > * {
    direction: ltr;
}

.ms-featured-content {
    padding: 20px 0;
}

.ms-featured-tagline {
    font-size: 24px;
    font-style: italic;
    color: #c8102e;
    margin: 0 0 24px;
    font-weight: 500;
}

.ms-featured-name {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
    line-height: 1.2;
}

.ms-featured-since {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 24px;
    font-weight: 500;
}

.ms-featured-quotes {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ms-featured-quotes blockquote {
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    position: relative;
    padding-left: 20px;
    border-left: 3px solid #c8102e;
}

.ms-featured-media {
    position: relative;
}

.ms-featured-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.ms-featured-video {
    position: relative;
    padding-bottom: 56.25%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.ms-featured-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 900px) {
    .ms-featured-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .ms-featured--media-left .ms-featured-inner {
        direction: ltr;
    }
    
    .ms-featured-media {
        order: -1;
    }
}

/* ==========================================================================
   Story Cards & Grid
   ========================================================================== */
.ms-grid {
    display: grid;
    gap: 32px;
    padding: 60px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.ms-grid--cols-1 {
    grid-template-columns: 1fr;
    max-width: 700px;
}

.ms-grid--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ms-grid--cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .ms-grid--cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .ms-grid--cols-2,
    .ms-grid--cols-3 {
        grid-template-columns: 1fr;
    }
}

.ms-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ms-card--standard {
    border: 1px solid #e5e7eb;
}

.ms-card--elevated {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.ms-card--elevated:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.ms-card--minimal {
    background: transparent;
    border-radius: 0;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.ms-card-image {
    position: relative;
    overflow: hidden;
}

.ms-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ms-card--elevated:hover .ms-card-image img {
    transform: scale(1.05);
}

.ms-card-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ms-card--minimal .ms-card-content {
    padding: 0;
}

.ms-card-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.ms-card-since {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px;
    font-weight: 500;
}

.ms-card-quote {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    margin: 0;
    padding: 0;
    border: none;
    flex: 1;
}

/* ==========================================================================
   Form Section
   ========================================================================== */
.ms-form-section {
    padding: 80px 24px;
    background: #f8f9fa;
    scroll-margin-top: 120px;
    --ms-form-card-width: 780px;
}

#submit-story {
    scroll-margin-top: 120px;
}

.ms-promo {
    max-width: 800px;
    margin: 0 auto 48px;
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #c8102e 0%, #a00d24 100%);
    border-radius: 20px;
    color: #ffffff;
}

.ms-promo-title {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    margin: 0 0 16px;
    color: #ffffff;
}

.ms-promo-desc {
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.9);
}

.ms-promo-methods {
    font-size: 15px;
    line-height: 1.8;
    margin: 0;
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.ms-promo-methods a {
    color: #ffffff;
    text-decoration: underline;
}

/* Form card: 600px original × 1.3 = 780px (see member-stories-form-width.css for overrides) */
.ms-form-wrapper {
    width: 780px;
    max-width: calc(100vw - 48px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.ms-form-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 32px;
    text-align: center;
}

.ms-form-row {
    display: flex;
    gap: 16px;
}

.ms-form-row--half .ms-form-field {
    flex: 1;
}

.ms-form-field {
    margin-bottom: 24px;
}

.ms-form-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.ms-form-field label .required {
    color: #c8102e;
}

.ms-form-field input[type="text"],
.ms-form-field input[type="email"],
.ms-form-field textarea,
.ms-form-field select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.ms-form-field input:focus,
.ms-form-field textarea:focus,
.ms-form-field select:focus {
    outline: none;
    border-color: #c8102e;
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.ms-form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.ms-file-upload {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.ms-file-upload:hover {
    border-color: #c8102e;
    background: #fef5f6;
}

.ms-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ms-file-label {
    font-size: 14px;
    color: #666;
}

.ms-form-disclaimer {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    margin: 0 0 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ms-form-submit {
    width: 100%;
    padding: 16px 32px;
    background: #c8102e;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.ms-form-submit:hover:not(:disabled) {
    background: #a00d24;
    transform: translateY(-2px);
}

.ms-form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.ms-form-wrapper--feedback {
    min-height: 220px;
}

.ms-form-success,
.ms-form-error {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.5;
    scroll-margin-top: 120px;
}

.ms-form-success:focus,
.ms-form-error:focus {
    outline: 2px solid #0C2333;
    outline-offset: 2px;
}

.ms-form-success {
    background: #ecfdf5;
    color: #065f46;
}

.ms-form-success svg {
    width: 32px;
    height: 32px;
    stroke: #10b981;
    flex-shrink: 0;
}

.ms-form-error {
    background: #fef2f2;
    color: #991b1b;
}

.ms-form-error svg {
    width: 32px;
    height: 32px;
    stroke: #ef4444;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .ms-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ms-form-wrapper {
        padding: 32px 24px;
    }
    
    .ms-promo {
        padding: 32px 24px;
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .ms-hero {
        padding: 100px 20px 80px;
    }
    
    .ms-featured {
        padding: 60px 20px;
    }
    
    .ms-grid {
        padding: 40px 20px;
    }
    
    .ms-form-section {
        padding: 60px 20px;
    }
}
