﻿/* ====================================
   sos.css - Animal SOS Emergency Page
   EcoLife Animal Safety Module
   ==================================== */

/* ------------------------------------
   Root Variables & Base Styles
------------------------------------ */
:root {
    --sos-primary: #ff4757;
    --sos-primary-dark: #e63946;
    --sos-primary-rgb: 255, 71, 87;
    --sos-secondary: #ffa502;
    --sos-accent: #ff6b81;
    --sos-gradient: linear-gradient(135deg, #ff4757, #ff6b81);
    --sos-glow: 0 0 30px rgba(255, 71, 87, 0.3);
}

/* ------------------------------------
   Hero Section
------------------------------------ */
.enhanced-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('https://images.unsplash.com/photo-1548199973-03cce0bbc87b?w=1600') center/cover fixed;
    overflow: hidden;
    padding: 8rem 2rem;
}

.enhanced-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.85) 0%,
        rgba(255, 71, 87, 0.4) 50%,
        rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    text-align: center;
    color: white;
    padding: 3rem;
    border-radius: 40px;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: heroGlow 3s infinite ease-in-out;
}

@keyframes heroGlow {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 71, 87, 0.3); }
    50% { box-shadow: 0 0 50px rgba(255, 71, 87, 0.6); }
}

.hero-content .badge {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--sos-primary);
    color: white;
    border-radius: 50px;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    text-transform: uppercase;
    animation: pulse 2s infinite;
    box-shadow: 0 0 30px rgba(255, 71, 87, 0.5);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-content h1 {
    font-size: 5.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #ffffff, #ffb8b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 3.5rem;
    border-radius: 60px;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-btn.primary {
    background: var(--sos-primary);
    color: white;
    box-shadow: 0 10px 30px rgba(255, 71, 87, 0.4);
}

.hero-btn.primary:hover {
    background: var(--sos-primary-dark);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 71, 87, 0.6);
}

.hero-btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    border-color: var(--sos-primary);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ------------------------------------
   Section Base Styles
------------------------------------ */
.section {
    padding: 8rem 2rem;
    position: relative;
    overflow: hidden;
}

.section-bg {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.section-bg-alt {
    background: var(--bg-secondary);
    position: relative;
}

.section-bg-alt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><path d="M50 15 L61 39 L88 41 L67 57 L73 84 L50 71 L27 84 L33 57 L12 41 L39 39 Z" fill="%23ff4757"/></svg>') repeat;
    background-size: 50px;
    pointer-events: none;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 3.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--sos-primary);
    border-radius: 2px;
    animation: titleUnderline 3s infinite;
}

@keyframes titleUnderline {
    0%, 100% { width: 80px; }
    50% { width: 120px; }
}

.section-desc {
    font-size: 1.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ------------------------------------
   When to Use Section
------------------------------------ */
.usage-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.usage-main-card {
    display: flex;
    background: var(--bg-card);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.usage-main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--sos-primary);
    transition: all 0.3s ease;
}

.usage-main-card:hover {
    transform: translateY(-10px) translateX(5px);
    box-shadow: 0 25px 50px rgba(255, 71, 87, 0.2);
}

.usage-main-card:hover::before {
    width: 8px;
    box-shadow: 0 0 30px var(--sos-primary);
}

