/* PHP 8.5 Release Page - Mobile-First CSS */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e1e5e9;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-logo {
    text-decoration: none;
    color: #777bb4;
    font-weight: bold;
    font-size: 2rem;
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

.hamburger-line {
    width: 1.5rem;
    height: 2px;
    background: #777bb4;
    transition: all 0.2s ease;
    transform-origin: center;
}

.nav-toggle-open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle-open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle-open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link:focus {
    color: #777bb4;
    outline: 2px solid #777bb4;
    outline-offset: 2px;
}

/* Main */
.main {
    min-height: calc(100vh - 4rem);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

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

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.version-number {
    color: #777bb4;
    display: block;
}

.version-tagline {
    color: #666;
    font-weight: 400;
}

.hero-description {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    color: #666;
    margin: 0 auto 2rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.php-logo-img {
    width: 200px;
    height: auto;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(119, 123, 180, 0.3));
}

@keyframes float {
    0%,100%{transform:translateY(0)}
    50%{transform:translateY(-10px)}
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    min-width: 140px;
}

.btn-primary {
    background: #777bb4;
    color: white;
    border-color: #777bb4;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #5a5f8a;
    border-color: #5a5f8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(119, 123, 180, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #777bb4;
    border-color: #777bb4;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: #777bb4;
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Sections */
.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

/* Features */
.highlights {
    padding: 4rem 0;
    background: #fff;
}

.highlights-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.feature-showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
    align-items: center;
}

.feature-code {
    background: #1e1e1e;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.code-header {
    background: #2d2d30;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #3e3e42;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-header::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 18px 0 0 #ffbd2e, 36px 0 0 #27c93f;
    margin-right: 3rem;
    flex-shrink: 0;
}

.code-filename {
    color: #ccc;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.875rem;
}

.code-block {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #d4d4d4;
}

.code-block code {
    display: block;
    white-space: pre;
}

.code-comment{color:#6a9955}
.code-keyword{color:#c586c0}
.code-function{color:#dcdcaa}
.code-variable{color:#9cdcfe}
.code-string{color:#ce9178}
.code-number{color:#b5cea8}

.feature-description {
    padding: 1rem 0;
}

.feature-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.feature-text {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.feature-link {
    color: #777bb4;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.feature-link:hover,
.feature-link:focus {
    color: #5a5f8a;
    transform: translateX(4px);
    outline: 2px solid #777bb4;
    outline-offset: 4px;
}

.more-features {
    background: #f8f9fa;
    padding: 3rem 2rem;
    border-radius: 1rem;
    margin-top: 2rem;
    text-align: center;
}

.more-features-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.features-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: left;
}

.features-list li {
    padding: 0.75rem 0;
    color: #666;
    font-size: 1.05rem;
    line-height: 1.6;
    border-bottom: 1px solid #e9ecef;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Download */
.download {
    padding: 4rem 0;
    background: linear-gradient(135deg, #777bb4 0%, #5a5f8a 100%);
    color: white;
}

.download-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.download-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.download-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.download-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.download-features {
    list-style: none;
    margin-bottom: 2rem;
}

.download-features li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
}

.download-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: bold;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.download .btn-primary {
    background: white;
    color: #777bb4;
    border-color: white;
}

.download .btn-primary:hover,
.download .btn-primary:focus {
    background: #f8f9fa;
    color: #5a5f8a;
}

.download .btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.download .btn-secondary:hover,
.download .btn-secondary:focus {
    background: white;
    color: #777bb4;
}

/* Migration */
.migration {
    padding: 4rem 0;
    background: #f8f9fa;
}

.migration-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.migration-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.migration-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.migration-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.migration-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link {
    color: #777bb4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.link:hover,
.link:focus {
    color: #5a5f8a;
    outline: 2px solid #777bb4;
    outline-offset: 2px;
}

.migration-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.migration-icon{font-size:4rem;opacity:.7}

/* Community */
.community {
    padding: 4rem 0;
    background: #fff;
}

.community-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.community-description {
    font-size: 1.1rem;
    color: #666;
    margin: 0 auto 2rem;
    max-width: 600px;
}

.community-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.community-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 200px;
    justify-content: center;
}

.community-link:hover,
.community-link:focus {
    background: #777bb4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(119, 123, 180, 0.3);
}

.community-icon {
    font-size: 1.2rem;
}

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

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #777bb4;
}

.footer-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-description {
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

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

.footer-link {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover,
.footer-link:focus {
    color: #777bb4;
    outline: 2px solid #777bb4;
    outline-offset: 2px;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
}

.footer-copyright {
    color: #95a5a6;
    font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e1e5e9;
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.nav-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid #f0f0f0;
        text-align: center;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .rocket-icon {
        width: 1.2rem;
        height: 1.2rem;
    }
    
    .php-logo-img {
        width: 140px;
        height: auto;
    }
}

/* Tablet */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }
    
    .nav-links {
        gap: 2rem;
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        flex-direction: row;
        background: none;
        border: none;
        box-shadow: none;
        padding: 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .hero-actions {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .feature-showcase {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .feature-showcase.feature-reverse .feature-code {
        order: 2;
    }
    
    .feature-showcase.feature-reverse .feature-description {
        order: 1;
    }
    
    .download-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .migration-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .community-links {
        flex-direction: row;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .nav-container {
        padding: 0 2rem;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero-container {
        padding: 0 2rem;
    }
    
    .highlights-container,
    .download-container,
    .migration-container,
    .community-container {
        padding: 0 2rem;
    }
    
    .feature-showcase {
        gap: 4rem;
    }
    
    .feature-code {
        max-width: 600px;
    }
    
    .migration-links {
        flex-direction: row;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: #777bb4;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(119, 123, 180, 0.3);
}

.scroll-to-top:hover,
.scroll-to-top:focus {
    background: #5a5f8a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(119, 123, 180, 0.4);
}

.scroll-to-top.scroll-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rocket-icon {
    width: 1.5rem;
    height: 1.5rem;
    transition: transform 0.2s ease;
}

.scroll-to-top:hover .rocket-icon {
    transform: translateY(-2px);
}

/* Focus */
*:focus {
    outline: 2px solid #777bb4;
    outline-offset: 2px;
}

/* Print */
@media print {
    .header,
    .footer {
        display: none;
    }
    
    .hero {
        background: none;
        padding: 1rem 0;
    }
    
    .btn {
        border: 1px solid #333;
        background: none;
        color: #333;
    }
}
