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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.nav-logo i {
    margin-right: 10px;
    font-size: 28px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
}

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

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #4b5563;
    transition: 0.3s;
}

/* Calculator Top Section */
.calculator-top {
    padding-top: 100px;
}

.calculator-top .section-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
}

.calculator-top .section-header p {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
    margin-bottom: 40px;
}

/* Calculator Section */
.calculator-section {
    padding: 100px 0;
    background: #f8fafc;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

.calculator-panel {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.calc-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

.unit-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
}

.unit-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.unit-btn.active {
    background: #2563eb;
    color: white;
}

.shape-selector {
    margin-bottom: 30px;
}

.shape-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: #374151;
}

.shape-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.shape-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.shape-option:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
}

.shape-option.active {
    border-color: #2563eb;
    background: #eff6ff;
}

.shape-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    background: #64748b;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.shape-option.active .shape-icon {
    background: #2563eb;
}

.rectangular-icon {
    clip-path: polygon(0 0, 100% 0, 100% 70%, 0 70%);
}

.circular-icon {
    border-radius: 50%;
}

.oval-icon {
    border-radius: 50%;
    width: 50px;
    height: 30px;
}

.kidney-icon {
    border-radius: 50% 50% 50% 0;
}

.l-shaped-icon {
    clip-path: polygon(0 0, 60% 0, 60% 40%, 100% 40%, 100% 100%, 0 100%);
}

.free-form-icon {
    clip-path: polygon(0 30%, 30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%);
}

.shape-option span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4b5563;
}

.shape-option.active span {
    color: #2563eb;
}

.dimension-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.dimension-inputs.hidden {
    display: none;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
}

.input-group input {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.cost-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.cost-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #374151;
}

.results-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-space {
    background: #f8fafc;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ad-placeholder i {
    font-size: 2rem;
}

.results-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.results-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1e293b;
}

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

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

.result-label {
    font-weight: 500;
    color: #4b5563;
}

.result-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
}

/* How It Works Section */
.how-it-works {
    padding: 100px 0;
    background: white;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.process-step {
    text-align: center;
    padding: 30px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.process-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.step-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1e293b;
}

.step-content p {
    color: #64748b;
    line-height: 1.6;
}

/* Formulas Section */
.formulas-section {
    padding: 100px 0;
    background: #f8fafc;
}

.formulas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.formula-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.formula-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1e293b;
}

.formula {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: #2563eb;
    margin-bottom: 20px;
    border: 2px solid #e0e7ff;
}

.formula-explanation p {
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
}

.formula-explanation ul {
    list-style: none;
    padding-left: 0;
}

.formula-explanation li {
    padding: 5px 0;
    color: #64748b;
    position: relative;
    padding-left: 20px;
}

.formula-explanation li::before {
    content: '•';
    color: #2563eb;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Saltwater Guide Section */
.saltwater-guide {
    padding: 100px 0;
    background: white;
}

.guide-content {
    margin-top: 60px;
}

.guide-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 80px;
}

.guide-article.reverse {
    direction: rtl;
}

.guide-article.reverse > * {
    direction: ltr;
}

.guide-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.guide-text h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1e293b;
}

.guide-text p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 20px;
}

.guide-text ul {
    list-style: none;
    padding-left: 0;
}

.guide-text li {
    padding: 8px 0;
    color: #64748b;
    position: relative;
    padding-left: 25px;
}

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

.ad-space-full {
    margin: 60px 0;
    background: #f8fafc;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

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

.faq-grid {
    margin-top: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

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

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.faq-question i {
    color: #2563eb;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

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

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

.faq-answer p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Tools Section */
.tools-section {
    padding: 100px 0;
    background: white;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.tool-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.tool-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
}

.tool-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1e293b;
}

.tool-card p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 25px;
}

.tool-button {
    padding: 12px 24px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #f1f5f9;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
}

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

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #3b82f6;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .results-panel {
        order: -1;
    }
    
    .guide-article {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .guide-article.reverse {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: start;
        padding: 50px 0;
        transition: left 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .shape-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dimension-inputs {
        grid-template-columns: 1fr;
    }
    
    .process-grid {
        grid-template-columns: 1fr;
    }
    
    .formulas-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-panel,
    .results-panel {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .shape-grid {
        grid-template-columns: 1fr;
    }
    
    .calc-header {
        flex-direction: column;
        gap: 20px;
        align-items: start;
    }
    
    .calculator-panel,
    .results-panel {
        padding: 15px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

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

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Utilities */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}
