/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4f46e5;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav a:hover {
    color: #4f46e5;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #4f46e5;
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}


/* Calculator Section */
.calculator-section {
    padding: 120px 0 80px;
    background: #f9fafb;
    position: relative;
}

.calculator-section h3 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: #1f2937;
}

.calculator-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.calculator-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ad-sidebar-left {
    position: fixed;
    left: calc((100vw - 800px) / 2 - 320px);
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    z-index: 1000;
    max-height: 100vh;
    overflow: hidden;
}

.ad-sidebar-right {
    position: fixed;
    right: calc((100vw - 800px) / 2 - 320px);
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    z-index: 1000;
    max-height: 100vh;
    overflow: hidden;
}

.ad-sidebar-vertical {
    width: 300px;
    height: 250px;
    margin: 0;
    background: #fafafa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ad-result-banner {
    max-width: 728px;
    height: 90px;
    margin: 2rem 0;
    background: #fafafa;
}

.calculator-container {
    display: flex;
    flex-direction: column;
}

.result-wrapper {
    display: flex;
    flex-direction: column;
}

.calculator-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Toggle Container (Pet Type) */
.toggle-container {
    display: flex;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.toggle-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.toggle-option:hover {
    background: #e5e7eb;
}

.toggle-option.active {
    background: #4f46e5;
    color: white;
    transform: scale(1.02);
}

.toggle-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.toggle-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Slider Container */
.slider-container {
    margin: 1rem 0;
}

.slider-container input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    margin: 1rem 0;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.slider-labels span {
    text-align: center;
    flex: 1;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.slider-labels span:hover {
    background: #f3f4f6;
    color: #4f46e5;
}

.slider-labels span.active {
    color: #4f46e5;
    font-weight: 600;
    background: #eff6ff;
}

.slider-value {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #4f46e5;
    padding: 0.5rem;
    background: #eff6ff;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

/* Result Container */
.result-container {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #e5e7eb;
    height: fit-content;
    transition: all 0.3s ease;
}

.result-container.has-result {
    border-color: #10b981;
}

.result-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}

.result-placeholder .placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.result-placeholder h4 {
    color: #6b7280;
    margin-bottom: 1rem;
    font-weight: 500;
}

.result-placeholder p {
    color: #9ca3af;
    font-size: 0.9rem;
}

.result-header h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.pet-info {
    background: #f0fdf4;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    color: #065f46;
    font-weight: 500;
}

.premium-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.premium-result:last-child {
    border-bottom: none;
}

.premium-result .label {
    font-weight: 500;
    color: #6b7280;
}

.premium-result .amount {
    font-size: 1.25rem;
    font-weight: 600;
    color: #10b981;
}

.result-details {
    margin-top: 1.5rem;
}

.result-details h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.result-details ul {
    list-style: none;
    padding: 0;
}

.result-details li {
    padding: 0.5rem 0;
    color: #6b7280;
    position: relative;
    padding-left: 1.5rem;
}

.result-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.premium-result.main {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.premium-result.main .amount {
    color: white;
    font-size: 1.5rem;
}

.savings-info {
    background: #f0f9ff;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border-left: 4px solid #0ea5e9;
}

.savings-info h5 {
    margin-bottom: 1rem;
    color: #0c4a6e;
}

.savings-tips {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tip-icon {
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.tip-content strong {
    color: #0c4a6e;
    display: block;
    margin-bottom: 0.25rem;
}

.tip-content p {
    color: #475569;
    font-size: 0.9rem;
    margin: 0;
}

.comparison-section {
    background: #fafafa;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.comparison-section h5 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.comparison-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.comparison-item.current {
    border-color: #10b981;
    background: #f0fdf4;
}

.comparison-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: #10b981;
}

.comparison-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.disclaimer {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #fef2f2;
    border: 1px solid #f87171;
    border-radius: 8px;
}

.disclaimer-header {
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.disclaimer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.disclaimer-list li {
    color: #7f1d1d;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
}

.disclaimer-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #dc2626;
}

.ad-result-related {
    margin-top: 2rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}


.ad-result-related .adsbygoogle {
    display: inline-block;
    margin: 0 auto;
}

.ad-faq-native {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fbfbfb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ad-faq-native .adsbygoogle {
    max-width: 100%;
    margin: 0 auto;
}

/* Info Section */
.info-section {
    padding: 80px 0;
    background: white;
}

.info-section h3 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: #1f2937;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.info-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background: #f9fafb;
}

.faq-section h3 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: #1f2937;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    color: #6b7280;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h5 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #4f46e5;
}

.footer-section h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #4f46e5;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        min-height: auto;
    }
    
    .calculator-container {
        order: 1;
    }
    
    .result-wrapper {
        order: 2;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .calculator-form,
    .result-container {
        padding: 1.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .calculator-section,
    .info-section,
    .faq-section {
        padding: 60px 0;
    }
    
    .calculator-section h3,
    .info-section h3,
    .faq-section h3 {
        font-size: 2rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth transitions */
.smooth-transition {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
button:focus,
select:focus,
a:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Loading state */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* AdSense Integration Styles */
.ad-container {
    margin: 1rem 0;
    text-align: center;
    padding: 0.5rem;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    position: relative;
}

.ad-leaderboard-top {
    max-width: 728px;
    height: 90px;
    margin: 1rem auto;
    background: #fafafa;
}

.ad-sidebar {
    width: 300px;
    margin: 0;
    background: #fafafa;
}

.ad-sidebar:first-child {
    height: 250px;
}

.ad-sidebar:last-child {
    height: 600px;
}

.ad-content-banner {
    max-width: 728px;
    height: 90px;
    margin: 2rem auto;
    background: #fafafa;
}

.ad-container::before {
    content: "Advertisement";
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
}

.ad-mid {
    margin: 2rem 0;
    position: relative;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.ad-mid.show {
    opacity: 1;
}

.ad-bottom {
    margin-top: 3rem;
    position: relative;
}

.ad-content {
    margin: 2rem auto 3rem auto;
    position: relative;
    max-width: 728px;
}

.adsbygoogle {
    min-width: 250px;
    min-height: 250px;
}

/* Responsive Ad Adjustments */
@media (max-width: 1440px) {
    .ad-sidebar-left,
    .ad-sidebar-right {
        display: none; /* Hide floating ads when not enough space for 300px ads */
    }
}

@media (max-width: 768px) {
    .calculator-wrapper {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .calculator-content {
        gap: 1.5rem;
    }
    
    .ad-result-banner {
        max-width: 320px;
        height: 50px; /* Mobile banner size */
    }
    
    .ad-container {
        margin: 1rem 0;
        padding: 0.25rem;
    }
    
    .ad-sidebar-left,
    .ad-sidebar-right {
        display: none; /* Hide floating ads on mobile */
    }
}

@media (max-width: 480px) {
    .ad-container {
        margin: 1rem 0;
        padding: 0.5rem;
    }
}

/* Content Quality Improvements */
.content-section {
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.content-section h4 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 600;
}

.content-section p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #4b5563;
}

.highlight-box {
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.highlight-box h5 {
    color: #0c4a6e;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.insurance-companies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.company-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.company-item h5 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #4f46e5;
    padding-bottom: 0.5rem;
}

.company-item p {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #4f46e5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4338ca;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .cta-button,
    .calculate-btn,
    .contact-btn {
        display: none;
    }
    
    body {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .hero {
        background: none;
        color: black;
    }
}