/**
 * =================================================================
 * Page Template Styles
 * =================================================================
 * @file page.css
 * @version 1.0
 */

/* =================================================================
   Page Hero
   ================================================================= */

.sw_page-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.sw_page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.sw_page-icon img {
    animation: fadeInDown 0.6s ease;
    border: 4px solid rgba(255,255,255,0.3);
}

.sw_page-title {
    animation: fadeInUp 0.5s ease 0.2s both;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.sw_page-excerpt {
    animation: fadeInUp 0.5s ease 0.3s both;
    max-width: 700px;
    margin: 0 auto;
}

.sw_page-meta {
    animation: fadeInUp 0.5s ease 0.4s both;
}

/* =================================================================
   Page Content
   ================================================================= */

.sw_page-content {
    background: white;
}

.sw_page-body {
    animation: fadeIn 0.6s ease;
}

.sw_content-wrapper {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #2d3748;
}

/* Typography Enhancement */
.sw_content-wrapper h1,
.sw_content-wrapper h2,
.sw_content-wrapper h3,
.sw_content-wrapper h4,
.sw_content-wrapper h5,
.sw_content-wrapper h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #1a202c;
}

.sw_content-wrapper h1 { font-size: 2.5rem; }
.sw_content-wrapper h2 { font-size: 2rem; }
.sw_content-wrapper h3 { font-size: 1.75rem; }
.sw_content-wrapper h4 { font-size: 1.5rem; }

.sw_content-wrapper p {
    margin-bottom: 1.5rem;
}

.sw_content-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sw_content-wrapper blockquote {
    border-right: 4px solid #667eea;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: #f7fafc;
    border-radius: 8px;
    font-style: italic;
    position: relative;
}

.sw_content-wrapper blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #667eea;
    opacity: 0.2;
    position: absolute;
    top: -10px;
    right: 10px;
    font-family: Georgia, serif;
}

.sw_content-wrapper ul,
.sw_content-wrapper ol {
    padding-right: 2rem;
    margin-bottom: 1.5rem;
}

.sw_content-wrapper li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.sw_content-wrapper code {
    background: #f7fafc;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e53e3e;
}

.sw_content-wrapper pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.sw_content-wrapper pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.sw_content-wrapper a {
    color: #667eea;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.sw_content-wrapper a:hover {
    color: #764ba2;
}

.sw_content-wrapper table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sw_content-wrapper th,
.sw_content-wrapper td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}

.sw_content-wrapper th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.sw_content-wrapper tr:hover {
    background: #f7fafc;
}

/* =================================================================
   Page Share
   ================================================================= */

.sw_page-share {
    padding-top: 3rem;
    border-top: 2px solid #e2e8f0;
}

/* =================================================================
   Contact Form Section
   ================================================================= */

.sw_contact-form-section {
    background: linear-gradient(to bottom, #f7fafc 0%, white 100%);
}

.sw_contact-form .form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.sw_contact-form .form-control,
.sw_contact-form textarea {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.sw_contact-form .form-control:focus,
.sw_contact-form textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.sw_contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.sw_contact-form button[type="submit"] {
    border-radius: 50px;
    padding: 0.75rem 2.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sw_contact-form button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

#formResponse {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================
   Back to Top
   ================================================================= */

.sw_back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sw_back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.sw_back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* =================================================================
   Animations
   ================================================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================
   Responsive
   ================================================================= */

@media (max-width: 991px) {
    .sw_page-title {
        font-size: 2.5rem !important;
    }
    
    .sw_content-wrapper {
        font-size: 1rem;
    }
    
    .sw_content-wrapper h1 { font-size: 2rem; }
    .sw_content-wrapper h2 { font-size: 1.75rem; }
    .sw_content-wrapper h3 { font-size: 1.5rem; }
}

@media (max-width: 767px) {
    .sw_page-hero {
        padding: 3rem 0 !important;
    }
    
    .sw_page-icon img {
        width: 80px;
        height: 80px;
    }
    
    .sw_page-title {
        font-size: 2rem !important;
    }
    
    .sw_back-to-top {
        bottom: 1rem;
        left: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* =================================================================
   Print Styles
   ================================================================= */

@media print {
    .sw_page-hero,
    .sw_page-share,
    .sw_contact-form-section,
    .sw_back-to-top {
        display: none !important;
    }
    
    .sw_content-wrapper {
        font-size: 12pt;
        line-height: 1.6;
    }
}

/* =================================================================
   Dark Mode Support (Optional)
   ================================================================= */

@media (prefers-color-scheme: dark) {
    .sw_page-content {
        background: #1a202c;
    }
    
    .sw_content-wrapper {
        color: #e2e8f0;
    }
    
    .sw_content-wrapper h1,
    .sw_content-wrapper h2,
    .sw_content-wrapper h3,
    .sw_content-wrapper h4,
    .sw_content-wrapper h5,
    .sw_content-wrapper h6 {
        color: white;
    }
    
    .sw_content-wrapper blockquote {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .sw_contact-form .form-control,
    .sw_contact-form textarea {
        background: #2d3748;
        color: white;
        border-color: #4a5568;
    }
}