.usage-left-card {
    flex: 0 0 120px;
    background: linear-gradient(135deg, var(--sos-primary), var(--sos-accent));
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.usage-left-card i {
    font-size: 3.5rem;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.usage-left-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.usage-right-card {
    flex: 1;
    padding: 2rem;
    background: var(--bg-card);
}

.usage-right-card p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Safety Section Variants */
.safety-border .usage-left-card {
    background: linear-gradient(135deg, #2196F3, #00BCD4);
}

.safety-border::before {
    background: #2196F3;
}

.safety-border:hover {
    box-shadow: 0 25px 50px rgba(33, 150, 243, 0.2);
}

.safety-left i {
    color: white;
}

/* ------------------------------------
   How It Works Timeline
------------------------------------ */
.timeline-wrapper {
    max-width: 1000px;
    margin: 4rem auto 0;
    padding: 2rem;
}

.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, 
        var(--sos-primary), 
        var(--sos-accent), 
        var(--sos-primary));
    border-radius: 2px;
    box-shadow: 0 0 30px rgba(255, 71, 87, 0.5);
    animation: timelineGlow 3s infinite;
}

@keyframes timelineGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.timeline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    animation: slideIn 0.5s ease forwards;
    opacity: 0;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(var(--start, -50px));
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-item:nth-child(even) {
    --start: 50px;
}

.timeline-dot {
    width: 50px;
    height: 50px;
    background: var(--sos-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 30px rgba(255, 71, 87, 0.5);
    border: 3px solid white;
    animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
}

.timeline-card {
    width: calc(50% - 50px);
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--sos-primary);
}

.timeline-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(255, 71, 87, 0.15);
}

.timeline-item:nth-child(odd) .timeline-card {
    margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-card {
    margin-left: auto;
}

.timeline-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.timeline-card p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ------------------------------------
   SOS Form Section
------------------------------------ */
.form-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 8rem 2rem;
}

.form-section h2 {
    text-align: center;
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.form-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--sos-gradient);
    border-radius: 2px;
}

.sos-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 4rem;
    border-radius: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.sos-form::before {
    content: '🚑';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 15rem;
    opacity: 0.03;
    transform: rotate(15deg);
    pointer-events: none;
}

.sos-form label {
    display: block;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.sos-form select,
.sos-form textarea,
.sos-form input {
    width: 100%;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    font-size: 1.6rem;
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.sos-form select:focus,
.sos-form textarea:focus,
.sos-form input:focus {
    outline: none;
    border-color: var(--sos-primary);
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1);
}

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

.sos-form input[type="file"] {
    padding: 1rem;
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    cursor: pointer;
}

.sos-form input[type="file"]:hover {
    border-color: var(--sos-primary);
}

.sos-form button {
    width: 100%;
    padding: 1.8rem;
    background: var(--sos-gradient);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(255, 71, 87, 0.3);
    position: relative;
    overflow: hidden;
}

.sos-form button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.sos-form button:hover::before {
    width: 300px;
    height: 300px;
}

.sos-form button:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(255, 71, 87, 0.4);
}

.sos-form button:active {
    transform: translateY(0);
}

/* ------------------------------------
   Trust Section
------------------------------------ */
.trust {
    background: linear-gradient(135deg, var(--sos-primary), var(--sos-accent));
    color: white;
    text-align: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.trust::before {
    content: '❤️';
    position: absolute;
    top: -50px;
    left: -50px;
    font-size: 30rem;
    opacity: 0.1;
    transform: rotate(15deg);
    animation: heartFloat 10s infinite linear;
}

.trust::after {
    content: '🐾';
    position: absolute;
    bottom: -50px;
    right: -50px;
    font-size: 30rem;
    opacity: 0.1;
    transform: rotate(-15deg);
    animation: pawFloat 10s infinite linear reverse;
}

@keyframes heartFloat {
    from { transform: rotate(15deg) translateX(0); }
    to { transform: rotate(15deg) translateX(50px); }
}

@keyframes pawFloat {
    from { transform: rotate(-15deg) translateX(0); }
    to { transform: rotate(-15deg) translateX(-50px); }
}

.trust-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.trust h2 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.2);
}

.trust h2 .heart {
    display: inline-block;
    animation: heartbeat 1.5s infinite;
    font-size: 5rem;
    line-height: 1;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.2); }
    50% { transform: scale(1.1); }
    70% { transform: scale(1.2); }
}

.trust p {
    font-size: 2rem;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* ------------------------------------
   Theme Toggle Button
------------------------------------ */
.theme-toggle {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    background: var(--sos-primary);
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 71, 87, 0.4);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 15px 40px rgba(255, 71, 87, 0.6);
}

.theme-toggle i {
    position: absolute;
    transition: all 0.3s ease;
}

.theme-toggle .fa-sun {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .theme-toggle .fa-moon {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .theme-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0);
}

/* ------------------------------------
   Responsive Design
------------------------------------ */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 4.2rem;
    }
    
    .usage-row {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
    
    .timeline-card {
        width: calc(50% - 40px);
    }
}

@media (max-width: 992px) {
    .hero-content {
        padding: 3rem 2rem;
    }
    
    .hero-content h1 {
        font-size: 3.6rem;
    }
    
    .hero-content p {
        font-size: 1.6rem;
    }
    
    .hero-btn {
        padding: 1.2rem 2.5rem;
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .timeline-card {
        width: calc(100% - 80px);
        margin-left: 80px !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-card,
    .timeline-item:nth-child(even) .timeline-card {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .enhanced-hero {
        min-height: 70vh;
        padding: 6rem 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-btn {
        width: 100%;
        justify-content: center;
    }
    
    .section {
        padding: 6rem 1.5rem;
    }
    
    .section-title {
        font-size: 2.6rem;
    }
    
    .usage-main-card {
        flex-direction: column;
    }
    
    .usage-left-card {
        flex-direction: row;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .usage-left-card i {
        font-size: 2.5rem;
    }
    
    .usage-left-card h3 {
        font-size: 1.8rem;
    }
    
    .sos-form {
        padding: 2.5rem;
    }
    
    .sos-form button {
        font-size: 1.6rem;
        padding: 1.5rem;
    }
    
    .trust h2 {
        font-size: 3rem;
    }
    
    .trust p {
        font-size: 1.6rem;
    }
    
    .theme-toggle {
        bottom: 2rem;
        right: 2rem;
        width: 5rem;
        height: 5rem;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.4rem;
    }
    
    .hero-content .badge {
        font-size: 1.2rem;
        padding: 0.6rem 1.5rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .section-desc {
        font-size: 1.5rem;
    }
    
    .timeline-card {
        padding: 1.5rem;
    }
    
    .timeline-card h3 {
        font-size: 1.6rem;
    }
    
    .timeline-card p {
        font-size: 1.3rem;
    }
    
    .sos-form {
        padding: 2rem;
    }
    
    .sos-form label {
        font-size: 1.4rem;
    }
    
    .sos-form select,
    .sos-form textarea,
    .sos-form input {
        padding: 1.2rem;
        font-size: 1.4rem;
    }
    
    .trust h2 {
        font-size: 2.4rem;
    }
    
    .trust h2 .heart {
        font-size: 3.5rem;
    }
}

/* ------------------------------------
   Dark Mode Overrides
------------------------------------ */
[data-theme="dark"] {
    --sos-primary: #ff6b81;
    --sos-primary-dark: #ff4757;
    --sos-accent: #ff8a9f;
}

[data-theme="dark"] .hero-content {
    background: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .usage-left-card {
    background: linear-gradient(135deg, var(--sos-primary-dark), var(--sos-primary));
}

[data-theme="dark"] .safety-border .usage-left-card {
    background: linear-gradient(135deg, #1e88e5, #00acc1);
}

[data-theme="dark"] .trust {
    background: linear-gradient(135deg, var(--sos-primary-dark), var(--sos-primary));
}

/* ------------------------------------
   Animations
------------------------------------ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.usage-main-card,
.timeline-item,
.sos-form {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading Animation */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3rem;
    height: 3rem;
    margin: -1.5rem 0 0 -1.5rem;
    border: 3px solid var(--border-color);
    border-top-color: var(--sos-primary);
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
}

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

/* ------------------------------------
   Utility Classes
------------------------------------ */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.hidden {
    display: none !important;
}

/* Print Styles */
@media print {
    .enhanced-hero {
        min-height: auto;
        background: none;
    }
    
    .theme-toggle,
    .scroll-indicator,
    .hero-btn {
        display: none;
    }
}